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

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





------- Comment #4 from holstege@mathling.com  2006-05-10 18:08 -------

Your analysis certainly points out that for a particular class of
implementations, those which perform real-time uncached external resolution of
URIs with no stability guarantees, some work is necessary to ensure that the
existing consistency constraints are met. True.  And confusing things can
happen if you don't have a fn:doc stability. Yes, also true. 

What is less clear to me is whether additional consistency constraints are
required in the spec. 

Your change (a) in comment 3 looks to me like a resurrection of stability 
for fn:doc, because the only testable implication of this requirement is
precisely that fn:doc($U) is fn:doc($U). While personally I thought relaxation
of the stability requirement on fn:doc was a mistake, this just sneaks it in 
through the back door. Proposal (b) is just a restatement of the existing
consistency constraint between fn:doc and fn:document-uri, and not one I find
clearer. I'm not sure how I would define "a document D used in a query or
transformation".  I am sure how to define fn:doc(fn:document-uri($A)) is $A
where fn:document-uri($A) is not empty.

I suppose one take on this is, well, given we have permitted implementations to 
provide unstable fn:doc, then we should allow them to provide unstable
fn:document-uri as well. And fn:document-available, I reckon. So, for unstable
implementations, no promises that fn:doc(fn:document-uri($A)) is $A and no
promises that fn:document-available($U) is consistent with fn:doc($U). I think
that is a logical conclusion of fn:doc instability.  

In looking at the original source of all of this -- some tests in the testsuite
-- my conclusion it that the testsuite is making some unstated assumptions
about document URIs, and that ought to be fixed: it is assuming that the file
names given to input documents should bear some relation to the document URIs
used by the driver/implementation in constructing data model instances.
Proposal: testsuite instructions to make this clearer. 

Received on Wednesday, 10 May 2006 18:08:27 UTC