[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/clauses.py No longer special-case these HTML tags; attributes with expressions that evaluate to None or False are omitted.
Malthe Borch
mborch at gmail.com
Wed Sep 10 16:15:27 EDT 2008
Log message for revision 91041:
No longer special-case these HTML tags; attributes with expressions that evaluate to None or False are omitted.
Changed:
U z3c.pt/trunk/src/z3c/pt/clauses.py
-=-
Modified: z3c.pt/trunk/src/z3c/pt/clauses.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/clauses.py 2008-09-10 20:14:30 UTC (rev 91040)
+++ z3c.pt/trunk/src/z3c/pt/clauses.py 2008-09-10 20:15:26 UTC (rev 91041)
@@ -540,21 +540,6 @@
assign = Assign(value)
assign.begin(stream, temp)
- # XXX 'toggle' attributes are attributes whose mere
- # presence signifies to the consumer that something should
- # happen regardless of the attribute's value ('checked' on
- # input tags and 'selected' on option tags); an
- # HTML-specific misfeature. Determining whether an
- # attribute is a toggle attribute really should be
- # conditioned on the tag being in the xhtml namespace (in
- # case we're rendering something other than HTML) and not
- # just rely on tag and attribute names (chrism), but let's
- # go ahead make the 99.999% case work.
-
- toggle = ( (self.tag == 'option' and attribute == 'selected') or
- (self.tag == 'input' and attribute == 'checked') )
-
-
# only include attribute if expression is not None
stream.write("if %s not in (False, None):" % temp)
stream.indent()
More information about the Checkins
mailing list