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

HTMLTableRowElement and rowIndex

From: Brad Pettit <bradp@microsoft.com>
Date: Thu, 12 Sep 2002 13:11:17 -0700
Message-ID: <3013537455C0D1459746B2AE2DF47AEA0521F30A@svc-msg-01.northamerica.corp.microsoft.com>
To: <www-dom@w3.org>

This is a follow-up to my proposal regarding proposed
errata to the specification of HTMLTableRowElement. We believe
it is also necessary to correct the description of the
HTMLTableElement.rows collection.

Here is the issue:

In a table, the tree order of rows may be different from the
display order. Since it is recommended that the TFOOT tag
occur before TBODY in the HTML, then by document order the
indices of the rows in TFOOT would be less than those of rows
in TBODY, but by display order their indices would be greater.

The following are specified as being in document tree order,
but IE 6 for Windows and Netscape implement them as display
order.

-The rowIndex property of HTMLTableRowElement
-The rowIndex parameter of HTMLTableElement.insertRow()
-The rowIndex parameter of HTMLTableElement.deleteRow()
-The ordering of rows within the HTMLTableElement.rows collection

The erratum for the HTMLTableElement.rows collection could read:

"Nodes are numbered within the collection in logical order,
not document order. The ordering takes into account table
section (THEAD, TFOOT, or TBODY) with THEAD rows first,
followed by rows in all TBODY elements (in document order),
followed by TFOOT rows."

For the rowIndex property of HTMLTableRowElement, where the
specification now reads: "This is in document tree order and not
display order. The rowIndex does not take into account
sections (THEAD, TFOOT, or TBODY) within the table."

The proposed erratum is: "The rowIndex is the index of the
row within the HTMLTableElement.rows collection."

The documentation of the rowIndex parameter for
HTMLTableElement::deleteRow and HTMLTableElement::insertRow
could be clarified by language similar to that proposal.

Where the HTMLTableElement::deleteRow specification
currently states: "This index starts from 0 and is relative
to all the rows contained inside the table, regardless of
section parentage," it could be clarified as: "This index is in the
order of
rows within the HTMLTableElement.rows collection."

Regards,

Brad Pettit
Microsoft Corp.
Received on Thursday, 12 September 2002 16:11:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:56 GMT