[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: sum function

Subject: Re: sum function
From: "Alex Albu" <xsl@xxxxxxxxxxxxxxx>
Date: Tue, 24 Oct 2000 16:22:38 -0400 (EST)
albu alex
Try 
sum(//cashflow/amount[../when='now'])


Alex


----- Original Message ----- 
From: "Ralf Schiemann" <rschiemann@xxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Tuesday, October 24, 2000 12:59 PM
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 file://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


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.