Re: XPath namespace nodes

Joseph Kesselman wrote:

>Yes, this terminology conflict, and the extra test, is a nuisance. In 
>retrospect, XPath really should have changed their terminology (but they 
>weren't willing to do so, sigh), and/or the DOM should have provided a 
>single operation that mapped more closely to XPath's concept of parent 
>(which is why I've proposed that we might want to move ownerElement from 
>the Attr interface to the Node interface).
>  
>
I have been unable to make the concept of ownerElement work the same as 
XPath all the time, even if moved to Node.

The problem is that the XPath Parent of the document element is the 
Document, which is called the root in XPath.

ownerElement appropriately returns an Element node, so it cannot return 
the same thing as XPath's parent axis in this case because the root is 
not an element, but is rather a Document.

Ray Whitmer
rayw@netscape.com

Received on Tuesday, 17 September 2002 10:16:13 UTC