<< Click to Display Table of Contents >> Navigation: Data Module > Description builder > Settings > Template |
The description builder template (*.dbtemplate) is an XML based definition of how the selected items in the description builder are compiled into the final description text.
The main templates relate to the Joiner, Soil & Rock. Within each of these are item one or more items representing a line of text, containing static text (i.e. 'with some'), variables (defined by {} or {{}}), blocks (i.e. ||) and concatenation items (defined by []).
A line represents an output paragraph, and may contain any number of Blocks (i.e. ||)
A Block may contain static text and any number of Variables
Variables can be singular (i.e. {} - for simple processing) or complex (i.e. {pre-text {} post-text} - for more complex processing)
If a single variable represents a range (i.e. Min & Max) these are processed in the format {Min}{Separator}{Max}.
If no variables in a Block return a value, the entire Block is skipped.
The case of the Variable written in the template determines if the output is upper (i.e. M1_NAME), lower (i.e. M1_name) or title (i.e. M1_Name) case.
It is possible to output either the Name or Abbreviation (Abbr) value associated with a Variable. To access the Abbreviation, simply append 'A' (upper case) or 'a' (lower or title case).
In the case of soil fractions it is necessary to process portions as a single block, therefore necessitating the concatenation of data from the separate fractions.
This is achieved by adding square brackets at the end of a block. Text inside the the brackets is used as the joiner between parts.