getElementsByTagName() in Mozilla HTML implementation

Current Mozilla nightly build will currently fail
every DOM 2 HTML test as written do to a issue with
getElementsByTag name.  Unfortunately, I'm on the road
and do not have ready access to all the pertinent
documents, so any statements about what the specs say
are my best recollection.

The tests are written to work with both XHTML and
HTML, so they follow the recommended pratices in the
XHTML 1.0 recommendation of using lower cased tag
named in getElementsByTagName.

The source HTML documents use all upper-case tag names
(the XHTML documents are valid XHTML so they use upper
case tag names).

I believe the spec implies that HTML implementations
of getElementsByTagName should return a list of
elements that have the same tag name or differ only in
case.

Microsoft IE does do this, so if I ask for
getElementsByTagName("a"), I'll also get any <A>
elements in the document.  Mozilla 0.9.8 will not.

Since every NIST test starts by finding a specific
element using getElementsByTagName() and every HTML
tag is in upper case, every case will fail by not
finding the element that it wanted to test.

I believe that the tests are testing legitimate
specified behavior, however failing every test because
of this one flaw overstates the issue.

It would be good to confirm that the DOM spec does
require case-insensitive behavior from
getElementsByTagName and whether the issue can be
fixed in Mozilla in a timely manner.

If not, then it would be best to modify the HTML test
documents to use lower case tag names and to introduce
specific tests that test getElementsByTagNames() case-insensitivity.

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

Received on Tuesday, 5 February 2002 14:36:46 UTC