Subject: [xsl] XPAth 2.0/General Comparisons From: "Raphael Parree" <rparree@xxxxxxxxx> Date: Fri, 4 May 2007 17:35:59 +0200 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT: Taking Value of One, Rex Rex | Thread | Re: [xsl] XPAth 2.0/General Compari, David Carlisle |
Re: [xsl] 2 columns with special co, Sven Waibel | Date | Re: [xsl] XPAth 2.0/General Compari, David Carlisle |
Month |