[whatwg] <base> versus xml:base

On Wed, 14 Mar 2007 10:17:48 +0100, Anne van Kesteren <annevk at opera.com>  
wrote:

>>    <base href="http://www.example.org/" xml:base="/bar" />
>
> I suppose xml:base="" should affect href="".

The XML Base[1] specification says:

   The base URI for a URI reference appearing in any other attribute value,
   including default attribute values, is the base URI of the element
   bearing the attribute.

Let's say the document from my example was located on  
'http://users.example.org/bob/'. According to the XML Base specification,  
the initial base URI of the document (in this example) is ?the URI used to  
retrieve the entity?. Since 'xml:base' affects <base>, and not the other  
way around (I would presume), the base URI of the document, after  
processing the <base> element, should be:

   http://users.example.org/bar

That is, if 'xml:base' is processed before the <base> element. And  
according to the XML Base specification, I'd say that is the case. If not,  
<base> is a special case element where 'xml:base' doesn't apply or is  
applied after the 'href' value has been resolved.

> That would make it consistent with
>
>    <img src="..." xml:base="..."/>
>
> at least. Interesting sample.

Yep.

____
[1] <http://www.w3.org/TR/xmlbase/>

-- 
Asbj?rn Ulsberg     -=|=-    http://virtuelvis.com/quark/
?He's a loathsome offensive brute, yet I can't look away?

Received on Wednesday, 14 March 2007 11:14:10 UTC