|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: sum function
One solution <xsl:value-of select="sum(//amount[../when = 'now'])" /> Don >-----Original Message----- >From: Ralf Schiemann [mailto:rschiemann@xxxxxxxxxxxxx] >Sent: Tuesday, October 24, 2000 12:59 PM >To: xsl-list@xxxxxxxxxxxxxxxx >Subject: sum function > > >Hi all, > >I hope my problem was not posted 1000 times before... > >I have a XML file like this: > ><cashflow> > <amount>10000</amount> > <when>now</when> ></cashflow> ><cashflow> > <amount>20000</amount> > <when>Jan2001</when> ></cashflow> ><cashflow> > <amount>30000</amount> > <when>now</when> ></cashflow> ><cashflow> > <amount>10000</amount> > <when>Feb2001</when> ></cashflow> > >I need to sum all <amount> fields where //cashflow/when='now'. > >Can anybody give me a hint on this? > >Thanks in advance >Ralf > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








