Package net.sf.saxon.instruct
Class Template
java.lang.Object
net.sf.saxon.instruct.Procedure
net.sf.saxon.instruct.Template
- All Implemented Interfaces:
Serializable
,SourceLocator
,LocationProvider
,Container
,InstructionInfoProvider
An xsl:template element in the style sheet.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(XPathContext context, Rule rule) Process the template, without returning any tail callsapplyLeavingTail
(XPathContext context, Rule rule) 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.expand
(XPathContext context) Expand the template.int
Get the namepool fingerprint of the name of the template (if it is named)Get the InstructionInfo details about the construct.int
int
boolean
Diagnostic methodboolean
void
init
(int templateFingerprint, int precedence, int minImportPrecedence) void
setBody
(Expression body) void
setHasRequiredParams
(boolean has) Methods inherited from class net.sf.saxon.instruct.Procedure
getBody, getColumnNumber, getExecutable, getHostLanguage, getLineNumber, getLineNumber, getLocationProvider, getPublicId, getStackFrameMap, getSystemId, getSystemId, replaceSubExpression, setExecutable, setHostLanguage, setLineNumber, setStackFrameMap, setSystemId
-
Constructor Details
-
Template
public Template()
-
-
Method Details
-
init
public void init(int templateFingerprint, int precedence, int minImportPrecedence) -
setBody
-
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() -
setHasRequiredParams
public void setHasRequiredParams(boolean has) -
hasRequiredParams
public boolean hasRequiredParams() -
apply
Process the template, without returning any tail calls- Parameters:
context
- The dynamic context, giving access to the current node,rule
-- Throws:
XPathException
-
applyLeavingTail
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
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
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 interfaceInstructionInfoProvider
-
hasBadParentPointer
public boolean hasBadParentPointer()Diagnostic method- Returns:
- true if the template contains an expression with a bad parent pointer
-