net.sf.saxon.instruct
Class Template

java.lang.Object
  |
  +--net.sf.saxon.instruct.Template
All Implemented Interfaces:
java.io.Serializable

public class Template
extends java.lang.Object
implements java.io.Serializable

An xsl:template element in the style sheet.

See Also:
Serialized Form

Constructor Summary
Template()
           
 
Method Summary
protected  TailCall expand(Controller controller)
          Expand the template.
 int getMinImportPrecedence()
           
 int getPrecedence()
           
 void init(SequenceInstruction body, boolean needsStackFrame, int precedence, int minImportPrecedence, java.lang.String systemId, int lineNumber)
           
 boolean needsStackFrame()
           
 void process(Controller controller)
          Process the template, without returning any tail calls
 TailCall processLeavingTail(Controller controller)
          Process this template, with the possibility of returning a tail call package if the template contains any tail calls that are to be performed by the caller.
 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 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(SequenceInstruction body,
                 boolean needsStackFrame,
                 int precedence,
                 int minImportPrecedence,
                 java.lang.String systemId,
                 int lineNumber)

setInstructionDetails

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


getPrecedence

public int getPrecedence()

getMinImportPrecedence

public int getMinImportPrecedence()

needsStackFrame

public boolean needsStackFrame()

process

public void process(Controller controller)
             throws javax.xml.transform.TransformerException
Process the template, without returning any tail calls

Parameters:
controller - The dynamic context, giving access to the current node, the current variables, etc.
javax.xml.transform.TransformerException

processLeavingTail

public TailCall processLeavingTail(Controller controller)
                            throws javax.xml.transform.TransformerException
Process this template, with the possibility of returning a tail call package if the template contains any tail calls that are to be performed by the caller.

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

javax.xml.transform.TransformerException

expand

protected TailCall expand(Controller controller)
                   throws javax.xml.transform.TransformerException
Expand the template. Called when the template is invoked using xsl:call-template. Invoking a template by this method does not change the current template.

javax.xml.transform.TransformerException