W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

[whatwg] <base> versus xml:base

From: Asbjørn Ulsberg <asbjorn@tigerstaden.no>
Date: Wed, 14 Mar 2007 19:14:10 +0100
Message-ID: <op.to6x9wru16f2qb@quark>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:53 UTC