[whatwg] <base> versus xml:base
asbjorn at tigerstaden.no
Wed Mar 14 11:14:10 PDT 2007
On Wed, 14 Mar 2007 10:17:48 +0100, Anne van Kesteren <annevk at opera.com>
>> <base href="http://www.example.org/" xml:base="/bar" />
> I suppose xml:base="" should affect href="".
The XML Base 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:
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.
Asbjørn Ulsberg -=|=- http://virtuelvis.com/quark/
«He's a loathsome offensive brute, yet I can't look away»
More information about the whatwg