TextTemplate
TextTemplate
Syntax
<TextTemplate rootSectionName="...">
<FileFormat ... />
<Output ... />
<TextSections>
<TextSection ... />
</TextSections>
</TextTemplate>
Parameters
Parameter |
Description |
Default |
Remark |
rootSectionName |
The name of the root section. |
_template_ |
|
Child sections
Syntax
<FileFormat
...
singleLineCommentPrefix="..."
multiLineCommentPrefix="..."
multiLineCommentSuffix="..."
/>
Parameters
Parameter |
Description |
Default |
Remark |
... |
Click here to see the generic FileFormat options. |
|
|
singleLineCommentPrefix |
The single line comment prefix. |
|
|
multiLineCommentPrefix |
The multi-line comment prefix. |
|
|
multiLineCommentSuffix |
The multi-line comment suffix. |
|
|
TextSection
The TextSection configuration defines a section in a text template. This can either be defined in the template part of the config or in the template directly. The syntax here is provided for in the configuration, but the same parameters are also available when specifying the section inline in a template using the TextSection annotation.
Syntax
<TextSection
name="..."
[
begin="..."
includeBegin="..."
end="..."
includeEnd="..."
literalOnFirstLine="..."
literalOnLastLine="..."
nrOfLines="..."
]
[
prefix="..."
prefixStyle="..."
prefixAction="..."
]
[
suffix="..."
suffixStyle="..."
suffixAction="..."
]
/>
Parameters
Parameter |
Description |
Default |
Remark |
name |
The name of the section. |
|
This can only contain a-z, A-Z, 0-9, _ and - characters. |
begin |
Character sequence which defines the beginning of the section. |
|
If begin is not specified, it will automatically start on the first line after the annotation. This can thus only be done with an inline annotation. |
includeBegin |
Whether to include the characters specified in begin in the output |
true |
|
end |
Character sequence which defines the beginning of the section. |
|
Cannot be used in conjunction with nrOfLines . |
includeEnd |
Whether to include the characters specified in end in the output |
true |
|
literalOnFirstLine |
Literal which exists on the first line of the section, the whole line will be taken into the section. |
|
Cannot be used in conjunction with begin . |
literalOnLastLine |
Literal which exists on the last line of the section, the whole line will be taken into the section. |
|
Cannot be used in conjunction with end or nrOfLines . |
nrOfLines |
Defines the number of lines of the section starting after the line containing the @XGenSection annotation. Any lines containing another (section) annotation should also be included. |
1 |
Cannot be used in conjunction with end or literalOnLastLine . |
prefix |
The prefix to prepend using the prefixStyle . |
|
|
prefixStyle |
The style of the prefix, see Prefix & suffix styles |
allButFirst |
Only interpreted when prefix is given. |
prefixAction |
The action to be performed with the prefix, either add or remove. |
add |
Only interpreted when prefix is given. Only add is supported at the moment. |
suffix |
The suffix to append using the suffxStyle . |
|
|
suffixStyle |
The style of the suffix, see Prefix & suffix styles |
allButLast |
Only interpreted when suffix is given. |
suffixAction |
The action to be performed with the suffix, either add or remove. |
add |
Only interpreted when suffix is given. Only add is supported at the moment. |
Prefix & suffix styles
Style |
Description |
firstOnly |
Only apply the suffix or prefix on the first repetition of the section. |
lastOnly |
Only apply the suffix or prefix on the last repetition of the section. |
allButFirst |
Apply the suffix or prefix on all repetition of the section, except the first. |
allButLast |
Apply the suffix or prefix on all repetition of the section, except the last. |
allButFirstAndLast |
Apply the suffix or prefix on all repetition of the section, except the first and last. |