[uf-discuss] Re: hCalendar for events in a table format
Toby A Inkster
mail at tobyinkster.co.uk
Wed Mar 5 01:27:11 PST 2008
Brian Suda wrote:
> i haven't tested your example, but X2V does support the header/id.
Really? As I say, I only had a quick skim of the code on
hg.microformats.org, and don't really know much XSLT anyway, so I may well
have missed it. I also think I was explicitly looking for the word "axis"
when I was skimming, so may have missed it because of...
> So your example of:
> <th id="id_fn" axis="fn">Full name</th>
> would need to become:
> <th id="id_fn"><span class="fn">Full name</span></th>
> Axis is not used and the class="fn" needs to be a child of the id
> being referenced.
That would be contrary to Tantek's guidelines on the Wiki:
| If the element is a table data cell <td>, then:
|
| 1. parse its "headers" attribute as a space separated set of local IDs
|
| 2. find the <td> and <th> elements referenced by those IDs (call them
| header cells) and consider them part of the element being parsed
| as follows:
|
| 1. Treat the header cells as children of the element, ordered by
| the order of ids in its "headers" attribute, immediately
| following the last child node (text or element) or the
| element. (The basic idea is that the content from those
| header cells is used to construct the VEVENT, but secondary
| to (AFTER) the content in the data cell itself, so that the
| data cell can customize/override part of the data in the
| header, e.g. if the header cell included both start time and
| location, and the event was being held at a different
| location).
|
| 2. Parse the "axis" attribute of a header cell as a comma-
| separated list of categories. These categories must be used
| in addition to (and before) any class names on that header
| cell for determining whether it is a property of the VEVENT.
The example I provided will be correctly parsed as hCard according to
these guidelines.
> To see a working example, you can visit:
> http://www.sixnationskickoff.com/
> it is hCalendar items, but it is pretty easy to figure out how to use
> hCard instead.
Not a particularly useful example: the table headers don't contain any
microformat classes. Also, what's up with the extra "uid" classes for each
event?
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 35 days, 15:22.]
Bottled Water
http://tobyinkster.co.uk/blog/2008/02/18/bottled-water/
More information about the microformats-discuss
mailing list