Re: createEntityReference issues in DOM L1 test suite

Regarding entities in DOM...

In DOM Level 1, as long as the entity node is available, calling
createEntityReference or having the entity reference node provided by the
parser will produce the same entity reference node with equal children (equal
with regards to the isEqualNode relation).

This is not true for DOM Level 2 if you have namespaces.
the namespaceURI attribute might have different values:
[[
In a document with no namespaces, the child list of an EntityReference node is
always the same as that of the corresponding Entity. This is not true in a
document where an entity contains unbound namespace prefixes.
]]
http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020114/core.html#Namespaces-Considerations

So as long as the parser provides the entity nodes, you'll be able to
test the read-only aspect of the children of the entity reference nodes by
using the createEntityReference. If the entity reference does not have children
even if there is an entity node, this is an error.

Philippe

Received on Thursday, 24 January 2002 12:52:42 UTC