Returns the value of a system property.
system-property($arg as xs:string) ➔ xs:string
The name of the system property required
Links to W3C specifications
Available in XSLT 2.0 and later versions. Available in all Saxon editions.
Notes on the Saxon implementation
As well as the standard system properties defined in the XSLT namespace, SaxonJ will return the value of a Java system property (e.g. as set using -X on the Java VM invocation) if the name is unprefixed. It does NOT return the values of operating system environment variables.
More specifically, if the argument is a name in no namespace, that is, if the name is
unprefixed, then the name is taken to refer to a Java system property, and the value of
that property is returned if it exists. For example, on a Windows platform,
system-property('file.separator') returns "\". This can be used to obtain
information from the environment, and is especially useful in conjunction with
use-when conditional compilation.
system-property() is executed at compile-time, then the results
pertain to the compile-time environment, but if executed at run-time, the results pertain
to the run-time environment. For example, the result of
may be different if a SEF file compiled using one Saxon release is executed under another. Evaluation
is always at compile-time if the function call appears in a static expression (for example in
Where the function call appears in a dynamic expression (for example in
it may be evaluated statically if the argument is a string literal, but only if the stylesheet
is not being compiled for execution in a different target environment. You can force run-time execution
by declaring the property name as the default
value of a stylesheet parameter (for example
<xsl:param name="p" select="'xsl:product-version'"/>)
and invoking the function as
For some properties, the result is configuration-dependent:
is-schema-aware: returns "yes" if running under Saxon-EE with a license, provided schema-awareness has been enabled either by including an
xsl:import-schemadeclaration in the stylesheet, or by setting
-saon the command line).
supports-streaming: returns "yes" if running under Saxon-EE with a license, unless the configuration feature has been set to false.
supports-dynamic-evaluation: returns "yes" unless the configuration feature has been set to false.
xsd-version: returns the value of the configuration property , which defaults to "1.1".