The core of the template file is a control file named "control.xml". It is an XML file containing information about files to be generated. It is structured as follows:
The top level is the product level identified by the <product> tag. (The tag name "product" will be replaced by unique product name identifier in respective products.) It gives a brief description of the template and serves for product and version information purpose. The code generator will monitor changes in this tag before generating scripts with the template.
|date||Template creation date|
|version||Template version number|
|desc||Brief description of the template|
|language||Language of the template|
|author||Author of the template|
The next level is the control level identified by the <control> tags. Each <control> tag specify an output file or a set of output files to be generated by the code generator.
|id||Control ID. This attribute identifies the page(s) to be generated.|
|ofile||Output file name|
|oext||Output file extension|
|tagext||Optional. Control tag extension. It is used to distinguish control tags with the same ID. Some control tags have same ID because they are related, usually one is a class file, the other a page using the class. Possible value is "class" only. If tagext="class", the file is a class and will by generated to the output folder with id="_classes". If no tagext, the file will be generated according to the ofolder or ofolderid attribute (see below).|
Control type. Possible values are:
|ifiles||Input file(s). (Currently it is always one file for each control only.)|
|ofolder||Optional. Output folder (relative to project folder). If no ofolder or ofolderid is specified, the default output folder is the project folder.|
|ofolderid||Optional. Output folder id. The id is used to get the output folder defined by controls with type="folder" (see above). If no ofolder or ofolderid is specified, the default output folder is the project folder.|
|remark||Remark to be shown in the generation file list before generation.|
Condition for the control. If condition specified, the file(s) will only be generated if the condition is met. If no condition, the file(s) will always be generated.
<condition> [[<logical operator> <condition2>] ...]
<object>.<property> <comparison operator> <value>
See Object Properties for available objects and properties.
Note If the object property is not of boolean type, the comparison operator and the value MUST be provided. The property will NOT be evaluated as a boolean.
Supported logical operator:
Note Parentheses are supported.
Supported comparison operators: