GCVs are available to the driver policy and shim parameters. The actual values available are a combination of the following:
GCV definitions on the DirXML-DriverSet object.
GCV definitions on the DirXML-Driver object.
Automatic GCVs.
If there are any name collisions among the three sources, the order of precedence is driver object, driver set object, and automatic. Automatic GCVs are the values supplied by the engine and provide information about the run-time environment. The automatic GCVs are:
There are two basic ways to access a GCV from a policy:
The following syntax is used to provide the value of a GCV through text replacement:
~gcv-name~
Replace gcv-name with the name of the desired GCV.
The GCV text replacement works by replacing such references with the value of the GCV in the policy source and in the following shim configuration fields:
In the policy source (both DirXML-Script and XSLT), the text replacement process consists of replacing the reference with the string value of the GCV with an exception of List values. These List values are output as either a string or as structured XML, depending on the replacement context. In particular, if the list GCV reference appears in the element content, the list is output in a structured form. If the list GCV reference appears in an attribute value, the list is output as a delimited string.
The examples provided in the following table illustrate the text replacement way of accessing GCV in a policy. If the result needs to be a string, use quotes around the GCV reference.
See the DirXML Script documentation for the full description. GCVs can be accessed in DirXML Script policies in several ways:
XPath Variables: XPath expressions in DirXML-Script can reference GCVs through the standard XPath "$name" syntax for variables. For more information, see XPath Variables documentation.
Conditions and Tokens: The <if-global-variable> condition and the <token-global-variable> token. For more information, see DirXMLScript DTD.
Variable Expansion: Many conditions and tokens support the DirXML Script variable expansion where the GCV is referenced as $gcv-name$. For more information, see DirXMLScript DTD.