Elements are XML-like tags embedded inside a template that control how data is rendered beyond simple value injection. While merge fields ({!Object.FieldName}) output a raw value, elements handle repeating rows, conditional sections, images, rich text, barcodes, and more.
Elements are written directly in your template file. The Doctavian Add-in (Word, Excel) and Add-on (Google Docs, Sheets) let you insert them from a UI panel without writing the tags manually.
Not all elements are available in every template format. See the Elements Reference for the full format support matrix.
Every element supports a name parameter (required) and a hidden parameter (optional) that accepts an expression evaluating to true or false. When hidden is true, the element is suppressed from the output entirely.
<mdoc:text name="discountLine"
value="{!$concat('-', Invoice[0].DiscountPercent, '%')}"
hidden="{!$Invoice[0].DiscountPercent == 0}" />Parameters marked as supporting expressions accept {!$Expression} notation in addition to static values.
Elements read from the data supplied at generation time. In Doctavian's data format, every direct member of the root data object is a list of records — that list is the collection a Repeater, Table or Slide iterates over, and a merge field such as {!Invoice.InvoiceNumber} reads a field from it. Values arrive as strings already formatted for the generation locale; use Expressions to convert or reformat them.
When a template uses Include to pull in another template and you generate with POST /documents/document/generate, list each included template in template.relatedItems. Each entry's name must match the reference the Include element uses exactly, or the include resolves to nothing; give its fileFormat and either urn + loadMethod or a url.
The Elements Reference contains the complete parameter tables, format support matrix, and examples for every element.