[Zope3-dev] DOM manilulators (was Re: <script> - the anti-pattern)
Jim Fulton
jim at zope.com
Wed Sep 10 18:39:03 EDT 2003
Phillip J. Eby wrote:
> At 11:58 AM 9/10/03 -0400, Paul Winkler wrote:
>
...
>> What does the invocation of a factory buy you?
>> How is this better than <foo tal:content="container/bit_of_code"></foo> ?
>
>
> Visual parameters. In your example, 'bit_of_code' has no access to the
> *original* content of the <foo> block. To illustrate, here's an example
> use of a hypothetical "selected-list" component:
>
> PEAK syntax
> -----------
> <ul pwt:domlet="selected-list:something">
> <li>This item is just an example and will not show up in the output</li>
> <li pwt:define="unselected">This is how an unselected item is rendered</li>
> <li pwt:define="selected"><b>This is how the selected item is rendered</b></li>
> <li>This item is just an example and will not show up in the output</li>
> </ul>
We originally wanted something like this for ZPT, and still do. We put this aside
when figuring out ZPT and never came back to it. I'd love to see something like
this added to ZPT.
Jim
P.S. I don't think that this has anything to do with the motivation of the scropt tag. :)
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (703) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list