Re: Selectors, getElementsByTagName() and camelCase SVG

On Fri, 03 Apr 2009 08:58:03 +0200, Henri Sivonen <hsivonen@iki.fi> wrote:

> On Apr 3, 2009, at 09:50, Henri Sivonen wrote:
>
>> * A close approximation of the outcome (if I guessed your intent  
>> correctly) could be achieved with a spec change with fewer  
>> implementation changes if it were stipulated in a spec that selectors  
>> don't match case-insensitively against HTML nodes but match against  
>> HTML nodes after the selector ident has been ASCII-lowercased.
>
>
> Furthermore, lowercasing the local name on createElementNS still  
> wouldn't be enough to hide the actual implementation strategy of the  
> appearance of selector case-insensitivity unless the  
> createAttributeNode[NS] hole were plugged as well. (The HTML5 spec  
> currently plugs the hole, but I think it's weird in principle and  
> implementation-wise annoying if assigning an attribute node to an HTML  
> element mutates the supposedly immutable internal state of the attribute  
> node, which is why I filed  
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=6689  .)

Moreover, you can always move an element with uppercase localName from an XML document to an HTML document. (Unless I make Web DOM Core say to throw when trying to move elements between HTML and XML documents -- it currently breaks the assumptions of the getting innerHTML in XML algorithm in HTML5.)

-- 
Simon Pieters
Opera Software

Received on Friday, 3 April 2009 09:43:41 UTC