Re: Selectors, getElementsByTagName() and camelCase SVG

On Fri, 1 May 2009, Boris Zbarsky wrote:
> Ian Hickson wrote:
> > I haven't changed the HTML5 spec on this issue, since it seems that 
> > what the spec says is what people seemed to agree was the desireable 
> > behaviour.
> > 
> > Namely, the method is case-sensitive except for elements in the HTML 
> > namespace in HTML documents.
> 
> That doesn't sound to me like what was agreed on towards the end there, 
> but maybe I misunderstood.  My impression is that for the HTML namespace 
> in HTML documents the argument to getElementsByTagName is 
> ASCII-lowercased before doing a case-sensitive compare; for everything 
> else the original case is used.

Oh, right, you can have non-lowercase nodes in the HTML namespace, I 
forgot about that. Ok, changed as you described:

# [...] compare the given argument in a case-sensitive manner, but when 
# looking at HTML elements, the argument must first be converted to 
# lowercase.

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

Received on Saturday, 2 May 2009 01:19:18 UTC