net.sf.saxon.expr

Class ContextMappingIterator

public final class ContextMappingIterator extends Object implements SequenceIterator

ContextMappingIterator 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 specialization of the MappingIterator class: it differs in that it sets each item being processed as the context item

Constructor Summary
ContextMappingIterator(ContextMappingFunction action, XPathContext context)
Construct a ContextMappingIterator that will apply a specified ContextMappingFunction to each Item returned by the base iterator.
Method Summary
voidclose()
Itemcurrent()
SequenceIteratorgetAnother()
intgetProperties()
Get properties of this iterator, as a bit-significant integer.
Itemnext()
intposition()

Constructor Detail

ContextMappingIterator

public ContextMappingIterator(ContextMappingFunction action, XPathContext context)
Construct a ContextMappingIterator that will apply a specified ContextMappingFunction to each Item returned by the base iterator.

Parameters: action the mapping function to be applied context the processing context. The mapping function is applied to each item returned by context.getCurrentIterator() in turn.

Method Detail

close

public void close()

current

public Item current()

getAnother

public SequenceIterator getAnother()

getProperties

public int getProperties()
Get properties of this iterator, as a bit-significant integer.

Returns: the properties of this iterator. This will be some combination of properties such as GROUNDED, LAST_POSITION_FINDER, and 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.

next

public Item next()

position

public int position()