[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Use document() function to get a reference to the

Subject: RE: Use document() function to get a reference to the input doc
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 18 Jul 2006 06:38:15 +0100
RE:  Use document() function to get a reference to the
> If you're interested in the subtleties you might like to follow the
> discussion at
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=3173 
> which is not yet resolved, but which I think is heading in 
> the direction of
> relaxing the requirement that
> doc(document-uri(D)) is D

As another little twist on this, 

document("", /) 

fetches a document using the base URI of the document node / (not its
document URI). XML Base says "The base URI of a document entity or an
external entity is determined by RFC 2396 rules, namely, that the base URI
is the URI used to retrieve the document entity or external entity." For the
document() function, in a JAXP context, it's unclear whether the base URI of
the returned node should be the (absolutized) URI that was passed to the
URIResolver, or the SystemId of the Source object that was returned by the
URIResolver. RFC 2396 says:

   "Note that if the retrieval was the
   result of a redirected request, the last URI used (i.e., that which
   resulted in the actual retrieval of the document) is the base URI."

and one could interpret this as meaning the SystemId of the returned Source
should be used; on this interpretation there is no guarantee that if this
URI is passed back to the document() function, the same document will be

To emphasize that this is a practical issue and not just theoretical,
consider what happens when an OASIS catalog resolver is used to redirect the
actual URI used by the application to a local URI held in a catalog. Which
of the two URIs should be used (a) as the base-uri, and (b) as the

Michael Kay

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.