[Bug 17312] [QT3] alternate result for K-DocumentURIFunc-2a

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17312

--- Comment #4 from Andrew Eisenberg <andrew.eisenberg@us.ibm.com> 2012-09-28 15:09:35 UTC ---
The part of section 1.6.4, Properties of functions, that you cite is troubling:

"Such functions (as fn:doc and fn:collection) are guaranteed to be
·deterministic· with the exception that an implementation is allowed to make
them non-deterministic as a user option."

We haven't defined user options in our process model. We haven't defined the
scope of this user option. Perhaps this user option should be added to the
static context. With the use of this option, our "guarantee" is negated. Not
much of a guarantee.


My proposal certainly needs to be modified. The first sentence describes
behavior for both fn:doc and fn:collection. I suggest that these two cases
should be separated. Add the following sentence to Rules:

"In the case of a document node $D returned by the fn:doc function, when fn:doc
is deterministic the following expression is true: fn:doc(fn:document-uri($D))
is $D."

Change the Note to read:

"In the case of a document node $D at the root of a tree containing a node
returned by the fn:collection function, when fn:doc is deterministic either
fn:document-uri($D) returns the empty sequence, or that the following
expression is true: fn:doc(fn:document-uri($D)) is $D. It is
·implementation-defined· whether this guarantee also holds for document nodes
obtained by other means, for example a document node passed as the initial
context node of a query or transformation."


XQuery 3.0, in section 2.1.2, Dynamic Context, says in a note in the definition
of Available documents:

"This means that given a document node $N, the result of
fn:doc(fn:document-uri($N)) is $N will always be true, unless
fn:document-uri($N) is an empty sequence."

This should be changed to:

"This means that given a document node $N, the result of
fn:doc(fn:document-uri($N)) is $N will be true when fn:doc is deterministic,
unless fn:document-uri($N) is an empty sequence."

Another note in the definition of Available node collections will need to be
modified in a similar way.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 28 September 2012 15:09:37 UTC