W3C home > Mailing lists > Public > public-html@w3.org > February 2009

Re: revised table headers design is OK, right?

From: James Graham <jgraham@opera.com>
Date: Fri, 13 Feb 2009 13:18:13 +0100
Message-ID: <49956505.8090207@opera.com>
To: Charles McCathieNevile <chaals@opera.com>
CC: public-html@w3.org

James Graham wrote:
> Charles McCathieNevile wrote:
>> On Thu, 12 Feb 2009 10:46:43 +0100, James Graham <jgraham@opera.com> 
>> wrote:
>>> Charles McCathieNevile wrote:
>>>> Trying to step through it for half an hour did my head in at this 
>>>> time of day, and I couldn't easily print out the relevant bit so I 
>>>> could set myself up with enough registers to be a computer. So 
>>>> instead, can anyone explain what are the headers for the cell whose 
>>>> content is "cell 2 2" in the attached table?
>>> The table inspector says "Australia Melbourne Buses Red" [1], but I 
>>> make no promises whatsoever about it being bug free.
>> OK, that was what I hoped it would be, but my attempts to read the 
>> algorithm in the spec didn't come out like that. Can anyone confirm or 
>> deny that the implementation is doing what the algorithm suggests?

OK, I have started making testcases for this; the repository is at [1]. 
However it would be great if someone else would take over from me doing 
this for two reasons:

1. Any tests I write are likely to contain the same bugs as the code 
that I wrote.
2. I'm not sure how much time I have to spend on this in the near future

The test format is simple, each test has to sections headed #input and 
#expected. Under #input goes some markup that, when wrapped in 
<table></table> tags becomes a HTML table (this is to avoid having to 
write so much per test). Each cell in the table must have unique text 
content (typically this will just be a number). Under expected, there is 
a line for each cell with one or more headers. Each line contains the 
text content of the cell, a colon, and then a comma separated list of 
the text content of the headers that apply to that cell.

This is very easy to understand by example:


So this states that the top left cell is a header for the bottom left 
cell, and that the top right and bottom left cells are headers for the 
bottom right cell.

To run the tests against the table inspector requires the nose framework 
[2]; after installing it (maybe just easy_install nose if you have 
python+easy_install) type nosetests tests.py in the relevant directory.

[1] http://hg.hoppipolla.co.uk/hgwebdir.cgi/html5_tables/
[2] http://somethingaboutorange.com/mrl/projects/nose/
Received on Friday, 13 February 2009 12:21:53 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:42 UTC