This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
Jens, Thank you for your comment. On April 18, 2006, the Query Working Group considered your comment and agreed to insert the following sentence into the example you cited: "This example assumes that weight is a validated element with a numeric type." Since this is a minor clarification to a non-normative example, I have marked this Bugzilla entry as Fixed and Closed. If you have any objections to this resolution, you may re-open the Bugzilla entry. Regards, Don Chamberlin (for the Query Working Group)