[uf-discuss] hCal issues: organizer=vCard and value concatenation
Scott Reynen
scott at randomchaos.com
Tue Mar 6 19:24:16 PST 2007
I'm working on a site that will list concerts with multiple bands,
and this should be a great use case for hCalendar, but I'm running
into some problems with my desired arrangement of content, e.g.:
<div class="vevent">
<div class="vcard organizer">
<h2 class="summary">March 6th, 2007 at <span class="fn org">The
Black Sheep</span></h2>
<p class="adr"><span class="locality">Colorado Springs</span>,
<span class="region">CO</span></p>
</div>
<div class="description">
<div class="band">
<h3><span class="attendee vcard"><a href="http://myspace.com/
valientthorr" class="fn url">Valient Thorr</a></span> at <abbr
class="dtstart" title="2007-03-06T20:00:00-08:00">8:00 pm</abbr></h3>
<p class="value">w/ Fu Manchu</p>
</div>
<div class="band">
<h3><span class="attendee vcard"><a href="http://myspace.com/
fumanchu" class="fn url">Fu Manchu</a></span> at <abbr class="dtend"
title="2007-03-06T21:30:00-08:00">8:30 pm</abbr></h3>
<p class="value">w/ Valient Thorr, Artimus Pyledriver</p>
</div>
</div>
</div>
My main problem is the class="vcard organizer". The hCal spec [1]
says "ORGANIZER in iCalendar may be represented by an hCard in
hCalendar," so that's what I'm doing. I want the class="fn org" to
be part of the vCard, so I need to wrap the vCard around both the
<h2> and the <p>, which I can do in the vCard without the date being
included, as the date isn't wrapped in any vcard properties. But the
two hCal->vCal parsers I've tried (X2V and a bookmarklet in Safari of
a source I can't presently remember) both include "March 6th, 2007
at" as part of the organizer, even though it's not part of the
vCard. Is this behavior correct?
My second issue is with class="description" and class="value". I was
hoping the class="value" would restrict the description to just
concatenations of those nodes, as the hCard parsing [2] suggests:
> For all properties, if the element for a property has one or more
> children with a class name of "value", then concatenate the node
> values for all those child elements with class name of "value", in
> their document order, and use that concatenation as the value of
> the property.
But that doesn't happen. Is there a reason this is only applied to
hCard and not hCalendar, or even all microformats? It would also be
nice to be able to do concatenation using class="value" with the
dtstart and dtend as well, as my date and time are somewhat distant
in this markup.
My final issue is that I don't know the time zone for events right
now (or rather my system doesn't - I actually know where Colorado
is). I may be able to derive the time zone from the location at some
point, but for now, I'm just using the time zone of my host server.
From writing an hCal parser, I know that almost no one uses accurate
time zones in hCalendar markup, and now that I'm doing my first
multiple-zone hCalendar publishing, I see why. It's a lot of work to
figure out a numeric representation of a time zone (especially
considering daylight savings) for machines when humans can infer time
zones from locations. I wonder if we could come up with some
algorithm by which parsers could make the same location to time zone
inferences to remove the burden of time zone complications from
publishers. That's not really something I expect to solve in this
markup - just a thought.
While you're improving my markup, if anyone sees any other
opportunities to make this more meaningful beyond the issues I
mentioned, I'd appreciate hearing them. Thanks.
[1] http://microformats.org/wiki/hcalendar
[2] http://microformats.org/wiki/hcard-parsing#class_value_handling
Peace,
Scott
More information about the microformats-discuss
mailing list