[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
# table.
What happens here:
<table>
<xhtmlfoo:content>
<tr>
...
... 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:
<table>
<thead>
<tr>
<th colspan="2">Male
<th colspan="2">Female
<tr>
<th>Alcoholic
<th>Suicidel
...
... not?
# 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[1] first?
The same might apply to getCaptionClasses(i, classes).
By the way, it would make more sense to say:
<datagrid sortable="">
... or:
<datagrid sortable="sortable">
... or:
<datagrid class="sortable">
... and that it then applies to all columns. Like some implementations
have implemented it[2].
[1]<http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#h-11.2.2>
[2]<http://www.letselplein.nl/~exemplarisch/sort-table/sort-table-rows.html>
--
Anne van Kesteren
<http://annevankesteren.nl/>
More information about the whatwg
mailing list