(Jun 9 2008, from branches/stable/0.5.x)
* Added include directive for text templates (ticket 115).
* Added new markup transformation filter contributed by Alec Thomas. This
provides gorgeous jQuery-inspired stream transformation capabilities based
on XPath expressions.
* When using HTML or XHTML serialization, the `xml:lang` attribute is
automatically translated to the `lang` attribute which HTML user agents
understand.
* Added support for the XPath 2 `matches()` function in XPath expressions,
which allow matching against regular expressions.
* Support for Python code blocks in templates can now be disabled
(ticket 123).
* Includes are now processed when the template is parsed if possible, but
only if the template loader is not set to do automatic reloading. Included
templates are basically inlined into the including template, which can
speed up rendering of that template a bit.
* Added new syntax for text templates, which is more powerful and flexible
with respect to white-space and line breaks. It also supports Python code
blocks. The old syntax is still available and the default for now, but in a
future release the new syntax will become the default, and some time after
that the old syntax will be removed.
* Added support for passing optimization hints to `<py:match>` directives,
which can speed up match templates in many cases, for example when a match
template should only be applied once to a stream, or when it should not be
applied recursively.
* Text templates now default to rendering as plain text; it is no longer
necessary to explicitly specify the "text" method to the `render()` or
`serialize()` method of the generated markup stream.
* XInclude elements in markup templates now support the `parse` attribute;
when set to "xml" (the default), the include is processed as before, but
when set to "text", the included template is parsed as a text template using
the new syntax (ticket 101).
* Python code blocks inside match templates are now executed (ticket 155).
* The template engine plugin no longer adds the `default_doctype` when the
`fragment` parameter is `True`.
* The `striptags` function now also removes HTML/XML-style comments (ticket
150).
* The `py:replace` directive can now also be used as an element, with an
attribute named `value` (ticket 144).
* The `TextSerializer` class no longer strips all markup in text by default,
so that it is still possible to use the Genshi `escape` function even with
text templates. The old behavior is available via the `strip_markup` option
of the serializer (ticket 146).
* Assigning to a variable named `data` in a Python code block no longer
breaks context lookup.
* The `Stream.render` now accepts an optional `out` parameter that can be
used to pass in a writable file-like object to use for assembling the
output, instead of building a big string and returning it.
* The XHTML serializer now strips `xml:space` attributes as they are only
allowed on very few tags.
* Match templates are now applied in a more controlled fashion: in the order
they are declared in the template source, all match templates up to (and
including) the matching template itself are applied to the matched content,
whereas the match templates declared after the matching template are only
applied to the generated content (ticket 186).
* The `TemplateLoader` class now provides an `_instantiate()` method that can
be overridden by subclasses to implement advanced template instantiation
logic (ticket 204).
* The search path of the `TemplateLoader` class can now contain ''load
functions'' in addition to path strings. A load function is passed the
name of the requested template file, and should return a file-like object
and some metadata. New load functions are supplied for loading from egg
package data, and loading from different loaders depending on the path
prefix of the requested filename (ticket 182).
* Match templates can now be processed without keeping the complete matched
content in memory, which could cause excessive memory use on long pages.
The buffering can be disabled using the new `buffer` optimization hint on
the `<py:match>` directive.
* Improve error reporting when accessing an attribute in a Python expression
raises an `AttributeError` (ticket 191).
* The `Markup` class now supports mappings for right hand of the `%` (modulo)
operator in the same way the Python string classes do, except that the
substituted values are escape. Also, the special constructor which took
positional arguments that would be substituted was removed. Thus the
`Markup` class now supports the same arguments as that of its `unicode`
base class (ticket 211).
* The `Template` class and its subclasses, as well as the interpolation API,
now take an `filepath` parameter instead of `basedir` (ticket 207).
* The `XHTMLSerializer` now has a `drop_xml_decl` option that defaults to
`True`. Setting it to `False` will cause any XML decl in the serialized
stream to be included in the output as it would for XML serialization.
* Add support for a protocol that would allow interoperability of different
Python packages that generate and/or consume markup, based on the special
`__html__()` method (ticket 202).