public class XsltExecutable
extends java.lang.Object
XsltTransformer
.
An XsltExecutable is immutable, and therefore thread-safe. It is simplest to load a new XsltTransformer each time the stylesheet is to be run. However, the XsltTransformer is serially reusable within a single thread.
An XsltExecutable is created by using one of the compile
methods on the
XsltCompiler
class.
Modifier and Type | Class and Description |
---|---|
class |
XsltExecutable.ParameterDetails
Inner class containing information about a global parameter to a compiled stylesheet
|
Modifier | Constructor and Description |
---|---|
protected |
XsltExecutable(Processor processor,
PreparedStylesheet preparedStylesheet) |
Modifier and Type | Method and Description |
---|---|
void |
explain(Destination destination)
Produce a diagnostic representation of the compiled stylesheet, in XML form.
|
void |
export(java.io.OutputStream destination)
Produce a representation of the compiled stylesheet, in XML form, suitable for
distribution and reloading.
|
void |
export(java.io.OutputStream destination,
java.lang.String target)
Produce a representation of the compiled stylesheet for a particular target environment, in XML form, suitable for
distribution and reloading.
|
java.util.HashMap<QName,XsltExecutable.ParameterDetails> |
getGlobalParameters()
Get the names of the xsl:param elements defined in this stylesheet, with details
of each parameter including its required type, and whether it is required or optional
|
Processor |
getProcessor()
Get the Processor that was used to create this XsltExecutable
|
PreparedStylesheet |
getUnderlyingCompiledStylesheet()
Get the underlying implementation object representing the compiled stylesheet.
|
WhitespaceStrippingPolicy |
getWhitespaceStrippingPolicy()
Get the whitespace stripping policy defined by this stylesheet, that is, the policy
defined by the xsl:strip-space and xsl:preserve-space elements in the top-level package
of this stylesheet
|
XsltTransformer |
load()
Load the stylesheet to prepare it for execution.
|
Xslt30Transformer |
load30()
Load the stylesheet to prepare it for execution.
|
protected XsltExecutable(Processor processor, PreparedStylesheet preparedStylesheet)
public Processor getProcessor()
public XsltTransformer load()
XsltTransformer
which offers interfaces for stylesheet
invocation corresponding to those described in the XSLT 2.0 specification. It can be used
with XSLT 2.0 or XSLT 3.0 stylesheets, but does not offer new XSLT 3.0 functionality such
as the ability to supply parameters to the initial template, or the ability to invoke
stylesheet-defined functions, or the ability to return an arbitrary sequence as a result
without wrapping it in a document node. If such facilities are required, use the
method load30()
in preference.public Xslt30Transformer load30()
Xslt30Transformer
which offers interfaces for stylesheet
invocation corresponding to those described in the XSLT 3.0 specification. It can be used
with XSLT 2.0 or XSLT 3.0 stylesheets, and in both cases it offers new XSLT 3.0 functionality such
as the ability to supply parameters to the initial template, or the ability to invoke
stylesheet-defined functions, or the ability to return an arbitrary sequence as a result
without wrapping it in a document node.public void explain(Destination destination) throws SaxonApiException
The detailed form of this representation is not stable (or even documented).
destination
- the destination for the XML document containing the diagnostic representation
of the compiled stylesheetSaxonApiException
public void export(java.io.OutputStream destination) throws SaxonApiException
The detailed form of the output representation is not documented.
destination
- the destination for the XML document containing the diagnostic representation
of the compiled stylesheet. The stream will be closed when writing has finished.SaxonApiException
- if the stylesheet was compiled with just-in-time compilation enabled.public void export(java.io.OutputStream destination, java.lang.String target) throws SaxonApiException
The detailed form of the output representation is not documented.
destination
- the destination for the XML document containing the diagnostic representation
of the compiled stylesheet. The stream will be closed when writing has finished.target
- the target environment. The only values currently recognized are "JS" and "JS2,
which export the package for running under Saxon-JS 1.0 or 2.0 respectively.SaxonApiException
public WhitespaceStrippingPolicy getWhitespaceStrippingPolicy()
DocumentBuilder
.public java.util.HashMap<QName,XsltExecutable.ParameterDetails> getGlobalParameters()
XsltExecutable.ParameterDetails
objects giving information about the
corresponding parameter.public PreparedStylesheet getUnderlyingCompiledStylesheet()
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.