|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: string(9) = string(09) ... true or false?
Hi Roger,
At 02:52 PM 3/12/2004, you wrote: I ran this test with SAXON 7_8 Mike or Jeni or someone will speak up if there's an XPath 2.0 angle to this (I apologize if that's what you're meaning to ask about) ... but in XPath 1.0, the two expressions are equal, since a number is cast to a string by the rule if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative [XPath 4.2] So string(9) is "9", string(09) is "9"; as strings these are equal. Now "string('9') = string('09')" is false, just as "'9' = '09'" is false (the strings are not the same). I hope this helps, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








