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

expandEntityReferences

From: Jonas Sicking <sicking@bigfoot.com>
Date: Wed, 23 May 2001 21:45:01 +0200
Message-ID: <007c01c0e3c0$db986ec0$d1ee42d5@kermit>
To: <www-dom@w3.org>
I don't quite understand how expandEntityReferences works on the treeWalker
and nodeIterator interfaces. The treeWalker interfaces says this about the
attribute:
"If false, they and their descendants will be rejected. Note that this
rejection takes precedence over whatToShow"
but then says:
"To produce a view of the document that has entity reference nodes but no
entity expansion, use the whatToShow flags to show the entity reference node
and set expandEntityReferences to false"

So the first sentence says that entity reference nodes is not shown if
expandEntityReferences is false, and the second sentence says they are. So
I'm wondering which is correct.

I can see three possible meanings of setting expandEntityReferences to
false:
1) Entity references are skipped. Thier children appears as children of the
entityreferences parent.
2) Entity references are rejected. They and thier children appears removed
from the tree.
3) Entity reference nodes are shown in the tree but have no children.

1) would be same as filtering entity reference nodes using whatToShow, or
having the filter always returning FILTER_SKIP for entity reference nodes.
2) would for the treeWalker be the same as having the the filter always
return FILTER_REJECT for entity reference nodes.

Or does expandEntityReferences have some forth meaning that i've missed?

/ Jonas Sicking
Received on Wednesday, 23 May 2001 15:42:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT