W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2003

Re: HTML Tidy bug?

From: Richard A. O'Keefe <ok@cs.otago.ac.nz>
Date: Wed, 11 Jun 2003 16:42:03 +1200 (NZST)
Message-Id: <200306110442.h5B4g3YK132515@atlas.otago.ac.nz>
To: html-tidy@w3.org, jalarie@umflint.edu

James Alarie <alarie@umich.edu> writes that:
	Tidy (version HTML Tidy for Windows released on 1st February 
	2003) does not like the apparent multiple definitions of "Rating" in:
	
	 <input type="radio" name="Rating" id="Rating" value="horrid">
	 <input type="radio" name="Rating" id="Rating" value="bad">
	 <input type="radio" name="Rating" id="Rating" value="average">
	 <input type="radio" name="Rating" id="Rating" value="good">
	 <input type="radio" name="Rating" id="Rating" value="great" 
	checked="checked">
	
From the HTML 4.01 DTD, with a little editing:

<!ATTLIST INPUT
  %attrs;                              -- %coreattrs, %i18n, %events --
  ...>
<!ENTITY % coreattrs
 "id          ID             #IMPLIED  -- document-wide unique id --
  ...">

See where it says "document-wide UNIQUE ID"?

In a single HTML page, no two elements may have the same value for the
ID attribute.

So Tidy darned well SHOULDN'T like that; it isn't legal HTML.

What can the ID attribute be used for?  It's for pointing to.
The idea is that by using ID, _any_ element can be the target of
a link, not just an <A>.  But for that to work, ID has to be unique.
It's also used for attaching style information to a particular element.

In this case, the simplest thing that's likely to work is to just
strip out all those id= attributes.
Received on Wednesday, 11 June 2003 00:42:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:54 GMT