W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2001

Re: getElementsByTagName() and case-sensitivity for HTML documents

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 04 Aug 2001 04:55:05 +0200
To: jst@netscape.com (Johnny Stenback)
Cc: www-dom@w3.org, plh@w3.org
Message-ID: <lbommtsjcg0ic69q6mugogoi7jmvjn0er5@4ax.com>
* Johnny Stenback wrote:
>Bjoern Hoehrmann wrote:
>>>This doesn't help me
>>>know what I should pass to getElementsByTagName().
>> Input isn't modified, at least, there is no such statement in DOM Level
>> 2, so you must pass uppercase element names.
>Huh? Hmm, now that you mention this I can't find anywhere in the spec 
>where it's stated that methods such as getElementsByTagName() are indeed 
>case in-sensitive in the HTML DOM, at least that's how the most widely 
>used HTML DOM implementations chose to implement this (i.e. web 
>browsers), and I'd be surpised if this was not the intent when the specs 
>were written. This should probably be changed in the spec.

A clarification should be added to the current errata, yes.

>>>In practice, I know that for HTML documents I can use tag names with any
>>>capitalization and the getElementsByTagName() methods will work okay.
>> Yes, if you pass uppercase element names.
>Case should not matter in a pure HTML DOM.

Let's say, rules for case-sensitivity should by inherited from HTML.
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Friday, 3 August 2001 22:55:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:08 UTC