[Zope3-dev] Weird TAL code path?

Fred Drake fdrake at gmail.com
Thu Oct 21 11:17:25 EDT 2004


On Thu, 21 Oct 2004 10:48:44 -0200, Sidnei da Silva <sidnei at awkly.org> wrote:
>     <div tal:replace="structure string:bla"
>          tal:attributes="name non_existing">
>     </div>

Hehe.  I see.

> It only happens if tal:attributes doesn't find the variable. Of course
> the code above doesn't make sense, because it's setting an attribute
> on a tag that's going away *wink*.

In TAL 1.4 (the current version), it's actually *allowed* to add the
"name" attribute to the first element found inside the replacement
structure.  This is insane.

> I'd love to write a functional test, but the pain of my last incursion
> into writing a test for page templates still hurts.

I understand.  ;-(

I'm going to propose some changes to TAL for a new version of the
specification.  It will allow some simplications in the implementation
as well.


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at gmail.com>
Zope Corporation


More information about the Zope3-dev mailing list