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

Re: variable going out of scope in a for-each loop?

Subject: Re: variable going out of scope in a for-each loop?
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Mon, 10 Dec 2001 12:04:40 +0200
string out of scope
Christopher R. Maden wrote:

No, he didn't. This is a clever little bit of hackery. NaN is not equal to itself. So if the node value is a number, number(.)=number(.) is a tautology, but if the node value *isn't* a number, then NaN=NaN is false.
Well, number() = number() is an analog of more readable expression string(number()) = 'NaN',

so the issue is what is more effective and robust. First expression to be evaluated needs 2 string2numbe

conversions (may be optimized to only 1) and 1 number comparison, while the second one needs 1 string2number conversion, 1 number2string and 1 string comparison, so it seems to me that hack expression is a little more effective.
The only hope is XPath 2, which must support lexical representation of NaN.



-- Oleg Tkachenko Multiconn International, Israel


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.