Re: Selectors: section 6.5: Error

> CSS has never described how to handle this error case (the error case 
> being the document having duplicate IDs).

At this stage in the thread, this was not being considered a possible
option.  The debate was between mandating that all elements with that
ID match and mandating that one specific one matches.

Personally, I'm actually uncomfortable with the idea that error recovery
be tightly specified, but that's speaking from an engineering point of
view.  I can see a human factors argument, and therefore a marketing 
argument, for requiring it.  I think that the marketing argument tends to
favour the big players, but then, whilst standards tend to benefit
small players, setting of them is often done by big players.  This is
because big players can spread the cost of extensive error recovery, and
for the normal reasons that big players can bias standards to minimise
the changes in their products.

> And so UAs did what they wanted. Which was to apply ID rules to any 
> elements with that ID, duplicates be damned.
> 
> You're now saying that the spec should have required that only one of the 
> duplicate IDs should be honoured, and that the fact that this would be bad 
> for performance is because the spec defined behaviour for all error 
> conditions.

I'm saying that, if one mandates a behaviour, one ought to mandate a 
behaviour that encourages correct usage (and, in this case, is consistent
with other uses of ID attributes (the DOM methods can only ever return one
element).

Received on Monday, 9 January 2006 08:15:48 UTC