This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Sum function
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Sum function
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 9 Mar 2001 10:38:33 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Not that easy; you could follow the example on page 502 of XSLT Programmer's
Reference.
Or with saxon, use
saxon:sum(storvol, saxon:expression("noofbocks * blocksize"))
Mike Kay
Software AG
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Purnima
> Shankaran
> Sent: 08 March 2001 17:58
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] Sum function
>
>
> Hi,
>
> I have an xml like this
>
> <storsys>
> <storvol>
> <noofblocks>2</noofblocks>
> <blocksize>3</blocksize>
> </storval>
> <storvol>
> <noofblocks>4</noofblocks>
> <blocksize>5</blocksize>
> </storval>
> </storsys>
>
> I want to display the total as sum of ( noofblocks *
> blocksize) for all
> <storval> tags present.
>
> Thanks for the help.
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list