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

XPAth 2.0/General Comparisons

Subject: XPAth 2.0/General Comparisons
From: "Raphael Parree" <rparree@xxxxxxxxx>
Date: Fri, 4 May 2007 17:35:59 +0200
 XPAth 2.0/General Comparisons
Hi,

I am trying to better grasp the concept of General Comparisons in XPath 2.0.
The rules listed in 3.5.2 of the recommendation
(http://www.w3.org/TR/xpath20/#id-general-comparisons) would suggest that
the following expression should work;


true() = 10
Should work right? step 1 of section 3.5.2:
"If either operand is a single atomic value that is an instance of
xs:boolean, then the other operand is converted to xs:boolean by taking its
effective boolean value."

The effective boolean value of 10 is true (I get an error cannot compare
xs:Boolean to xs:integer)

10 < '10.2' 
Should work (?) due to step 3 of section 3.5.2:
"If the comparison operator is <, <=, >, or >=, then each item in both of
the operand sequences is converted to the type xs:double by applying the
fn:number function. (Note that fn:number returns the value NaN if its
operand cannot be converted to a number.)"

And number('10.2') is correct, however I get an error Cannot compare
xs:integer to xs:string


I am testing with oXygen 7.2 and have it set to XPath 2.0

What am I missing?

Tx.,

Raphael

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.