[ZPT] allow duplicate defines?

Evan Simpson evan@digicool.com
Mon, 25 Jun 2001 13:01:34 -0500


From: "Jason Byron" <jason_zope@yahoo.com>
> It would make it easier to read when you have a lot of defines.
> Plus you might be able to arrange the defines better like:
>
> <td tal:define="var1 here/some1"
>     tal:define="var2 python:var1+5"
>     tal:repeat="here/repeat_stuff"
>     tal:define="var3 here/dir/do_repeat"
>     tal:condition="var3">

Your original supposition was correct; XML doesn't allow multiple
attributes with the same name.  It also specifies that the order in
which the attributes appear is not meaningful, which kills the ordering
of operations I infer from your example.

The current implementation of TAL embeds these restrictions fairly
deeply, which would make it difficult to make an exception for HTML if
we wanted to.

Most of the time, this isn't an insurmountable problem, since you can
move the TAL statements onto nested tags.

Cheers,

Evan @ digicool