Tags und Styles
Elements are marked resp. identified by
Tags.
Those Tags are defined in
Styles.
Styles can be loaded via
- the definition of a TemplateLanguage as obligatory language specific Default Style or
- the BuildIn-Macro style in a template.
The Template Elements are supported by the following tags:
Comments
Comments can be used to document the Template. They will ignored in the further processing.
- Line Comment
-
A Line Comment starts with the Line Comment Tag and ends at the end of the line ('_').
Syntax (Core Style):
- Block Comment
-
A Block Comment starts with the Block Comment Start Tag and ends with the Block Comment End Tag.
Syntax (Core Style):
Syntax (JSP):
Code
Code is Java code to be generated directly in the Templet's execute-method.
- Line Code
-
A Line Code starts with the Line Code Tag and ends with the end of the line ('_').
Syntax (Core Style):
- Block Code
-
A Block Code starts with the Block Code Start Tag and ends with the Block Code End Tag.
Syntax (Core Style):
Syntax (JSP):
Expression
An Expression is an unary Java expression to be evaluated at the Templet's runtime; i.e. on generation of the final output.
-
An Expression starts with the Expression Start Tag and ends with the Expression End Tag.
java.lang.String.valueOf(my expression) has to be a valid Java expression.
Syntax (Core Style):
Syntax (JSP):
Evaluation
An Evaluation is replaced at the template's parsing time.
Currently, only replacement of Properties is implemented.
- Propertyevaluation
-
A Property Evaluation starts with the Property Evaluation Start Tag and ends with the Property Evaluation End Tag.
[p$my property$p] is replaced with my value by the Template Compiler.
Syntax (Core Style):
Statement
Statements are the central and most powerfull control elements.
The consists of a
Macro-Call.
- Line Statement
-
A Line Statement starts with the Line Statement Tag and ends with the end of the line ('_').
Syntax (Core Style):
- Block Statement
-
A Block Statement starts with the Block Statement Start Tag and ends with the Block Statement End Tag.
Syntax (Core Style):
Syntax (JSP):