Edgewall Software

Changes between Version 2 and Version 3 of MarkupTemplates


Ignore:
Timestamp:
Jul 4, 2006, 3:25:13 PM (18 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MarkupTemplates

    v2 v3  
    66 * The same basic set of directives (excluding `py:extends` and `py:layout`)
    77 * Inline expressions using the `${expr}` (or just `$expr`) syntax.
    8  * Expressions are real Python code, not some crippled mini language.
     8 * Expressions are real Python code, not some “crippled” mini language.
    99 * Stream-based processing model making heavy use of Python generators.
    1010 * Different serialization methods, for example to produce XML or HTML output.
    1111
    1212Differences include:
    13  * No generation of Python code for a template; the template is "interpreted"
     13 * No generation of Python code for a template; the template is executed directly.
    1414 * No support for `<?python ?>` processing instructions
    1515 * Expressions are evaluated in a more flexible manner, meaning you can use e.g. attribute access notation to access items in a dictionary, etc (see the [source:/trunk/markup/eval.py markup.eval] module)
    1616 * Use of XInclude and match templates instead of Kid's `py:extends` / `py:layout` directives
     17 * `py:match` directives use (basic) XPath expressions to match against input nodes, making match templates more powerful while keeping the syntax simple (see the [source:/trunk/markup/path.py markup.path] module)
    1718 * Real (thread-safe) search path support
    1819 * No dependency on ElementTree (due to the lack of position reporting)
    1920 * The original location of parse events is kept throughout the processing pipeline, so that errors can be tracked back to a specific line/column in the template file
    20  * `py:match` directives use (basic) XPath expressions to match against input nodes, making match templates more powerful while keeping the syntax simple (see the [source:/trunk/markup/path.py markup.path] module)
     21 * In simple tests (see [source:/trunk/examples/basic examples/basic]) the rendering phase (i.e. not including parsing/compilation) runs about twice as fast compared to Kid. Parsing is generally quite a bit faster in Markup, too.