DocFlex Technology - Overview - Templates / Template Designer Features

Template Components

DocFlex templates can be considered as a sort of computer programs, containing instructions interpreted by DocFlex Generator. Such instructions are specified in the form of template components.

Template components are the building blocks of templates and visualized in DocFlex Template Designer. Almost everything you can see on the following screenshot depicts some template components.

Component Properties

The interpretations of template components as well as their appearance in the Template Designer can be adjusted with component properties.

Most of the component properties are specified statically in templates using special Property Inspectors:

Some of the component properties, however, can be calculated dynamically depending on the data being processed. Such dynamic properties are specified using FlexQuery-expressions.

FlexQuery Expression Editors and Assistant Dialog

For programming convenience, all input fields for FlexQuery-expressions in the DocFlex Template Designer are implemented with the special Expression Editors supplied with the expression quick-check button:

and the button invoking the FlexQuery Expression Assistant Dialog:

which provides a lot of information about everything that can be used in the expression:

This information is always up-to-date as it is obtained mostly not from the static help files but collected dynamically from all available resources. Here, you can also select a necessary identifier and insert it directly into the edited expression.

Location Path Chooser

Location Paths, which are XPath-like expressions used in many settings within templates, can be selected using the special Location Path Chooser dialog:

Template Parameters

DocFlex provides elaborated methods to handle template parameters.

The following parameter types are supported:

Parameter Type Usage
string string parameters
number numeric parameters (both integer and float)
boolean boolean parameters (to specify yes/no or true/false settings)
enum string parameters whose value can be selected only among specified strings
(e.g. "red", "yellow", "blue")
text same as string type, but allows to enter multiline text
object this type is intended mostly for internal use
(e.g. to program passing parameters between templates)

In the Template Properties Dialog of any template, it is possible to declare a list of template parameters:

Each parameter declaration consists of

  1. parameter name
  2. description
  3. data type
  4. for the enum-parameter, the list of the possible values
  5. default value
  6. other settings

When starting the generator, the template parameters can be either specified in the Template Parameter Inspector dialog:

or passed programmatically, using DocFlex API.

Within templates, the values of passed parameters can be obtained in FlexQuery-expressions using getParam() function.

Stock-Sections

The small repeatable fragments of a template can be designed only once and, then, be put into the special template part called Template Stock in the form of stock-sections.

Such stock-sections can be called many times from the different template's locations and even from within themselves.

Each stock-section call produces the same fragment of the output document as if the stock-section's content was in the place of its call. Stock-sections can be considered as an equivalent of procedures in a typical programming language.

For more information, see documentation: Template Components, Stock-Sections, Call Stock-Section.

Calling Subtemplates

DocFlex allows to call from one templates another templates (subtemplates). Each called subtemplate can produce either the separate document or a fragment of the common document being generated by the calling one. This allows

For more details, see documentation: Template Components | Call Template.


Copyright© 2003-2009 Filigris Works, Leonid Rudy Softwareprodukte. All rights reserved.
To contact us, please visit www.filigris.com or e-mail to: contact@filigris.com