public class PreparedStylesheet extends Executable
Note that the PreparedStylesheet object does not contain a reference to the source stylesheet tree (rooted at an XSLStyleSheet object). This allows the source tree to be garbage-collected when it is no longer required.
The PreparedStylesheet in XSLT 3.0 represents the set of all packages making up an executable stylesheet.
Constructor and Description |
---|
PreparedStylesheet(Compilation compilation)
Constructor - deliberately protected
|
Modifier and Type | Method and Description |
---|---|
void |
explain(ExpressionPresenter presenter)
Produce an XML representation of the compiled and optimized stylesheet
|
void |
explainNamedTemplates(ExpressionPresenter presenter)
Explain the expression tree for named templates in a stylesheet
|
IAccumulatorManager |
getAccumulatorManager()
Get the class that manages accumulator functions
|
PreparedStylesheet |
getCachedStylesheet(String href,
String baseURI)
Get a "next in chain" stylesheet.
|
GlobalParameterSet |
getCompileTimeParams()
Get the parameters that were set at compile time.
|
Component |
getComponent(SymbolicName name) |
FunctionItem |
getFunction(StructuredQName qName,
int arity)
Get the function with a given name.
|
Template |
getNamedTemplate(StructuredQName qName)
Get the named template with a given name.
|
Properties |
getOutputProperties()
Get the properties for xsl:output.
|
RuleManager |
getRuleManager()
Get the RuleManager which handles template rules
|
FunctionLibraryList |
getStylesheetFunctions() |
Iterator<Template> |
iterateNamedTemplates()
Iterate over all the named templates defined in this Executable
|
Controller |
newController()
Make a Controller from this stylesheet object.
|
void |
putCachedStylesheet(String href,
String baseURI,
PreparedStylesheet pss)
Save a "next in chain" stylesheet in compiled form, so that it can be reused repeatedly.
|
void |
putNamedTemplate(StructuredQName templateName,
Template template)
Register the named template with a given name
|
void |
setAccumulatorManager(IAccumulatorManager accumulatorManager)
Set the class that manages accumulator functions
|
void |
setComponentIndex(Map<SymbolicName,Component> index)
Register the index of components
|
void |
setRuleManager(RuleManager rm)
Set the RuleManager that handles template rules
|
void |
setStylesheetFunctionLibrary(FunctionLibraryList stylesheetFunctions) |
addQueryLibraryModule, addQueryLocationHintProcessed, checkAllRequiredParamsArePresent, createsSecondaryResult, explainGlobalVariables, fixupQueryModules, getCharacterMapIndex, getCompiledGlobalVariables, getConfiguration, getDefaultOutputProperties, getFunctionLibrary, getGlobalVariableMap, getHostLanguage, getInitialContextItemVariable, getKeyManager, getLargestPatternStackFrame, getLocationMap, getOutputProperties, getQueryLibraryModules, getQueryLibraryModules, getQueryModuleWithSystemId, getStripperRules, isAllowXPath30, isQueryLocationHintProcessed, isSchemaAware, registerGlobalVariable, setCharacterMapIndex, setConfiguration, setCreatesSecondaryResult, setDefaultOutputProperties, setFunctionLibrary, setHostLanguage, setInitialContextItemVariable, setKeyManager, setLocationMap, setOutputProperties, setPatternSlotSpace, setSchemaAware, setStripperRules, setStripsInputTypeAnnotations, setStripsWhitespace, stripsInputTypeAnnotations, stripsWhitespace
public PreparedStylesheet(Compilation compilation)
compilation
- Compilation optionspublic FunctionLibraryList getStylesheetFunctions()
public Controller newController()
Controller
public IAccumulatorManager getAccumulatorManager()
public void setAccumulatorManager(IAccumulatorManager accumulatorManager)
accumulatorManager
- the manager of accumulator functionspublic GlobalParameterSet getCompileTimeParams()
public void setRuleManager(RuleManager rm)
rm
- the RuleManager containing details of all the template rulespublic RuleManager getRuleManager()
public Template getNamedTemplate(StructuredQName qName)
qName
- The template namepublic void putNamedTemplate(StructuredQName templateName, Template template)
templateName
- the name of a named XSLT templatetemplate
- the templatepublic FunctionItem getFunction(StructuredQName qName, int arity)
qName
- The function namepublic void setComponentIndex(Map<SymbolicName,Component> index)
index
- the component indexpublic Component getComponent(SymbolicName name)
public Iterator<Template> iterateNamedTemplates()
Template
public void explainNamedTemplates(ExpressionPresenter presenter)
presenter
- destination for the explanatory outputpublic Properties getOutputProperties()
In Saxon, the properties object is a new, empty, Properties object that is backed by the live properties to supply default values for missing properties. This means that the property values must be read using the getProperty() method. Calling the get() method on the underlying Hashtable will return null.
In Saxon 8.x, this method gets the output properties for the unnamed output format in the stylesheet.
Transformer.setOutputProperties(java.util.Properties)
public PreparedStylesheet getCachedStylesheet(String href, String baseURI)
href
- the relative URI of the next-in-chain stylesheetbaseURI
- the baseURI against which this relativeURI is to be resolvedpublic void putCachedStylesheet(String href, String baseURI, PreparedStylesheet pss)
href
- the relative URI of the stylesheetbaseURI
- the base URI against which the relative URI is resolvedpss
- the prepared stylesheet object to be cachedpublic void explain(ExpressionPresenter presenter)
presenter
- defines the destination and format of the outputpublic void setStylesheetFunctionLibrary(FunctionLibraryList stylesheetFunctions)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.