Defines a set of stylesheet modules that can be compiled as a unit, independently of other packages.
Available in XSLT 3.0. From Saxon 9.8, available in all editions. Implemented in Saxon-PE and Saxon-EE since Saxon 9.7.
- Content: ( (
xsl:expose| declarations )* )
- Permitted parent elements: None
- The name of the package, as an absolute URI, to be used by
- Version identifier, used to distinguish between different versions of a package.
- Indicates the version of XSLT to which the package manifest conforms.
"preserve" | "strip" | "unspecified"
- Used to request stripping of type annotations. The default is
- Determines whether of not modes that are referenced within the package must be explicitly declared. The default is
- eqname |
"preserve" | "strip"
Notes on the Saxon implementation¶
Packages are new in XSLT 3.0, and first fully implemented in Saxon 9.7.
Saxon 9.8 introduces new capabilities for defining packages in the configuration file. The configuration file acts as a catalog, mapping package names and versions to the actual locations of source XSLT code for the package, or exported SEF files containing the compiled package.
Alternatively, it is possible to resolve package names and versions programmatically by setting up a
Packages are available in all Saxon editions. However, only Saxon-EE can be used to export a package in compiled (SEF) form to filestore, and only Saxon-PE or -EE can be used to load a compiled package from filestore. With Saxon-HE, packages must be compiled from source code every time they are used.