This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3092 - value comparisons: example inconsistent to semantics
Summary: value comparisons: example inconsistent to semantics
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-07 13:33 UTC by Jens Teubner
Modified: 2006-04-21 23:37 UTC (History)
0 users

See Also:


Attachments

Description Jens Teubner 2006-04-07 13:33:37 UTC
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.
Comment 1 Don Chamberlin 2006-04-21 23:36:48 UTC
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)