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

On 29 May 2007, at 12:47, Anne van Kesteren wrote:

>>>  3. Implementing something like base= dynamically costs a lot.
>>>     (As far as I know we still have issues with xml:base because  
>>> of that.)
>>
>> What are the costs?
>
> In theory you would need to reiterate over the entire subtree,  
> calculate the new URIs and start fetching the new resources. <base>  
> doesn't have this problem, as it is only taken into account during  
> parsing. baseURI and xml:base, however, are defined in a different  
> way.

Why can't you calculate the baseURI dynamically as you parse the  
document tree? I mean, you always encounter the start tag of parent  
elements before their children, so this should be possible with a  
simple stack of baseURI values.

In what way is this more costly than style/class processing?

Anyway, isn't the cost of this kind of simple text parsing hardly  
noticeable compared to operations like image resizing etc.?

Do you know other places where problems like these are discussed/ 
described? It would be interesting to learn more about the actual  
processing challenges of browsers, search engines etc. I guess this  
is relevant for other parts of the spec as well.

--
Henrik

Received on Tuesday, 29 May 2007 12:15:51 UTC