Re: [whatwg] Clarification on hashed id reference

2008-02-20 Thread Geoffrey Sneddon


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/



Re: [whatwg] Clarification on hashed id reference

2008-02-20 Thread Adele Peterson

ah, I understand now - that makes sense.  thanks!

On Feb 20, 2008, at 1:14 PM, Ian Hickson wrote:


On Wed, 20 Feb 2008, 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.


Right, the definition of valid hashed ID reference defines what's  
valid,
and the rules for parsing a hashed ID reference cover how to parse  
them

even if they're invalid.



If the parsing rule is correct, then should there be some rule for
determining which attribute should get checked first? And if the  
parsing
rule is correct, maybe the initial description should mention the  
name

attribute too.


Why? Pointing at the name attribute is non-conforming.

--
Ian Hickson   U+1047E) 
\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _ 
\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'-- 
(,_..'`-.;.'




Re: [whatwg] Clarification on hashed id reference

2008-02-20 Thread Ian Hickson
On Wed, 20 Feb 2008, 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.

Right, the definition of valid hashed ID reference defines what's valid, 
and the rules for parsing a hashed ID reference cover how to parse them 
even if they're invalid.


 If the parsing rule is correct, then should there be some rule for 
 determining which attribute should get checked first? And if the parsing 
 rule is correct, maybe the initial description should mention the name 
 attribute too.

Why? Pointing at the name attribute is non-conforming.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'