[whatwg] [html5] 2.20.1. The datagrid element
Anne van Kesteren
fora at annevankesteren.nl
Fri Apr 29 08:11:24 PDT 2005
Some initial comments on possible problems I spotted.
# Columns, rows, and cells can each have specific classes applied to
# them by the data provider.
Classes is nowhere defined. Is this about the HTML CLASS attribute? If
so, could that be more clearly stated. If otherwise, could it be
elaborated for a bit to make it more understandable.
# getRowCount(): The number of rows returned by the default data
# provider must be the number of tr elements that are children of tbody
# elements that are children of the table, if there are any tbody
# elements. If there are no tbody elements then the number of rows
# returned must be the number of tr elements that are children of the
What happens here:
... should it return 0? Or should it look for all descendents of TABLE
when there is neither a TBODY or TR child element.
# getColumnCount(): If the table has a thead element child, and the
# first such element has a tr element child, then the number of columns
# returned by the default data provider must be the number of th
# element children in the first such tr element, if there are any such
# th elements.
This 'messes up' perfectly valid tables like:
# getCaptionText(i): If the table has no thead element child, or if its
# first thead element child has no tr element child, the default data
# provider must return the empty string for all captions. Otherwise,
# the value of the textContent attribute of the ith th element child
# of the first tr element child of the first thead element child of the
# table element must be returned. If there is no such th element, the
# empty string must be returned.
How about trying to select the value of the CAPTION element first?
The same might apply to getCaptionClasses(i, classes).
By the way, it would make more sense to say:
... and that it then applies to all columns. Like some implementations
have implemented it.
Anne van Kesteren
More information about the whatwg