|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.instruct.Procedure net.sf.saxon.instruct.Template
public class Template
An xsl:template element in the style sheet.
Constructor Summary | |
---|---|
Template()
Create a template |
Method Summary | |
---|---|
void |
apply(XPathContext context,
Rule rule)
Process the template, without returning any tail calls. |
TailCall |
applyLeavingTail(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. |
TailCall |
expand(XPathContext context)
Expand the template. |
InstructionInfo |
getInstructionInfo()
Get the InstructionInfo details about the construct. |
int |
getMinImportPrecedence()
Get the minimum import precedence used by xsl:apply-imports |
int |
getPrecedence()
Get the import precedence of the template |
SequenceType |
getRequiredType()
Get the required type to be returned by this template |
StructuredQName |
getTemplateName()
Get the name of the template (if it is named) |
boolean |
hasRequiredParams()
Ask whether this template has one or more required parameters |
void |
init(StructuredQName templateName,
int precedence,
int minImportPrecedence)
Initialize the template |
void |
setBody(Expression body)
Set the expression that forms the body of the template |
void |
setHasRequiredParams(boolean has)
Set whether this template has one or more required parameters |
void |
setRequiredType(SequenceType type)
Set the required type to be returned by this template |
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Template()
Method Detail |
---|
public void init(StructuredQName templateName, int precedence, int minImportPrecedence)
templateName
- the name of the template (if any)precedence
- the import precedenceminImportPrecedence
- the minimum import precedence to be considered in the search
performed by apply-importspublic void setBody(Expression body)
setBody
in class Procedure
body
- the body of the templatepublic StructuredQName getTemplateName()
public int getPrecedence()
public int getMinImportPrecedence()
public void setHasRequiredParams(boolean has)
has
- true if the template has at least one required parameterpublic boolean hasRequiredParams()
public void setRequiredType(SequenceType type)
type
- the required type as defined in the "as" attribute on the xsl:template elementpublic SequenceType getRequiredType()
public void apply(XPathContext context, Rule rule) throws XPathException
context
- The dynamic context, giving access to the current node,rule
- the template rule that caused this template to be invoked. When a template has
a match pattern defined as a union, there can be more than one Rule referring to the same template,
and further calls on next-match or apply-imports need to know which one in in force
XPathException
public TailCall applyLeavingTail(XPathContext context, Rule rule) throws XPathException
context
- the XPath dynamic contextrule
- the template rule that caused this template to be invoked. When a template has
a match pattern defined as a union, there can be more than one Rule referring to the same template,
and further calls on next-match or apply-imports need to know which one in in force
XPathException
public TailCall expand(XPathContext context) throws XPathException
context
- the XPath dynamic context
XPathException
public InstructionInfo getInstructionInfo()
getInstructionInfo
in interface InstructionInfoProvider
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |