* @return an iterator over the requested subsequence
*/
public static SequenceIterator make(SequenceIterator base, int min, int max) throws XPathException {
if (base instanceof GroundedIterator) {
GroundedValue value = ((GroundedIterator)base).materialize();
value = value.subsequence(min-1, max-min+1);
return ((Value)value).iterate();
} else {
return new SubsequenceIterator(base, min, max);
}
}