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 29791 - [XP31] Non-deterministic with respect to ordering
Summary: [XP31] Non-deterministic with respect to ordering
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 editorial
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-24 09:58 UTC by Abel Braaksma
Modified: 2016-12-16 19:55 UTC (History)
1 user (show)

See Also:


Attachments

Description Abel Braaksma 2016-08-24 09:58:10 UTC
(This bug is probably only editorial)

Under 1.7.4 Properties of functions, we state:

<quote>
All functions defined in this specification are ·deterministic· unless otherwise stated. Exceptions include the following:

* Some functions (such as fn:distinct-values and fn:unordered) produce results in an ·implementation-defined· or ·implementation-dependent· order. In such cases there is no guarantee that the order of results from different calls will be the same. These functions are said to be non-deterministic with respect to ordering.
<quote>

I find a few issues with this:

1) neither fn:distinct-values nor fn:unordered have a mention in the body of their resp. entries that they are non-deterministic with respect to ordering

2) the functions map:keys and map:for-each have a mention in the body of their entries, but the line explaining the effect is slightly different with the definition above: "two calls with the same argument are not guaranteed to produce the results in the same order." versus "no guarantee that the order of results from different calls will be the same.".

I propose the to bring the sentence in 1.7.4 in line with this, i.e., make it "no guarantee that the order of results from different calls with the same arguments will be the same."

3) none of fn:distinct-values, fn:unordered, map:for-each and map:keys are marked "non-deterministic" under their resp. properties. I think they should be.

----
I'm not 100% sure that these four functions is an exhaustive list of the non-deterministic wrt ordering functions. For instance, should fn:in-scope-prefixes be in here?
Comment 1 Michael Kay 2016-09-06 22:04:51 UTC
I have implemented the editorial suggestions here.