Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.instruct
Class Template

    java.lang.Object
      net.sf.saxon.instruct.Procedure
          net.sf.saxon.instruct.Template

All Implemented Interfaces:
  Container, InstructionInfoProvider, java.io.Serializable, javax.xml.transform.SourceLocator

public class Template
extends Procedure
implements InstructionInfoProvider

An xsl:template element in the style sheet.

See Also:
  Serialized Form

Constructor Summary
`Template()`

Method Summary
`TailCall` | `expand(XPathContext context)` Expand the template.
`int` | `getFingerprint()` Get the namepool fingerprint of the name of the template (if it is named)
`InstructionInfo` | `getInstructionInfo()` Get the InstructionInfo details about the construct.
`int` | `getMinImportPrecedence()`
`int` | `getPrecedence()`
`void` | `init(int templateFingerprint, int precedence, int minImportPrecedence)`
`boolean` | `needsStackFrame()`
`void` | `process(XPathContext context)` Process the template, without returning any tail calls
`TailCall` | `processLeavingTail(XPathContext context)` 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.

Methods inherited from class net.sf.saxon.instruct.Procedure
`getBody, getColumnNumber, getExecutable, getLineNumber, getPublicId, getStackFrameMap, getSystemId, setBody, setExecutable, setLineNumber, setStackFrameMap, setSystemId`

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(int templateFingerprint,
                     int precedence,
                     int minImportPrecedence)

### getFingerprint

    public int getFingerprint()

  Get the namepool fingerprint of the name of the template (if it is named)

  Returns:
    the fingerprint of the template name, or -1 if unnamed

### getPrecedence

    public int getPrecedence()

### getMinImportPrecedence

    public int getMinImportPrecedence()

### needsStackFrame

    public boolean needsStackFrame()

### process

    public void process(XPathContext context)
                 throws XPathException

  Process the template, without returning any tail calls

  Parameters:
    `context` - The dynamic context, giving access to the current node, the current variables, etc.
  Throws:
    `XPathException`

### processLeavingTail

    public TailCall processLeavingTail(XPathContext context)
                                throws XPathException

  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.

  Throws:
    `XPathException`

### expand

    public TailCall expand(XPathContext context)
                    throws XPathException

  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.

  Throws:
    `XPathException`

### getInstructionInfo

    public InstructionInfo getInstructionInfo()

  Get the InstructionInfo details about the construct. This information isn't used for tracing, but it is available when inspecting the context stack.

  Specified by:
    `getInstructionInfo` in interface `InstructionInfoProvider`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD