Package com.saxonica.ee.trans
Class TemplateRuleEE
java.lang.Object
net.sf.saxon.expr.instruct.TemplateRule
com.saxonica.ee.trans.TemplateRuleEE
- All Implemented Interfaces:
SourceLocator,ExpressionOwner,Locatable,Location,Traceable,TraceableComponent,RuleTarget,Locator
Saxon-EE version of the TemplateRule class, with added code for JIT compilation and streamability analysis
-
Field Summary
Fields inherited from class net.sf.saxon.expr.instruct.TemplateRule
body, bodyEvaluator, matchPattern, mode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsure that any first-time initialization has been done.booleanisActuallyStreamable(List<String> reasons) Ask whether this template satisfies the rules for a guaranteed streamable templatebooleanAsk whether or not this template is declared as streamablevoidGenerate the inversion of the expression comprising the body of a template rules.voidprepareInitializer(Compilation compilation, ComponentDeclaration decl) Prepare for JIT compilation.voidsetDeclaredStreamable(boolean streamable) Say whether or not this template is declared as streamablevoidsetInitializer(TemplateRuleInitializer initializer) Methods inherited from class net.sf.saxon.expr.instruct.TemplateRule
apply, applyLeavingTail, copyTo, explainProperties, export, gatherProperties, getBody, getChildExpression, getColumnNumber, getComponentKind, getContainerGranularity, getLineNumber, getLocalParams, getLocation, getMatchPattern, getMode, getObjectName, getPackageData, getPublicId, getRequiredContextItemType, getRequiredType, getRules, getStackFrameMap, getSystemId, getTracingTag, isAbsentFocus, registerRule, saveLocation, setBody, setChildExpression, setColumnNumber, setContextItemRequirements, setLineNumber, setMatchPattern, setMode, setPackageData, setRequiredType, setStackFrameMap, setSystemId
-
Constructor Details
-
TemplateRuleEE
public TemplateRuleEE()Create a template rule
-
-
Method Details
-
setDeclaredStreamable
public void setDeclaredStreamable(boolean streamable) Say whether or not this template is declared as streamable- Overrides:
setDeclaredStreamablein classTemplateRule- Parameters:
streamable- true if the template belongs to a streamable mode; set to false if it does not belong to a streamable mode, or if it is found that the template is not actually streamable, and fallback to non-streaming has been requested.
-
isDeclaredStreamable
public boolean isDeclaredStreamable()Ask whether or not this template is declared as streamable- Overrides:
isDeclaredStreamablein classTemplateRule- Returns:
- true if the template belongs to a streamable mode; false if it does not belong to a streamable mode, or if it is found that the template is not actually streamable, and fallback to non-streaming has been requested.
-
setInitializer
-
getInitializer
-
prepareInitializer
Prepare for JIT compilation.- Overrides:
prepareInitializerin classTemplateRule- Parameters:
compilation- the XSLT compilationdecl- the component declaration of this template rule
-
initialize
Ensure that any first-time initialization has been done. Used in Saxon-EE to do JIT compilation- Overrides:
initializein classTemplateRule- Throws:
XPathException- if any error occurs
-
isActuallyStreamable
Ask whether this template satisfies the rules for a guaranteed streamable template- Parameters:
reasons- the caller may supply a list which on return will contain explanations for why the template is not streamable, suitable for inclusion in error messages- Returns:
- true if the template is within the (Saxon or W3C) definition of guaranteed streamable
-
makeInversion
Generate the inversion of the expression comprising the body of a template rules. Supported in Saxon-EE only- Throws:
XPathException
-
getInversion
- Throws:
XPathException
-