push-style templating - an xml-like way to process xhtml

Tino Wildenhain tino at wildenhain.de
Sun Nov 2 15:06:29 CET 2008


Terrence Brannon wrote:
> Hello,
> 
> The most common way of dynamically producing HTML is via template
> engines like genshi, cheetah, makotemplates, etc.
> 
> These engines are 'inline' --- they intersperse programming constructs
> with the HTML document itself.
> 
> An opposite approach to this form of dynamic HTML production is called
> push-style templating, as coined by Terence Parr:

Hm.

"<a href=$attr.url$>$attr.title$</a>
$if(attr.active)$
$attr.submenu:menuItem()$
$endif$"

This looks ugly to me.
Why not just using well tested TAL, which is
also available for a number of languages?

http://en.wikipedia.org/wiki/Template_Attribute_Language

In contrast there would be something like TSSL, which
unfortunately never saw the light of the day yet :-)

http://mail.zope.org/pipermail/zpt/2002-May/003304.html

(This solution would not even touch the HTML directly)

Regards
Tino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20081102/8130ced4/attachment.bin>


More information about the Python-list mailing list