- From: Joe English <joe@trystero.art.com>
- Date: Thu, 30 May 1996 16:11:53 PDT
- To: www-html@w3.org
gleeson@unimelb.edu.au (Martin Gleeson) wrote:
> I've just noticed that many of the Table examples for the HTML 3.2 DTD
> (which were also given as examples for HTML 3.0) won't validate with the 3.2
> DTD. Specifically, the example (the first example in RFC 1942):
>
> <TABLE BORDER>
> [...]
The RFC 1942 DTD solves this problem (achieving compatibility with
the HTML 3 <TABLE BORDER> notation and Netscape's <TABLE BORDER="###">
notation) by making 'BORDER' one of the allowable values for the
_FRAME_ attribute:
<!ENTITY % Frame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
<!-- ^^^^^^ -->
...
<!ATTLIST table -- table element --
<!-- ... -->
border CDATA #IMPLIED -- controls frame width around --
-- table --
frame %Frame; #IMPLIED -- which parts of table frame to --
-- include --
<!-- ... -->
>
The only difference is that in HTML 3, <TABLE BORDER> was
shorthand for <TABLE BORDER=BORDER> whereas in RFC1942 it's
shorthand for <TABLE FRAME=BORDER>.
> [...]
> is illegal according to the DTD, as the BORDER attribute must have a value
> (according to the DTD). (The attribute is optional, the value is not). I thin
> this can be fixed by adding a default value for the attribute to the DTD.
It doesn't quite work that way...
In attribute minimization (e.g., <TABLE BORDER>) it's the attribute
_name_ which is omitted, not the _value_. The usual convention for
boolean-valued attributes in HTML has been to use the attribute name
as the (sole) allowable token in the declared value:
<!ATTLIST bar
FOO (FOO) #IMPLIED
>
This has lead to some confusion... this is what's really going on:
vvvvv this part can be omitted under certain circumstances
<BAR FOO = FOO>
^^^^^ NOT this part
--Joe English
joe@art.com
Received on Thursday, 30 May 1996 19:12:05 UTC