expandEntityReferences

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 UTC