[Tables] Why not use the XFrames approach?

I know this topic has been discussed a lot and apparently there is no 
good solution, but it struck me that the solution the XFrames working 
group used for Frames can be used for (presentational?) Tables as well.


<http://www.w3.org/TR/xframes/#s_examples>
"3. To specify a layout that looks like the following

  -------
|   |   |
|---|   |
|   |   |
  -------

you specify

<row>
     <column>
         <frame/>
         <frame/>
     </column>
     <frame/>
</row>"

Just that our <frame/> would be a <td/> actually. Sure, it's a lot of 
markup for four cells, but tables in markup are always messy.
In <column/>s <td/>s would be aligned vertically, in <row/>s they would 
be aligned horizontally.

The (simple) tables we have already would be easily converted:

<tbody>
     <tr>
         <td/>
         <td/>
         <td/>
     </tr>
     <tr>
         <td/>
         <td colspan="2"/>
     </tr>
</tbody>

would become:

<col>
     <row>
         <td/>
         <td/>
         <td/>
     </row>
     <row>
         <td/>
         <td/>
     </row>
</col>

It wouldn't be very clean either, but at least it would get rid of the 
colspan and rowspan attributes.

The drawback I see is that it would be difficult to get headers working 
with this kind of tables, but there's always our beloved and underused 
headers attribute to connect them semantically.

Even if this isn't anything which could replace our ol' HTML tables, it 
should be worth giving it a try, at least for a seperate XML set (XTables?).

-ap

Received on Thursday, 8 April 2004 17:40:11 UTC