net.sf.saxon.instruct

Class Template

public class Template extends Procedure implements InstructionInfoProvider

An xsl:template element in the style sheet.
Constructor Summary
Template()
Method Summary
TailCallexpand(XPathContext context)
Expand the template.
intgetFingerprint()
Get the namepool fingerprint of the name of the template (if it is named)
InstructionInfogetInstructionInfo()
Get the InstructionInfo details about the construct.
intgetMinImportPrecedence()
intgetPrecedence()
booleanhasBadParentPointer()
Diagnostic method
voidinit(int templateFingerprint, int precedence, int minImportPrecedence)
voidprocess(XPathContext context)
Process the template, without returning any tail calls
TailCallprocessLeavingTail(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.

Constructor Detail

Template

public Template()

Method Detail

expand

public TailCall expand(XPathContext context)
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.

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

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.

getMinImportPrecedence

public int getMinImportPrecedence()

getPrecedence

public int getPrecedence()

hasBadParentPointer

public boolean hasBadParentPointer()
Diagnostic method

Returns:

init

public void init(int templateFingerprint, int precedence, int minImportPrecedence)

process

public void process(XPathContext context)
Process the template, without returning any tail calls

Parameters: context The dynamic context, giving access to the current node, the current variables, etc.

processLeavingTail

public 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.