The Generator Object Model (GOM) exposes some inner working of the DocFlex Generator in the form of hierarchy of objects which represent some of the generator's components and the data the generator processes.
Those objects and their properties can be accessed within FlexQuery expressions in a template in order to control the interpretation of the template components and the output they produce.
At any particular moment, the generator may be processing one or several templates (which, in that case, are those called one from another).
For each template, the generator maintains a special GOMContext
object which holds information about the template's current processing state.
The GOM starts from the GOMContext
object associated with
the given template. The properties of that object are accessible within
FlexQuery expressions in the same way as variables. Those properties are called
also generator variables.
The values of generator variables are references to other GOM objects, which, in turn, hold their own properties and so on. This provides access to the whole GOM.
Example:
This expression returns an identifier of the generator's current context element.contextElement.id