System variables

System variables are variables defined by TopLeaf that cannot be directly created or altered. A system variable name is a token beginning with a lowercase letter and continuing with letters, digits, hyphens, underscores, colons, or full stops, which together are known as system variable name characters. The value of a system variable is universal and may be accessed by any mapping.

The following table lists the system variables that may be used within custom content.

Variable Summary Where Defined
{catalog-folder} The folder containing the partition catalog “Generated files”
{content} Scanned content (without markup) “Content”
{content-model} The content model applied to the tag being mapped. “Tag specific”
{current-document} The path to the document currently being processed (changes whenever a new sub-document is accessed) “Generated files”
{document-file} The path to a generated copy of the source document “Generated files”
{dtd-folder} The folder containing the partition DTD “Generated files”
{document-folder} The folder containing the {current-document} “Predefined folder paths”
{index-file} The path to the generated index file “Generated files”
{keywords} The keywords associated with the current partition “Partition specific”
{leaf-indicators} The path to the leaf indicators file “Generated files”
{language} The language part of the current language identifier “Tag specific”
{locale} The current language identifier “Tag specific”
{live-pages} The path to the list of active pages “Generated files”
{mappings-folder} The path to the folder containing the mappings.tlx file; this is usually the same as the publication folder, but can be different when mappings are shared between publications. “Predefined folder paths”
{note-index} The note label for a split column footnote or split page footnote “Column footnotes”
{page-final} Indicates if an output page is the final page in a document “Page specific”
{page-orientation} The page orientation for the current page type “Page type specific”
{page-sequence} The output page sequence number “Page specific”
{page-side} The output page side “Page specific”
{page-type} The current page type “Page type specific”
{partition-folder} The path to the current partition folder “Predefined folder paths”
{previous-token} The name of the previous token processed in the input stream “Tag specific”
{publication-folder} The path to the current publication folder “Predefined folder paths”
{published-release-label} The published release label string “The {published-release-label} variable”
{release-label} The partition release label string “The {release-label} variable”
{release-number} The partition release number “The {release-number} variable”
{tag-id} A unique identifier for the element being mapped “Tag specific”
{tag-occurrence} The sequence number of this element within its parent compared to other elements with the same {tag-name} “Tag specific”
{tag-name} The name of the tag being mapped “Tag specific”
{tag-parent} The name of the parent tag of the tag being mapped “Tag specific”
{tag-context} The tag context path “Tag specific”
{toc-file} The path to the generated table of contents file “Generated files”
{total-pages} The total number of pages produced last time the partition was set “Partition specific”
{xref-file} The name of the generated XREF file “Generated files”
[Note] Note

All mappings (other than $document) can reference system variables from user definable controls in some editor tabs providing TopLeaf assigns the variable before the mapping is invoked.