- From: Chris Maden <crism@oreilly.com>
- Date: Tue, 3 Aug 1999 13:51:54 -0400 (EDT)
- To: www-html@w3.org
[Alex Blewitt] > I do not particularly like the style of checked="checked" for input > types. It seems a little bit of overkill to have the repetition of > 'checked' in the HTML source. The reason for this is so that you can enter <input checked>. In SGML, when there's a list of allowable tokens for an attribute value: <!ATTLIST element attribute (val1 | val2) #IMPLIED> you can just enter the value: <element val1> and the name of the attribute can be inferred. Because of that minimization rule, it was illegal to have multiple attributes with overlapping token values: <!ATTLIST ILLEGALELEMENT attribute1 (val1 | val2) #IMPLIED attribute2 (val2 | val3) #IMPLIED> So it was common practice with Boolean attributes to have an attribute whose legal values were the name of the attribute, or nothing at all: <!ATTLIST element-with-booleans boolean1 (boolean1) #IMPLIED boolean2 (boolean2) #IMPLIED> That way, you could just invoke the Boolean by name: <element-with-booleans boolean1> has boolean1 true and boolean2 false. XML has made both attribute names and values required, so this minimization is irrelevant; additionally, WebSGML has relaxed the restriction on overlapping token values, as long as document instances aren't ambiguous. In light of those changes, a change for XHTML like you suggest might make sense, but it would mean that converting from HTML to XHTML was no longer a simple matter of normalization (with a tool like SX), but would require more heuristics, knowing that checked="checked" was equivalent to checked="yes". Maybe multiple values could be allowed: <!ATTLIST input checked (checked | yes | no) "no"> -Chris -- <!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN"> <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN" "<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487 <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>
Received on Tuesday, 3 August 1999 13:52:26 UTC