EXSLT - System - Implementer Page

Version: 1
User Page: index.html
XML Definition: sys.xml
Module Package: sys.zip

EXSLT - System provides features for using the host system.

This module defines an additional namespace, http://exsl.org/system/environment, through which a user can access system environment variables via the system-property function.

Use this namespace as follows. Given SQ, a string that is a QName with a prefix that maps to http://exsl.org/system/environment and local part L, system-property(SQ) returns the value of the system environment variable L. For example, if "env" maps to this namespace, then system-property("env:USER") might return "john". If the system uses case-insensitive environment variable names, then the implementation SHOULD match L to the system's environment variable names in a case-insensitive manner and it SHOULD document the systems on which this behavior takes place. For example, on a case-insensitive system the previous function call would match USER, user, and User environment variable names, among others.

The result of a call to system-property("env:X") MUST always return the same value (for a given X) throughout the processing session. Which environment variables are available to a given XSLT transformation is system- and implementation-dependent, and an implementation SHOULD document any special steps it takes when exposing environment variables. Whenever an implementation cannot provide a value for a given environment variable, it MUST return the zero-length string as the result of the system-property call. The mapping of the encoding of the variable's original value to that of the XPath string object is implementation-dependent.

Note: Retrieving environment variables can pose a security risk if those environment variables expose sensitive system information.

The extension elements and functions defined within this document are governed by the general rules about extensions to XSLT covered in [14. Extensions] in [XSLT 1.0].

XSLT processors are free to support any number of the extension elements and functions described in this document. However, an XSLT processor must not claim to support EXSLT - System unless all the core extensions described within this document are implemented by the processor. An implementation of an extension element or function in an EXSLT namespace must conform to the behaviour described in this document.

Using EXSLT will only make your stylesheet portable amongst the implementations that support EXSLT. Note that there is no requirement for XSLT processors that are compliant to XSLT to support the extensions described within EXSLT.

Namespace

The namespace for EXSLT - System is:

http://exslt.org/system

Throughout this document, the prefix sys is used to refer to this namespace. Any other prefix can be used within a particular stylesheet (though a prefix must be specified to enable the extension functions to be recognised as extensions).

Change History

Submitted: 2006-02-15
Creator: John L. Clark

Specify a namespace for access to environment variables.

http://www.exslt.org/sys/sys.html last modified 2006-02-15