8.7 Use of GCVs

GCVs are available to the driver policy and shim parameters. The actual values available are a combination of the following:

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:

Name

Type

Explanation

dirxml.auto.treename

string

The name of the eDirectory tree.

dirxml.auto.driverdn

string

The slash-form DN of the DirXML-Driver object.

dirxml.auto.driverguid

string

The value of the GUID attribute of the DirXML-Driver object in the following form:

{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

where x is a hexadecimal digit.

dirxml.auto.localserverdn

string

The DN of the local server.

There are two basic ways to access a GCV from a policy:

8.7.1 Text Replacement

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:

Field

DirXML-Driver attribute

Explanation

shim auth id

DirXML-ShimAuthID

Typically presented by user agents as Authentication ID. This value is usually used by a shim as the account name with which to authenticate to the target application.

shim auth server

DirXML-ShimAuthServer

Typically presented by user agents as Authentication context. This value is usually used by a shim as connection information for the target application.

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.

GCV Definition

<definition
name="my-gcv"
type="string"
display-name="Source subtree"
>
<value>\mytree\novell\</value>
</definition>

Reference

<xsl:if test="starts-with(@src-dn,'~my-gcv~'">

Result

<xsl:if test="starts-with(@src-dn,'\mytree\novell\'">

8.7.2 DirXML Script Access

See the DirXML Script documentation for the full description. GCVs can be accessed in DirXML Script policies in several ways:

  • Text Replacement

  • 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.