- From: Dave Raggett <dsr@w3.org>
- Date: Sat, 27 Sep 1997 06:22:01 -0400 ()
- To: Al Gilman <asgilman@access.digex.net>
- cc: w3c-wai-hc@w3.org
- Message-ID: <Pine.WNT.3.95.970927055855.-94347C-100001@hazel.hpl.hp.com>
On Fri, 26 Sep 1997, Al Gilman wrote: > For efficiency, it is possible that some of the patterns of > association would want to be able to be declared in a COL or TR > and inherited into TH and TD. An alternative to the algorithm for computing axes values is, as Al suggests, a way of annotating headers with information that indicates which cells they apply to. I have experimented with a simple way to achieve this using a "scope" attribute. The scope attribute can be used with TD and TH elements. Its permitted values are: row all cells in the row column (or col) all cells in the column rowgroup all cells in the same row group colgroup all cells in the same column group column groups are marked up using the COLGROUP element. row groups are marked up using THEAD, TFOOT and TBODY elements. Here is the table markup for the example show in the attached image: <TABLE border="border"> <CAPTION> Travel Expense Report </CAPTION> <THEAD> <TR> <TH scope="column"> Meals </TH> <TH scope="column"> Hotels </TH> <TH scope="column"> Transport </TH> <TD scope="column"> subtotal </TD> </TR> </THEAD> <TBODY> <TR> <TH scope="rowgroup"> San Jose </TH> </TR> <TR> <TD scope="row"> 25-Aug-97 </TD> <TD> 37.74 </TD> <TD> 12.00 </TD> <TD> 45.00 </TD> </TR> <TR> <TD scope="row"> 26-Aug-97 </TD> <TD> 27.28 </TD> <TD> 112.00 </TD> <TD> 45.00 </TD> </TR> <TR> <TD scope="row"> subtotal </TD> <TD> 65.02 </TD> <TD> 224.00 </TD> <TD> 90.00 </TD> <TD> 379.02 </TD> </TR> </TBODY> <TBODY> <TR> <TH scope="rowgroup"> Seattle </TH> </TR> <TR> <TD scope="row"> 27-Aug-97 </TD> <TD> 96.25 </TD> <TD> 109.00 </TD> <TD> 36.00 </TD> </TR> <TR> <TD scope="row"> 28-Aug-97 </TD> <TD> 35.00 </TD> <TD> 109.00 </TD> <TD> 36.00 </TD> </TR> </TBODY> <TBODY> <TR> <TD scope="row"> subtotal </TD> <TD> 131.25 </TD> <TD> 218.00 </TD> <TD> 72.00 </TD> <TD> 421.25 </TD> </TR> <TR> <TH scope="row"> Totals </TH> <TD> 196.27 </TD> <TD> 442.00 </TD> <TD> 162.00 </TD> <TD> 800.27 </TD> </TR> </TBODY> </TABLE> Regards, -- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett phone: +44 122 578 2521 (office) +44 385 320 444 (gsm mobile) World Wide Web Consortium (on assignment from HP Labs)
Attachments
- IMAGE/GIF attachment: table1.gif
Received on Saturday, 27 September 1997 06:24:02 UTC