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 3781 - [XQuery] The list of functions affected by "unordered" (section 3.9) is possibly incorrect.
Summary: [XQuery] The list of functions affected by "unordered" (section 3.9) is possi...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 minor
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-10-01 21:13 UTC by Hans-Juergen Rennau
Modified: 2006-10-11 21:39 UTC (History)
0 users

See Also:


Attachments

Description Hans-Juergen Rennau 2006-10-01 21:13:30 UTC
In section 3.9, note #1, functions are listed which may return nondeterministic results in a region of the query where ordering mode is "unordered". The list includes the function fn:last. As this function returns the context size, I should expect it to be independent of the ordering mode. So I doubt whether it is correct to include it in the list.
Comment 1 Michael Kay 2006-10-01 23:03:28 UTC
Actually, the whole note is a bit sloppy. I think what it's trying to say is that in unordered mode, it's indeterminate which element will be returned by an expression such as (//a)[last()]. You have to read the caveat for all these functions in the same way: the behaviour of the function itself is determinate, but if it is used in an expression along with operands that evaluate sequences in unordered mode, the overall result is unpredictable and meaningless.

Michael Kay
(personal response)
Comment 2 Don Chamberlin 2006-10-11 21:39:19 UTC
Hans-Juergen,
Thanks for this comment. You are correct. I have rewritten the Note in Section 3.9 to clarify that it is the query rather than the function that is nondeterministic. Since this bug report is classified as editorial and I have made the corrections, I have changed its status to Closed. The corrections will appear in the next published version of the XQuery specification.
Regards,
Don Chamberlin (for the Query Working Group)