|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.expr.ComputedExpression
net.sf.saxon.expr.BinaryExpression
net.sf.saxon.expr.RangeExpression
A RangeExpression is an expression that represents an integer sequence as a pair of end-points (for example "x to y"). If the end-points are equal, the sequence is of length one.
From Saxon 7.8, the sequence must be ascending; if the end-point is less than the start-point, an empty sequence is returned. This is to allow expressions of the form "for $i in 1 to count($seq) return ...."
Nested Class Summary | |
static class |
RangeExpression.RangeIterator
Iterator that produces numeric values in a monotonic sequence, ascending or descending |
Field Summary |
Fields inherited from class net.sf.saxon.expr.BinaryExpression |
operand0, operand1, operator |
Fields inherited from class net.sf.saxon.expr.ComputedExpression |
locationId, staticProperties |
Fields inherited from interface net.sf.saxon.expr.Expression |
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
Constructor Summary | |
RangeExpression(Expression start,
int op,
Expression end)
Construct a RangeExpression |
Method Summary | |
Expression |
analyze(StaticContext env,
ItemType contextItemType)
Type-check the expression |
int |
computeCardinality()
Determine the static cardinality |
ItemType |
getItemType()
Get the data type of the items returned |
SequenceIterator |
iterate(XPathContext context)
Return an iteration over the sequence |
Methods inherited from class net.sf.saxon.expr.BinaryExpression |
computeSpecialProperties, display, displayOperator, equals, getOperands, getOperator, hashCode, isCommutative, isInverse, iterateSubExpressions, promote, simplify |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RangeExpression(Expression start, int op, Expression end)
Method Detail |
public Expression analyze(StaticContext env, ItemType contextItemType) throws XPathException
analyze
in interface Expression
analyze
in class BinaryExpression
XPathException
public ItemType getItemType()
public int computeCardinality()
computeCardinality
in class BinaryExpression
public SequenceIterator iterate(XPathContext context) throws XPathException
iterate
in interface Expression
iterate
in class ComputedExpression
context
- supplies the context for evaluation
XPathException
- if any dynamic error occurs evaluating the
expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |