HTML 3.2: Bug in OL, LI attribute definition lists

Regarding the HTML 3.2 DTD, revision 1.1, stamped:

    $Id: HTML3.2.dtd,v 1.1 1996/05/06 22:11:23 connolly Exp $


1. The attribute definition for the TYPE attribute on the OL
element is specified as:

    <!ENTITY % OLStyle "CDATA" -- "1|a|A|i|I" but SGML folds case -->

    <!ATTLIST OL -- ordered lists --
        type     (%OLStyle)  #IMPLIED   -- numbering style --
	...
    >

Replacing entities, this expands to:

        type     (CDATA)  #IMPLIED


This means that the only allowable value for the TYPE attribute
is the token "CDATA".  That is,

	<OL TYPE=CDATA>

is legal but

	<OL TYPE="i">

is not, contrary to the description of this attribute.

Suggested fix:

    <!ENTITY % OLStyle "CDATA" -- constraint: [1|a|A|i|I] -->

    <!ATTLIST OL
	type	%OLStyle;	#IMPLIED
	...
    >

(That is, there should be no parentheses around the declared value.)


2. The declared value of the TYPE attribute on the LI element
is specified as:

    <!ENTITY % ULStyle "disc|square|circle">
    ...
    <!ENTITY % LIStyle "%ULStyle|%OLStyle">
    ...
    <!ATTLIST LI
	    type   (%LIStyle)    #IMPLIED   -- list item style --
	    ...
    >

which expands to:

	    type   (disc|square|circle|CDATA)    #IMPLIED

This is almost certainly not what was intended.

[ The apparent intent seems to be to allow authors to specify
  a bullet style _or_ a numbering style for individual list items.
  The informal part of the DTD only mentions changing bullet styles,
  though, and there is little utility in changing the numbering style
  mid-list, so perhaps not. ]


Suggested fix:

	<!ENTITY % ULStyle "(disc|square|circle)">
	...
	<!ATTLIST UL
	    type	%ULStyle;	#IMPLIED
	    ...
	>
	...
	<!ENTITY % LIStyle "%ULStyle"  -- constraint: only valid in <UL> -- >
	...
	<!ATTLIST LI
	    type	%LIStyle;	#IMPLIED
	    ...
	>

This would only allow specifying a different bullet style,
not a different numbering style.  If that was in fact intended,
then a suggested fix is:

	<!ENTITY % LIStyle "CDATA"
		-- constraint: (ULStyle | OLStyle)
		   Case-insensitive if ULStyle, case-sensitive otherwise.
		-->


*EOF*

--Joe English

  joe@art.com

Received on Thursday, 16 May 1996 18:02:04 UTC