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

RE: Getting max attribute value of an element by attri

Subject: RE: Getting max attribute value of an element by attribute value...
From: David_N_Bertoni@xxxxxxxxx
Date: Wed, 28 Nov 2001 12:57:46 -0500
xpath max attribute value
"Brinkman, Theodore" <Theodore.Brinkman@xxxxxxxxxxxxxxxxxxxx> wrote:
> <xml:call-template name="hitPoints"/> should return:
>          26 = 17 + (+2 * 3) + (1 * 3)
>
> But instead I get:
>          NaN = 17 + (+2 * 3) + (1 * 3)
>
> All of the xsl:call-template calls within hitPoints return the proper
> values.  What am I missing here?
>
>          - Theo

It's hard to tell, since you don't provide your implementation of the
template conMod, but it looks like it's returning the string '+2'.

If that's the case, '+2' cannot be converted to a number, as there is no
unary + operator in XPath. Thus, it's converted to NaN and the result of
any numeric operation with NaN is always NaN.

Dave


 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.