net.sf.saxon.expr
public final class MappingIterator extends Object implements SequenceIterator, AtomizableIterator
This is a powerful class. It is used, with different mapping functions, in a great variety of ways. It underpins the way that "for" expressions and path expressions are evaluated, as well as sequence expressions. It is also used in the implementation of the document(), key(), and id() functions.
Constructor Summary | |
---|---|
MappingIterator(SequenceIterator base, MappingFunction action, XPathContext context)
Construct a MappingIterator that will apply a specified MappingFunction to
each Item returned by the base iterator. |
Method Summary | |
---|---|
Item | current() |
SequenceIterator | getAnother() |
int | getProperties()
Get properties of this iterator, as a bit-significant integer.
|
Item | next() |
int | position() |
void | setIsAtomizing(boolean atomizing)
Indicate that any nodes returned in the sequence will be atomized. |
Parameters: base the base iterator action the mapping function to be applied context the processing context. This should be supplied only if each item to be processed is to become the context item. In this case "base" should be the same as context.getCurrentIterator().
Returns: the properties of this iterator. This will be some combination of properties such as SequenceIterator.GROUNDED, SequenceIterator.LAST_POSITION_FINDER, and SequenceIterator.LOOKAHEAD. It is always acceptable to return the value zero, indicating that there are no known special properties. It is acceptable for the properties of the iterator to change depending on its state.
Parameters: atomizing true if the caller of this iterator will atomize any nodes that are returned, and is therefore willing to accept the typed value of the nodes instead of the nodes themselves.