[uf-discuss] hCalendar anchors...
Mark Mansour
mark at lifelint.com
Sun Jan 15 03:31:03 PST 2006
Hi,
This is quite a big post so brace yourself :)
I've found some more anomilies in hcal relating to anchors that I want
to clarify. I'm hoping that people will post their thoughts as I
don't have a 100% definitive answer on how this should be done. To
the problem...
The general rule for extracting info from hCal seems to be
<tag class="microformat-element-name">text</tag>
where the hcal entry looks like
class-value:text
but for anchors it seems to be
<a class="microformat-element-name" href="location">text</tag>
where
class-value:href
But there are a few exceptions to this case. Below I have compiled a
list of anchor examples to help highlight the issues.
1. from http://www.microformats.org/wiki/hcalendar#Example
<a class="url" href="http://www.web2con.com/">
<span class="summary">Web 2.0 Conference</span>:
<abbr class="dtstart" title="2005-10-05">October 5</abbr>-
<abbr class="dtend" title="2005-10-08">7</abbr>,
at the <span class="location">Argent Hotel, San Francisco, CA</span>
</a>
Recommended result:
URL:http://www.web2con.com/
Format:
class-value:href
2. from http://www.microformats.org/wiki/hcalendar-examples#5._iCalendar_Object_Examples
<div>Organized by: <a class="organizer"
href="mailto:jsmith at host.com">jsmith at host.com</a></div>
Recommended result:
ORGANIZER:MAILTO:jsmith at host.com
Format:
class-value:href
3. from http://www.microformats.org/wiki/hcalendar-examples#Example_3_2
<span class="attendee"><a class="value"
href="mailto:jsmith at host1.com">jsmith at host1.com</a> RSVPed? <span
class="rsvp">TRUE</span></span>
Recommended result:
ATTENDEE;RSVP=TRUE:MAILTO:jsmith at host1.com
Format:
class;sub-element-class=subelement-text:href
4. from http://www.microformats.org/wiki/hcalendar-examples#Example_3_2
<a class="attach" type="application/postscript"
href="ftp://xyzCorp.com/pub/conf/bkgrnd.ps">ftp://xyzCorp.com/pub/conf/bkgrnd.ps</a>
Recommended result:
ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/conf/bkgrnd.ps
Format:
class;FMTTYPE=attribute-type:href
5. from http://www.microformats.org/wiki/hcalendar-examples#Example_6._Free.2FBusy_time
<a class="url"
href="http://www.host.com/calendar/busytime/jsmith.ifb">http://www.host.com/calendar/busytime/jsmith.ifb</a>
Recommended result:
URL:http://www.host.com/calendar/busytime/jsmith.ifb
Format:
class-value:href
6. from http://suda.co.uk/projects/holidays/
<a class="summary"
href="createvcal.php?summary=Drinking%20Straw%20Day&description=Today%20in%201888%20the%20drinking%20straw%20was%20patented%2C%20use%20it%20wisely&date=20060103&freq=YEARLY&interval=1&bymonth=1"
title="Drinking Straw Day">Drinking Straw Day</a>
Recommended result (from x2v):
SUMMARY:Drinking Straw Day
Format:
class-value:text
7. from http://lists.w3.org/Archives/Public/www-rdf-calendar/2006Jan/0003.html
<span class="summary"><a class="url"
href="http://dps1.travelocity.com/dparcobrand.ctl?smls=Y&Service=YHOE&.intl=us&aln_name=AA&flt_num=1655&dep_arp_name=&arr_arp_name=&dep_dt_dy_1=23&dep_dt_mn_1=Jan&dep_dt_yr_1=2006&dep_tm_1=9%3A00am">ORD-SFO/AA
1655</a></span>
Recommended result (from x2v):
SUMMARY:ORD-SFO/AA 1655
URL:http://dps1.travelocity.com/dparcobrand.ctl?smls=Y&Service=YHOE&.intl=us&aln_name=AA&flt_num=1655&dep_arp_name=&arr_arp_name=&dep_dt_dy_1=23&dep_dt_mn_1=Jan&dep_dt_yr_1=2006&dep_tm_1=9%3A00am
Format:
class-value:sub-element-text
sub-element-class:sub-element-href
1, 2, 3, 4, and 5 seem to follow the same format (3 and 4 show the use
of parameters), they are also all from the microformats wiki. 6 is
from suda.co.uk which has the primary hcalendar parser available
(there is glean, but I haven't tried that yet). 7 is handled by x2v
just fine, but is in a format that is different from the other
examples.
1 and 7 are opposites of each other, 1 is an <a class="url"
href="location"><span class="summary">value</span></a> and 7 is <span
class="summary><a class="url" href="location">value</a></span>. I
don't think both can be valid and to me 1 seems like the best choice
as it is the most consistant and it is taking the href to be the url
value - to me that seems like a good idea. I don't like 7 because it
seems to indicate that the URL is for the summary.
6 is ok but not great as again, it seems to indicate that the summary
has a URL rather than the entire event, maybe that is just me being
fussy.
So, what do people think of examples 1, 6 and 7?
Mark
More information about the microformats-discuss
mailing list