DocumentTraversal

First: The DocumentTraversal methods appears to be an extension of the Node
Interface, rather than an additional interface that may be supported by the
Document.  You should be able to create a TreeWalker or NodeIterator that
works with any conforming DOM 2 implementation using only the Node, flags
and filter.  Since the TreeWalker or NodeIterator is rooted at a specific
node, this would seem to imply that the factory method might be most
appropriately placed on Node, so that the root of the walker or iterator
thus created is simply the node that it was created from.  If the
implementation needs the owner document to create the node from, then it can
obtain that information from the node.  This puts the onus of getting the
owner document on the implementation if necessary, instead of the
application using the DOM API, where it shouldn't be necessary.

Secondly, the expandEntityReferences flag on the factory method should
really just be another constant that can be passed into whatToShow:
SHOW_ENTITY_REFERENCE_EXPANSION or SHOW_ENTITY_REFERENCE_CHILDREN.   This
change doesn't remove any functionality from the API, and it does eliminate
a parameter from one of the methods.

	Keith

Received on Monday, 6 March 2000 12:07:20 UTC