[whatwg] Issues concerning the <base> element and xml:base

Kristof Zelechovski giecrilj at stegny.2a.pl
Sat Jun 7 06:18:04 PDT 2008


RFC 1808 defines how to resolve a relative URI, doesn’t it?.
The need to notify elements that have URI attributes is much better
expressed as the need to notify those attributes themselves.  However, this
would require each attribute to be an object type, à la XML DOM.  For
completeness, attributes defined to contain an URI could expose a method
"resolve" to return the resolved URI if appropriate and handle an event
"onbasechange".
(All this probably is science fiction, do not assign much weight to these
musings).
Chris

-----Original Message-----
From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Ian Hickson
Sent: Friday, June 06, 2008 9:02 PM
To: whatwg at whatwg.org
Subject: [whatwg] Issues concerning the <base> element and xml:base


On Sat, 1 Mar 2008, Maciej Stachowiak wrote:
> 
> I'd propose that resolution is always done against the base in effect at 
> the time the URI is resolved. So changing the base would never trigger a 
> reload short of another action.

Then we need to define "resolve".

[snip]

I have made notes in the spec that this is an area that needs defining. 
Right now I'm leaning towards defining a "base href change notification 
behaviour" for all elements that have URI attributes or are otherwise 
sensitive to base href changes, and defining that when the base href 
changes, all the elements in the document with such behaviour defined 
should have that behaviour activated (this would, in the simple case, just 
be a walk over the document with a virtual method call per element; it 
might be a bit slow for some documents, but then this is a very rare 
occurance anyway). We would also invoke this behaviour on the entire 
subtree of an element whenever that element is inserted into a different 
document, in case it matters in any cases.






More information about the whatwg mailing list