RE: [Tables] Why not use the XFrames approach?

>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.

Except it wouldn't because the last row is ambiguous. Is the first TD two 
columns or the second TD two columns. Both are reasonable approaches. There 
are better approaches to this, I for one would like to see a more semantic 
appoach and advanced styling for tables take care of the rest.

<table>
	<title>Travel Expense Report</title>
	<summary></summary>
	<axis name="type">
		<ai>Meals</ai>
		<ai>Hotels</ai>
		<ai>Transportation</ai>
		<af>subtotals</af>
	</axis>
	<axis name="date">
		<ag>
			<gh>San Jose</gh>
			<ai>25-Aug-97</ai>
			<ai>26-Aug-97</ai>
			<af>subtotals</af>
		</ag>
		<ag>
			<gh>Seattle</gh>
			<ai>27-Aug-97</ai>
			<ai>28-Aug-97</ai>
			<af>subtotals</af>
		</ag>
		<af>Totals</af>
	</axis>
	<data>37.74</data>
	<data>112.00</data>
	<data>45.00</data>
	<data>27.28</data>
	<data>112.00</data>
	<data>45.00</data>
	<data>96.25</data>
	<data>109.00</data>
	<data>36.00</data>
	<data>35.00</data>
	<data>109.00</data>
	<data>36.00</data>
</table>

Though this itself has problems... Actually I wasn't done with it, but since 
it's been brought up, I thought I'd bring it up.

<ai> is an axis item; it labels the column or row it's on.
<af> is an axis fuctions; it labels the column or row it's on, but is itself 
a fuction on the data on the axis group it's in or the axis it's in (if not 
in a group)
<ag> represents an axis group; this structure allows you to group data into 
sets.
<gh> represents a group header; this structure labels the group it's in.

Note this is sample markup for 
http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#h-11.4.2
I believe this approach is much cleaner than the one that uses headers, ids 
and scope attributes.

Also colspan and rowspan could be and probably should be replaced with CSS 
styling. Basically the only cases I've seen where you need to have colspan 
and rowspan are when adjacent cells are combined because they have the same 
value, which could be easily reproduced with a single CSS styling rule 
merge-cells-on-same (or some other better-named style).

Also you could for effeciency sake specify data on a whole row or column 
here. I haven't layed out the structure, but it shouldn't be too difficult. 
Also this could be structured like the current HTML layout is to allow for 
rendering while downloaded without loosing the semantic value associated 
with it. It just isn't here.

Another nice point is that by doing it this way, functions can actually be 
specified for axis functions. For instance, sum or product.

This also allows us to style based on the built in classes and not just on 
rows and columns. I can now style functions, items and group headers all 
differently. Which is better than the current approach.

Orion Adrian

_________________________________________________________________
Free up your inbox with MSN Hotmail Extra Storage! Multiple plans available. 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/

Received on Friday, 9 April 2004 07:18:32 UTC