http://microformats.org/wiki/api.php?action=feedcontributions&user=64.230.94.230&feedformat=atomMicroformats Wiki - User contributions [en]2024-03-28T21:51:57ZUser contributionsMediaWiki 1.38.4http://microformats.org/wiki/index.php?title=hcalendar&diff=1693hcalendar2005-09-10T02:27:49Z<p>64.230.94.230: /* Examples in the wild */</p>
<hr />
<div>= hCalendar =<br />
<br />
hCalendar is a simple open, distributed calendaring and events format, based on the iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]), suitable for embedding in (X)HTML, Atom, RSS, and arbitrary XML. hCalendar is one of several open [[microformats|microformat]] standards.<br />
<br />
__TOC__<br />
<br />
== Draft Specification ==<br />
<br />
=== Editor ===<br />
[http://tantek.com/ Tantek Çelik] ([http://technorati.com Technorati, Inc])<br />
<br />
=== Authors ===<br />
* [http://tantek.com/ Tantek Çelik], [http://technorati.com Technorati, Inc]<br />
* [http://suda.co.uk/ Brian Suda]<br />
<br />
=== Copyright ===<br />
{{MicroFormatCopyrightStatement2004}}<br />
<br />
=== Patents ===<br />
{{MicroFormatPatentStatement}}<br />
<br />
=== Inspiration and Acknowledgments ===<br />
Thanks to:<br />
* Adam Bosworth for leading the [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOO Camp 2004 HTML For Calendars presentation] which brought together a critical mass of interested parties.<br />
<br />
<br />
<br />
== Introduction ==<br />
The iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]), has been broadly interoperably implemented (e.g. Apple's "iCal" application built into MacOSX).<br />
<br />
In addition, bloggers often discuss events on their blogs -- upcoming events, writeups of past events, etc. With just a tad bit of structure, bloggers can discuss events in their blog(s) in such a way that spiders and other aggregators can retrieve such events, automatically convert them to iCalendar, and use them in any iCalendar application or service.<br />
<br />
This specification introduces the '''hCalendar''' format, which is a 1:1 representation of the aforementioned iCalendar standard, in semantic XHTML. Bloggers can both embed hCalendar events directly in their web pages, and style them with CSS to make them appear as desired. In addition, hCalendar enables applications to retrieve information about such events directly from web pages without having to reference a separate file.<br />
<br />
== Semantic XHTML Design Principles ==<br />
<br />
{{semantic-xhtml-design-principles}}<br />
<br />
== Format ==<br />
<br />
=== In General ===<br />
<br />
The iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]) forms the basis of hCalendar.<br />
<br />
Note: the editor and authors of this specification are tracking the [http://lists.osafoundation.org/pipermail/ietf-calsify/ "iCal-Basic" effort] and intend to base the core hCalendar profile on iCal-Basic. See references for a link to the current draft.<br />
<br />
The basic format of hCalendar is to use iCalendar object/property names in lower-case for class names, and to map the nesting of iCalendar objects directly into nested XHTML.<br />
<br />
=== More Semantic Equivalents ===<br />
<br />
However, for some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:<br />
* <code>URL</code> in iCalendar becomes <code><a class="url" href="...">...</a></code> inside the element with <code>class="vevent"</code> in hCalendar.<br />
* <code>ATTENDEE</code> in iCalendar may in hCalendar be represented by an [[hcard]].<br />
<br />
=== Singular vs. Plural Properties ===<br />
<br />
For properties which are singular (e.g. "N" and "FN" from vCard), the first descendant element with that class should take effect, any others being ignored.<br />
<br />
For properties which can be plural (e.g. "TEL" from vCard), each class instance should create a instance of that property. Plural properties with subtypes (e.g. TEL with WORK, HOME, CELL from vCard) can be optimized to share a common element for the property itself, with each instance of subtype being an appropriately classed descendant of the property element. <br />
<br />
=== Human vs. Machine readable ===<br />
If an <code>&lt;abbr&gt;</code> element is used for a property, then the '<code>title</code>' attribute of the <code>&lt;abbr&gt;</code> element is the value of the property, instead of the contents of the element, which instead provide a human presentable version of the value. This specification recommends that such <code>&lt;abbr&gt;</code> elements be used for the following iCalendar properties:<br />
* DTSTART, DTEND, DURATION, RDATE, RRULE<br />
<br />
== Example ==<br />
<br />
Here is a sample event in an iCalendar:<br />
<pre><nowiki><br />
BEGIN:VCALENDAR<br />
PRODID:-//XYZproduct//EN<br />
VERSION:2.0<br />
BEGIN:VEVENT<br />
URL:http://www.web2con.com/<br />
DTSTART:20051005<br />
DTEND:20051007<br />
SUMMARY:Web 2.0 Conference<br />
LOCATION:Argent Hotel\, San Francisco\, CA<br />
END:VEVENT<br />
END:VCALENDAR<br />
</nowiki></pre><br />
and an equivalent event in hCalendar format with various elements optimized appropriately. See [[hcalendar-example1-steps]] for the derivation.<br />
<br />
<pre><nowiki><br />
<span class="vevent"><br />
<a class="url" href="http://www.web2con.com/"><br />
<span class="summary">Web 2.0 Conference</span>: <br />
<abbr class="dtstart" title="2005-10-05">October 5</abbr>-<br />
<abbr class="dtend" title="2005-10-07">7</abbr>,<br />
at the <span class="location">Argent Hotel, San Francisco, CA</span><br />
</a><br />
</span><br />
</nowiki></pre><br />
which could be displayed as:<br />
<br />
[http://www.web2con.com/ Web 2.0 Conference: October 5-7, at the Argent Hotel, San Francisco, CA]<br />
<br />
Note 1: The product information is not necessary since hCalendar is an interchange format. When transforming hCalendar back into iCalendar, the transforming engine should add its own product ID.<br />
<br />
Note 2: A surrounding &lt;span class="vcalendar"&gt; element is optional, and is left out as such. It is optional since the context of a vcalendar is implied when a vevent is encountered. The implied context/scope is that of the document. Authors may explicitly use elements with class="vcalendar" to wrap sets of vevents that all belong to the same calendar, e.g. when publishing multiple calendars on the same page.<br />
<br />
Note 3: The version information is unnecessary in hCalendar markup directly since the version will be defined by the profile of hCalendar that is used/referred to in the 'profile' attribute of the <head> element.<br />
<br />
Note 4: ISO8601 dates (required by iCalendar) are not very human friendly. In addition, the year is often understood implicitly by humans from the context. Thus <code>&lt;abbr&gt;</code> elements are used to simultaneously provide a human friendly date and/or time in the visible contents of the element, while placing the respective machine parsable comprehensive ISO8601 datetime in the 'title' attribute.<br />
The notation YYYY-MM-DD should be used for better readability.<br />
<br />
== Examples in the wild ==<br />
This section is '''informative'''.<br />
<br />
The following sites have implemented hCalendar, and thus are a great place to start for anyone looking for examples "in the wild" to try parsing, indexing, organizing etc. If events on your pages are marked up with hCalendar, feel free to add it to the top of this list. Once the list grows too big, we'll make a separate wiki page.<br />
<br />
* [http://www.thisiscmon.com/ C'MON] is a rock band from Canada, and their [http://www.thisiscmon.com/shows/ tour dates] have been marked up by [http://www.d2digitalmedia.com/ Ray Dickman] with hCalendar.<br />
* [http://chocnvodka.blogware.com/blog Suw Charman] has marked up [http://suw.org.uk/archives/category/events/ her events] with hCalendar.<br />
* [http://www.blogbusinesssummit.com/ Blog Business Summit] has published their [http://www.blogbusinesssummit.com/details.htm event details] marked up with hCalendar.<br />
* [http://evdb.com EVDB], the Events and Venues database, publishes all events with hCalendar.<br />
* [http://upcoming.org Upcoming.org] publishes all events and lists of events with hCalendar.<br />
* The [http://laughingsquid.com/squidlist/calendar/ Laughing Squid Calendar] events, [http://laughingsquid.com/squidlist/calendar/9949/2005/5/9 e.g. this party], now supports hCalendar.<br />
* [http://paulschreiber.com/blog/ Paul Schreiber]'s [http://concerts.shrub.ca/ Sunnyvale House Concerts] site publishes hCalendar event information for upcoming concerts. In addition the [http://concerts.shrub.ca/shows Past Shows] page contains hCalendar events for all past concerts.<br />
* [http://www.complexspiral.com/ Complex Spiral Consulting], both in the "Events" box on left side, and the separate [http://www.complexspiral.com/events/ Events page]. <br />
* [http://tantek.com/log Tantek's Thoughts], specifically the "Events" roll in the right-most column.<br />
* [http://suda.co.uk/projects/holidays/ Lesser Known Holidays], a list of holidays on [http://suda.co.uk suda.co.uk] that can be imported via iCal and hCal so you can compare actual transformation versus intended.<br />
* [http://norman.walsh.name/2005/itinerary/ Norm Walsh's travel schedule] use hCalendar as well as GRDDL.<br />
* [http://www.policyawareweb.org/2005/ftf2/paw-mtg Policy Aware Web (PAW) Project Meeting] uses hCalendar to record date-related decisions, and uses a vtodo microformat to record action items.<br />
<br />
== Implementations ==<br />
This section is '''informative'''.<br />
<br />
The following implementations have been developed which either generate or parse hCalendars. If you have an hCalendar implementation, feel free to add it to the top of this list. Once the list grows too big, we'll make a separate wiki page.<br />
<br />
Generation:<br />
* [http://hybernaut.com/upcoming-hcal Drupal Upcoming.org syndication module emits hCalendar]<br />
* [http://theryanking.com/ Ryan King] has an [http://theryanking.com/microformats/hcalendar-creator.html hCalendar creator].<br />
<br />
Conversion:<br />
* [http://george.hotelling.net/90percent/ George] has built a [http://george.hotelling.net/90percent/geekery/greasemonkey_and_microformats.php Greasemonkey user script that detects hCalendar events and allows users to easily add them to their calendar application(s)].<br />
* [http://blogmatrix.blogmatrix.com/ David Janes] has produced a [[Greasemonkey]] [http://www.blogmatrix.com/include/microformat-find.user.js script] that finds many microformat elements, including hCalendar events, and [http://blog.davidjanes.com/mtarchives/2005_08.html#003379 provides a popup menu of actions]. The hCalendar to vCalendar conversion is done internally within the script.<br />
* [http://suda.co.uk/projects/X2V/ X2V] parses hCalendar and produces a .ics (iCalendar) stream. Note: needs to be updated to track changes in the specification as they occur.<br />
* [http://dev.w3.org/cvsweb/2001/palmagent/ palmagent] by [[User:DanC]] includes toICal.xsl and test materials; it works much like xhtml2vcal.xsl in X2V. See also: [http://www.w3.org/2002/12/cal/ RDF Calendar workspace] with icalendar test materials.<br />
* [http://web.mit.edu/glasser/www/JSCalendar/ JSCalendar] parses hCalendar and produces a displayable HTML table/CSS-based calendar.<br />
<br />
== References ==<br />
=== Normative References ===<br />
* [http://www.w3.org/TR/2002/REC-xhtml1-20020801/ XHTML 1.0 SE]<br />
* [[hcard|hCard]]<br />
* [http://www.ietf.org/rfc/rfc2445.txt iCalendar RFC2445]<br />
<br />
=== Informative References ===<br />
* [http://w3.org/TR/REC-CSS1 CSS1]<br />
* [http://tantek.com/log/2004/09.html#hcalendar hCalendar term introduced and defined on the Web, 20040930]<br />
* [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOO Camp 2004 HTML For Calendars presentation, 20040911]<br />
* [http://wiki.oreillynet.com/foocamp04/index.cgi?SimpleSemanticFormats FOO Camp 2004 Simple Semantic Formats presentation, 20040910]<br />
* [http://www.ietf.org/internet-drafts/draft-royer-ical-basic-02.txt iCal-Basic draft 02]<br />
* Contributed from http://developers.technorati.com/wiki/hCalendar<br />
* [http://www.w3.org/TR/xhtml11 XHTML 1.1]<br />
<br />
==== Related Reading ====<br />
* [http://lists.osafoundation.org/pipermail/ietf-calsify/ IETF-calsify archives]<br />
* [http://www.livejournal.com/users/jwz/444651.html jwz - Hula] (required reading)<br />
* [http://www.jwz.org/doc/groupware.html Groupware Bad by Jamie Zawinski] crystalizes the reason for hCalendar ('''emphasis''' added):<br />
<blockquote>"Right now people can do that by publishing .ics files, but it's not trivial to do so, and it's work on the part of other people to look at them. '''If it's not HTML hanging off our friend's home page that can be viewed in any browser on a public terminal in a library, the bar to entry is too high and it's useless.'''"</blockquote><br />
<br />
* [http://muddybranch.thejkgroup.com/ Jason Klemow's blog]<br />
* [http://www.softwarestudio.org/iCal/2445Issues.html RFC2445 Issues List]<br />
* [http://ietf.webdav.org/calsify/ CALSIFY WG Links And Resources]<br />
* [http://theryanking.com/microformats/hcalendar-creator.html hCalendar Creator]<br />
=== Similar Work ===<br />
* [[XOXO]]<br />
<br />
== Discussions ==<br />
<br />
This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added. There is a separate document where we are keeping our brainstorms and other explorations relating to hCalendar:<br />
<br />
* [[hcalendar-brainstorming]]<br />
<br />
* See also [http://www.technorati.com/cosmos/referer.html blogs discussing this page].<br />
<br />
=== Q&A ===<br />
* If you have any questions about hCalendar, check the [[hcalendar-faq]], and if you don't find answers, add your questions!<br />
<br />
=== Issues ===<br />
* Please add any issues with the specification to the separate [[hcalendar-issues]] document.</div>64.230.94.230