Re: xml:base

Richard Tobin wrote:
>> I see (responding to your point about it not being related to ancestor 
>> elements). But I was trying to find somewhere where the issue was made 
>> explicit as to how xml:base is not only based on the parent, since there 
>> are these following lines (and basically only these lines on the topic) 
>> which only refer to "parent element" and not clearly to an indefinite 
>> number of levels of inheritance of within the document (and regardless 
>> of whether xml:base was explicitly present on the parent or not, etc.):
>>
>> "The base URI of an element is...the base URI of the element's parent 
>> element within the document or external entity, if one exists..."
>>
>> "The base URI for a URI reference appearing in an |xml:base| attribute 
>> is the base URI of the parent element of the element bearing the 
>> |xml:base| attribute, if one exists within the document entity or 
>> external entity, otherwise the base URI of the document entity or 
>> external entity containing the element."
>>
>> Maybe that is made clear in other referenced specs, but since this seems 
>> to be such a central point of the spec, I would think clarifying that 
>> would be helpful.
>>     
>
> The answer follows from the rules you quote above.  Given
>
> <a xml:base="http://example.com">
>   <b>
>     <c> ...
>
> the base URI of the <c> element is (by 4.2 part 2) the base URI
> of the <b> element.  Similarly, the base URI of the <b> element
> is the base URI of the <a> element.  And by 4.2 part 1, the base
> URI of the <a> element is "http://example.com".
>   

Yes, I am aware that this is the intention, but by specifying "parent" 
(without reference to recursion), it raises the question of whether it 
is constrained to this and whether a base URI must be explicit except 
for an immediate child.

With the phrase "if one exists" in these rules (while I know its 
intention), I think this also raises the question about whether this 
might refer to whether an explicit definition exists.

I know that the answer can be derived, but I think some extra note or 
qualification could help make it more explicit.

Brett

Brett

Received on Monday, 3 November 2008 23:19:32 UTC