|
Subject: [xsl] Continuously add to a parameter at each call From: "Emil Soosaithasan" <emils@xxxxxxxxxxxxxxxx> Date: Wed, 9 Nov 2005 14:01:23 -0500 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] [ANNOUNCE] XQuery FLWOR Tutor, Stylus Studio | Thread | RE: [xsl] Continuously add to a par, Haarman, Michael |
| [xsl] [ANNOUNCE] XQuery FLWOR Tutor, Stylus Studio | Date | RE: [xsl] Continuously add to a par, Haarman, Michael |
| Month |