Albatross provides an HTML templating system that applications use to provide the presentation layer.
The template parser uses regular expressions to locate all of the template tags. All text that is not recognised as an Albatross tag or associated trailing whitespace is passed unchanged through the parser. In practice this means that you can use the templating system for non-HTML files.
The parser regular expressions recognise all tags names that are prefixed by either ``al-'' or ``alx-''. All standard Albatross tags use the ``al-''. The ``alx-'' prefix is provided to ensure extension tag names do not clash with standard names.
For Albatross tags that enclose content you can use the XML empty tag syntax to indicate that there is no content. The parser transforms all tag and attribute names to lowercase and allows attributes on multiple lines. For example the following two constructs are identical.
<al-for iter="i" expr="seq" pagesize="10" prepare> </al-for> <AL-FOR ITER="i" EXPR="seq" PAGESIZE="10" PREPARE/>
The parser handles attribute values enclosed with either single or
double quotes. The enclosing quote character can be used in the
attribute string if it is escaped by a backslash (``'').
Attribute values can be broken over multiple lines.