net.sf.saxon.instruct
Class Template

java.lang.Object
  extended bynet.sf.saxon.instruct.Instruction
      extended bynet.sf.saxon.instruct.Template
All Implemented Interfaces:
java.io.Serializable, javax.xml.transform.SourceLocator

public class Template
extends Instruction

An xsl:template element in the style sheet.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.instruct.Instruction
children
 
Constructor Summary
Template()
           
 
Method Summary
protected  TailCall expand(Controller controller)
          Expand the template.
 int getMinImportPrecedence()
           
 int getPrecedence()
           
 void init(Sequence body, boolean needsStackFrame, int precedence, int minImportPrecedence)
           
 boolean needsStackFrame()
           
 TailCall processLeavingTail(XPathContext context)
          Process a node in the source document.
 void setInstructionDetails(Controller controller, NamePool namePool, InstructionDetails details)
          Get the name of this instruction for diagnostic and tracing purposes
protected  TailCall traceExpand(Controller controller)
          Expand the template, with tracing.
 
Methods inherited from class net.sf.saxon.instruct.Instruction
assembleParams, assembleTunnelParams, getChildren, getColumnNumber, getInstructionDetails, getInstructionName, getLineNumber, getPublicId, getResultType, getSystemId, getSystemId, process, 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
 

Constructor Detail

Template

public Template()
Method Detail

init

public void init(Sequence body,
                 boolean needsStackFrame,
                 int precedence,
                 int minImportPrecedence)

setInstructionDetails

public void setInstructionDetails(Controller controller,
                                  NamePool namePool,
                                  InstructionDetails details)
Get the name of this instruction for diagnostic and tracing purposes

Specified by:
setInstructionDetails in class Instruction

getPrecedence

public int getPrecedence()

getMinImportPrecedence

public int getMinImportPrecedence()

needsStackFrame

public boolean needsStackFrame()

processLeavingTail

public TailCall processLeavingTail(XPathContext context)
                            throws javax.xml.transform.TransformerException
Process a node in the source document. This is called when the template is invoked using xsl:apply-templates.

Specified by:
processLeavingTail in class Instruction
Parameters:
context - The dynamic context of the transformation, giving access to the current node, the current variables, etc.
Returns:
null if the instruction has completed execution; or a TailCall indicating a function call or template call that is delegated to the caller, to be made after the stack has been unwound so as to save stack space.
Throws:
javax.xml.transform.TransformerException

traceExpand

protected TailCall traceExpand(Controller controller)
                        throws javax.xml.transform.TransformerException
Expand the template, with tracing. Called when the template is invoked either by xsl:apply-templates or from xsl:call-template

Throws:
javax.xml.transform.TransformerException

expand

protected TailCall expand(Controller controller)
                   throws javax.xml.transform.TransformerException
Expand the template. Called when the template is invoked either by xsl:apply-templates or from xsl:call-template

Throws:
javax.xml.transform.TransformerException