[ZPT] Other "sub-languages" with TAL and METAL

Lalo Martins lalo@laranja.org
Wed, 20 Mar 2002 22:12:52 -0300


One idea that was briefly thrown around Way Back Then (TM) is
that, side by side with TAL and METAL, you could have other
sub-languages, selected by their xml namespaces, eg::

<td tal:repeat="item col" mylib:mystuff="fnordize">

IMHO this hasn't surfaced yet because PT isn't widely adopted
and understood yet, but still it is a reasonable requirement.

Currently, to do that you have to provide your own Parser (with
a lot of code duplicated from TALParser) and Generator (again,
lots of duplicated code) and tweak lots of other places - I'm
not sure TALInterpeter would run seamlessly.

With a half-dozen simple changes, starting by
TALParser.process_ns, this could be abstracted and supported in
a more flexible way. Actually, I think this would be less work
than the work-around alternative above. Then it would be a
matter of subclassing ZopePageTemplate to enable the correct
xmlns set - or perhaps even configuring ZPTs via ZMI.

Is there any good reason to *not* do that changes?

[]s,
                                               |alo
                                               +----
--
  It doesn't bother me that people say things like
   "you'll never get anywhere with this attitude".
   In a few decades, it will make a good paragraph
      in my biography. You know, for a laugh.
--
http://www.laranja.org/                mailto:lalo@laranja.org
         pgp key: http://www.laranja.org/pessoal/pgp

Brazil of Darkness (RPG)      ---       http://www.BroDar.org/
Python Foundry Guide http://www.sf.net/foundry/python-foundry/