2007/3/14, Anne van Kesteren:
On Tue, 13 Mar 2007 19:15:12 +0100, Asbjørn Ulsberg
<[EMAIL PROTECTED]> wrote:
>> They don't conflict. They are both applied. <base> is the document's
>> base URI, and xml:base is the base URI of the element it is applied on.
>
> What about:
>
>    <base href="http://www.example.org/"; xml:base="/bar" />

I suppose xml:base="" should affect href="". That would make it consistent
with

   <img src="..." xml:base="..."/>

at least. Interesting sample.

How about this variation:
<head xml:base="bar/">
<base href="foo/" />
</head>

Is the [EMAIL PROTECTED] resolved to absolute using [EMAIL PROTECTED]:base or 
not?
If it is, then when looking at links inside head, relative URIs are
resolved using a base of "bar/foo/bar/" (taking [EMAIL PROTECTED]:base into
account twice: once to resolve [EMAIL PROTECTED], which sets the document's
base URI, and then relative to that base URI to resolve [EMAIL PROTECTED]'s).

If it is not, then <base> is in violation of the xml:base spec AFAICT.

I'd personally only allow absolute URI references in [EMAIL PROTECTED]

We still have to cope with legacy content which uses a relative URI,
but then they're likely not XHTML, so xml:base is simply ignored.

This could be solved by saying that if there is an xml:base in scope,
then <base> is ignored for the whole document.

A quick test with Firefox shows that xml:base is applied but <base>
seems to be ignored in application/xhtml+xml documents.

Just some thoughts…

--
Thomas Broyer

Reply via email to