meld3 Overview meld3 is an XML templating system for Python 2.3+ which keeps template markup and dynamic rendering logic separate from one another. See http://www.entrian.com/PyMeld for a treatise on the benefits of this pattern. meld3 is a variation of Paul Winkler's Meld2, which is itself a variation of Richie Hindle's PyMeld. meld3 uses Frederik Lundh's ElementTree library. Requirements Python 2.3+ ElementTree 1.2+ (http://effbot.org/downloads/#elementtree) Differences from PyMeld - templates created for use under PyMeld will not work under meld3 due to differences in meld tag identification (meld3's id attributes are in a nondefault XML namespace, PyMeld's are not). - The "id" attribute used to mark up is in the a separate namespace (aka. xmlns="http://www.plope.com/software/meld3"). So instead of marking up a tag like this::
meld3 requires that you qualify the "id" attribute with a "meld" namespace element, like this::
As per the XML namespace specification, the "meld" name is completely optional, and must only represent the "http://www.plope.com/software/meld3" namespace identifier, so this input is just as valid::
- Input documents must be valid XML or XHTML and must include the meld namespace declaration on the root element, eg.: ... - Output documents do not include any meld namespace attributes. - Output is not performed in "html mode" (yet), so some elements which are conventionally "autoclosed" by PyMeld to support older browsers are not closed by meld3. For example, if you create an empty textarea element in PyMeld, it will likely be rendered as:: In meld3 it is rendered as::