[whatwg] Update to the Adoption Agency Algorithm

Blanchard, Todd wrote:
> Lachlan Hunt wrote:
>> Blanchard, Todd wrote:
>>> What I want to know is:  if the "cloned" node has an id 
>>> attribute, and id is meant to be unique, then how do we resolve 
>>> this conflict?
>> The ID attributes need to be duplicated in such cases, that's what 
>> existing browsers do.
> OK, I have to disagree with this - the id's MUST NOT be duplicated as 
> the end result is simply converting one kind of error to a different 
> kind of error.  I'd also suggest that browsers should be NOISY about 
> bad HTML such that authors are encouraged to fix it (possibly through 
> some disable-able preference).

There are extensions available, such as the HTML tidy extension for 
Firefox, which *will* alert the user of such mistakes.  There are also 
various tools available for browsers, such as the JavaScript console, 
Venkman, the DOM inspector and many more that the author can make use of 
to diagnose problems.  I don't agree that anything should be added as a 
hidden pref for this, that would just add bloat to the software the most 
users won't need and provide nothing that existing tools don't already.

> As it is now, site authors spend a great deal of time scratching 
> their heads trying to make sense of why things are acting oddly

Errors caused by the result of duplicate IDs either in the markup or 
indirectly as a result of badly nested elements can be fixed by a quick 
visit to the validator (or other conformance tool) or by making use of 
any or all of those tools I mentioned above.

Lachlan Hunt

Received on Thursday, 2 February 2006 16:05:00 UTC