There is no setting that shows both the entity reference and its expansion. We feel that it is better to implement them using iterators, since it makes it possible to provide a more efficient implementation. This method raises no exceptions. If an iterator is given a filter, before it returns the next node, it applies the filter. The DOM does not provide any filters.
Filter is just an interface that users can implement to provide their own filters.
The introduction to this chapter gives an example of how a user can implement a filter to perform a specific function. Filters do not need to know how to iterate, nor do they need to know anything about the data structure that is being iterated. This makes it very easy to write filters, since the only thing they have to know how to do is evaluate a single node. One filter may be used with a number of different kinds of iterators, encouraging code reuse. The node to check to see if it passes the filter or not.