XQuery/Environment Variables

= Motivation = You want to use environment variables to change the way an XQuery executes.

XQuery 3.0 introduced two new functions:

available-environment-variables as xs:string* - returns a sequence of strings of all the environment variables available

environment-variable($name as xs:string) as xs:string? - returns the value of a specific environment variable

= Sample Program =

= Sample Results = Here are some sample results on a Windows 7 System:

Note that Environment Variables are not the same as system-properties. System properties are key-value pairs typically set by Java. Environment Variables are typically key-value pairs associated with a shell.

= References =
 * W3C XQuery 3.0 Specification