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

RE: Why is xml:base a URI *reference*?


xml base uri
> > RFC 2396 is a remarkable document.  Holy writ and hellish mess all 
> > wrapped into one package.  Separating the two is difficult, both in 
> > theory and in practice.
> 
> You might want to check out the rewrite-in-progress at 
> http://www.apache.org/~fielding/uri/rev-2002/rfc2396bis.html 
> which most 
> people seem to think is a substantial step forward. -Tim

It's certainly an improvement. Looking specifically at the question of
zero-length relative URIs, it's now clear that they are syntactically
valid, and the description in 4.4 of how they work is far clearer.
There's still an ambiguity about exactly what it means by a "document"
(in the case of XML, is this an XML document or an XML entity?), but
that's minor compared with the mess that was there before.

In making it clearer, it has also become clearer that it's potentially a
problem. In XPath, the static context for evaluating an expression
includes a concept of base URI, but it does not include a separate
concept of "containing document". A relative URI passed to an XPath
function such as doc() is defined to operate relative to the base URI.
If we wanted to apply the rule in 4.4, we would need to introduce a
separate concept of "containing document" into the static context for an
XPath expression, and say that some relative URIs are interpreted
relative to the base URI and others to the containing document. I'm not
sure that would add any user benefits. Alternatively, we can wriggle out
of this by saying that once the relative URI has been passed to the
doc() function it is no longer contained in a document and therefore 4.4
does not apply.

Michael Kay


PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.