W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2002

Re: XPath namespace nodes

From: Ray Whitmer <rayw@netscape.com>
Date: Tue, 17 Sep 2002 08:12:08 -0700
Message-ID: <3D874648.8000400@netscape.com>
To: Joseph Kesselman <keshlam@us.ibm.com>
CC: www-dom@w3.org

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
Received on Tuesday, 17 September 2002 11:12:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:10 UTC