-----BEGIN PGP SIGNED MESSAGE-----
Roger Ineichen wrote:
> Hi Malthe
>> Betreff: [Zope-dev] ZPT attributes and ""
>> Currently, if an attribute expression evaluates to any value
>> that's boolean False, it's omitted (e.g. 0, "", object()). I
>> think that's unexpected. Instead, attributes should only be
>> omitted when the expression evaluates to ``None``.
> I think this is better then render empty strings. see below...
>> How do folks feel about changing this behavior in
> Probably anything else then "" should be skipped. There is no
> logic why object() or False should get rendered as "".
Non-true values have special semantics for certain attributes
('checked', 'selected', I think).
> I only whould expect that an empty string whould get rendered
> as "". And probably we should check the HTML specification and
> make sure that we only render empty strings for attributes where
> they are allowed.
> ID and NAME tokens must begin with a letter ([A-Za-z]) and
> may be followed by any number of letters, digits ([0-9]),
> hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
> This means to me that an empty value for id or name
> doen't start with [A-Za-z] and is invalid because is must start
> with [A-Za-z]. or not?
- -1 on making ZPT / chameleon responsible for enforcing that requirement:
that would be the application's job.
Tres Seaver +1 540-429-0999 tsea...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -