net.sf.saxon.expr
Class FilterIterator.Leading
java.lang.Object
net.sf.saxon.expr.FilterIterator
net.sf.saxon.expr.FilterIterator.Leading
- All Implemented Interfaces:
- SequenceIterator
- Enclosing class:
- FilterIterator
public static final class FilterIterator.Leading
- extends FilterIterator
Subclass to support the extension function saxon:leading, which terminates
the iteration at the first item whose predicate is false
FilterIterator.Leading
public FilterIterator.Leading(SequenceIterator base,
Expression filter,
XPathContext context)
- Create a FilterIterate that terminates at the first item for which the predicate
evaluates to false
- Parameters:
base
- iterator over the sequence to be filteredfilter
- the filter expression - always evaluated as a booleancontext
- the outer context for the filter expression as a whole; a new
context will be created for evaluating the predicate
getAnother
public SequenceIterator getAnother()
throws XPathException
- Get another iterator to return the same nodes
- Specified by:
getAnother
in interface SequenceIterator
- Overrides:
getAnother
in class FilterIterator
- Returns:
- a SequenceIterator that iterates over the same items,
positioned before the first item
- Throws:
XPathException
- if any error occurs
Copyright (C) Michael H. Kay. All rights reserved.