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

Barry Warsaw barry at python.org
Mon Aug 11 16:37:22 EDT 2003


On Mon, 2003-08-11 at 11:00, Fred L. Drake, Jr. wrote:

> BOOLEAN_HTML_ATTRS = [
>     # List of Boolean attributes in HTML that should be rendered in
>     # minimized form (e.g. <img ismap> rather than <img ismap="">)
>     # From http://www.w3.org/TR/xhtml1/#guidelines (C.10)
>     # XXX The problem with this is that this is not valid XML and
>     # can't be parsed back!
>     "compact", "nowrap", "ismap", "declare", "noshade", "checked",
>     "disabled", "readonly", "multiple", "selected", "noresize",
>     "defer"
> ]
> 
>  > Does it matter which tag they're defined on?
> 
> No.  Note that this is only taken into consideration in HTML mode,
> though; when using XML mode, the munging would not produce well-formed
> XML.
> 
>  > (eg: will:
>  > 
>  > <flub tal:attributes="checked python:0"/>
>  > 
>  > render to:
>  > 
>  > <flub/>
> 
> In HTML mode, yes.

Wow, cool.  This sounds like it's going to solve my most vexing problem
with ZPT in Mailman3.  Fred's whining at me about sticking to XML, but
it'll make my page templates much more difficult to grok and customize. 
Would an XHTML mode make sense, and help with this?

-Barry





More information about the ZPT mailing list