net.sf.saxon.expr
public abstract class SimpleExpression extends ComputedExpression
Field Summary | |
---|---|
protected Expression[] | arguments |
static Expression[] | NO_ARGUMENTS |
Constructor Summary | |
---|---|
SimpleExpression()
Constructor |
Method Summary | |
---|---|
int | computeCardinality()
Determine the static cardinality of the expression. |
int | computeDependencies()
Compute the dependencies of an expression, as the union of the
dependencies of its subexpressions. |
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure. |
Item | evaluateItem(XPathContext context)
Evaluate an expression as a single item. |
String | getExpressionType()
Return a distinguishing name for the expression, for use in diagnostics.
|
ItemType | getItemType(TypeHierarchy th)
Determine the data type of the items returned by this expression. |
SequenceIterator | iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence. |
Iterator | iterateSubExpressions()
Get the immediate sub-expressions of this expression. |
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) |
void | process(XPathContext context)
Process the instruction, without returning any tail calls |
Expression | promote(PromotionOffer offer)
Offer promotion for this subexpression. |
void | setArguments(Expression[] sub)
Set the immediate sub-expressions of this expression. |
Expression | simplify(StaticContext env)
Simplify the expression |
Expression | typeCheck(StaticContext env, ItemType contextItemType) |
Returns: the depencies, as a bit-mask
Parameters: level indentation level for this expression out
Parameters: context The context in which the expression is to be evaluated
Returns: the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
Throws: XPathException if any dynamic error occurs evaluating the expression
Parameters: th
Returns: the data type
Parameters: context supplies the context for evaluation
Returns: a SequenceIterator that can be used to iterate over the result of the expression
Throws: XPathException if any dynamic error occurs evaluating the expression
Returns: an array containing the sub-expressions of this expression
Parameters: context The dynamic context, giving access to the current node, the current variables, etc.
Parameters: offer details of the offer, for example the offer to move expressions that don't depend on the context to an outer level in the containing expression
Returns: if the offer is not accepted, return this expression unchanged. Otherwise return the result of rewriting the expression to promote this subexpression
Throws: XPathException if any error is detected
Parameters: sub an array containing the sub-expressions of this expression
Returns: the simplified expression