HTMLTableRowElement and rowIndex

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 UTC