[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Continuously add to a parameter at each call

Subject: Continuously add to a parameter at each call
From: "Emil Soosaithasan" <emils@xxxxxxxxxxxxxxxx>
Date: Wed, 9 Nov 2005 14:01:23 -0500
 Continuously add to a parameter at each call
I am using xsl to manipulate data contained in a MS Project file and my
issue is with adding the total cost of certain tasks.  Currently I am
checking through all tasks to meet a certain condition and when there is
a match I want to obtain the cost of the task and set that value to a
parameter.  My desired end result should calculate the total cost of all
tasks that satisfy the condition.  Based on the code below, I calculate
the cost of a task if the first two "if" statements are satisfied.  I
want to have a parameter that I can update everytime I get the cost of a
task and keep a running total of the overall cost.

Can someone tell me what the code should be inside the template
"TotalCost" to keep a running total of the cost???

<xsl:if test="$task_uid = $temp_task_id"> <!-- Compare ID related to
Assignment -->

	<xsl:if test="$task_wbs = $temp_task_wbs">      <!-- Seperate
low-level tasks according to top-level -->

		<xsl:variable name="Cost"
select="*[local-name()='Cost']" />

            <xsl:call-template name="TotalCost">
 	           <xsl:with-param name="Tot_Cost" select="$Cost"/>
            </xsl:call-template>



I've been trying this for two days and cannot get a good result, so any
help is very much appreciated

Thankyou
Emil S.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.