#### 37.5.2 Determining the value of a configuration variable

The value of a configuration variable depends on whether the referenced setting is present and valid:

For present settings, value is the latest override (if any)

For missing settings, value is the default

For invalid settings, value is zero

For present settings, value is the latest override (if any)

The value of a configuration variable is the value of the setting in question at the time a macro is executed. If the original setting in your configuration file was overridden by a configuration-variable assignment in a PI marker or another macro, the override, not the original value, is the value returned for <$$[section]key>. See §42.2 Overriding settings with PI markers or macros.

For missing settings, value is the default

If you use a configuration variable to retrieve the value of a setting when the key is not present in your configuration file, or the section itself is missing from your configuration file, the value of <$$[section]key> is the default value specified for that key.

In some cases the default value is an empty string, as for a missing [Style*Prefix] or [Style*Suffix] setting.

For invalid settings, value is zero

If you use a configuration variable to retrieve a value when <$$[section]key> refers to an invalid configuration-file section, or to an invalid key, DITA2Go returns 0 (zero), which is interpreted as false in a conditional expression <$_if($$[section]key ...)>; see §37.6.4.2 Using conditional expressions.

Previous Topic: 37.5.1 Understanding configuration macros and variables

Next Topic: 37.5.3 Deploying configuration macros

Parent Topic: 37.5 Accessing settings with configuration macros

Sibling Topics:

37.5.1 Understanding configuration macros and variables

37.5.3 Deploying configuration macros

Table of Contents • Index