Re: HTML Tidy bug?

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 UTC