OSI template syntax
OSI templates are provided for simplifying document generation. With the file support any OSI template can be created by means of expressions, but often, it becomes simpler to define an OSI template instead of an expression. OSI templates contain fixed text parts and code elements. Code elements are OSI expression statements or variable declarations.
OSI templates are syntactically defined as text templates. In a text template, code parts are included in $-sequences. A $-sequence starts with a single '$' character or a $keyword (a keyword preceded by a '$' character. A $-sequence must be terminated by a single '$ character. All text outside $-sequences is interpreted as fixed text or comment.
Text templates passed from external sources may start with template text immediately or might be preceded by an expression header. text templates can also be passed as template expressions.
When data has been stored in the database as XML, plain text is extracted from XML and passed to the expression. While extracting plain text, HTML tags and codes are converted to ASCII (<p>, <li>, <, > etc.).
text_template := templ_def | templ_code | temp_expr_dcl