
net.sf.saxon.instruct
Class CallTemplate
java.lang.Object
|
+--net.sf.saxon.instruct.Instruction
|
+--net.sf.saxon.instruct.CallTemplate
- All Implemented Interfaces:
- Instr, Locatable, java.io.Serializable, javax.xml.transform.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, displayChildren, dynamicError, dynamicError, getCardinality, getChildren, getColumnNumber, getExecutable, getInstructionNamespace, getItemType, getLineNumber, getPublicId, getSourceLocator, getSystemId, processChildren, processChildrenLeavingTail, recoverableError, setChildren, setExecutable, setSourceLocation |
| 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
getInstructionName
public java.lang.String getInstructionName()
- Return the name of this instruction.
- Specified by:
getInstructionName in class Instruction
process
public void process(XPathContext context)
throws javax.xml.transform.TransformerException
- Process this instruction, without leaving any tail calls.
- Specified by:
process in interface Instr- Overrides:
process in class Instruction
- Parameters:
context - the dynamic context for this transformation
- Throws:
javax.xml.transform.TransformerException - if a dynamic error occurs
processLeavingTail
public TailCall processLeavingTail(XPathContext context)
throws javax.xml.transform.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 interface Instr- 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.
javax.xml.transform.TransformerException
Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.