- From: K. Ari Krupnikov <ari@cogsci.ed.ac.uk>
- Date: Thu, 26 Apr 2001 15:59:41 +0100
- To: www-dom@w3.org
- CC: dbdom-devel@lists.sourceforge.net
A DOM tree may include entity reference nodes in the tree, if such references were reported by the parser. All children of the relevant entity are copied as children of the entity reference node. So someEntityRef.getLastChild().getNextSibling() will always be null. Am I correct so far? Now consider the following fragment: <!ENTITY c "<c/>"> ... <a> <b/> &c; <d/> </a> As far as XPath, or the Infoset are concerned, the next sibling of the element c, which is the last child of entity c, is the element d (whitespace ignored). Is there an obvious solution to this difference, or is it the XPath implementation's responsibility to translate getNextSibling() to getParentNode().getNextSibling() in the case of nodes that are children of entity references? Ari.
Received on Thursday, 26 April 2001 10:59:49 UTC