W3C home > Mailing lists > Public > public-html@w3.org > June 2007

Re: Do we need the restrictions on the <base> element?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 04 Jun 2007 02:12:38 -0500
Message-ID: <4663BB66.4030500@mit.edu>
To: Henrik Dvergsdal <henrik.dvergsdal@hibo.no>
CC: HTML WG <public-html@w3.org>

Henrik Dvergsdal wrote:
 > I can see how <base> is cheaper than xml:base because
> of problems related to reordering of nodes in the DOM tree. But, apart 
> from that, won't we have excactly the same problems with the current 
> <base> element?

The main performance issues come from base URI changes as nodes are moved in the 
DOM.  That problem does not exist with <base>.

> Furthermore xml:base seems to be a "normative part" of the spec already. 
> Does this mean that we have a base attribute? - at least in the XML 
> serialization

Effectively, yes.  Although you'll note that Firefox doesn't implement xml:base 
for XHTML... largely because we haven't figured out a good way to make it 
performant enough.

> And finally: Why must the <base> element occur only "In a head element, 
> after the meta element with the charset attribute, if any, but before 
> any other elements"? Does the sequencing of the elements in <head> 
> really matter?

Of course.  The <meta> comes first so the least amount of effort is wasted when 
you throw everything away and start parsing in the new encoding.  The <base> 
comes before anything with a URI attribute so you don't have to cancel a bunch 
of loads and start new ones.  Or worse yet, so you don't execute the wrong 
things, in the case of <script src="">.

-Boris
Received on Monday, 4 June 2007 07:12:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:00 GMT