OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Why is xml:base a URI *reference*?

[ Lists Home | Date Index | Thread Index ]

> > 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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS