[ZPT] RE: Should tal:content keep surrounding tags?

Wade Leftwich wade@lightlink.com
Sat, 2 Jun 2001 16:09:44 -0400


<tal:block> is a super idea.


> -----Original Message-----
> From: Evan Simpson [mailto:evan@digicool.com]
> Sent: Saturday, June 02, 2001 4:01 PM
> To: wade@lightlink.com; zpt@zope.org
> Subject: Re: [ZPT] RE: Should tal:content keep surrounding tags?
> 
> 
> 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
>