[Bug 2553] [F+O] Stability of collection()

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2553





------- Additional Comments From mike@saxonica.com  2006-01-10 19:27 -------
At the joint meeting on 10 Jan the change was accepted in principle and I was
actioned to supply detailed text. Here is the proposal:

1. In the XQuery book, section 2.4.4, delete the paragraph

"If one of the above functions is invoked repeatedly with arguments that resolve
to the same absolute URI during the processing of a single query, each
invocation must return the same node sequence. This rule applies also to
repeated invocations of fn:collection with zero arguments during the processing
of a single query."

(This information is currently redundant)

2. In F+O, 1.7, under the definition of the term "stable", add a note after the
first paragraph: "Note: in the case of fn:collection() and fn:doc(), the
requirement for stability may be relaxed: see the function definitions for details"

3. In F+O 15.5.6 fn:collection, delete the sentence "This function is ·stable·.
" and replace it with the following paragraph:

By default, this function is stable. This means that repeated calls on the
function specifying the same URI will return the same result each time. However,
for performance reasons, implementations may provide a user option to evaluate
the function without a guarantee of stability. The manner in which any such
option is provided is implementation-defined. If the user has not selected such
an option, a call of the function must either return a stable result or must
raise an error.

4. In F+O 15.5.4, fn:doc, change "This function is stable" to "By default, this
function is stable". After the example explaining what this means, add the
paragraph:

However, for performance reasons, implementations may provide a user option to
evaluate the function without a guarantee of stability. The manner in which any
such option is provided is implementation-defined. If the user has not selected
such an option, a call of the function must either return a stable result or
must raise an error.

At the end of this section, add a fifth bullet:

* Implementations may provide user options that relax the requirement for the
function to return stable results.

5. In F+O 15.5.5, fn:doc-available, add a final sentence: "However, if
non-stable processing has been selected for the fn:doc function, this guarantee
is lost."

6. In XSLT 5.4.3 (Initializing the Dynamic Context) add after the second paragraph:

As specified in [F+O], implementations may provide user options that relax the
requirement for the doc and collection functions (and therefore, by implication,
the document function) to return stable results. By default, however, the
functions must be stable. The manner in which such user options are provided, if
at all, is implementation-defined.

Received on Tuesday, 10 January 2006 19:27:25 UTC