Re: @role in SVG

On Oct 10, 2007, at 23:48, Bjoern Hoehrmann wrote:

> * Henri Sivonen wrote:
>> DOM doesn't capture the namespace mapping scope at the node creation
>> time. It doesn't even provide API-native convenience methods for
>> resolving qNames-in-content into NS,localName pairs. Even if you
>> bother to walk the tree using code you wrote yourself because DOM
>> didn't do it for you, the meaning of qNames is brittle when nodes are
>> moved around. When you walk towards the root you may find very
>> different ns declarations if the node you start from has been moved
>> to another subtree after the initial DOM build.
>
> I have a hard time following your criticism. It is true that the  
> DOM is
> unaware of possible dependencies between some content and its context,
> and moving nodes without reconstructing the context may have  
> undesirable
> or unexpected effects. This is true for most inherited declarations  
> and
> relative references (the language of the node may change due to  
> xml:lang
> attributes, resource identifiers may change due to xml:base  
> attributes,
> event handlers may behave differently because the node's parent  
> changed,
> "QNames" may resolve to different names due to xmlns attributes, etc.)
>
> That's a rather general problem, and beyond that, I am not sure  
> what you
> are saying.

It is a general problem for anything that is specified to inherit  
along the tree and isn't captured in the node at the node creation  
time. That xml:lang is brittle doesn't make qNames in content less  
brittle.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Friday, 12 October 2007 11:26:38 UTC