net.sf.saxon.instruct
public class CallTemplate extends Instruction
Constructor Summary | |
---|---|
CallTemplate(Template template, boolean useTailRecursion, Expression calledTemplateExpression, NamespaceResolver nsContext)
Construct a CallTemplate instruction. |
Method Summary | |
---|---|
boolean | createsNewNodes()
Determine whether this instruction creates new nodes.
|
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure. |
InstructionInfo | getInstructionInfo()
Set additional trace properties appropriate to the kind of instruction. |
int | getInstructionNameCode()
Return the name of this instruction. |
int | getIntrinsicDependencies() |
Template | getTargetTemplate(XPathContext context)
Get the template, in the case where it is specified dynamically. |
Iterator | iterateSubExpressions()
Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction) |
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) |
void | process(XPathContext context)
Process this instruction, without leaving any tail calls. |
TailCall | processLeavingTail(XPathContext context)
Process this instruction. |
protected void | promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites. |
void | setActualParameters(WithParam[] actualParams, WithParam[] tunnelParams)
Set the actual parameters on the call |
Expression | simplify(StaticContext env)
Simplify an expression. |
Expression | typeCheck(StaticContext env, ItemType contextItemType) |
Parameters: template the Template object identifying the template to be called, in the normal case where this is known statically useTailRecursion calledTemplateExpression expression to calculate the name of the template to be called at run-time, this supports the saxon:allow-avt option nsContext the static namespace context of the instruction, needed only in the case where the name of the called template is to be calculated dynamically
Parameters: level indentation level for this expression out
Parameters: context The dynamic context of the transformation
Returns: The template to be called
Throws: XPathException if a dynamic error occurs: specifically, if the template name is computed at run-time (Saxon extension) and the name is invalid or does not reference a known template
Parameters: context the dynamic context for this transformation
Throws: XPathException if a dynamic error occurs
Parameters: context the dynamic context for this transformation
Returns: an object containing information about the tail call to be executed by the caller. Returns null if there is no tail call.
Parameters: offer The type of rewrite being offered
Throws: net.sf.saxon.trans.XPathException
Returns: the simplified expression
Throws: XPathException if an error is discovered during expression rewriting