[ZPT] Re: [Zope] Using ZPT with options/radio/checkboxes

Fergal Daly fergal at esatclear.ie
Fri Aug 8 16:28:38 EDT 2003


On Friday 08 August 2003 12:49, Chris Withers wrote:
> Not sure what you mean, I wasn't aware of the special handling of the two
> attributes already discussed. I think all attributes should be handled the
> same way, that being if the expression evaluates to python's notion of
> false, then the attribute is omitted.
>
> The only situation this doesn't handle is where you want to generate
> something like:
>
> <myTag needsToBeHere=""/>

This just came up recently on the Petal list. The spec

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx#3-38

says delete the attribute when the expression evaluates to "nothing", moreover 
the spec

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx#3-3

says that "nothing" is not a string the empty string should not delete 
attributes and so it should be possible to produce

<myTag needsToBeHere=""/>

F




More information about the ZPT mailing list