| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.instruct.Instruction net.sf.saxon.instruct.CallTemplate
CallTemplate | public class CallTemplate extends Instruction (Code) | | Instruction representing an xsl:call-template element in the stylesheet.
|
Method Summary | |
final public boolean | createsNewNodes() Determine whether this instruction creates new nodes. | public void | display(int level, NamePool pool, PrintStream out) Diagnostic print of expression structure. | public InstructionInfo | getInstructionInfo() Set additional trace properties appropriate to the kind of instruction. | public int | getInstructionNameCode() Return the name of this instruction. | public int | getIntrinsicDependencies() | public Template | getTargetTemplate(XPathContext context) Get the template, in the case where it is specified dynamically. | public Iterator | iterateSubExpressions() | public Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) | public void | process(XPathContext context) Process this instruction, without leaving any tail calls. | public TailCall | processLeavingTail(XPathContext context) Process this instruction. | protected void | promoteInst(PromotionOffer offer) Handle promotion offers, that is, non-local tree rewrites. | public void | setActualParameters(WithParam[] actualParams, WithParam[] tunnelParams) | public Expression | simplify(StaticContext env) Simplify an expression. | public Expression | typeCheck(StaticContext env, ItemType contextItemType) |
CallTemplate | public CallTemplate(Template template, boolean useTailRecursion, Expression calledTemplateExpression, NamespaceResolver nsContext)(Code) | | Construct a CallTemplate instruction.
Parameters: template - the Template object identifying the template to be called, in the normalcase where this is known statically Parameters: useTailRecursion - Parameters: calledTemplateExpression - expression to calculate the name of the template to be calledat run-time, this supports the saxon:allow-avt option Parameters: nsContext - the static namespace context of the instruction, needed only in the casewhere the name of the called template is to be calculated dynamically |
createsNewNodes | final public boolean createsNewNodes()(Code) | | Determine whether this instruction creates new nodes.
This implementation currently returns true unconditionally.
|
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Diagnostic print of expression structure. The expression is written to the System.err
output stream
Parameters: level - indentation level for this expression Parameters: out - |
getInstructionInfo | public InstructionInfo getInstructionInfo()(Code) | | Set additional trace properties appropriate to the kind of instruction. This
implementation adds the template property, which identities the template to be called
|
getInstructionNameCode | public int getInstructionNameCode()(Code) | | Return the name of this instruction.
|
getIntrinsicDependencies | public int getIntrinsicDependencies()(Code) | | |
getTargetTemplate | public Template getTargetTemplate(XPathContext context) throws XPathException(Code) | | Get the template, in the case where it is specified dynamically.
Parameters: context - The dynamic context of the transformation The template to be called throws: XPathException - if a dynamic error occurs: specifically, if thetemplate name is computed at run-time (Saxon extension) and the name is invalidor does not reference a known template |
iterateSubExpressions | public Iterator iterateSubExpressions()(Code) | | 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)
|
process | public void process(XPathContext context) throws XPathException(Code) | | Process this instruction, without leaving any tail calls.
Parameters: context - the dynamic context for this transformation throws: XPathException - if a dynamic error occurs |
processLeavingTail | public TailCall processLeavingTail(XPathContext context) throws XPathException(Code) | | Process this instruction. If the called template contains a tail call (which may be
an xsl:call-template of xsl:apply-templates instruction) then the tail call will not
actually be evaluated, but will be returned in a TailCall object for the caller to execute.
Parameters: context - the dynamic context for this transformation an object containing information about the tail call to be executed by thecaller. Returns null if there is no tail call. |
setActualParameters | public void setActualParameters(WithParam[] actualParams, WithParam[] tunnelParams)(Code) | | Set the actual parameters on the call
|
simplify | public Expression simplify(StaticContext env) throws XPathException(Code) | | Simplify an expression. This performs any static optimization (by rewriting the expression
as a different expression).
exception: XPathException - if an error is discovered during expressionrewriting the simplified expression |
|
|