W3C home > Mailing lists > Public > www-dom-ts@w3.org > September 2002

Order of table sections (Re: Minutes from telcon 20020920)

From: David Faure <david@mandrakesoft.com>
Date: Thu, 26 Sep 2002 13:25:38 +0200 (CEST)
To: <www-dom-ts@w3.org>
Message-ID: <Pine.LNX.4.33L2.0209261306090.10430-100000@smtp.mandrakesoft.com>

> pettit1 : HTMLTableRowElement.rowIndex
>
> Brad: within the table definition, order is different from how they
> appear.
>
> -> OPEN ISSUE for WG.

The tests HTMLTableRowElement01 and 04 rely on the order of the table
sections in the DOM tree. They look for a certain row using
document.getElementsByTagName("tr").item(4). This assumes the useragent
doesn't sort the table sections during parsing.

Konqueror currently sorts the table sections (to the visual order,
thead/tbodies/tfoot), but the table rendering guys say this isn't
necessary anymore, and should probably be fixed so that the DOM tree can
be "mapped back to the input file".

But is this really considered a bug, or are user-agents free to order or
not order the table sections in the DOM tree?
What does Mozilla do? What does IE do? (I suppose at least one of them
reorders the sections too, since the issue is mentionned here?)

If the answer is that useragents are free to do so, then those tests
should be changed, e.g. with <tr id="therowtotest"> and
testNode=document.getElementById("therowtotest"). This would allow testing
rowIndex and sectionRowIndex without relying on the order of the sections.
(Hmm, at least sectionRowIndex. rowIndex has sort of the same problem:
is it the index in the dom tree, or the index on screen, i.e. with TFOOT
at the bottom?)

If sections shouldn't be reordered, a specific test for that would be
easier to debug than noticing it as a side effect of the current tests'
failure - so I suggest doing the getElementById change anyway.

Thanks,
David.
Received on Thursday, 26 September 2002 07:23:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:58:47 GMT