[ZPT] [Weakness] "tal:repeat" not yet right
Dieter Maurer
dieter@handshake.de
Thu, 27 Sep 2001 10:20:23 +0200 (CEST)
Richard Jones writes:
> ....
> I've talked to our design people, and it looks
> like this is what they've been doing _anyway_. That is, there's almost always
> a:
>
> <div tal:define="loop_list some/expression">
> <span tal:repeat="item loop_list"/>
> </div>
>
> or similar.
The problems only start when you are in a context where
wrapping elements are not allowed (by the DTD/Schema).
An example is the "select/options" context.
Maybe more relevant: using "tbody" to repeat table rows.
"tbody" has specific semantics which may not be compatible
with the ZPT use (e.g. I may need larger groups, but
"tbody" cannot be nested).
The new "tal:whatever" pseudo elements help in this direction
(they disappear after rendering leaving only the content).
But in a strict environment, they make the template itself
non-conformant and difficult to check against a DTD/Schema.
Thus, I would prefer not to be forced to use artificial wrapping
elements.
I do not have a proposal, though....
Dieter