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" 
From the HTML 4.01 DTD, with a little editing:

  %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 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:53 UTC