|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Why is xml:base a URI *reference*?
> > 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








