net.sf.saxon.expr
public class IfExpression extends ComputedExpression implements TailCallReturner
Constructor Summary | |
---|---|
IfExpression(Expression condition, Expression thenExp, Expression elseExp)
Constructor |
Method Summary | |
---|---|
void | checkPermittedContents(SchemaType parentType, StaticContext env, boolean whole)
Check that any elements and attributes constructed or returned by this expression are acceptable
in the content model of a given complex type. |
int | computeCardinality()
Determine the static cardinality of the result |
int | computeSpecialProperties()
Get the static properties of this expression (other than its type). |
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure |
Item | evaluateItem(XPathContext context)
Evaluate the conditional expression in a given context |
Expression | getCondition() |
Expression | getElseExpression() |
ItemType | getItemType(TypeHierarchy th)
Get data type of items in sequence returned by expression |
Expression | getThenExpression() |
SequenceIterator | iterate(XPathContext context)
Iterate the path-expression in a given context |
Iterator | iterateSubExpressions()
Get the immediate subexpressions of this expression |
boolean | markTailFunctionCalls()
Mark tail calls on used-defined functions. |
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) |
void | process(XPathContext context)
Process this expression as an instruction, writing results to the current
receiver |
TailCall | processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction. |
Expression | promote(PromotionOffer offer)
Promote this expression if possible |
void | setCondition(Expression exp) |
void | setThenExpression(Expression exp) |
Expression | simplify(StaticContext env)
Simplify an expression |
void | suppressValidation(int validationMode)
Suppress validation on contained element constructors, on the grounds that the parent element
is already performing validation. |
Expression | typeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression |
Parameters: context the evaluation context
Parameters: th
Parameters: context the evaluation context
Parameters: context The dynamic context of the transformation, giving access to the current node, the current variables, etc.
Returns: null if the instruction has completed execution; or a TailCall indicating a function call or template call that is delegated to the caller, to be made after the stack has been unwound so as to save stack space.