Re: headers= and rowgroup

On 2007-09-12 12:59:44 +0200 "Anne van Kesteren" <annevk@opera.com> wrote:
> On Wed, 12 Sep 2007 07:53:25 +0200, Leif Halvard Silli <lhs@malform.no>  
>>> but it seems HTML4 suggests "a" and "c" (if you simply follow the
>>> algorithm in 11.4.1).
>> 
>> For this e-maail, I'll guess that what makes you read HTML4 that way, is 
>> this sentence: «You should use the TD element for such cells together 
>> with the id or scope attributes as appropriate.»  Right?
> 
> No, just the intersection of bullet point one and two.

Please quote. I don't see anything that can be interpreted like that.

>> Both for rowgroup and colgroup one could get the thought that it is 
>> unclear whether «the rest of» is to be taken vertically or horisontally. 
>> But a symmetric reading would suggest that row and rowgroup stretches  the 
>> same horisontal direction, and that col and colgroup stretches the  same 
>> vertical direction.
> 
> rowgroup simply stretches both horizontally and vertically.

Anything in a table has x,y coordinates. What you build that on?

>> Furthermore, not only <tbody> is a rowgroup, but also <thead> and  <tfoot>. 
>> And what, if "rowgroup" was to be read like you said, what  should the 
>> point of having scope="rowgroup" inside the <thead> be?  Should it be to 
>> forbid that the header cells in <thead> was propagated  as headers for the 
>> rest of the table?
> 
> I'm not sure what the meaning of many features in HTML4 is when used in  
> non-typical ways. The specification is not really useful.

It is not really useful to not want to make sense of it. And also, the HTML5 draft does not say that rowgroup cannot be applied to THEAD/TFOOT. So what would the improvement be? 

The HTML5 draft isn't anymore spesific than HTML4 about which direction scope="rowgroup" and scope="colgroup" goes. Quoting the draft:

> The rowgroup keyword, which maps to the row group state
>  The row group state means the header cell applies
>  to all the remaining cells in the row group.
> The colgroup keyword, which maps to the column group state
>  The column group state means the header cell applies 
> to all the remaining cells in the column group.
 
It tried to read the scope algorithm - to get any wiser, were the explanation or rowgroup is:

>       If [TH] is in the row group state [...] let (1, groupy) be the
>       slot at which the row group is anchored, let height be the
>       number of rows in the row group, and assign the header cell
>       to any data cells anchored at slots with coordinates (datax,
>       datay) where headerx ≤ datax ≤ xmax and headery ≤ datay <
>       groupy+height

I am not sure if have got this part of the algorithm 100% correcty, but my understanding is that the phrase «headerx ≤ datax ≤ xmax» tells which _direction_ a header in «the row group state» has - namely horisontal direction. Thus it appears to be the case that rowgroup have the same direction in the HTML5 draft as in HTML4. If your are in better knowldege, then I hope you can explain.

>>>> Perhaps you could have used scope="colgroup" though: «colgroup: The
>>>> header cell provides header information for the rest of the column  group 
>>>> that contains it.»
>>> 
>>> There's no <colgroup> in the table. (And therefore no column group.)
>> 
>> Oops. Be aware of traps! :-)  [... HTML has one default COLGROUP ... ]
> 
> Oh, ok, fair enough. Seems that HTML5 is not compatible with HTML4 here 

I read that as «the draft is not compatible». Well, that is interesting. Why has that change been drafted?
 
> then. Anyway, colgroup would not do any good as it spans too much cells.  
> rowgroup simply works. Or maybe omitting scope= altogether depending on  how 
> you interpret HTML4.

«rowgroup simply works»? Well, it «it simply works» in the Table Inspector. I hope we can make into a tool we can trust.
-- 
leif halvard silli

Received on Wednesday, 12 September 2007 14:40:15 UTC