Generate rich text using logic and data

Content generation saves time and improves quality

How does it work?

Content generation starts with one or more templates. Templates usually contain word processing content, but other types of output such as HTML, plain text, JSON, vector graphics and more can be generated.

Templates mix content with logic which is run at generation time. If data is available, it can be queried or copied, however you can generate content that has the current date and time without providing any data. Logic is defined using expressions, which use a very powerful open standard called XPath.

Templates can call each other and are a fundamental element for reuse. They are used to group sections of content, handle lookup or labelling, act as a utility (e.g., he-she, his-her, client-name), and much more. They can also contain instructions that control the flow of processing, such as conditional logic (if, choose/when) and repetition (for-each).

Automate vs. Scribe

Support for content generation can be found in both the Automate and Scribe apps, although there are some important differences. Both use a foundation of open standards including XSLT, XSL-FO and RNG.

The Automate app uses the open standards listed above in the purest way. It does not include any extensions (discussed further below), which means it is fully compatible with other software that uses these standards. Some notable features are:

  • No-code XSLT+FO (dynamic rich text) editor that is a lite version of what's in Scribe

  • Non schema-aware XSLT/XQuery 3.1 processing

  • Support for template matching and named templates in XSLT

  • Support for input and output of XML, HTML, JSON and text content

  • Able to generate SVG graphics and other XML-based vocabularies

  • Able to save multiple output files during one generation

The Scribe app extends these open standards to handle more complex tasks. Files created in this app can be safely processed by other software, however not all features will work the same way. It supports schema-aware XSLT 3.1 processing, and a list of unique features discussed further below.

Scribe is more mature and over time more of its functionality will be replicated in Automate. While there is considerable overlap, the remainder of this page focusses on how content generation works in the Scribe app.

Unlimited data fields

Data is defined using fields. Fields have properties like name, label and form control. You only need to choose names for your fields, everything else is optional or automatic.

Forms are automatically generated for the data field instructions you enter, and can be previewed at any time.

Field names are used in expressions while labels are used in forms. Form controls provide hints to make forms easier to use.

Logic instructions are inserted into text like free-flowing images. These are called logic bubbles. Clicking on logic bubbles reveals action buttons (e.g., Select template) that let you edit or view more info.

Some logic bubbles use expressions and will open an expression editor to display them. Others let you select which template to call, specify pass-in values (parameters), or navigate to the current template. 

Logic bubbles

Decision tree

A decision tree is used to visualize logical flow for the current template. It has branches for major instructions like if, choose/when, for-each and variables.

Selecting a branch causes the content of that instruction to display below. Tools are provided to format text and insert logic bubbles.

The content displayed is an approximation of what will be generated. During generation logic bubbles are replaced, while conditional logic and repetition is handled. The final output is a word processing file (*.docx) ready for final editing in your favorite word processor.

Forms

One form is automatically generated for each data setup file imported into your templates. A filter is provided to only show fields used in your templates. This is useful when there are large numbers of fields.

The auto fill feature maps columns (e.g., from CSV file, database, web API call, etc.) to data fields in the form. Mapping is done visually using arrows between clickable labels and can be saved for reuse. Mappings can be conditional (only run if a condition is true) and/or transform data during the copy.. 

Other useful features

Tag's Scribe app takes a multi-file view of content generation jobs. Template files reference data setup files, while data files reference template files. This is comparable to treating the list of all connected files like a single project.

While open standards (XSLT, XSL-FO and RNG) are followed whenever possible, some extensions unique to Tag are used to keep things simple and add some power.

  • When opening data files check to see if any fields have changed

  • Auto-upgrade data if changes are detected and preserve data if possible

  • Utility templates can generate dynamic comma-separated, bulleted or numbered lists

  • An easy to use wizard is generated to display all forms and guide data entry

  • Auto-fill mapping instructions can be attached to a report

  • Data can be imported into forms from CSV, SQL database, knowledge graph, web API or pipeline

  • Statistical datatypes on data fields can make use of stats conversion functions

  • Data can be aggregated (into CSV) from multiple data files for the same report

When content is generated in the Scribe, by default, it is saved as a word processing file (*.docx). It is also possible to generate a PNG image of the generated content.

The Scribe app can be used for free with limitations (only three generations per month). An unlimited number of generations is available to Individual subscriptions.