W3C home > Mailing lists > Public > www-dom-ts@w3.org > January 2002

Re: createEntityReference issues in DOM L1 test suite

From: Philippe Le Hegaret <plh@w3.org>
Date: Thu, 24 Jan 2002 12:52:37 -0500
Message-ID: <3C5049E5.F2A9E8E4@w3.org>
To: Curt Arnold <carnold@houston.rr.com>
Cc: www-dom-ts@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:58:45 GMT