*/
public SequenceIterator iterate(XPathContext context) throws XPathException {
AtomicValue av1 = (AtomicValue)operand0.evaluateItem(context);
if (av1 == null) {
return new EmptyIterator();
}
NumericValue v1 = (NumericValue)av1.getPrimitiveValue();
AtomicValue av2 = (AtomicValue)operand1.evaluateItem(context);
if (av2 == null) {
return new EmptyIterator();
}
NumericValue v2 = (NumericValue)av2.getPrimitiveValue();
if (v1.compareTo(v2) > 0) {
return new EmptyIterator();
}
return new RangeIterator(v1.longValue(), v2.longValue());
}