The <xsltPackages> element

The xsltPackages element contains zero or more package elements, each of which defines an XSLT 3.0 package, or a version of a package. The packages may be listed in any order.

Each package element may have the following attributes:

Attribute

Applies to

Values

Effect

name

PE EE

URI

The package name. Must match the value in the name attribute of the xsl:package element, unless the base attribute is present. When xsl:use-package searches for an appropriate package to use, it is this name that will be matched.

version

PE EE

string

The package version. Required. The numeric part of the version number must match the value in the package-version attribute of the xsl:package element; the NamePart (if any) can differ. When xsl:use-package searches for an appropriate package to use, it is the version number in the configuration file that is used, not the version in the XSLT source.

base

PE EE

URI

The original package name. Required only if the package name defined in the name attribute differs from the package name in the XSLT source. If present, the value must match the package name defined in the XSLT source. Using this attribute allows packages to be renamed. This is useful when a package has static parameters whose values are bound in child withParam elements: it allows two instances of a package to be made available (under different names) with different bindings for the static parameters.

exportLocation

PE EE

Relative URI

The location (relative to the configuration file) of a representation of this package in SEF (stylesheet export format) form. If this attribute is present then the SEF form will always be used in preference to the source form; the sourceLocation is then ignored, and it is an error if any withParam children are present (because static parameters will have been bound when the SEF was created). It is entirely a user responsibility to keep the SEF form up-to-date with changes to the source.

priority

PE EE

integer

Used when there are several versions of a package available and the client does not specify which version to use. The value must be an integer. Versions with higher priority are preferred over versions with lower priority or unspecified priority; if the priorities are equal (or unspecified) then the highest available version is used. The rules for ordering of version numbers are given in section §3.5.1 of the W3C specification.

shortName

PE EE

string

Any convenient short name for the package name/version combination. This can be used for convenience as the value of the -xsl option on the Transform command line. (We suggest using a value that is unlikely to be confused with a filename, for example * if the same stylesheet package is used all the time.)

sourceLocation

PE EE

Relative URI

The location (relative to the configuration file) of the source XSLT code of the top-level module of the package.

The package element may also have zero or more withParam children supplying values of static stylesheet parameters to be used during package compilation. If it is necessary to have different sets of parameter bindings for a package in the same configuration, this should be achieved by use of different versions, for example "1.0-streamable" versus "1.0-nonstreamable".

Each withParam element must have the following attributes:

Attribute

Applies to

Values

Effect

name

PE EE

EQName

The parameter name.

select

PE EE

XPath expression

An XPath expression that is evaluated to give the value of the parameter (so a boolean parameter might be written select="true()", while a string parameter would be expressed as select="'London'").

The list of packages in the configuration file is used: