net.sf.saxon.style

Class XSLTemplate

public final class XSLTemplate extends StyleElement implements StylesheetProcedure

An xsl:template element in the style sheet.
Method Summary
Expressioncompile(Executable exec)
Compile: this registers the template with the rule manager, and ensures space is available for local variables
TemplategetCompiledTemplate()
Get the compiled template
intgetConstructType()
Get the type of construct.
protected ItemTypegetReturnedItemType()
Determine the type of item returned by this template
SlotManagergetSlotManager()
Get associated Procedure (for details of stack frame)
StructuredQNamegetTemplateName()
Return the name of this template.
protected voidindex(XSLStylesheet top)
protected booleanisPermittedChild(StyleElement child)
Specify that xsl:param is a permitted child
booleanmarkTailCalls()
Mark tail-recursive calls on templates and functions.
protected booleanmayContainParam(String attName)
booleanmayContainSequenceConstructor()
Determine whether this type of element is allowed to contain a template-body
voidoptimize()
voidpostValidate()
voidprepareAttributes()
voidvalidate()

Method Detail

compile

public Expression compile(Executable exec)
Compile: this registers the template with the rule manager, and ensures space is available for local variables

getCompiledTemplate

public Template getCompiledTemplate()
Get the compiled template

Returns: the compiled template

getConstructType

public int getConstructType()
Get the type of construct. This will be a constant in class Location. This method is part of the InstructionInfo interface

getReturnedItemType

protected ItemType getReturnedItemType()
Determine the type of item returned by this template

Returns: the item type returned

getSlotManager

public SlotManager getSlotManager()
Get associated Procedure (for details of stack frame)

getTemplateName

public StructuredQName getTemplateName()
Return the name of this template. Note that this may be called before prepareAttributes has been called.

Returns: the name of the template as a Structured QName.

index

protected void index(XSLStylesheet top)

isPermittedChild

protected boolean isPermittedChild(StyleElement child)
Specify that xsl:param is a permitted child

markTailCalls

public boolean markTailCalls()
Mark tail-recursive calls on templates and functions.

mayContainParam

protected boolean mayContainParam(String attName)

mayContainSequenceConstructor

public boolean mayContainSequenceConstructor()
Determine whether this type of element is allowed to contain a template-body

Returns: true: yes, it may contain a template-body

optimize

public void optimize()

postValidate

public void postValidate()

prepareAttributes

public void prepareAttributes()

validate

public void validate()