W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2001

Re: EntityReference nodes and tree positon

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Thu, 26 Apr 2001 13:03:10 -0400
To: www-dom@w3.org
Message-ID: <OFF6F20A35.20581E54-ON85256A3A.005CF534@pok.ibm.com>

>All children of the relevant
>entity are copied as children of the entity reference node.

Right so far.

>someEntityRef.getLastChild().getNextSibling() will always be null

Trivially true. anything.getLastChild().getNextSibling() will always be
null; that's part of the definition of last sibling.

>is it the XPath
>implementation's responsibility to translate getNextSibling() to
>getParentNode().getNextSibling() in the case of nodes that are children
>of entity references?

Yes, the XPath data model and the DOM data model are somewhat different.
It's the XPath implementation's responsibility to extract the information
it needs from the DOM and present it in a manner that makes sense for the
XPath user. We're considering adding some convenience features to DOM Level
3 which will make obtaining an XPath-style view of the data a bit easier,
but it can be done with the existing DOM features.

The important point is that a DOM Node is not an XPath Node, though either
may be expressed in terms of one or more instances of the other.

Joe Kesselman  / IBM Research
Received on Thursday, 26 April 2001 13:03:52 UTC

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