[ZPT] ZPT and TAL 1.0 Final Release

Guido van Rossum guido@digicool.com
Fri, 30 Mar 2001 12:30:44 -0500


> Given the paucity of bug reports, and the fact that I've been able to build
> a web site and a ZClass-heavy application with ZPT, I'm almost ready to
> declare ZPT 1.0 final.

Yay!

> Guido, do you think that TAL is ready for 1.0?  I have a wish item with
> respect to the handling of structure insertion, but it could wait for a 1.1
> release.
> 
> I'm concerned that structure insertion is *way* too heavy, given that it
> will be fairly common.  It looks like you currently parse/compile inserted
> structure into a whole new TAL subprogram, when we really just want to
> insert it as unescaped text most of the time.  Can we avoid this step in
> every case except tal:replace="structure ..." combined with tal:attributes,
> and then only parse the opening tag?

It's easy enough to skip the parsing when there's no attrribute
replacement.  But if we don't parse, we can't be sure that the
inserted text doesn't add unbalanced elements, and this means that a
mistake in the inserted text could screw up the page globally (rather
than just locally).

When there *is* attribute replacement, I could implement the attribute
replacement without using a full-blown parser, but it would be
hackish.

I'll look into this for 1.1 (but I don't have much time today, and
next week I'm away to Chicago for three days).

> To compensate for this change, you could make do_insertStructure sniff the
> result of evaluateStructure to see if it is already a TAL program.  If it is
> a program, execute it, otherwise stringify as usual.  That way, we could use
> the pre-compiled TAL programs created by metal:define-macro as sub-programs,
> by writing tal:replace="structure here/other/macros/sub1".

Then we should define what makes something a TAL program.  A list
whose first item is the tuple ("version", "1.0")???  I think we should
do something better.  I guess I can design a better starting item for
ZPT and TAL 1.1.

> If nobody dissents by then, I will release ZPT 1.0 final around 4pm today.

Fine by me.

Will you include the changes I made to TAL?  (Only affect
DummyEngine.py and the test suite.)

I also suggest that you check in your README.txt and your CHANGES.txt
for PageTemplates into the tree, like I did with the README.txt for
TAL.

--Guido van Rossum (home page: http://www.python.org/~guido/)