[microformats-discuss] XHTML tables as CSV-like "records"?
Kevin Marks
kmarks at technorati.com
Sun Oct 2 12:00:22 PDT 2005
This is something we discussed last year in 'Can your website be your
API?',
http://tantek.com/presentations/20040928sdforumws/semantic-xhtml.html
I think it is worth writing out a set of rules, as we did for XOXO. In
particualr, XOXO constrains each <dt> to one <dd> for simplicitly of
dictionary mapping, and constraining to have a uniform grid of rows and
columns makes sense.
You can represent n=dimensional arrays in XOXO as nested lists, but a
2d table is a very useful special case.
Oh, and as an aside, CSV is really nasty due to horrible escaping rules
that aren't well-obeyed. Tab and Newline delimited textfiles
interoperate much better.
On Oct 2, 2005, at 9:34 AM, Dr. Ernie Prabhakar wrote:
> Hi all,
>
> I'm trying to find out if there is a standard microformat for
> interpreting tables as a list of records, e.g.:
>
> <table class="records">
> <tr>
> <th scope="col"><b>XML Schema Datatype</b></th>
> <th scope="col"><b>Mac OS X tag</b></th>
> <th scope="col"><b>XHTML class/tag</b></th>
> </tr><tr>
> <td>xs:string</td>
> <td><code><string></code></td>
> <td><em>implicit</em></td>
> </tr><tr>
> <td>xs:integer</td>
> <td><code><integer></code></td>
> <td><code><div class="integer"></div></code></td>
> </table>
>
> The idea is that tables tagged as "records" are expected to:
> a) Have a header row
> b) Indicate proper scope
> c) Contain the same number of elements in each row
>
> In other words, act like a CSV file. I've heard Tantek describe XHTML
> tables this way, but haven't seen an actual microformat (or even
> design pattern) characterizing the 'right' way to do that. This seems
> worthy of its own pattern -- like XOXO for lists -- doesn't it?
>
> Anyway, if there is no such thing, and people agree it is worthwhile,
> I'll start collecting examples and such as recommended in the usual
> process. I just wanted to check first, to make sure I wasn't missing
> anything.
>
> Thanks,
> - Ernie P.
>
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
More information about the microformats-discuss
mailing list