simpleTAL / simpleTALES (Version 3.9)
-------------------------------------
This is an implementation of the TAL and TALES specifications
see (http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixC.stx)

Installation
------------
To install SimpleTAL under Unix:
  
  (Note that to perform the installation of SimpleTAL you will probably
   have to have the Python Development package installed.)
  
  1 - Become root
  2 - Run "python setup.py install"
	
Under MacOS X:
  1 - Run "sudo python setup.py install"
  2 - Close the terminal program and re-open it.
  
Notes
-----
This code is made freely available under a BSD style license, see 
LICENSE.txt for more details.

The DummyLogger.py module is used if you do not have either Python 2.3
(un-tested on this) or the logging code from
http://www.red-dove.com/python_logging.html installed.

Note that the unit test cases (under tests) require logging to be installed
to run.

Migrating between 1.x and 2.x
-----------------------------
Version 2.0 is a complete refactoring of SimpleTAL, with all of the
internals to simpleTAL.py being re-written.  As such 2.0 is not directly
backwards compatible with 1.x, although all functionality from 1.x is still
available.

The two supported APIs for 1.x where:
	def expandTemplate (template, context, inputEncoding="iso8859-1"
										 ,outputEncoding="iso8859-1", allowTALInStructure=1)
	def expandXMLTemplate (file, context, outputEncoding="iso8859-1"
                        , allowTALInStructure=1)

These are replaced with two new calls:
	def compileHTMLTemplate (template, inputEncoding="iso8859-1")
	def compileXMLTemplate (template)

These two functions accept either a string containing the template, or a
file like object that contains the template.  They both return instances of
the Template class, which can then be used to perform the actual template
expansion by calling:
	template.expand (self, context, outputFile, outputEncoding=None)
	
The template instances can be re-used, which leads to huge performance
savings (upto 7X faster than the SimpleTAL 1.x approach).

Support for including TAL inside content which is brought into a template
using the 'structure' keyword has changed.  It is now possible to include
compiled templates into a simpleTALES.Context object, allowing the nesting
of TAL inside structure in a similar manner to the old allowTALInStructure
parameter.  As an example you can now do:

nestedTemplate = simpleTAL.compileHTMLTemplate 
                              ('<h1 tal:content="name">Name goes here</h1>')

masterTemplate = simpleTAL.compileHTMLTemplate (masterTemplateFile)

context.addGlobal ("nameTemplate", nestedTemplate)
masterTemplate.expand (self, context, outputFile)

There remains an edge case that is a bit tricky, and that is the handling of
TAL Structure which is generated by a callable object.  In SimpleTAL 1.x you
could do:

def genTALStruct ():
	return '<p tal:content="title">Title of page</p>'		
context.addGlobal ("structuredContent", genTALStruct)

This is still valid, however the 'tal:content' will be passed through and
not expanded.  To achieve the same result in 2.0 either the function should
be evaluated immediately and compiled into a Template, or if this is not
possible it can be deferred:

def genTALStruct ():
	return simpleTAL.compileHTMLTemplate 
                                ('<p tal:content="title">Title of page</p>')
context.addGlobal ("structuredContent", genTALStruct)

Known limitations
-----------------
Repeat Variables do not support 'first' and 'last'.

When using 'not:' on an empty expression the result will be true rather than
an error

on-error is not yet supported.

Known differences
-----------------

Non existant path types, e.g. '<b tal:content="total: $totalAmount"></b>'
are not supported.  In Zope this results in the path being interpreted as a
string - in simpleTAL/ES the result will be an error.
