[html4all] Headers= up

Robert Burns rob at robburns.com
Fri Sep 7 21:15:31 PDT 2007


Hi Leif,

 From a cursory glance at these, they do not seem to me to implement  
the algorithms as listed in the respective recommendations. That's  
not really that important, but it does seem to be constructed to make  
the HTML4 algorithm look inadequate and the HTML5 algorithm to look  
like the savior here. The short-coming of the HTML 4.01 algorithm is  
that its not explicit enough [1]. However, that doesn't mean it  
should be interpreted in silly sorts of ways.  The HTML5 algorithm  
is, in contrast, very explicit and, as such is also inadequate.

The goal for the HTML WG is simply to find an algorithm that works  
well in the absence of explicit 'headers' attributes regardless of  
whether that draws on HTML 4.01 or the current draft. However, the  
problem now is that James's implementation of the HTML5 algorithm  
glosses over its deficiencies to make it look like its adequate  
already [2].

The HTML4 algorithm is actually quite short and quite easy to follow.  
James interpretation looks way off to me, but that's not really that  
important. It's the interpretation of the HTML5 algorithm that tries  
to make it look like we have an adequate algorithm that's the  
problem.  In the absence of scope (if we take this literally) the  
header cell is actually supposed to be assigned to every data cell  
(which basically renders the header cells useless). The HTML5  
algorithm says that

"If the header cell is not in the first row of the table, or not in  
the first cell of a row, then don't assign the header cell to any  
data cells."

Anyway, I think at this stage we should largely throw out the  
different algorithms (and especially comparisons of the different  
algorithms ) and work towards refining an algorithm that works well.  
We should also be clear that the James implementation of the HTML5  
algorithm does not reflect the current draft, otherwise we'll be  
lulled into thinking the current draft is adequate.

To get an algorithm that works well I think we also need to rethink  
the 'scope' attribute. Right now it has the values: 'col',  
'colgroup', 'row' and 'rowgroup'. However this is confusing because a  
column heading will typically either have a 'col' value or a  
'rowgroup' value, so the meaning or 'row' and 'rowgroup' actually  
have no relation. I think the HTML4.01 approach is better in that a  
corner header cell may apply either to the column or the row or both.  
Row group and column group just add to the confusion. So here's how I  
think the algorithm should be constructed:

  • header cells in the thead (or even all cells in the thead) should  
apply to all cells that they column span
  • header cells in a tbody should apply to all remaining data cells  
beneath them that the header cell colspans and all remaining data  
cells to the right of them (left of them for dir=rtl) that the header  
cell rowspans subject to the following qualifications
     - whenever a run of data cells reaches another header cell the  
association should stop
     - to associate header cells (and therefore the data cells that  
they associate with) with other header cells the headers attribute  
should be used. This would for example accomplish the same thing for  
rows that can be accomplished without headers= for columns using the  
thead element. For example if an author includes a column of row  
header cells at the beginning of a table and then includes several  
other columns of row header cells that will apply only to data cells  
in the rows locally according to this algorithm, the the use of  
headers='' will allow associating different groups of data cells and  
control scoping better and more clearly.
     - scope of 'col' limits that to only the cells beneath them and
     - scope of 'row' limits that to only cells to the right of them  
(left of them for dir=rtl).
     - the rowgroup and colgroup values for scope should be  
eliminated except for legacy reasons. They create confusion because  
they overlap with an author that might want to break the table into  
arbitrary groups of data cells broken by a new band of one or more  
consecutive header cells. If these authoring techniques are at cross  
purposes its just more confusing for authors.
  •  axis should be rethought because I don't think its clear enough  
from HTML 4.01 and common usage or implementations what it means
  • with this approach headers= would be mostly reduced to an  
attribute on TH cells that would automatically associate the TH cell   
and all of its associated TD cells with another TH cell.

Those are my thoughts, I support I should put something more formal  
together, but I thought I'd see what users on this list think.

Take care,
Rob

[1]: <http://www.w3.org/TR/html4/struct/tables.html#h-11.4.3>
[2]: <http://dev.w3.org/cvsweb/~checkout~/html5/spec/Overview.html? 
rev=1.78#header-and-data-cell-semantics>

On Sep 7, 2007, at 9:23 PM, Leif Halvard Silli wrote:

> Don't know what happened to my message ... something ate it.
>
> So I better put it short. Have a look at Ben's message to Publich  
> HTML:
>
> 2007-09-07 21:13:03 +0200 "Ben 'Cerbera' Millard"
> <cerbera at projectcerbera.com>:
>
> [ ... issues in Anne's web log ... ]
>> Oh, and I'm [famous] now. :-) If you are new to the HTML5 tables
>> effort, that
>> blog entry from Anne is an excellent introduction, imho.
>
>> [famous] <http://annevankesteren.nl/2007/09/html-tables>
>
> And read Anne's blog. It shows some misconspetions about @SCOPE vs.
> @headers (which I was explaining ... but he make it sound as if
> @headers is almost against the nature of the table.)
>
> I recommend tryhing Anne's table [1] in the table inspector [2]. You
> will see that if you test the table _without_ any attributes at all
> (use the option to turn off @SCOPE and @HEADERS), then it works almost
> the same as it does with the HTML5 algorithm _with_ the @SCOPE
> attributes that Anne applied. (It is of course funny that one can
> achieve the "no attributes" solution that Anne pledges for with HTML4
> - but not in current HTML5 ... )
>
> Rob, or anyone, there is small difference: HTML4 without @SCOPE shows
> more headers - but I think in this case the HTML5 show is better.
> Agree? (Chime in, you aural browsers users!) But what I wonders about:
> how do I make the same happen in HTML4? Hint: the challenge is the row
> with <th colspan="4">, which makes it impossible to use headers="".
>
> [1] <http://annevankesteren.nl/2007/09/tmb-overview>
> [2] <http://james.html5.org/tables/table_inspector.html>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wilbur.bytowninternet.com/pipermail/list_html4all.org/attachments/20070907/cd9fd1ac/attachment.html 


More information about the List_HTML4all.org mailing list