- From: Alex Blewitt <Alex.Blewitt@ioshq.com>
- Date: Wed, 6 Oct 1999 12:31:02 -0400 (EDT)
- To: www-html@w3.org
In the section describing Boolean attributes (3.3.4.2 in the 19990824 recommendation) suggests that: > ... their appearance in the start tag of an element implies that the > value of the attribute is "true". Their absence implies a value of > "false". > > Boolean attributes may legally take a single value: the name > of the attribute itself (e.g., selected="selected"). ... For the next level of HTML (4.1?) why not allow boolean values to be specified using a Boolean definition of 'true' and 'false'? This would be a useful datatype which could be used in other locations as well. It also allows the representation of future HTML elements which have a default value of 'true' (rather than the default 'false' that selected et al have) <anElement> <!-- implicitly visible="true" --> <anElement visible="false"> <!-- explicitly visible="false"> This could be declared similar to: <!ENTITY % Boolean (true | false) "false" > In this case, the elements defined for 'selected' etc could be written as: <!ELEMENT OPTION> <!ATTLIST OPTION selected %Boolean;> Although it is too late to incorporate something like this into HTML4.0, can it be considered/thought of for the next release of HTML/XHTML? It would be easier to parse/recognise 'boolean' attributes using this mechanism than the selected="selected" that is current, and it allows the presence of some default-true values (such as visible) to be represented. Alex Blewitt. /***************************************************************\ |* Alex Blewitt * Hug, and the world hugs with you *| |* Alex.Blewitt@ioshq.com * *| |* Mobile: +44 966 158647 * Spread a little happiness *| \***************************************************************/
Received on Wednesday, 6 October 1999 12:37:18 UTC