[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

Subject: RE: Continuously add to a parameter at each call
From: "Haarman, Michael" <mhaarman@xxxxxxxxx>
Date: Wed, 9 Nov 2005 13:36:59 -0600
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,

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.