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 3086 - fn:boolean and ordering mode unordered
Summary: fn:boolean and ordering mode unordered
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-05 12:58 UTC by Jens Teubner
Modified: 2006-04-21 23:27 UTC (History)
0 users

See Also:


Attachments

Description Jens Teubner 2006-04-05 12:58:53 UTC
The XQuery Candidate Recommendation states (Sect. 2.4.3):

"The effective boolean value of a sequence that contains at least one node and at least one atomic value is nondeterministic in regions of a query where 'ordering mode' is unordered."

Most probably, this statement is based on the semantics of fn:boolean() to only look into the *first* item of a heterogeneous sequence. However, my understanding is that, even in a context where 'ordering mode' is unordered, the order among items in a sequence (sequence order) is still well-defined. The expression

  (<a/>, 42)

for example, will have the node as its first result item and an integer as its second, regardless of the setting of 'ordering mode'. The above quote, IMHO, is not compatible with the semantics of 'ordering mode'.

'Ordering mode' does affect sequence order at other occasions, e.g., when the result sequence is formed from an XPath location step. Once the order of a sequence is fixed, however, it is unaffected by 'ordering mode'.
Comment 1 Don Chamberlin 2006-04-21 23:27:41 UTC
Jens,
Thank you for your comment. The Query Working Group considered your comment on April 3, 2006 and agreed to change "is nondeterministic" to "may be nondeterministic" in the second Note in XQuery Section 2.4.3. We believe the conditions under which EBV is nondeterministic are adequately specified in the section on Ordered and Unordered Expressions. Since this is a minor change to a non-normative Note, I have marked this Bugzilla entry as Fixed and Closed. If you have any objections to this resolution, you may re-open this Bugzilla entry.
Regards,
Don Chamberlin (for the Query Working Group)