[whatwg] <base> versus xml:base

Simon Pieters zcorpan at gmail.com
Tue Mar 6 12:38:59 PST 2007

On Tue, 06 Mar 2007 20:16:08 +0100, Keryx Web <webmaster at keryx.se> wrote:

> [...] I think that it would be wise to answer
> questions such as if both <base> and xml:base are present, which one
> should "win"?

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.  
xml:base can be a relative URI so you can have e.g.:

    <html xmlns="http://www.w3.org/1999/xhtml" xml:base="foo/">
     <head xml:base="bar/">
      <base href="http://www.example.org/"/>
      <link rel="stylesheet" href="baz.css"/>

...where the link references http://www.example.org/foo/bar/baz.css.

> [...] What authority do you rely on when you say that the attribute
> must be explicitly allowed?

A conforming XHTML 1.0 document must conform to the DTD, which effectively  
disallows xml:base and a whole bunch of other things (including, say,  
namespace prefixes).


Simon Pieters

More information about the whatwg mailing list