==================================================== Zero Markup Language (ZML) Specification Version 0.3 ==================================================== Introduction ------------ Zero Markup Language (abbreviated ZML) is a template language and is designed to be human-friendly, lean and flexible. This specification is both an introduction to the ZML language and the concepts supporting it, and also a complete specification of the information needed to develop applications for processing ZML. ZML represents hierarchically structured data in conjunction with template logic in an integrated system. Documents are structured by using indentation instead of opening and closing tags. ZML is designed for a platform- and implementation-independent use. Currently there is only one implementation of the ZML specification. (the python "zml"-module implementing the specification for a zml renderer). We try to encourage the creation of implementations in different programming languages by developing a reliable specification standard. The specification versions below 1.0 are working drafts. The first release version 1.0 will maintain backward compatibility for all 1.x versions by asserting the validation of a test suite. (a collection of tests for testing the output of an implementation to be the same as the output of previous versions. The maintainers of the different implementations should supply a community driven test-suite to assert the backward-compatibility for versatile test-cases. Goals ----- The design goals for ZML are, in decreasing priority: #. ZML is easily readable by humans #. ZML templates a portable between different implementations and frameworks #. ZML is extensible #. ZML is a good base for the usage of javascript mvc frameworks in the templating #. ZML is easy to implement and use Syntax ------ Elements ^^^^^^^^ An element is described by * an element name (f.e. 'h1', 'div', 'p') followed by * a colon followed by * one space character followed by * quoted content of the element **Single H1 headline with text** :: h1: 'One headline' Result: ::
A teaser intro
Some article text...
more """" **Nesting of structures:** :: div#sidebar: div.teaser: p.intro: 'A teaser intro' h1: 'One headline' img src='article.jpg' p: 'Some article text' a href='article1.html': 'more' Result: :: """" Attributes ^^^^^^^^^^ **Attributes are described by:** * attribute name optional group of: * equal sign [=] * attribute value Attribute value can be quoted strings (single quote) or context variables. Quoted strings may include context properties surrounded by moustaches. :: a href='article1.html': 'more' Result: :: more **Empty attributes are described by a single attribute name without the optional group of equal sign and quoted value.** :: form: input type='text' disabled Result: ::