|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Continuously add to a parameter at each call
To elaborate on my problem, For each of the Top Level Tasks - I have to search through each Assignment - obtain the task that is related to the assignment - check if the task obtained falls under the top-level task - and if it does then get the cost. For example, I have 3 Top-Level tasks: "Hardware", "Software", "Analysis" and these Top level tasks have low-level tasks under them. My objective is to obtain a total for each of these Top-Level Tasks. The way I do this is to go through each Top-Level Task and at the same time go through each "Assignments", get the low-level tasks that correspond to the Assignment, then check if that task is related to the Top-Level and get the cost. I can get all the tasks under a particular Top-Level task, but once I get it - I am not too sure how to get the cost and have a running total at the same time. I really appreciate your quick response Michael -----Original Message----- From: Haarman, Michael [mailto:mhaarman@xxxxxxxxx] Sent: Wednesday, November 09, 2005 2:37 PM To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: RE: Continuously add to a parameter at each call > -----Original Message----- > From: Emil Soosaithasan 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. Why not use the sum() function? The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number. Then, <xsl:value-of select="sum(/XPath/to/nodes[answeringToSomeCondition])"/> with possibly a translate() inserted to remove symbols (euro, dollar, etc.) HTH,
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








