This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: sum function
- To: <xsl-list at mulberrytech dot com>
- Subject: Re: sum function
- From: "Alex Albu" <xsl at mailandnews dot com>
- Date: Tue, 24 Oct 2000 16:22:38 -0400 (EST)
- References: <14837.49108.574000.929427@menteith.com>
- Reply-To: xsl-list at mulberrytech dot com
Try
sum(//cashflow/amount[../when='now'])
Alex
----- Original Message -----
From: "Ralf Schiemann" <rschiemann@ip-online.net>
To: <xsl-list@mulberrytech.com>
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