| java.lang.Object net.sf.saxon.expr.MappingIterator
MappingIterator | final public class MappingIterator implements SequenceIterator,AtomizableIterator(Code) | | MappingIterator merges a sequence of sequences into a single flat
sequence. It takes as inputs an iteration, and a mapping function to be
applied to each Item returned by that iteration. The mapping function itself
returns another iteration. The result is an iteration of the concatenation of all
the iterations returned by the mapping function.
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 | |
public | MappingIterator(SequenceIterator base, MappingFunction action, XPathContext context) Construct a MappingIterator that will apply a specified MappingFunction to
each Item returned by the base iterator.
Parameters: base - the base iterator Parameters: action - the mapping function to be applied Parameters: context - the processing context. |
MappingIterator | public MappingIterator(SequenceIterator base, MappingFunction action, XPathContext context)(Code) | | Construct a MappingIterator that will apply a specified MappingFunction to
each Item returned by the base iterator.
Parameters: base - the base iterator Parameters: action - the mapping function to be applied Parameters: context - the processing context. This should be supplied only if each item to be processedis to become the context item. In this case "base" should be the same as context.getCurrentIterator(). |
getProperties | public int getProperties()(Code) | | Get properties of this iterator, as a bit-significant integer.
the properties of this iterator. This will be some combination ofproperties such as GROUNDED, LAST_POSITION_FINDER,and LOOKAHEAD. It is alwaysacceptable 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. |
position | public int position()(Code) | | |
setIsAtomizing | public void setIsAtomizing(boolean atomizing)(Code) | | Indicate that any nodes returned in the sequence will be atomized. This
means that if it wishes to do so, the implementation can return the typed
values of the nodes rather than the nodes themselves. The implementation
is free to ignore this hint.
Parameters: atomizing - true if the caller of this iterator will atomize anynodes that are returned, and is therefore willing to accept the typedvalue of the nodes instead of the nodes themselves. |
|
|