[whatwg] Clarification on hashed id reference
Geoffrey Sneddon
foolistbar at googlemail.com
Wed Feb 20 12:09:51 PST 2008
On 20 Feb 2008, at 19:47, Adele Peterson wrote:
> I was looking at the definition of a valid hashed id reference, and
> I noticed some inconsistency. The first sentence says the string
> must match the id attribute, but then the last parsing rule says
> that the string can match the id or name attributes of the element.
> If the parsing rule is correct, then should there be some rule for
> determining which attribute should get checked first?
It already says "[r]eturn the first element" — which attribute gets
checked first is irrelevant. If you search by attribute, I guess you
need to carry out both searches, then combine the results, order by
tree order, and return the first.
> And if the parsing rule is correct, maybe the initial description
> should mention the name attribute too.
It means exactly what it says: conformant documents cannot use @name,
but parsers must look in @name. They serve identical purposes, so
there's no reason to allow both in a document, but parsers must
support both for compatibility.
--
Geoffrey Sneddon
<http://gsnedders.com/>
More information about the whatwg
mailing list