[Bug 3092] value comparisons: example inconsistent to semantics

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3092

           Summary: value comparisons: example inconsistent to semantics
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: jens.teubner@in.tum.de
         QAContact: public-qt-comments@w3.org


According to Section 3.5.1 of the XQuery 1.0 Candidate Recommendation, an
operand of one of the value comparison operators ('eq', 'gt', ...) is to be
cast to xs:string before the comparison if its type is xs:untypedAtomic. ("If
the atomized operand is of type xdt:untypedAtomic, it is cast to xs:string.")

In the sequel, the specs list the example

  //product[weight gt 100] ,

which will not succeed for a non-validated document.

This example is either simply wrong, or it misses a statement on the assumption
of a *validated* document, with 'weight' of numeric type.

Received on Friday, 7 April 2006 13:33:40 UTC