net.sf.saxon.instruct
public class CallTemplate extends Instruction
Nested Class Summary | |
---|---|
static class | CallTemplate.CallTemplatePackage
A CallTemplatePackage is an object that encapsulates the name of a template to be called,
the parameters to be supplied, and the execution context. |
Constructor Summary | |
---|---|
CallTemplate(Template template, boolean useTailRecursion, Expression calledTemplateExpression, NamespaceResolver nsContext)
Construct a CallTemplate instruction. |
Method Summary | |
---|---|
int | computeCardinality()
Get the cardinality of the sequence returned by evaluating this instruction
|
Expression | copy()
Copy an expression. |
boolean | createsNewNodes()
Determine whether this instruction creates new nodes.
|
void | explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
int | getInstructionNameCode()
Return the name of this instruction. |
int | getIntrinsicDependencies() |
ItemType | getItemType(TypeHierarchy th)
Get the item type of the items returned by evaluating this instruction
|
StructuredQName | getObjectName() |
Template | getTargetTemplate(XPathContext context)
Get the template, in the case where it is specified dynamically. |
Iterator<Expression> | 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(ExpressionVisitor visitor, 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. |
boolean | replaceSubExpression(Expression original, Expression replacement)
Replace one subexpression by a replacement subexpression |
void | setActualParameters(WithParam[] actualParams, WithParam[] tunnelParams)
Set the actual parameters on the call |
Expression | simplify(ExpressionVisitor visitor)
Simplify an expression. |
Expression | typeCheck(ExpressionVisitor visitor, ItemType contextItemType) |
Parameters: template the Template object identifying the template to be called, in the normal case where this is known statically useTailRecursion true if the call is potentially tail recursive 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
Returns: the static cardinality
Returns: the copy of the original expression
Parameters: th the type hierarchy cache
Returns: the static item type of the instruction
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
Parameters: original the original subexpression replacement the replacement subexpression
Returns: true if the original subexpression is found
Parameters: actualParams the parameters that are not tunnel parameters tunnelParams the tunnel parameters
Parameters: visitor an expression visitor
Returns: the simplified expression
Throws: XPathException if an error is discovered during expression rewriting