W3C home > Mailing lists > Public > public-html@w3.org > March 2008

Re: [whatwg] several messages about tables and related subjects

From: Krzysztof Żelechowski <giecrilj@stegny.2a.pl>
Date: Tue, 25 Mar 2008 20:03:44 +0100
To: Ian Hickson <ian@hixie.ch>
Cc: whatwg@whatwg.org, HTML WG <public-html@w3.org>
Message-Id: <1206471824.6534.47.camel@a1dmin.vola.spe.com.pl>

Dnia 23-03-2008, N o godzinie 19:29 +0000, Ian Hickson pisze:
> Executive summary:
>  * header/id is in.
>  * summary="" is not in.
>  * axis="" is not in.
>  * the automatic header association algorithm has been expanded.
>  * a number of minor fixes and editorial edits were made.
> 
> For details, see revisions r1373 to r1396.
> 
> On Thu, 16 Aug 2007, Ben Boyle wrote:
> >
> > Look at the balance sheet (3rd table). It's like we have nested sections 
> > within the table. There's "net assets" that's broken down into "current 
> > assets", "non-current assets" and "liabilities", each either their own 
> > heading and totals (footer).
> > 
> > It would be interesting to investigate table markup that could support 
> > complex relationships within tables like this. It may be a bit esoteric, 
> > and can probably be handled through classes for those that need it. In 
> > either case it's very important we can clearly associate the headers 
> > with the right cells. I think it would be useful to be able to identity 
> > the "totals" (footers?) in each section too.
> 
> For simple cases like:
> 
>                       WATER   FOOD
>     CATS
>       male              871     12
>       female            900     10
>     TOTALS FOR CATS    1771     22
>     DOGS
>       male              871     12
>       female            900     10
>     TOTALS FOR DOGS    1771     22
>     TOTALS             3542     44
> 
> ...you can now easily get this effect by putting everything in the left 
> hand column into <th>s, everything on the top row into <th>s, and 
> everything on the bottom row into its own <tfoot>.
> 
> Does that work?

You are trying to map a cube onto a plane here.  
It will never work, 
except for the simplest cases the reader can easily imagine.
More formally, your table has two independent attributes enumerated:
table(species of {cats, dogs, all}, sex of {male, female, total}) 
and two dependent numerical ones:
= (water, food)
and should have the following four columns:

species	sex	water	food

An alternative would be to use tabs 
to present slices of the cube for different animals
--- but it is out of scope here, I presume.

> 
> 
> > I'm going to through a crazy idea into the mix and suggest that 
> > <section>, <header> and <footer> may be useful within data tables for 
> > this very purpose.
> 
> I'm not clear on how that would work. (Especially considering backwards 
> compatibility and the CSS table model.)
> 
> 
> 


Aren't the two answers below contradictory?

> On Tue, 14 Nov 2006, Simon Pieters wrote:
> > 
> > Currently <tbody> requires at least one <tr> element. [1] Why not zero 
> > or more? I think <tr> is for <tbody> like <li> is for <ul>/<ol> (or a 
> > <dt><dd> group is for <dl>).
> 
> Because if you have zero <tr> elements, you actually have zero <tbody> 
> elements, which is allowed.
> 
> 
> On Thu, 5 Apr 2007, Simon Pieters wrote:
> >
> > Why does <tbody> require one or more <tr> elements, as opposed to zero 
> > or more?
> 
> Fixed.

> 
> Cheers,
Chris
Received on Tuesday, 25 March 2008 19:11:43 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:53 UTC