Proposed response to xml:base comment

This refers to 

http://lists.w3.org/Archives/Public/www-xml-linking-comments/2008AprJun/0003.html

> From reading the documentation of xml:base, I am left unclear as to 
> whether xml:base can not only be used on the parent of an element, or 
> whether its presence on any previous ancestor is enough to trigger the 
> resolving of relative URIs. This is especially unclear as I see a 
> previous draft of the document did refer to "the nearest ancestor 
> element" rather than what seems to me to be a more ambiguous 
> "encapsulating entity".

Section 4.3 states that the base URI used for resolving a relative URI
is that of the element containing it.  Section 4.2 states that the
base URI of an element without an xml:base attribute is that of its
parent element.  So base URIs come from the nearest ancestor with
an xml:base attribute.  (There is an exception when entity boundaries
intervene.)

The phrase "encapsulating entity" appears in case 2 of section 4.1,
and is quoted from RFC3986.  The use of xml:base falls into case 1: it
is a URI embedded in the document's content.  So "encapsulating
entity" has nothing to do with the ancestor elements within the
document.

-- Richard

Received on Wednesday, 27 August 2008 13:26:59 UTC