[ZPT] RE: Should tal:content keep surrounding tags?
Evan Simpson
evan@digicool.com
Sat, 2 Jun 2001 15:00:57 -0500
From: "Wade Leftwich" <wade@lightlink.com>
> I endorse Brad Clements' remark: "I still need a way to have a repeat
that
> does NOT include the enclosing element." This is extra important when
you're
> building XML.
HTML code should really use 'span' and 'div' -- that's what they're for.
I can understand the problem with XML, though. I wonder if this
problem, and a few others, would be solved by having TAL omit the
beginning and ending for "tal:block" tags (and assume the 'tal:'
namespace!). Thusly:
<things>
<tal:block repeat="thing things">
<thing tal:content="thing">Thing</thing>
<thing tal:content="string:Other $thing">Other Thing</thing>
</tal:block>
</things>
...producing:
<things>
<thing>First Thing</thing>
<thing>Other First Thing</thing>
<thing>Second Thing</thing>
<thing>Other Second Thing</thing>
</things>
XML editors shouldn't have too much trouble with this.
Cheers,
Evan @ digicool