Re: XPath namespace nodes

Joseph Kesselman wrote:

>An alternative would be to implement Node.getOwnerNode(), which for attrs 
>would yield the same value getOwnerElement() does now (but as a Node) and 
>for others would yield the new behavior -- ownerElement if exists, else 
>the parent (Document node if this is the root, null if it's an orphan 
>tree). But I was hoping to do this by a minor reshuffle rather than by 
>enlarging the DOM API; the latter's harder to get acceptance on.
>
>Of course if we'd thought of this at the time we could have implemented 
>getOwnerNode() in the frst place. Hindsight is always 20/20...
>  
>
getOwnerNode is also wrong, because in the case of a text which is the 
child of an entity reference, it would return the entity reference 
instead of the Element.  That is why the ownerElement was almost correct.

Ray Whitmer
rayw@netscape.com

Received on Tuesday, 17 September 2002 11:12:40 UTC