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. If ofile and oext are not provided, the input file name and extension will be used.|
|oext||Output file extension. For use with ofile. If ofile and oext are not provided, the input file name and extension will be used.|
|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.|
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: