Don Hopkins wrote:
> An example of what I mean: Zope has a templating language called TAL,
> which is 100% XML compatible, but instead of embracing Python, has its
> own mini expression language (TALES expressions), complex control
> structures (loops with special "convenience" functions to tell if the
> index is the first, last, even, odd, etc), and uses restricted Python
> instead of providing full access to Python, etc. The goal of restricted
> Python for templates was that untrusted people could write TAL
> templates. Do you think that's a realistic goal, and worth crippling the
> system for trusted Python programmers? Do you let untrusted programmers
> write templates on your site?

Somewhat off-topic, but ZPT/TAL gives you access to Python (though it's
not as convenient as TALES, since you need a python: prefix); the
control structures are generally necessary in nearly all templateing
languages (including Kid), and even moreso in Python than other
languages due to whitespace issues.  ZPT doesn't allow Kid's Python
blocks, but those aren't typical templating loops, and so Kid also has
tag-based loops.  Also, TAL doesn't use restricted Python, instead the
underlying Zope system implements the restrictions -- when used outside
of Zope TAL doesn't have any restrictions.

I just wanted to clarify that ZPT isn't that different from Kid, in
spirit or function.

-- 
Ian Bicking  |  [EMAIL PROTECTED]  |  http://blog.ianbicking.org

Reply via email to