net.sf.saxon.instruct
Class CallTemplate
java.lang.Object
net.sf.saxon.instruct.Instruction
net.sf.saxon.instruct.CallTemplate
- All Implemented Interfaces:
- Serializable, SourceLocator
public class CallTemplate
- extends Instruction
Instruction representing an xsl:call-template element in the stylesheet.
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.instruct.Instruction |
assembleParams, assembleTunnelParams, getChildren, getColumnNumber, getInstructionDetails, getInstructionName, getLineNumber, getPublicId, getResultType, getSystemId, getSystemId, processChildren, processChildrenLeavingTail, recoverableError, setChildren, setSourceLocation, styleError, styleError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CallTemplate
public CallTemplate(Template template,
WithParam[] actualParams,
WithParam[] tunnelParams,
boolean useTailRecursion,
Expression calledTemplateExpression,
NamespaceResolver nsContext)
- Construct a CallTemplate instruction.
- Parameters:
template
- the Template object identifying the template to be called, in the normal
case where this is known staticallyactualParams
- array of WithParam instructions to calculate the actual parameters
to be supplied to the callcalledTemplateExpression
- expression to calculate the name of the template to be called
at run-time, this supports the saxon:allow-avt optionnsContext
- the static namespace context of the instruction, needed only in the case
where the name of the called template is to be calculated dynamically
setInstructionDetails
public void setInstructionDetails(Controller controller,
NamePool namePool,
InstructionDetails details)
- Return the name of this instruction.
- Specified by:
setInstructionDetails
in class Instruction
process
public void process(XPathContext context)
throws TransformerException
- Process this instruction, without leaving any tail calls.
- Overrides:
process
in class Instruction
- Parameters:
context
- the dynamic context for this transformation
- Throws:
TransformerException
- if a dynamic error occurs
processLeavingTail
public TailCall processLeavingTail(XPathContext context)
throws TransformerException
- 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.
- Specified by:
processLeavingTail
in class Instruction
- 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.
- Throws:
TransformerException