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

RE: making calculations in XSL

Subject: RE: making calculations in XSL
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 31 May 2000 17:19:40 +0100
xsl inside calculations
> <?xml version="1.0">
> <startmeup>
> <number>1</number>
> <number>2</number>
> <number>...</number>
> </startmeup>
> 
> <xsl:template match="startmeup">
>    Total is: <xsl:value-of select="sum(//number)"/>
> </xsl:template>
> 
> 
> *crying* it just keeps on giving me 0 :(

1. Which XSLT processor are you using? At this stage it's usually worth
trying it on more than one.
2. Does your XML document really have a "..." in? If any of the <number>
elements is not a number, the result of the sum() function should be NaN,
not zero.

Mike Kay


 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.