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.
schemaAware
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,
as a human-readable entity
|
void |
explainNamedTemplates(ExpressionPresenter presenter)
Explain the expression tree for named templates in a stylesheet
|
PreparedStylesheet |
getCachedStylesheet(java.lang.String href,
java.lang.String baseURI)
Get a "next in chain" stylesheet.
|
GlobalParameterSet |
getCompileTimeParams()
Get the parameters that were set at compile time.
|
Component |
getComponent(SymbolicName name) |
NamedTemplate |
getNamedTemplate(StructuredQName qName)
Get the named template with a given name.
|
java.util.Properties |
getOutputProperties()
Get the properties for xsl:output.
|
RuleManager |
getRuleManager()
Get the RuleManager which handles template rules
|
StylesheetPackage |
getTopLevelPackage() |
java.util.Iterator<NamedTemplate> |
iterateNamedTemplates()
Iterate over all the named templates defined in this Executable
|
Controller |
newController()
Make a Controller from this stylesheet object.
|
void |
putCachedStylesheet(java.lang.String href,
java.lang.String baseURI,
PreparedStylesheet pss)
Save a "next in chain" stylesheet in compiled form, so that it can be reused repeatedly.
|
void |
putNamedTemplate(StructuredQName templateName,
NamedTemplate template)
Register the named template with a given name
|
void |
setComponentIndex(java.util.Map<SymbolicName,Component> index)
Register the index of components
|
void |
setRuleManager(RuleManager rm)
Set the RuleManager that handles template rules
|
addPackage, addQueryLibraryModule, addQueryLocationHintProcessed, checkAllRequiredParamsArePresent, checkInitialContextItem, createsSecondaryResult, explainGlobalVariables, fixupQueryModules, getCharacterMapIndex, getCompilerService, getConfiguration, getDefaultOutputProperties, getFunctionLibrary, getGlobalContextRequirement, getGlobalParameters, getHostLanguage, getKeyManager, getOutputProperties, getPackages, getQueryLibraryModules, getQueryLibraryModules, getQueryModuleWithSystemId, isQueryLocationHintProcessed, isSchemaAware, obtainCompilerService, registerGlobalParameter, setCharacterMapIndex, setCompilerService, setConfiguration, setCreatesSecondaryResult, setDefaultOutputProperties, setFunctionLibrary, setGlobalContextRequirement, setHostLanguage, setKeyManager, setOutputProperties, setSchemaAware, setTopLevelPackage
public PreparedStylesheet(Compilation compilation)
compilation
- Compilation optionspublic Controller newController()
Controller
public GlobalParameterSet getCompileTimeParams()
public StylesheetPackage getTopLevelPackage()
getTopLevelPackage
in class Executable
public void setRuleManager(RuleManager rm)
rm
- the RuleManager containing details of all the template rulespublic RuleManager getRuleManager()
public NamedTemplate getNamedTemplate(StructuredQName qName)
qName
- The template namepublic void putNamedTemplate(StructuredQName templateName, NamedTemplate template)
templateName
- the name of a named XSLT templatetemplate
- the templatepublic void setComponentIndex(java.util.Map<SymbolicName,Component> index)
index
- the component indexpublic Component getComponent(SymbolicName name)
public java.util.Iterator<NamedTemplate> iterateNamedTemplates()
NamedTemplate
public void explainNamedTemplates(ExpressionPresenter presenter) throws XPathException
presenter
- destination for the explanatory outputXPathException
public java.util.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(java.lang.String href, java.lang.String baseURI)
href
- the relative URI of the next-in-chain stylesheetbaseURI
- the baseURI against which this relativeURI is to be resolvedpublic void putCachedStylesheet(java.lang.String href, java.lang.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) throws XPathException
presenter
- defines the destination and format of the outputXPathException
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.