Re: EntityReference nodes and tree positon

>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