OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita-lightweight-dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: comparison of simpletable and HTML5 tables


Colleagues,

I regret that I will likely miss today's Lightweight DITA SC meeting (I'm at IEEE Procomm this week).

In support of today's discussion, I've attached a brief analysis that compares simpletable to HTML5 tables.

If I were present, I would note the elegance of the HTML5 table design. The markup is quite simple, and expressions of simple tables are ... simple. But the table design also provides necessary capabilities for semantic tables, through colgroup and the ability to formally associate "header" cells (any cell can be a header) with body cells.

-Alan

--
Alan Houser
Group Wellesley, Inc.
Consultant and Trainer, Technical Publishing
arh on Twitter
412-450-0532

Title: Comparison of DITA simpletable and HTML5 tables

Comparison of DITA simpletable and HTML5 tables

This document attempts to summarize the similarities and differences between the DITA simpletable model and HTML5 tables, with two goals:

  • Consideration of how the DITA TC might modify <simpletable> to include features of HTML5 tables

  • Consideration of the viability of adding HTML5 tables to DITA 2.0

Table 1. <simpletable> elements and corresponding HTML5 equivalents
simpletable element type HTML5 table element type
simpletable table
sthead thead
strow tr
stentry td
Table 2. Additional HTML5 element types
HTML5 table element type Notes
<colspec>/<col> Optional child of table, supports identification of column groups for semantic or formatting purposes
<caption> Specifies table caption
<thead> Optional child of table, specifies heading row or rows
<tbody> Optional child of table, specifies body rows
<tfoot> Optional child of table, specifies footer rows
<th> Specifies a heading cell; can appear anywhere in table

The following table lists attributes tthat are specific to DITA simpletable. It does not include members of universal DITA attribute groups.

Table 3. <simpletable> attributes
simpletable element type Attribute Notes
<simpletable> @keycol Specifies a header column

The following table lists attributes that are specific to HTML5 table components. This table does not include universal HTML5 attributes.

Table 4. HTML5 table attributes
HTML5 element type Attribute Notes
<colgroup>, <col> @span Specifies number of spanned columns in column group (for semantic or styling purposes)
<th> @colspan Specify column spanning
 @rowspan Specify row spanning
 @headers Associate table data cells with this table header cell. Space-separated list of ID values.
 @scope Enumerated type; specify whether this header cell applies to a row, group of rows, column, or group of columns
 @abbr Alternate label for header cell
<td> @colspan Specify column spanning
 @rowspan Specify row spanning
 @headers Associate table header cell with this table data cell. ID value.

Notable aspects of HTML5 table model

  • HTML5 tables support table captions and row/column spanning

  • attributes are sparse. CSS formatting is assumed.

  • header cells can appear anywhere in a table (<th> element can appear anywhere in a table)

  • header cells can be associated with arbitrary table data cells

  • tables can be nested

Possible modifications to simpletable

The following additions to simpletable would improve alignment with the HTML5 table model.

Note:

simpletable and its components are base elements in DITA 1.3. (i.e., they are not specialized element types). Their content models and attribute sets can be modified without consideration of the DITA rules of specialization.

  • Ability to specify a caption or title: Add <caption> as an optional child of <simpletable>.

  • Ability to specify row/column spanning: Add @colspan and @rowspan attributes to <stentry>; possibly <strow>.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]