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 |
checkSuppliedParameters(GlobalParameterSet params)
Check that all required parameters have been supplied.
|
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) |
SerializationProperties |
getDeclaredSerializationProperties()
Get the properties for xsl:output, including character maps.
|
StructuredQName |
getDefaultInitialTemplateName()
Get the default initial template name
|
NamedTemplate |
getNamedTemplate(StructuredQName qName)
Get the named template with a given name.
|
RuleManager |
getRuleManager()
Get the RuleManager which handles template rules
|
StylesheetPackage |
getTopLevelPackage() |
boolean |
isEligibleInitialComponent(Component component)
Ask whether a component is invokable from outside the stylesheet
|
boolean |
isEligibleInitialMode(Component.M component)
Ask whether a mode is eligible for invoking from outside the stylesheet
|
java.util.Iterator<NamedTemplate> |
iterateNamedTemplates()
Iterate over all the named templates defined in this Executable
|
XsltController |
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, checkInitialContextItem, createsSecondaryResult, explainGlobalVariables, fixupQueryModules, getCharacterMapIndex, getConfiguration, getFunctionLibrary, getGlobalContextRequirement, getGlobalParameter, getGlobalParameters, getHostLanguage, getOutputProperties, getOutputProperties, getPackages, getPrimarySerializationProperties, getQueryLibraryModules, getQueryLibraryModules, getQueryModuleWithSystemId, isQueryLocationHintProcessed, isSchemaAware, registerGlobalParameter, setCharacterMapIndex, setConfiguration, setCreatesSecondaryResult, setDefaultOutputProperties, setFunctionLibrary, setGlobalContextRequirement, setHostLanguage, setOutputProperties, setSchemaAware, setTopLevelPackage
public PreparedStylesheet(Compilation compilation)
compilation
- Compilation optionspublic XsltController newController()
Controller
public GlobalParameterSet getCompileTimeParams()
public void checkSuppliedParameters(GlobalParameterSet params) throws XPathException
checkSuppliedParameters
in class Executable
params
- the set of parameters that have been supplied dynamically to the transformer
(null represents an empty set).XPathException
- if there is a required parameter for which no value has been suppliedpublic 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 StructuredQName getDefaultInitialTemplateName()
public void setComponentIndex(java.util.Map<SymbolicName,Component> index)
index
- the component indexpublic Component getComponent(SymbolicName name)
public boolean isEligibleInitialComponent(Component component)
component
- the componentpublic boolean isEligibleInitialMode(Component.M component)
component
- the componentpublic java.util.Iterator<NamedTemplate> iterateNamedTemplates()
NamedTemplate
public void explainNamedTemplates(ExpressionPresenter presenter) throws XPathException
presenter
- destination for the explanatory outputXPathException
public SerializationProperties getDeclaredSerializationProperties()
PreparedStylesheet
.
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-2020 Saxonica Limited. All rights reserved.