[Bug 3173] [F+O, DM] A difficulty with document-uri()

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


mike@saxonica.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #9 from mike@saxonica.com  2006-08-25 17:21 -------
The WGs today discussed the proposal at

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

(member-only) and agreed to accept it with one minor change. The proposal as
amended is:

(A) add to the definition of "Available documents" in XP/XQ 2.1.2:

"If there are one or more URIs in Available Documents that map to a document
node D, then the document-uri property of D must either be absent, or must
be one of these URIs.

Note: 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."

(B) add to the definition of "Available collections":

"For every document node D that is present in one or more Available
Collections, or that is the root of a tree containing a node that is so
present, the document-uri property of D must either be absent, or must be a
URI U such that Available Documents contains a mapping from U to D."

Note: this means that for any document node $N retrieved using the
fn:collection function, either directly or by navigating to the root of a
node that was returned, 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
implies a requirement for the fn:doc and fn:collection functions to be
consistent in their effect. If the implementation uses catalogs or
user-supplied URI resolvers to dereference URIs supplied to the fn:doc
function, the implementation of the fn:collection function must take these
mechanisms into account. For example, an implementation might achieve this
by mapping the collection URI to a set of document URIs, which are then
resolved using the same catalog or URI resolver that the fn:doc function
uses."

(C) change the text in F+O section from:

"If fn:document-uri($arg) does not return the empty sequence, then the
following expression always holds: fn:doc(fn:document-uri($arg)) is $arg"

to:

"In the case of a document node $D returned by the fn:doc function, or a
document node at the root of a tree containing a node returned by the
fn:collection function, it will always be true that 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."

Received on Friday, 25 August 2006 17:22:03 UTC