[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|