[ZPT] Mini proposal: repeat-define and repeat-condition

Fernando Martins fmartins@hetnet.nl
Sun, 26 Jan 2003 01:14:25 +0100


Evan Simpson wrote:
> Fernando Martins wrote:
> > All right! I'm missing something!
>
> Here's a more concrete example (tested):
>
> <div tal:define="d python:{'a;;b': (1,2,3)}"
>       tal:condition="exists:d/a;b"
>       tal:repeat="n d/a;b"
>       tal:context="n"></div>
>
> Note that the semicolon in the tal:define is doubled, in order to
> prevent it being interpreted as a delimiter between definitions.  The
> tal:condition and tal:repeat, on the other hand, do not have multiple
> parts, so there is no need, or ability, to escape the semicolons.
>

Thanks for the example. Not unconceivable, indeed. That's a pitty.

>
> Introducing multiple parts to tal:repeat would break this example.
>

And the above example even excludes any other possible delimiter...

It would be nice to extend tal:repeat's capabilities but it looks wrong to
me to do it with repeat-define and repeat-condition because they are at
syntatically "brothers-level" to all the other TAL tags when in fact they
are semantically at "children-level" of tal:repeat.

IMHO, either a tal:pre-repeat (Casey Duncan's proposal) or a tal:repeat-ext
(tal:repeat extended) would do a better job.

Regards,
Fernando