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(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) |
NamedTemplate |
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
|
Iterator<NamedTemplate> |
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,
NamedTemplate template)
Register the named template with a given name
|
void |
setComponentIndex(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, getConfiguration, getDefaultOutputProperties, getFunctionLibrary, getGlobalContextRequirement, getGlobalParameters, getHostLanguage, getKeyManager, getOutputProperties, getPackages, getQueryLibraryModules, getQueryLibraryModules, getQueryModuleWithSystemId, getStripperRules, getTopLevelPackage, isAllowXPath30, isQueryLocationHintProcessed, isSchemaAware, registerGlobalParameter, setCharacterMapIndex, setConfiguration, setCreatesSecondaryResult, setDefaultOutputProperties, setFunctionLibrary, setGlobalContextRequirement, setHostLanguage, setKeyManager, setOutputProperties, setSchemaAware, setStripperRules, setStripsInputTypeAnnotations, setStripsWhitespace, setTopLevelPackage, stripsInputTypeAnnotations, stripsWhitespace
public PreparedStylesheet(Compilation compilation)
compilation
- Compilation optionspublic Controller newController()
Controller
public GlobalParameterSet getCompileTimeParams()
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(Map<SymbolicName,Component> index)
index
- the component indexpublic Component getComponent(SymbolicName name)
public Iterator<NamedTemplate> iterateNamedTemplates()
NamedTemplate
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 outputCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.