<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>z3c.pt</name>
<shortdesc>An implementation of the TAL template language.</shortdesc>
<description>Overview
--------
		      
The z3c.pt package provides an alternative implementation of the TAL
template language including i18n. It also provides a simple text
template class that allows expression interpolation.

Casual benchmarks pegs it 12x more performant than ``zope.pagetemplate``.

In a nutshell:

* Templates are bytecode-compiled
* Only Python-expressions are supported
* Depends only on lxml
* Adds support for expression interpolation
* Limited support for CSS, Javascript and other non-XML documents

See the README.txt inside the package for instructions on usage.

Note: The METAL macro language is not supported.

Template and expression language
--------------------------------

The template and expression language is based loosely on the TAL 1.4
specification*. Some notable changes:

1. Only Python-expressions are allowed. Expressions can have
   try-except fallbacks using the vertical bar syntax:

      tal:content="&lt;expression&gt; | &lt;first fallback&gt; | &lt;second fallback&gt; | ..."

2. Tuples are allowed in the tal:define statement:

      tal:define="(a, b, c) [1, 2, 3]"

3. Generators are allowed in tal:repeat statements. Note that the
   repeat variable is not available in this case.

      tal:repeat="i &lt;some generator&gt;"

4. Attribute-access to dictionary entries is allowed, e.g.

      dictionary.key

   can be used instead of ``dictionary['key']``.

5. Expressions that return a callable are called.

6. Expression interpolation is allowed:

       &lt;a href="mailto:${context.email}"&gt;${context.email}&lt;/a&gt;

7. Attribute-values are always escaped; document expressions are
   never.
   
.. _TAL: http://wiki.zope.org/ZPT/TALSpecification14

Development
-----------

If you want to use the code directly from trunk, provide
``z3c.pt==dev`` as your dependency.

http://svn.zope.org/z3c.pt/trunk#egg=z3c.pt-dev

Changelog
---------

Version 0.7 - March 10, 2008
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Added support for comments; expressions are allowed
  inside comments, i.e.

     &lt;!-- ${'Hello World!'} --&gt;

  Comments are always included.
  
Version 0.6 - February 24, 2008
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Added support for text templates; these allow expression
  interpolation in non-XML documents like CSS stylesheets and
  javascript files.

Version 0.5 - February 23, 2008
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Expression interpolation implemented.

Version 0.4 - February 22, 2008
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Engine now uses cStringIO yielding a 2.5x performance
  improvement. Unicode is now handled correctly.

Version 0.3 - December 23, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Code optimization; bug fixing spree
  [malthe]

- Added ``ViewPageTemplateFile`` class
  [malthe]
  
- Added support for i18n
  [malthe]
  
- Engine rewrite; improved code generation abstractions
  [malthe]

  
Version 0.2 - December 5, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Major optimizations to the generated code
  [malthe]


Version 0.1 - December 3, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- First public release
  [malthe]</description>
<maintainer><foaf:Person><foaf:name>Malthe Borch</foaf:name>
<foaf:mbox_sha1sum>38d1fa3709e4435d5acabdd3c1d26b529ec24227</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.7</revision></Version></release>
</Project></rdf:RDF>