|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.expr.ComputedExpression | +--net.sf.saxon.instruct.Instruction | +--net.sf.saxon.instruct.InstructionWithChildren
Abstract superclass for all instructions in the compiled stylesheet that have child instructions. This does not include instructions such as xsl:perform-sort that have child instructions, but whose child instructions are compiled directly into an expression (or a Block).
Field Summary | |
protected Expression[] |
children
|
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 | |
InstructionWithChildren()
Constructor |
Method Summary | |
Expression |
analyze(StaticContext env,
ItemType contextItemType)
Perform static analysis of an expression and its subexpressions. |
static void |
displayChildren(Expression[] children,
int level,
NamePool pool,
java.io.PrintStream out)
Display the children of an instruction for diagostics |
Expression[] |
getChildren()
Get the children of this instruction |
java.util.Iterator |
iterateSubExpressions()
Get the immediate sub-expressions of this expression. |
protected void |
processChildren(XPathContext context)
Process the children of this instruction, including any tail calls |
protected TailCall |
processChildrenLeavingTail(XPathContext context)
Process the children of this instruction, returning any tail call made by the last child instruction |
protected void |
promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites. |
void |
setChildren(Expression[] children)
Set the children of this instruction |
Expression |
simplify(StaticContext env)
Simplify an expression. |
Methods inherited from class net.sf.saxon.instruct.Instruction |
appendItem, assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, getImplementationMethod, getInstructionInfo, getInstructionNameCode, getItemType, getSourceLocator, iterate, process, processLeavingTail, promote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.xml.transform.SourceLocator |
getColumnNumber, getLineNumber, getPublicId, getSystemId |
Methods inherited from interface net.sf.saxon.expr.Expression |
display |
Field Detail |
protected Expression[] children
Constructor Detail |
public InstructionWithChildren()
Method Detail |
public void setChildren(Expression[] children)
children
- The instructions that are children of this instructionpublic Expression[] getChildren()
public static void displayChildren(Expression[] children, int level, NamePool pool, java.io.PrintStream out)
public Expression simplify(StaticContext env) throws XPathException
simplify
in interface Expression
simplify
in class Instruction
XPathException
- if an error is discovered during expression
rewritingpublic Expression analyze(StaticContext env, ItemType contextItemType) throws XPathException
This checks statically that the operands of the expression have the correct type; if necessary it generates code to do run-time type checking or type conversion. A static type error is reported only if execution cannot possibly succeed, that is, if a run-time type error is inevitable. The call may return a modified form of the expression.
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable. However, the types of such functions and variables will only be accurately known if they have been explicitly declared.
analyze
in interface Expression
analyze
in class Instruction
env
- the static context of the expression
XPathException
- if an error is discovered during this phase
(typically a type error)protected void promoteInst(PromotionOffer offer) throws XPathException
promoteInst
in class Instruction
offer
- The type of rewrite being offered
XPathException
public java.util.Iterator iterateSubExpressions()
iterateSubExpressions
in interface Expression
iterateSubExpressions
in class ComputedExpression
protected void processChildren(XPathContext context) throws XPathException
context
- The dynamic context for the transformation
XPathException
- if a dynamic error occursprotected TailCall processChildrenLeavingTail(XPathContext context) throws XPathException
context
- The dynamic context of the transformation, giving access to the current node,
the current variables, etc.
XPathException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |