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