public class XsltPackage
extends java.lang.Object
xsl:package
element.Modifier | Constructor and Description |
---|---|
protected |
XsltPackage(XsltCompiler compiler,
StylesheetPackage pp) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Get the name of the package (the URI appearing as the value of
xsl:package/@name ) |
PackageVersion |
getPackageVersion()
Get the version of the package as a structured object that meets the requirements of
http://www.w3.org/TR/xslt-30/#package-versions
|
Processor |
getProcessor()
Get the processor under which this package was created
|
StylesheetPackage |
getUnderlyingPreparedPackage()
Escape-hatch interface to the underlying implementation class.
|
java.lang.String |
getVersion()
Get the version number of the package (the value of the attribute
xsl:package/@package-version . |
WhitespaceStrippingPolicy |
getWhitespaceStrippingPolicy()
Get the whitespace stripping policy defined by this stylesheet package, that is, the policy
defined by the xsl:strip-space and xsl:preserve-space elements in the source XSLT code of the package.
|
XsltExecutable |
link()
Link this package with the packages it uses, to form an executable stylesheet.
|
void |
save(java.io.File file)
Save this compiled package to filestore.
|
void |
save(java.io.File file,
java.lang.String target)
Deprecated.
since 9.9.1.3. Use XsltCompiler.setTargetEdition() to define the target environment.
|
protected XsltPackage(XsltCompiler compiler, StylesheetPackage pp)
public Processor getProcessor()
public java.lang.String getName()
xsl:package/@name
)public java.lang.String getVersion()
xsl:package/@package-version
.
Note that this may have had trailing zeroes truncated.public PackageVersion getPackageVersion()
public WhitespaceStrippingPolicy getWhitespaceStrippingPolicy()
DocumentBuilder
.public XsltExecutable link() throws SaxonApiException
SaxonApiException
- if any error is found during the linking process, for example
if the constituent packages containing duplicate component names, or if abstract components
are not resolved.public void save(java.io.File file) throws SaxonApiException
file
- the file to which the compiled package should be savedSaxonApiException
- if the compiled package cannot be saved to the specified
location, or if the package was compiled with just-in-time
compilation enabledpublic void save(java.io.File file, java.lang.String target) throws SaxonApiException
file
- the file to which the compiled package should be savedtarget
- 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
- if the compiled package cannot be saved to the specified
location, or if the package was compiled with just-in-time
compilation enabled.public StylesheetPackage getUnderlyingPreparedPackage()
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.