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


Applies to: XSLT 2.0 and later versions

XSLT 2.0 Specification

XSLT 2.1 Specification

Notes on the Saxon implementation

As well as the standard system properties defined in the XSLT namespace, the Saxon implementation 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.