[ZPT] Confused about Zope

Chris Withers chrisw@nipltd.com
Thu, 27 Feb 2003 12:50:05 +0000


Jean Jordaan wrote:
>> One of these day's I'm gonna kick that crutch from under DTML by doign 
>> a ZSQL method that allows ZPT markup ;-)
> 
> I dunno how pretty that'll be ..

Not overly pretty, but certainly no less pretty than DTML...

<dtml-sqlvar x type="string">

<tal:x replace="sql.string:x"/>

(assuming the current plans beign discussed on zope3-dev coem to fruition)

> element tree, attributes, ..). Using it to generate SQL or
> robot emails or other arbitrary text feels pretty kludgy to
> me, while DTML fits that bill.

I have an extremely strong desire not to force new users of Zope to learn more 
than one templating language. DTML is too flawed to rescue, and while ZPT may 
not appear ideal, I'm sure new users will find it more intuitive than having to 
learn a whole seperate language just to dynamically generate SQL and text.

> that DTML is tricksy regarding namespaces and expression
> syntax (i.e. everything that can replace the XXX bit in
> <dtml-tag XXX>).

...yup, there are others too though. I'm glad I don't have to explain the 
difference between <dtml-var "x">, <dtml-var x> and &dtml-x; anymore, or have to 
wade through incomprehensible errors before I can even save a template I'm 
working on...

cheers,

Chris