[uf-discuss] Re: Combining hCard and hCalendar

Scott Reynen scott at randomchaos.com
Tue Aug 7 06:34:34 PDT 2007


On Aug 7, 2007, at 2:45 AM, Peter Bremer wrote:

> The site is dynamic and on the intranet, so difficult to show
> something, but the basic layout of the table is thus:
>
> | Event 1 | 01-01-2007 | example.org/event1 | Organiser 1 |  
> email1 at example.org |
> | Event 2 | 02-02-2007 | example.org/event2 | Organiser 1 |  
> email1 at example.org |
> | Event 3 | 03-03-2007 | example.org/event3 | Organiser 2 |  
> email2 at example.org |
>
> I would like to be able to extract 2 contacts and 3 events from this
> table, and the url (example.org/eventx) should only be connected to
> the event.
> My table row template is as follows:
>
> <tr class="vcard vevent">
>   <td class="summary">Event 1</td>
>   <td><abbr title="20070101" class="dtstamp">2007-01-01</abbr></td>
>   <td><a href="http://example.org/event1" class="url">subscribe</ 
> a></td>
>   <td class="fn">Organiser 1</td>
>   <td><a href="mailto:email1 at example.org" class="email">contact</ 
> a></td>
> </tr>

Someone more familiar with table column semantics could maybe explain  
how that works (I've never used it), but you could also do this with  
the include pattern [1]:

<tr class="vevent">
   <td class="summary">Event 1</td>
   <td><abbr title="20070101" class="dtstamp">2007-01-01</abbr></td>
   <td><a href="http://example.org/event1" class="url">subscribe</a></ 
td>
   <td class="vcard"><span class="fn">Organiser 1</span><a  
class="include" href="#email1"></a></td>
   <td><a id="email1" href="mailto:email1 at example.org"  
class="email">contact</a></td>
</tr>

Also, I'm guessing you probably want "dtstart" instead of "dtstamp".   
The former indicates when an event is happening, the latter when it  
was published.

[1] http://microformats.org/wiki/include-pattern

Peace,
Scott



More information about the microformats-discuss mailing list