fn:system-property

Returns the value of a system property.

system-property($arg as xs:string) ➔ xs:string

Arguments

 

$arg

xs:string

The name of the system property required

Result

xs:string

Namespace

http://www.w3.org/2005/xpath-functions

Links to W3C specifications

XSLT 2.0 Specification

XSLT 3.0 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.