W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2008

[whatwg] Clarification on hashed id reference

From: Geoffrey Sneddon <foolistbar@googlemail.com>
Date: Wed, 20 Feb 2008 20:09:51 +0000
Message-ID: <B395C69C-2193-40ED-8635-836DE527D92A@googlemail.com>

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/>
Received on Wednesday, 20 February 2008 12:09:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:39 UTC