[XML-SIG] 4DOM HTML erroneously using NS methods

Martin v. Loewis martin@v.loewis.de
Sun, 20 Jan 2002 21:43:32 +0100


> (http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-2041995112):
> 
> "There are basically two things that need to be taken into account, one is
> that when comparing element or attribute names to strings the string compare
> needs to be case insensitive, or the element or attribute name needs to be
> converted into lowercase before comparing against a lowercase string. The
> other thing is that when calling methods that are case insensitive when used
> on a HTML document (such as getElementsByTagName() and namedItem()) the
> string that is passed in should be lower case to work on both HTML and XHTML
> documents."

I'm confused. Is this a requirement on DOM implementations, or on DOM
applications? It appears that it says that it says that
getElementsByTagName is case-insensitive. I wonder where it actually
says so. In particular, 1.1.7 of DOM 2 Core says

(http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-5DFED1F0)
# The DOM has many interfaces that imply string matching. HTML
# processors generally assume an uppercase (less often, lowercase)
# normalization of names for such things as elements, while XML is
# explicitly case sensitive. For the purposes of the DOM, string
# matching is performed purely by binary comparison of the 16-bit
# units of the DOMString. In addition, the DOM assumes that any case
# normalizations take place in the processor, before the DOM
# structures are built.

So, to the contrary, it appears that the DOM explicitly disallows to
perform case-insensitive string comparison inside the DOM
implementation.

Regards,
Martin