Package net.sf.saxon.s9api
Class XsltPackage
java.lang.Object
net.sf.saxon.s9api.XsltPackage
An XsltPackage object represents the result of compiling an XSLT 3.0 package, as
represented by an XML document containing an
xsl:package element.- Since:
- 9.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of the package (the URI appearing as the value ofxsl:package/@name)Get the version of the package as a structured object that meets the requirements of http://www.w3.org/TR/xslt-30/#package-versionsGet the processor under which this package was createdEscape-hatch interface to the underlying implementation class.Get the version number of the package (the value of the attributexsl:package/@package-version.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.link()Link this package with the packages it uses, to form an executable stylesheet.voidSave this compiled package to filestore.voidDeprecated.since 9.9.1.3.
-
Constructor Details
-
XsltPackage
-
-
Method Details
-
getProcessor
Get the processor under which this package was created- Returns:
- the corresponding Processor
-
getName
Get the name of the package (the URI appearing as the value ofxsl:package/@name)- Returns:
- the package name
-
getVersion
Get the version number of the package (the value of the attributexsl:package/@package-version. Note that this may have had trailing zeroes truncated.- Returns:
- the package version number(s)+suffix?
-
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- Returns:
- the package version of the stylesheet
-
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.- Returns:
- a newly constructed WhitespaceStrippingPolicy based on the declarations in
this stylesheet package. This policy can be used as input to a
DocumentBuilder.
-
link
Link this package with the packages it uses, to form an executable stylesheet. This process fixes up any cross-package references to files, templates, and other components, and checks to ensure that all such references are consistent.- Returns:
- the resulting XsltExecutable
- Throws:
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.
-
save
Save this compiled package to filestore.- Parameters:
file- the file to which the compiled package should be saved- Throws:
SaxonApiException- if the compiled package cannot be saved to the specified location, or if the package was compiled with just-in-time compilation enabled- Since:
- 9.7
-
save
Deprecated.since 9.9.1.3. Use XsltCompiler.setTargetEdition() to define the target environment.Save this compiled package to filestore for a particular target environment- Parameters:
file- the file to which the compiled package should be savedtarget- the target environment (for example "EE" or "JS")- Throws:
SaxonApiException- if the compiled package cannot be saved to the specified location, or if the package was compiled with just-in-time compilation enabled.- Since:
- 9.7.0.5
-
getUnderlyingPreparedPackage
Escape-hatch interface to the underlying implementation class.- Returns:
- the underlying StylesheetPackage. The interface to StylesheetPackage is not a stable part of the s9api API definition.
-