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

[whatwg] <base> versus xml:base

From: Simon Pieters <zcorpan@gmail.com>
Date: Tue, 06 Mar 2007 21:38:59 +0100
Message-ID: <op.tosbaxrh7a8kvn@hp-a0a83fcd39d2>
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).

    http://www.w3.org/TR/xhtml1/#strict

-- 
Simon Pieters
Received on Tuesday, 6 March 2007 12:38:59 UTC

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