Daisy documentation
 PreviousHomeNext 
5.21.3 Defining variablesBook Index5.21.5 Configuring variable resolution for books

5.21.4 Configuring Wiki variable resolution

It is possible to define the variable configuration globally for the Wiki, or per site. If the config for a site is missing, it will fall back to the global configuration, if present.

The global variable configuration should be placed here:

<wiki data dir>/conf/variables.xml

The site-specific variable configuration should be placed here:

<wiki data dir>/sites/<sitename>/conf/variables.xml

The content of the files is in both cases the same, and follows this structure:

<?xml version="1.0"?>
<variables>

  <variableSources>
    <variableDocument id="64-DSY"/>
    <variableDocument id="128-DSY"/>
    <variableDocument id="256-DSY"/>
  </variableSources>

  <variablesInAttributes allAttributes=”false”>
    <element name="img" attributes="daisy-caption,[comma separated list]"/>
    <element name="table" attributes="daisy-caption"/>
  </variablesInAttributes>

</variables>

Multiple variable documents can be specified, these will be searched in the given order when resolving variables.

For resolving variables in attributes, one can either explicitely define the attributes for which this should happen, or simply say to do it in all attributes. Explicitely listing the attributes can be used when performance is a concern (however, the amount of attributes in a Daisy document is typically not very high).

5.21.4.1 When the configuration doesn't seem to be used

The Daisy Wiki only looks for configuration changes every ten seconds. Thus if you count to ten and don't see the result of your configuration changes, there's something wrong.

Problems with errors in the configuration file (e.g. invalid XML) will be logged in the Daisy Wiki log file. They will not cause display of documents to fail.

Problems with loading the variables documents (e.g. don't exist, invalid XML, etc.) will be logged in the repository server log file.

 PreviousHomeNext 
5.21.3 Defining variables5.21.5 Configuring variable resolution for books