#### 39.1.3 Understanding how templates are chained together

Configuration templates are chained together in a series, each accessing all the settings in the next, plus all the settings in all other templates farther up the chain. If a given setting appears in more than one template in a chain, the instance of that setting closest to your project configuration file takes precedence over any that are farther away.

Table 39-1 Output-type-specific general configuration files

Output type | Project configuration file | Editable local configuration file
DITA |
    _d2dita.ini
    local_d2dita_config.ini
DocBook |
    _d2docbook.ini
    local_d2docbook_config.ini
Eclipse Help |
    _d2eclipse.ini
    local_d2eclipse_config.ini
HTML |
    _d2html.ini
    local_d2html_config.ini
MS HTML Help |
    _d2htmlhelp.ini
    local_d2htmlhelp_config.ini
JavaHelp |
    _d2javahelp.ini
    local_d2javahelp_config.ini
OmniHelp |
    _d2omnihelp.ini
    local_d2omnihelp_config.ini
Oracle Help |
    _d2oraclehelp.ini
    local_d2oraclehelp_config.ini
WinHelp |
    _d2winhelp.ini
    local_d2winhelp_config.ini
MS Word |
    _d2rtf.ini
    local_d2rtf_config.ini
XHTML |
    _d2xhtml.ini
    local_d2xhtml_config.ini

Each project configuration file references an output-type-specific local configuration file. This editable local configuration file in turn references its system counterpart, which references the next editable local configuration file in the chain, and so forth.

For example, the MS Word starting project configuration file _d2rtf.ini references this chain of general configuration templates and files:

    _d2rtf.ini ->
      local_d2rtf_config.ini-> d2rtf_config.ini ->
        local_d2g_config.ini -> d2g_config.ini ->
          local_omsys.ini -> omsys.ini

The HTML starting project configuration file references this chain:

    _d2html.ini ->
      local_d2htm_config.ini -> d2htm_config.ini ->
        local_d2g_config.ini -> d2g_config.ini ->
          local_omsys.ini -> omsys.ini

Some chains are longer. For example, for OmniHelp output, the chain looks like this:

    _d2omnihelp.ini ->
      local_d2omnihelp_config.ini -> d2omnihelp_config.ini ->
        local_d2help_config.ini -> d2help_config.ini ->
          local_d2htm_config.ini -> d2htm_config.ini ->
            local_d2g_config.ini -> d2g_config.ini ->
              local_omsys.ini -> omsys.ini

All general configuration chains go through either d2htm_config.ini (for HTML or XML output) or d2rtf_config.ini (for Word or WinHelp output). These two configuration templates reference the format and macro configuration files and templates, through side chains. Therefore, as long as your project configuration file references one of the output-specific configuration files, you do not have to include settings in your project configuration file to reference those other files.

See also:

§39.1.4 Understanding how macro libraries are organized

§39.1.5 Understanding how format templates are organized

Previous Topic: 39.1.2 Understanding how templates are named

Next Topic: 39.1.4 Understanding how macro libraries are organized

Parent Topic: 39.1 Working with configuration templates

Sibling Topics:

39.1.1 Understanding how templates are organized

39.1.2 Understanding how templates are named

39.1.4 Understanding how macro libraries are organized

39.1.5 Understanding how format templates are organized

39.1.6 Understanding how language templates are organized