User:TobyInk/hcalendar-1.1: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (→‎Related-To Links: clarify linking to UIDs)
 
(57 intermediate revisions by 4 users not shown)
Line 1: Line 1:
(I am aware of the existence of [[hcalendar-brainstorming]] and [[htask]]. This is intended to be more of a formal-style document, representing a draft replacement for the current [[hcalendar]] spec, mostly aimed at filling in areas where the current spec is incomplete or ambiguous, rather than additing newly requested functionality.)
<entry-title>hCalendar 1.1</entry-title>


Rather than replacing the current spec, we can iterate on it. If there are areas that you feel are incomplete or ambiguous please post them to a wiki page and as a community we can sort them out and edit the spec together. Some of these idea might have been discussed and dropped previously for various reasons which might not be documented or are buried somewhere. Getting everyone's thoughts onto a page were we can discuss this and find the reference will save everyone time and make for a better result in the end. [[User:Brian|Brian]]
<h1>hCalendar <small>1.1</small></h1>
http://www.boogdesign.com/images/buttons/microformat_hcalendar.png
http://www.boogdesign.com/images/buttons/microformat_hcalendar.png


'''This is a DRAFT version of an update to the [[hCalendar]] spec.'''
'''This is a DRAFT version of an update to the [[hCalendar]] spec.'''
(I am aware of the existence of [[hcalendar-brainstorming]] and [[htask]]. This is intended to be more of a formal-style document, representing a draft replacement for the current [[hcalendar]] spec, mostly aimed at filling in areas where the current spec is incomplete or ambiguous, rather than adding newly requested functionality.)


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 HTML or XHTML, Atom, RSS, and arbitrary XML. hCalendar is one of several open [[microformats|microformat]] standards.
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 HTML or XHTML, Atom, RSS, and arbitrary XML. hCalendar is one of several open [[microformats|microformat]] standards.


Want to get started with writing an [[hcalendar|hCalendar]] event? Use the [http://microformats.org/code/hcalendar/creator hCalendar creator] to write up an event and publish it, or follow the [[hcalendar-authoring|hCalendar authoring tips]] to add hCalendar markup to your page of upcoming events or events you mention in blog posts, wikis, etc.
Want to get started with writing an [[hcalendar|hCalendar]] event? Use the [http://microformats.org/code/hcalendar/creator hCalendar creator] to write up an event and publish it, or follow the [[hcalendar-authoring|hCalendar authoring tips]] to add hCalendar mark-up to your page of upcoming events or events you mention in blog posts, wikis, etc.


__TOC__
__TOC__
Line 36: Line 35:
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).
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).


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.
In addition, bloggers often discuss events on their blogs -- upcoming events, write-ups 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.


This specification introduces the '''hCalendar''' format, which is a representation of a subset of the aforementioned iCalendar standard, in semantic HTML. Bloggers can both embed hCalendar events and todo items 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.
This specification introduces the '''hCalendar''' format, which is a representation of a subset of the aforementioned iCalendar standard, in semantic HTML. Bloggers can both embed hCalendar events and todo items 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.


{{rfc-2119-intro}}
{{rfc-2119-intro}}
Line 46: Line 45:
{{semantic-xhtml-design-principles}}
{{semantic-xhtml-design-principles}}


For practical implementations, it should be noted that Internet Explorer's support for styling <code><nowiki><abbr></nowiki></code> elements is poor, and may require wrapper elements.
For practical implementations, note that Internet Explorer's support for styling <code><nowiki><abbr></nowiki></code> elements is poor, and might require wrapper elements.


== Format ==
== Format ==
Line 54: Line 53:
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 elements.
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 elements.


The VJOURNAL and VTIMEZONE components of iCalendar are explictly not supported as part of hCalendar. hCalendar authors ''should not'' use classes "vjournal" or "vtimezone" within an hCalendar context; parsers ''must not'' attempt to interpret them if conforming to this version of the specification. [[hAtom]] ''may'' be used as an altrnative to VJOURNAL for those authors wishing to publish journal information. VTIMEZONE has no suggested direct replacement: authors should restrict themselves to publishing dates in [http://www.w3.org/TR/NOTE-datetime W3CDTF format] using only well-known timezones.
The VJOURNAL and VTIMEZONE components of iCalendar are explicitly not supported as part of hCalendar. hCalendar authors {{should-not}} use classes "vjournal" or "vtimezone" within an hCalendar context; parsers {{must-not}} attempt to interpret them if conforming to this version of the specification. [[hAtom]] {{may}} be used as an alternative to VJOURNAL for those authors wishing to publish journal information. VTIMEZONE has no suggested direct replacement: authors {{should}} restrict themselves to publishing dates in [http://www.w3.org/TR/NOTE-datetime W3CDTF format] using only well-known timezones.


=== Root Class Name ===
=== Root Class Name ===
The root class name for hCalendar is "vcalendar".  An element with a class name of "vcalendar" is itself called an ''hCalendar''.  
The root class name for hCalendar is "vcalendar".  An element with a class name of "vcalendar" is itself called an ''hCalendar''.  


The root class name for events is "vevent". An element with a class name of "vevent" is itself called an ''hCalendar event''. The root class name for todo items is "vtodo". An element with a class name of "vtodo" is itself called an ''hCalendar todo''. The root class name for todo items is "valarm". An element with a class name of "valarm" is itself called an ''hCalendar alarm''. The root class name for todo items is "vfreebusy". An element with a class name of "vfreebusy" is itself called an ''hCalendar freebusy''.
The root class name for events is "vevent". An element with a class name of "vevent" is itself called an ''hCalendar event''. The root class name for todo items is "vtodo". An element with a class name of "vtodo" is itself called an ''hCalendar todo''. The root class name for alarm items is "valarm". An element with a class name of "valarm" is itself called an ''hCalendar alarm''. The root class name for freebusy items is "vfreebusy". An element with a class name of "vfreebusy" is itself called an ''hCalendar freebusy''.


For authoring convenience, both all of the above are treated as root class names for parsing purposes. If a document contains elements with class names "vevent", "vtodo", "valarm" or "vfreebusy", but not "vcalendar", the entire document has an implied "vcalendar" context.
For authoring convenience, "vevent", "vtodo" and "vfreebusy" are treated as root class names for parsing purposes. If a document contains elements with class names "vevent", "vtodo" or "vfreebusy", but not "vcalendar", the entire document has an implied "vcalendar" context.
 
An element with a class name of "valarm" is itself called an ''hCalendar alarm''. This is not a root class name.


=== Properties and Sub-properties ===
=== Properties and Sub-properties ===
The properties of an hCalendar are represented by elements inside the hCalendar. Elements with class names of the listed properties represent the values of those properties. Some properties have sub-properties, and those are represented by elements inside the elements for properties.
The properties of an hCalendar are represented by elements inside the hCalendar. Elements with class names of the listed properties represent the values of those properties. Some properties have sub-properties, and those are represented by elements inside the elements for properties.


==== Property List for hCalendars ====
==== Property List for hCalendars ====


* ''vevent'' (hCalendar event)*
* vcalendar ?
* ''vtodo'' (hCalendar todo)*
** ''vevent'' (hCalendar event)*
* ''valarm'' (hCalendar alarm)*
** ''vtodo'' (hCalendar todo)*
* ''vfreebusy'' (hCalendar freebusy)*
** ''vfreebusy'' (hCalendar freebusy)*
** calscale ? [String representing calendar system being used. Default is "GREGORIAN" if not specified.]
** method ? [Method taken from [http://www.ietf.org/rfc/rfc2446.txt RFC 2446]. Default is "PUBLISH".]


Although each component of an hCalendar is optional and may occur more than once, an hCalendar *should* contain at least one item.
Although each component of an hCalendar is optional and {{may}} occur more than once, an hCalendar {{should}} contain at least one of <code>vevent</code>, <code>vtodo</code> or <code>vfreebusy</code>.


===== Key =====
===== Key =====
Line 89: Line 92:
|-  
|-  
| (parentheses) || data format  
| (parentheses) || data format  
|-
| <nowiki>A | B</nowiki> || A or B (not both)
|-  
|-  
| # || comment  
| # || comment  
Line 100: Line 105:


* '''vevent''' {1}
* '''vevent''' {1}
** '''dtstart''' ([[iso-8601|ISO date]]) {1}
** '''summary''' {1}
** '''summary''' {1}
** '''dtstart''' ([[iso-8601|ISO date]]) +
** class ? ["PUBLIC", "PRIVATE", "CONFIDENTIAL"]
** created (ISO date) ?
** description ?
** description ?
** comment ?
** dtend (ISO date) | duration (ISO date duration) ?
** dtend (ISO date) ?
** dtstamp (ISO date) ?
** duration (ISO date duration) ?
** geo ([[geo]]) ?
** ''url'' *
** last-modified (ISO date) ?
** ''location'' (text | [[geo]] | [[adr]] | [[hCard]]) *
** location (text | [[geo]] | [[adr]] | [[hCard]]) ?
** ''[[geo]]'' *
** organizer ([[#Nested_hCards|see section below]]) ?
** resources ?
** priority ? ["LOW", "MEDIUM", "HIGH" or integer from 0 to 9]
** ''attendee'' (text | [[hCard]]) *
** recurrence-id (link) ?
** ''organizer'' (text | [[hCard]]) *
** sequence (integer) ?
** ''contact'' (text | [[hCard]]) *
** status ? ["TENTATIVE", "CONFIRMED", "CANCELLED"]
** ''valarm'' (hCalendar alarm) *
** transp ? ["OPAQUE", "TRANSPARENT"]
** ''related-to'' (link) *
** uid (link) ?
** recurrance-id ?
** url (link) ?
** ''rdate'' (ISO date) *
** ''attach'' (link) *
** ''rrule'' (see the section on Recurrance below) *
** ''attendee'' ([[#Nested_hCards|see section below]]) *
*** '''freq''' {1}
** ''categories'' *
*** until|count ? ("until" and "count" are mutually exclusive. "count" is an integer; "until" is an ISO date)
** ''contact'' ([[#Nested_hCards|see section below]]) *
** ''comment'' *
** ''exdate'' (ISO date) *
** ''exrule'' (see the section on Recurrence below) *
*** '''freq''' {1} ["SECONDLY", "MINUTELY", "HOURLY", "DAILY", "WEEKLY", "MONTHLY", "YEARLY"]
*** until (ISO date) | count (integer) ?
*** interval ?
*** interval ?
*** ''bysecond'' *
*** ''bysecond'' *
Line 130: Line 142:
*** ''bymonth'' *
*** ''bymonth'' *
*** ''bysetpos'' *
*** ''bysetpos'' *
*** ''wkst'' *
*** wkst ?
** ''exdate'' (ISO date) *
** ''rdate'' (ISO date) *
** ''exrule'' (see the section on Recurrance below) *
** ''related-to'' (link) *
*** (as per "rrule")
** ''resources'' *
** uid ?
** ''rrule'' (see the section on Recurrence below) *
** transp ?
*** (as per "exrule")
** class ?
** ''valarm'' (hCalendar alarm) *
** priority ?
 
** status ?
Additionally an hCalendar event {{may}} contain zero or more links marked up as [[rel-tag]] corresponding to additional values for the CATEGORIES property from iCalendar; and zero or more links marked up as [[rel-enclosure]] corresponding to additional values for the ATTACH property.
** created
 
** last-modified
==== Mapping of hAtom to hCalendar ====
** sequence
 
The VJOURNAL component {{must not}} be used in hCalendar. hAtom entries {{may}} be used instead. Below is an informative mapping of iCalendar to hAtom.


Additionally an hCalendar event ''may'' contain zero or more links marked up as [[rel-tag]] corresponding to the CATEGORY property from iCalendar; and zero or more links marked up as [[rel-enclosure]] corresponding to the ATTACH property.
{| border="1"
|-
! iCalendar
! hAtom
|-
| BEGIN:VJOURNAL
| hentry
|-
| ATTACH
| [[rel-enclosure]]
|-
| CATEGORIES
| [[rel-tag]]
|-
| COMMENT
| entry-summary
|-
| DESCRIPTION
| entry-content
|-
| SUMMARY
| entry-title
|-
| ORGANIZER
| author
|-
| UID
| [[rel-bookmark]]
|-
| CREATED
| published
|-
| LAST-MODIFIED
| updated
|-
| DTSTAMP
| updated
|}


==== Property List for hCalendar Todos ====
==== Property List for hCalendar Todos ====


hCalendar todo items have the same properties as hCalendar events, except they ''should not'' contain "transp" or "dtend" properties. The following additional properties are defined:
hCalendar todo items have the same properties as hCalendar events, except that they {{should-not}} contain "transp" or "dtend" properties. The "dtstart" property is optional. The following additional properties are defined:


* '''vtodo''' {1}
* '''vtodo''' {1}
Line 154: Line 204:
** completed (ISO date) ?
** completed (ISO date) ?


As per hCalendar events, [[rel-tag]] and [[rel-enclosure]] links ''may'' be used.
Allowed values for the "status" property are instead: "NEEDS-ACTION", "COMPLETED", "IN-PROCESS", "CANCELLED".
 
As per hCalendar events, [[rel-tag]] and [[rel-enclosure]] links {{may}} be used.


==== Property List for hCalendar Alarms ====
==== Property List for hCalendar Alarms ====
Line 160: Line 212:
* '''valarm''' {1}
* '''valarm''' {1}
** '''summary''' {1}
** '''summary''' {1}
** '''trigger''' {1}
** '''trigger''' (ISO date duration) {1}
** action ? ["AUDIO", "DISPLAY", "EMAIL", "PROCEDURE"]
** description ?
** description ?
** duration (ISO date duration) ?
** duration (ISO date duration) ?
** repeat (integer) ?
** ''attach'' (link) *
** ''attendee'' (text | [[hCard]]) *
** ''attendee'' (text | [[hCard]]) *
** action ?
** repeat ?


[[rel-enclosure]] links ''may'' be used, but [[rel-tag]] ''should not''.
[[rel-enclosure]] links {{may}} be used, but [[rel-tag]] {{should-not}}.
 
The "ACTION" property is required in RFC 2445, but in hCalendar defaults to "DISPLAY".
 
{{OpenIssue}} This is an over-simplistic representation of [http://www.kanzaki.com/docs/ical/trigger.html TRIGGER].


==== Property List for hCalendar Freebusys ====
==== Property List for hCalendar Freebusys ====
Line 174: Line 231:
** '''summary''' {1}
** '''summary''' {1}
** '''freebusy''' +
** '''freebusy''' +
*** '''fbtype''' {1}
*** ''value'' * (ISO date then slash then ISO-date-or-ISO-duration)
** comment ?
** comment ?
** dtstart ?
** dtend (ISO date) ?
** dtend ?
** dtstamp (ISO date) ?
** duration ?
** dtstart (ISO date) ?
** duration (ISO date duration) ?
** organizer (text | [[hCard]]) ?
** uid (link) ?
** url (link) ?
** ''attendee'' (text | [[hCard]]) *
** ''attendee'' (text | [[hCard]]) *
** ''organizer'' (text | [[hCard]]) *
** ''contact'' (text | [[hCard]]) *
** ''contact'' (text | [[hCard]]) *
** ''url'' (link) *
** uid ?
** dtstamp ?


[[rel-tag]] and [[rel-enclosure]] links ''should not'' by included.
[[rel-tag]] and [[rel-enclosure]] links {{should-not}} be included.
 
=== Case-Sensitivity of Pre-Defined Values ===
 
Certain properties have a list of possible values, defined in the iCalendar specification in ALL-CAPS. For example, the "transp" property has a value of either "OPAQUE" or "TRANSPARENT". hCalendar authors {{may}} use lower or mixed case for these values. hCalendar parsers {{must}} convert these to upper case if exporting as iCalendar.
 
=== Dates and Times ===
 
Dates and times {{must}} be expressed in the [http://www.w3.org/TR/NOTE-datetime W3C datetime format]. Authors {{may}} take advantage of the [[abbr-design-pattern|ABBR design pattern]], but {{should}} take into account [[accessibility-issues#abbr-design-pattern|accessibility issues]].
 
==== Durations ====
 
Durations {{must}} be expressed as ISO 8601 durations of time, as per RFC 2445. Some examples:
 
<pre>The <span class="summary">management meeting</span> with last approximately
<abbr class="duration" title="PT2H30M">two and a half hours</abbr>.</pre>


=== Recurrance ===
<pre>This <abbr title="2008-06-23" class="dtstart">summer</abbr>, we begin our
<abbr class="duration" title="P13W">season</abbr> of light entertainment.</pre>


Recurrance rules and exclusion rules are complex. hCalendar parsers are not required to support them, and *may* choose to ignore the entire contents of "rrule" and "exrule" properties. But if "rrule" and "exrule" are supported, then they *must* be parsed according to the guidelines in this section of the specification.
=== Links ===


That is, parsers should aim to implement "rrule" and "exrule" entirely, or not at all.
When a class is found indicating a property of type "link", then it {{should}} be parsed as follows:
 
# If the element is an &lt;a> element, the "href" attribute is used as the value;
# Otherwise, if the element is an &lt;img> element, the "src" attribute is used as the value;
# Otherwise, if the element is an &lt;object> element, the "data" attribute is used as the value;
# If all else fails, the element is interpreted as if it were a non-link element, with the textual content of the element being treated as the value. If authors rely on this behavior, absolute URLs {{should}} be specified.
 
==== UID ====
 
As a special case, the UID property is parsed as follows:
 
# If the element with class "uid" has a fragment identifier (that is, if it has an "id" attribute or is <a name>), then the value of the UID property {{must}} be set to the absolute URL of that fragment;
# Otherwise the element with class "uid" is parsed using the procedure described in the previous section on links in general.
# If there is no element with class "uid", then the element bearing the root class name (e.g. "vevent" or "vtodo") is checked. If that element has a fragment identifier (that is, if it has an "id" attribute or is <a name>), then the value of the UID property {{must}} be set to the absolute URL of that fragment.
# If all else fails, an hCalendar parser {{may}} choose to generate its own UID for the item. Reasonable care {{must}} be taken to ensure the uniqueness of this UID. Authors {{should not}} rely on this behavior.
# Otherwise, the item has no UID value.
 
==== Related-To Links ====
 
The value of the related-to property {{must}} be a link, and {{should}} be the UID of another hCalendar event or todo item (not necessarily on the same page). If the element with the "related-to" class is &lt;a> or &lt;area>, then it {{may}} take a rel attribute with any of the following values:
 
* vcalendar-parent
* vcalendar-child
* vcalendar-sibling
 
These correspond to the PARENT, CHILD and SIBLING values of the RELTYPE sub-property.
 
=== Recurrence ===
 
In RFC 2445, recurrence (RDATE) and exclusion dates (EXDATE) may be a comma-separated list of ISO dates. In hCalendar, each "rdate" and "exdate" class {{must}} each be a single date. Each of these can occur zero or more times within todo items and events.
 
Recurrence rules (RRULE) and exclusion rules (EXRULE) are complex. hCalendar parsers are not required to support them, and {{may}} choose to ignore the entire contents of "rrule" and "exrule" properties. But if "rrule" and "exrule" are supported, then they {{must}} be parsed according to the guidelines in this section of the specification.
 
That is, parsers {{must}} aim to implement "rrule" and "exrule" entirely, or not at all.


==== A Worked Example ====
==== A Worked Example ====


The following example iCalendar recurrance rule is given in RFC 2445:
The following example iCalendar recurrence rule is given in RFC 2445:


<pre>
<pre>
Line 203: Line 311:
</pre>
</pre>


This represents an event which occurs every Sunday in January at 08:30 and 09:30, starting on the 5th of January 1997 and only occuring on odd-numbered years. Here is an example of how that might be translated into HTML:
This represents an event which occurs every Sunday in January at 08:30 and 09:30, starting on 5 January 1997 and only occurring on odd-numbered years. Here is an example of how that might be translated into HTML:


<pre>
<pre>
Line 240: Line 348:
# The examples above show only the DTSTART and RRULE properties and do not represent an entire VEVENT (which would require an element with class "vevent", and one with class "summary").
# The examples above show only the DTSTART and RRULE properties and do not represent an entire VEVENT (which would require an element with class "vevent", and one with class "summary").
# For further information and allowed values, see section 4.3.10 of RFC 2445.
# For further information and allowed values, see section 4.3.10 of RFC 2445.
# Although iCalendar doesn't allow the "BY*" properties to be repeated (BYHOUR=8;BYHOUR=9) it does allow a single "BY*" property to contain a comma-separated list of numbers (BYHOUR=8,9). When an hCalendar recurrance rule specifies a repeated "BY*" property, parsers *must* interpret this as being equivalent to a comma-separated list in iCalendar.
# Although iCalendar doesn't allow the "BY*" properties to be repeated (BYHOUR=8;BYHOUR=9) it does allow a single "BY*" property to contain a comma-separated list of numbers (BYHOUR=8,9). When an hCalendar recurrence rule specifies a repeated "BY*" property, parsers {{must}} interpret this as being equivalent to a comma-separated list in iCalendar.
# RFC 2445 section 4.3.10 defines the tokens "SECONDLY" / "MINUTELY" / "HOURLY" / "DAILY" / "WEEKLY" / "MONTHLY" / "YEARLY" as possible values for FREQ. hCalendar allows these to be specified in a case-insensitive manner. Parsers *should* convert them to upper-case if exporting as an iCalendar file.
# RFC 2445 section 4.3.10 defines the tokens "SECONDLY" / "MINUTELY" / "HOURLY" / "DAILY" / "WEEKLY" / "MONTHLY" / "YEARLY" as possible values for FREQ. hCalendar allows these to be specified in a case-insensitive manner. Parsers {{should}} convert them to upper-case if exporting as an iCalendar file.
# hCalendar recurrance rules *may* use tokens longer than two characters to identify the day. Parsers *must* trim the token down to its first two non-whitespace characters and upper-case them if wishing to convert them to iCalendar BYDAY tokens.
# hCalendar recurrence rules {{may}} use tokens longer than two characters to identify the day. Parsers {{must}} trim the token down to its first two non-whitespace characters and upper-case them if wishing to convert them to iCalendar BYDAY tokens.
# hCalendar recurrance rules *should not* include multiple occurances of "until" or "count" sub-properties, and *should not* specify both an "until" and a "count" sub-property for the same rule. If a rule violates this requirement, parsers *must* use only the first "until" or "count" sub-propetry and *must* ignore subsequent uses of "until" or "count".
# hCalendar recurrence rules {{should-not}} include multiple occurrences of "until" or "count" sub-properties, and {{should-not}} specify both an "until" and a "count" sub-property for the same rule. If a rule violates this requirement, parsers {{must}} use only the first "until" or "count" sub-property and {{must}} ignore subsequent uses of "until" or "count".


==== Simplified Notation ====
==== Simplified Notation ====


In the notation above, an element with class "freq" is a required child element of "rrule" and "exrule". When a parser encounters a recurrance rule with no "freq" specified, then the entire contents of the "rrule" or "exrule" element *must* bre treated as a literal iCalendar RRULE or EXRULE. For example:
In the notation above, an element with class "freq" is a required child element of "rrule" and "exrule". When a parser encounters a recurrence rule with no "freq" specified, then the entire contents of the "rrule" or "exrule" element {{must}} be treated as a literal iCalendar RRULE or EXRULE. For example:


<pre><p>Our organisation has been offering a series of summer lectures since
<pre><p>Our organisation has been offering a series of summer lectures since
Line 258: Line 366:


This allows authors to express complicated rules in more natural language without having to worry about how to map their language onto the various recurrance rule sub-properties.
This allows authors to express complicated rules in more natural language without having to worry about how to map their language onto the various recurrance rule sub-properties.
=== Nested Events and Todos ===
As with [[hcard-parsing#nested_hCards|hCard]], events and todos {{may}} be nested:
<pre><nowiki>
<div class="vevent">
  <h1 class="summary">Technology Conference</h1>
  <p class="dtstart">2008-03-01</p>
  <h2>Workshops</h2>
  <ul>
    <li class="vevent">
      <b class="summary">Microformats</b>
      <abbr class="dtstart" title="2008-03-01T10:30:00Z">10:30am</abbr>
    </li>
    <li class="vevent">
      <b class="summary">RDFa</b>
      <abbr class="dtstart" title="2008-03-01T11:30:00Z">11:30am</abbr>
    </li>
    <li class="vtodo">
      <b class="summary">Lunch</b>
      <abbr class="dtstart" title="2008-03-01T12:45:00Z">12:45pm</abbr>
    </li>
  </ul>
</div>
</nowiki></pre>
The events and todos are to be parsed as independent items, with properties from the children not being applied to the parent, nor vice versa. The only thing a parser {{may}} infer from the nesting is the RELATED-TO property. However, if the items explicitly specify a "related-to" class, the explicit relation {{must}} override any implied relation.
<div id="Nested_hCards"></div>
=== People embedded in hCalendar items ===
The "attendee", "contact" and "organizer" properties each describe a person. These elements may be treated as [[hcard|hCards]] even when no class "vcard" is found on the element.
<pre>
YES: <div class="attendee vcard"><span class="fn">...</span></div>
YES: <div class="attendee"><span class="fn">...</span></div>
NO:  <div class="attendee"><p class="vcard"><span class="fn">...</span></p></div>
</pre>
If the hCards do not contain an "fn" property (formatted name), then:
* The entire contents of the element are taken to be the person's formatted name.
* If the element is a link with href beginning with "mailto:" then the e-mail address linked to is taken to be the person's e-mail address.
* If the element is a link with href not beginning with "mailto:" then the link is taken to be the person's URL.
Some parameters may then be mapped from the hCard to various parameters used in iCalendar.
==== Attendees ====
* hCard "fn" maps to the iCalendar "CN" parameter
* hCard "role" maps to the iCalendar "ROLE" parameter
* the first hCard "email" of the first hCard "agent" maps to the iCalendar "DELEGATED-TO" parameter
* the first hCard "email" maps to the iCalendar "ATTENDEE" property itself
* Additional class names within the hCard {{may}} which be parsed (or ignored, as they are not part of hCard):
** class name "kind" (terminology from vCard 4.0), implied contact type (individual or organisation) or "cutype" (term: iCalendar) maps to the iCalendar "CUTYPE" parameter
** class name "rsvp" maps to the iCalendar "RSVP" parameter
** class name "partstat" maps to the iCalendar "PARTSTAT" parameter
** class name "member" (e-mail address) maps to the iCalendar "MEMBER" parameter
** class name "delegated-from" (e-mail address) maps to the iCalendar "DELEGATED-FROM" parameter
For example, the following:
<pre><nowiki>
<p class="attendee">Alice Smith</p>
<p class="attendee">
  <a class="fn email" href="mailto:bob@example.net">Bob Jones</a>,
  <span class="role">Req-Participant</span>
  (RSVP <span class="rsvp">true</span>)
  <span class="agent vcard">
    <a href="fn email" href="mailto:dave@example.net">Dave Wong</a>
  </span>
</p>
<p><a class="attendee" href="mailto:eve@example.net">Eve Ville</a></p>
<p class="attendee">
  <a class="fn org" href="mailto:corp@example.net">Example Corp</a>
</p></nowiki></pre>
is equivalent to this in iCalendar:
<pre>ATTENDEE;VALUE=TEXT:Alice Smith
ATTENDEE;CN=Bob Jones;ROLE=REQ-PARTICIPANT;RSVP=TRUE;CUTYPE=INDIVIDUAL
DELEGATED-TO:"MAILTO:dave@example.net":MAILTO:bob@example.net
ATTENDEE;CN=Eve Ville;CUTYPE=INDIVIDUAL:MAILTO:eve@example.net
ATTENDEE;CN=Example Corp;CUTYPE=GROUP:MAILTO:corp@example.net</pre>
==== Contacts ====
The CONTACT is essentially a free-form string in iCalendar. Parsers should generate this string from the "fn" property and other properties if desired. For example:
<pre><nowiki>
<p class="contact">Alice Smith</p>
<p class="contact">
  <a class="fn email" href="mailto:bob@example.net">Bob Jones</a>,
  <span class="role">Req-Participant</span>
  (RSVP <span class="rsvp">true</span>)
  <span class="agent vcard">
    <a href="fn email" href="mailto:dave@example.net">Dave Wong</a>
  </span>
  <span class="tel">01234 567 890</span>
</p></nowiki></pre>
<pre>CONTACT:Alice Smith
CONTACT:Bob Jones\, Tel: 01234 567 890</pre>
==== Organizer ====
* hCard "fn" maps to the iCalendar "CN" parameter
* the first hCard "email" of the first hCard "agent" maps to the iCalendar "SENT-BY" parameter
* the first hCard "email" maps to the iCalendar "ORGANIZER" property itself
=== Categories and Attachments ===
RFC 2445 specifies that a VEVENT or VTODO {{may}} have a single CATEGORIES property, which takes a comma-separated list of categories applicable to the item. For example:
<pre><nowiki>CATEGORIES:BUSINESS,HUMAN RESOURCES</nowiki></pre>
This specification allows the "categories" property to occur multiple times, and also allows categories to be specified using [[rel-tag]]. An hCalendar-to-iCalendar converter {{must}} coalesce multiple hCalendar categories into a single iCalendar CATEGORIES string. It {{may}} convert these to upper-case. As an example, the following hCalendar and iCalendar events are considered equivalent:
<pre><nowiki>
<div class="vevent">
  <span class="dtstart">2008-04-01</span> <span class="summary">April Fools' Day</span>
  <span class="categories">Days, Foolishness,</span>
  <a rel="tag" href="http://en.wikipedia.org/wiki/April">April (on Wikipedia)</a>
  <span class="categories">Practical Jokes</span>
</div>
</nowiki></pre>
<pre><nowiki>
BEGIN:VEVENT
DTSTART:2008-04-01
SUMMARY:April Fools' Day
CATEGORIES:DAYS,FOOLISHNESS,APRIL,PRACTICAL JOKES
END:VEVENT
</nowiki></pre>
hCalendar components (except freebusy) {{may}} include one or more attachments -- documents related to the component. For example, an hCalendar event describing a meeting might have the agenda attached. In RFC 2445, binary attachments are allowed; in hCalendar, all attachments must be given as URLs (though they may be "data:" URLs). This specification allows two equivalent syntaxes for attaching files to a component:
# An HTML class of "attach" may be set on an element, in which case it should be parsed according to the general rules for links.
# If the element is &lt;a> or &lt;area>, then [[rel-enclosure]] may be used.
The following five examples should be considered equivalent in hCalendar:
<pre><nowiki>
<img class="attach" src="map.jpeg" alt="Map to meeting location.">
<a class="attach" href="map.jpeg">Map to meeting location.</a>
<a rel="enclosure" href="map.jpeg">Map to meeting location.</a>
<a class="attach" rel="enclosure" href="map.jpeg">Map to meeting location.</a>
<span class="attach">http://example.org/map.jpeg</span> <!-- note: absolute URL recommended -->
</nowiki></pre>
=== Include Pattern ===
The [[include-pattern|include pattern]] {{may}} be used within hCalendar mark-up to reference material elsewhere on the page.
=== ABBR Pattern ===
The [[abbr-design-pattern|ABBR design pattern]] {{may}} be used within hCalendar, but authors {{should}} take into account potential accessibility issues.
=== VTODO List XOXO Minimization ===
The following minimization is defined for VTODO when used with [[xoxo]]:
<pre><ol class="vtodo-list xoxo">
    <li>Eat breakfast <span class="status">COMPLETED</span></li>
    <li>
        Go to work
        <ol>
            <li>Walk to station</li>
            <li>Buy ticket</li>
            <li>Board train</li>
        </ol>
    </li>
    <li>Attend <span class="summary">meeting</span></li>
</ol></pre>
When class "vtodo-list" is found on an element with class "xoxo", then each list item corresponds to a todo item. For each item, if no summary is found in, then the entire contents of the item (less any nested lists) are taken to be the summary. Nested lists correspond to the RELATED property of VTODO with RELTYPE of PARENT/CHILD. An example iCalendar translation of the above XOXO list might be:
<pre>BEGIN:VTODO
UID:f4bc9c52b4a13dd53-01
SUMMARY:Eat breakfast COMPLETED
STATUS:COMPLETED
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-02
SUMMARY:Go to work
RELATED;RELTYPE=CHILD:f4bc9c52b4a13dd53-02-01
RELATED;RELTYPE=CHILD:f4bc9c52b4a13dd53-02-02
RELATED;RELTYPE=CHILD:f4bc9c52b4a13dd53-02-03
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-02-01
SUMMARY:Walk to station
RELATED;RELTYPE=PARENT:f4bc9c52b4a13dd53-02
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-02-02
SUMMARY:Buy ticket
RELATED;RELTYPE=PARENT:f4bc9c52b4a13dd53-02
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-02-03
SUMMARY:Board train
RELATED;RELTYPE=PARENT:f4bc9c52b4a13dd53-02
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-03
SUMMARY:meeting
END:VTODO</pre>


== Examples ==
== Examples ==
Line 264: Line 580:


Here is a sample event in an iCalendar:
Here is a sample event in an iCalendar:
<pre>
<pre><nowiki>
<nowiki>
BEGIN:VCALENDAR
BEGIN:VCALENDAR
PRODID:-//XYZproduct//EN
PRODID:-//XYZproduct//EN
Line 277: Line 592:
END:VEVENT
END:VEVENT
END:VCALENDAR
END:VCALENDAR
</nowiki>
</nowiki></pre>
</pre>


and an equivalent event in hCalendar format with various elements optimized appropriately. See [[hcalendar-example1-steps]] for the derivation.
and an equivalent event in hCalendar format with various elements optimized appropriately. See [[hcalendar-example1-steps]] for the derivation.
Line 294: Line 608:
which could be displayed as:
which could be displayed as:


<div class="vevent">
<div class="vevent" style="margin:1em 4em 1.5em;padding:0.5em;border:1px solid silver;background:#f8f8f8;font-size:120%">
<span class="url">http://www.web2con.com/</span>&nbsp;<!-- note modified to account for idiosyncrasy of wiki software -->
<span class="url">http://www.web2con.com/</span>&nbsp;<!-- note modified to account for idiosyncrasy of wiki software -->
<span class="summary">Web 2.0 Conference</span>:  
<span class="summary">Web 2.0 Conference</span>:  
Line 304: Line 618:
Note that this is a '''live''' hCalendar microformat, which will be found on this page by parsers.
Note that this is a '''live''' hCalendar microformat, which will be found on this page by parsers.


=== More Complex hCalendar Event ===
=== Full hCalendar Example ===


The following example specifies a scheduled meeting that begins at 8:30 AM EST on March 12, 1998 and ends at 9:30 AM EST on March 12, 1998.  
The following hCalendar example includes three events and a todo item. It makes use of nested hCalendar components, embedded hCards and recurrences.


<pre><nowiki>
<pre><nowiki>
    BEGIN:VCALENDAR
<div class="vcalendar">
    BEGIN:VEVENT
 
    UID:guid-1.host1.com
  <div class="vevent">
    DTSTAMP:19980309T231000Z
    <h1 class="uid" id="xmas">
    DESCRIPTION:Project XYZ Review Meeting
      <span class="summary">Christmas</span> Schedule
    SUMMARY:XYZ Project Review
    </h1>
    DTSTART:19980312T133000Z
    <abbr class="dtstart" title="0001-12-25" style="display:none"></abbr>
    DTEND:19980312T143000Z
    <p class="comment rrule"><span class="freq">Yearly</span>
    LOCATION:1CP Conference Room 4350
    period of festive merriment.</p>
    CATEGORY:xyz
    <div class="attendee vcard">
    END:VEVENT
      <b class="role">
    END:VCALENDAR
        <abbr title="REQ-PARTICIPANT">Required for merriment:</abbr>
      </b><br>
      <span class="fn">
        <span class="honorific-prefix nickname">Santa</span>
        <span class="given-name">Claus</span>
      </span>
      (<span class="adr><span class="region">North Pole</span></span>)
    </div>
   
    <div class="vtodo">
      <h2 class="uid" id="shopping">Shopping</h2>
      <abbr class="dtstart" title="2008-12-01">In December</abbr>, don't forget
      to <span class="summary">buy everyone their presents</span> before the
      shops shut on <abbr class="due" title="2008-12-24T16:00:00">Christmas
      Eve</abbr>!
    </div>
   
    <div class="vevent">
      <h2 id="jones" class="uid summary">Jones' Christmas Lunch</h2>
      <p class="comment">The Joneses have been having a wonderful lunch
      <abbr class="rrule" title="FREQ=YEARLY">every year</abbr> at
      <abbr class="dtstart" title="2003-12-25T13:00:00Z">1pm for the last
      few years</abbr>.</p>
      <p><span class="attendee">Everyone</span>'s invited.</p>
    </div>
  </div>
 
  <div class="vevent">
    <h2 class="summary">Boxing Day</h2>
    <p class="comment">
      <abbr class="rrule" title="FREQ=YEARLY">Every year</abbr>
      <abbr class="dtstart" title="0001-12-26">the day after</abbr>
      <a class="related-to" href="#xmas" rel="vcalendar-sibling">Christmas</a>
      is Boxing Day. Nobody knows quite why this day is called that.
    </p>
  </div>
 
</div>
</nowiki></pre>
</nowiki></pre>


The equivalent in hCalendar:
This might be transformed to iCalendar as:


<pre><nowiki>
<pre><nowiki>
<div class="vevent">
BEGIN:VCALENDAR
<h3 class="summary">XYZ Project Review</h3>
BEGIN:VEVENT
<p class="description"><a href="http://acme.example.com/projects/xyz" rel="tag">Project XYZ</a> Review Meeting</p>
UID:<http://example.org/hcalendar#xmas>
<p>To be held on <abbr class="dtstart" title="1998-03-12T08:30:00-05:00">12 March 1998 from 8:30am EST</abbr>  
SUMMARY:Christmas
until <abbr class="dtend" title="1998-03-12T09:30:00-05:00">9:30am EST</abbr></p>
DTSTART:0001-12-25
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
RRULE:FREQ=YEARLY
<small>Booked by: <span class="uid">guid-1.host1.com</span> on
COMMENT:Yearly period of festive merriment.
<abbr class="dtstamp" title="19980309T231000Z">9 Mar 1998 6:00pm</abbr></small>
ATTENDEE;ROLE=REQ-PARTICIPANT;VALUE=TEXT:Santa Claus
</div>
RELATED-TO;REL-TYPE=CHILD:<http://example.org/hcalendar#shopping>
RELATED-TO;REL-TYPE=CHILD:<http://example.org/hcalendar#jones>
END:VEVENT
BEGIN:VTODO
UID:<http://example.org/hcalendar#shopping>
SUMMARY:buy everyone their presents
DTSTART:2008-12-01
DUE:2008-12-24T16:00:00
RELATED-TO;REL-TYPE=PARENT:<http://example.org/hcalendar#xmas>
END:VTODO
BEGIN:VEVENT
UID:<http://example.org/hcalendar#jones>
SUMMARY:Jones' Christmas Lunch
DTSTART:2003-12-25T13:00:00Z
RRULE:FREQ=YEARLY
COMMENT:The Joneses have been having a wonderful lunch every year at
  1pm for the last few years.
ATTENDEE:Everyone
RELATED-TO;REL-TYPE=PARENT:<http://example.org/hcalendar#xmas>
END:VEVENT
BEGIN:VEVENT
SUMMARY:Boxing Day
DTSTART:0001-12-26
RRULE:FREQ=YEARLY
COMMENT:Every year the day after Christmas is Boxing Day. Nobody knows quite
  why this day is called that.
RELATED-TO;REL-TYPE=SIBLING:<http://example.org/hcalendar#xmas>
END:VEVENT
END:VCALENDAR
</nowiki></pre>
</nowiki></pre>


This could be displayed as:
The following vCard can also be extracted from it:


<div class="vevent" style="margin:1em 4em 1.5em;padding:0.5em;border:1px solid silver;background:#f8f8f8;font-size:120%"><h3 class="summary">XYZ Project Review</h3>
<pre><nowiki>
<p class="description">[http://acme.example.com/projects/xyz Project XYZ] Review Meeting</p>
BEGIN:VCARD
<p>To be held on <abbr class="dtstart" title="1998-03-12T08:30:00-05:00">12 March 1998 from 8:30am EST</abbr> until <abbr class="dtend" title="1998-03-12T09:30:00-05:00">9:30am EST</abbr></p>
FN:Santa Claus
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
N:;Claus;;Santa;
<small>Booked by: <span class="uid">guid-1.host1.com</span> on <abbr class="dtstamp" title="19980309T231000Z">9 Mar 1998 6:00pm</abbr></small></div>
NICKNAME:Santa
 
ROLE:REQ-PARTICIPANT
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.
ADR:;;;;North Pole;;
 
END:VCARD
Note 2: A surrounding <code><nowiki><span class="vcalendar"></nowiki></code> 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.
</nowiki></pre>
 
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.
 
Note 4: [[iso-8601|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><nowiki><abbr></nowiki></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.
The notation <code>YYYY-MM-DDThh:mm:ss</code> should be used for better readability, following the format of RFC 3339.
 
Note 5: The difference between the DTEND ISO8601 date (2005-10-08) and the human readable date (7) is NOT a mistake.  [http://lists.osafoundation.org/pipermail/ietf-calsify/2005-September/000769.html DTEND is exclusive], meaning, that the event ends just before the DTEND. Thus for events which start on one day and end on another day, the DTEND date must be specified as the day after the day that a human would say is the last day of the event.
 
Note 6: The location in this example contains implicit structure (venue name, city, state) which could be marked up explicitly as an [[hcard|hCard]].  See [http://microformats.org/wiki/hcalendar-brainstorming#hCard_locations hCalendar brainstorming: hCard locations] for a informative explanation of how to do this.


== References ==
== References ==
Line 384: Line 754:
* [http://ietf.webdav.org/calsify/ CALSIFY WG Links And Resources]
* [http://ietf.webdav.org/calsify/ CALSIFY WG Links And Resources]


== Further Reading ==
=== Further Reading ===
* [http://www.livejournal.com/users/jwz/444651.html jwz - Hula] (required reading)
* [http://www.livejournal.com/users/jwz/444651.html jwz - Hula] (required reading)
* [http://www.jwz.org/doc/groupware.html Groupware Bad by Jamie Zawinski] crystalizes the reason for hCalendar ('''emphasis''' added):
* [http://www.jwz.org/doc/groupware.html Groupware Bad by Jamie Zawinski] crystallizes the reason for hCalendar ('''emphasis''' added):
<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>
<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>



Latest revision as of 22:00, 8 March 2010

<entry-title>hCalendar 1.1</entry-title>

microformat_hcalendar.png

This is a DRAFT version of an update to the hCalendar spec.

(I am aware of the existence of hcalendar-brainstorming and htask. This is intended to be more of a formal-style document, representing a draft replacement for the current hcalendar spec, mostly aimed at filling in areas where the current spec is incomplete or ambiguous, rather than adding newly requested functionality.)

hCalendar is a simple, open, distributed calendaring and events format, based on the iCalendar standard (RFC2445), suitable for embedding in HTML or XHTML, Atom, RSS, and arbitrary XML. hCalendar is one of several open microformat standards.

Want to get started with writing an hCalendar event? Use the hCalendar creator to write up an event and publish it, or follow the hCalendar authoring tips to add hCalendar mark-up to your page of upcoming events or events you mention in blog posts, wikis, etc.

Specification

Editor
Toby Inkster
Authors
Tantek Çelik (Technorati, Inc)
Brian Suda
Toby Inkster

Copyright

Per the public domain release on the authors' user pages (Tantek Çelik, Brian Suda) this specification is released into the public domain.

Public Domain Contribution Requirement. Since the author(s) released this work into the public domain, in order to maintain this work's public domain status, all contributors to this page agree to release their contributions to this page to the public domain as well. Contributors may indicate their agreement by adding the public domain release template to their user page per the Voluntary Public Domain Declarations instructions. Unreleased contributions may be reverted/removed.

Patents

This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy, and IETF RFC3667 & RFC3668.

Inspiration and Acknowledgments

Thanks to:

Introduction

The iCalendar standard (RFC2445), has been broadly interoperably implemented (e.g. Apple's "iCal" application built into MacOSX).

In addition, bloggers often discuss events on their blogs -- upcoming events, write-ups 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.

This specification introduces the hCalendar format, which is a representation of a subset of the aforementioned iCalendar standard, in semantic HTML. Bloggers can both embed hCalendar events and todo items 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.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Semantic XHTML Design Principles

Note: the Semantic XHTML Design Principles were written primarily within the context of developing hCard and hCalendar, thus it may be easier to understand these principles in the context of the hCard design methodology (i.e. read that first). Tantek

XHTML is built on XML, and thus XHTML based formats can be used not only for convenient display presentation, but also for general purpose data exchange. In many ways, XHTML based formats exemplify the best of both HTML and XML worlds. However, when building XHTML based formats, it helps to have a guiding set of principles.

  1. Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference. Avoid restating constraints expressed in the source standard. Informative mentions are ok.
    1. For types with multiple components, use nested elements with class names equivalent to the names of the components.
    2. Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited.
  2. Use the most accurately precise semantic XHTML building block for each object etc.
  3. Otherwise use a generic structural element (e.g. <span> or <div>), or the appropriate contextual element (e.g. an <li> inside a <ul> or <ol>).
  4. Use class names based on names from the original schema, unless the semantic XHTML building block precisely represents that part of the original schema. If names in the source schema are case-insensitive, then use an all lowercase equivalent. Components names implicit in prose (rather than explicit in the defined schema) should also use lowercase equivalents for ease of use. Spaces in component names become dash '-' characters.
  5. Finally, if the format of the data according to the original schema is too long and/or not human-friendly, use <abbr> instead of a generic structural element, and place the literal data into the 'title' attribute (where abbr expansions go), and the more brief and human readable equivalent into the element itself. Further informative explanation of this use of <abbr>: Human vs. ISO8601 dates problem solved

For practical implementations, note that Internet Explorer's support for styling <abbr> elements is poor, and might require wrapper elements.

Format

In General

The iCalendar standard (RFC2445) forms the basis of hCalendar.

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 elements.

The VJOURNAL and VTIMEZONE components of iCalendar are explicitly not supported as part of hCalendar. hCalendar authors SHOULD NOT use classes "vjournal" or "vtimezone" within an hCalendar context; parsers MUST NOT attempt to interpret them if conforming to this version of the specification. hAtom MAY be used as an alternative to VJOURNAL for those authors wishing to publish journal information. VTIMEZONE has no suggested direct replacement: authors SHOULD restrict themselves to publishing dates in W3CDTF format using only well-known timezones.

Root Class Name

The root class name for hCalendar is "vcalendar". An element with a class name of "vcalendar" is itself called an hCalendar.

The root class name for events is "vevent". An element with a class name of "vevent" is itself called an hCalendar event. The root class name for todo items is "vtodo". An element with a class name of "vtodo" is itself called an hCalendar todo. The root class name for alarm items is "valarm". An element with a class name of "valarm" is itself called an hCalendar alarm. The root class name for freebusy items is "vfreebusy". An element with a class name of "vfreebusy" is itself called an hCalendar freebusy.

For authoring convenience, "vevent", "vtodo" and "vfreebusy" are treated as root class names for parsing purposes. If a document contains elements with class names "vevent", "vtodo" or "vfreebusy", but not "vcalendar", the entire document has an implied "vcalendar" context.

An element with a class name of "valarm" is itself called an hCalendar alarm. This is not a root class name.

Properties and Sub-properties

The properties of an hCalendar are represented by elements inside the hCalendar. Elements with class names of the listed properties represent the values of those properties. Some properties have sub-properties, and those are represented by elements inside the elements for properties.

Property List for hCalendars

  • vcalendar ?
    • vevent (hCalendar event)*
    • vtodo (hCalendar todo)*
    • vfreebusy (hCalendar freebusy)*
    • calscale ? [String representing calendar system being used. Default is "GREGORIAN" if not specified.]
    • method ? [Method taken from RFC 2446. Default is "PUBLISH".]

Although each component of an hCalendar is optional and MAY occur more than once, an hCalendar SHOULD contain at least one of vevent, vtodo or vfreebusy.

Key

Based on Perl's standard quantifiers:

bold {1} MUST be present exactly once
italic* OPTIONAL, and MAY occur more than once
+ MUST be present, and MAY occur more than once
? OPTIONAL, but MUST NOT occur more than once
[square brackets] list of common values
(parentheses) data format
A | B A or B (not both)
# comment
! awaiting documentation

Property List for hCalendar Events

hCalendar event properties

  • vevent {1}
    • dtstart (ISO date) {1}
    • summary {1}
    • class ? ["PUBLIC", "PRIVATE", "CONFIDENTIAL"]
    • created (ISO date) ?
    • description ?
    • dtend (ISO date) | duration (ISO date duration) ?
    • dtstamp (ISO date) ?
    • geo (geo) ?
    • last-modified (ISO date) ?
    • location (text | geo | adr | hCard) ?
    • organizer (see section below) ?
    • priority ? ["LOW", "MEDIUM", "HIGH" or integer from 0 to 9]
    • recurrence-id (link) ?
    • sequence (integer) ?
    • status ? ["TENTATIVE", "CONFIRMED", "CANCELLED"]
    • transp ? ["OPAQUE", "TRANSPARENT"]
    • uid (link) ?
    • url (link) ?
    • attach (link) *
    • attendee (see section below) *
    • categories *
    • contact (see section below) *
    • comment *
    • exdate (ISO date) *
    • exrule (see the section on Recurrence below) *
      • freq {1} ["SECONDLY", "MINUTELY", "HOURLY", "DAILY", "WEEKLY", "MONTHLY", "YEARLY"]
      • until (ISO date) | count (integer) ?
      • interval ?
      • bysecond *
      • byminute *
      • byhour *
      • byday *
      • bymonthday *
      • byyearday *
      • byweekno *
      • bymonth *
      • bysetpos *
      • wkst ?
    • rdate (ISO date) *
    • related-to (link) *
    • resources *
    • rrule (see the section on Recurrence below) *
      • (as per "exrule")
    • valarm (hCalendar alarm) *

Additionally an hCalendar event MAY contain zero or more links marked up as rel-tag corresponding to additional values for the CATEGORIES property from iCalendar; and zero or more links marked up as rel-enclosure corresponding to additional values for the ATTACH property.

Mapping of hAtom to hCalendar

The VJOURNAL component MUST NOT be used in hCalendar. hAtom entries MAY be used instead. Below is an informative mapping of iCalendar to hAtom.

iCalendar hAtom
BEGIN:VJOURNAL hentry
ATTACH rel-enclosure
CATEGORIES rel-tag
COMMENT entry-summary
DESCRIPTION entry-content
SUMMARY entry-title
ORGANIZER author
UID rel-bookmark
CREATED published
LAST-MODIFIED updated
DTSTAMP updated

Property List for hCalendar Todos

hCalendar todo items have the same properties as hCalendar events, except that they SHOULD NOT contain "transp" or "dtend" properties. The "dtstart" property is optional. The following additional properties are defined:

  • vtodo {1}
    • due (ISO date) ?
    • percent-complete ?
    • completed (ISO date) ?

Allowed values for the "status" property are instead: "NEEDS-ACTION", "COMPLETED", "IN-PROCESS", "CANCELLED".

As per hCalendar events, rel-tag and rel-enclosure links MAY be used.

Property List for hCalendar Alarms

  • valarm {1}
    • summary {1}
    • trigger (ISO date duration) {1}
    • action ? ["AUDIO", "DISPLAY", "EMAIL", "PROCEDURE"]
    • description ?
    • duration (ISO date duration) ?
    • repeat (integer) ?
    • attach (link) *
    • attendee (text | hCard) *

rel-enclosure links MAY be used, but rel-tag SHOULD NOT.

The "ACTION" property is required in RFC 2445, but in hCalendar defaults to "DISPLAY".

open issue! This is an over-simplistic representation of TRIGGER.

Property List for hCalendar Freebusys

  • vfreebusy {1}
    • summary {1}
    • freebusy +
      • fbtype {1}
      • value * (ISO date then slash then ISO-date-or-ISO-duration)
    • comment ?
    • dtend (ISO date) ?
    • dtstamp (ISO date) ?
    • dtstart (ISO date) ?
    • duration (ISO date duration) ?
    • organizer (text | hCard) ?
    • uid (link) ?
    • url (link) ?
    • attendee (text | hCard) *
    • contact (text | hCard) *

rel-tag and rel-enclosure links SHOULD NOT be included.

Case-Sensitivity of Pre-Defined Values

Certain properties have a list of possible values, defined in the iCalendar specification in ALL-CAPS. For example, the "transp" property has a value of either "OPAQUE" or "TRANSPARENT". hCalendar authors MAY use lower or mixed case for these values. hCalendar parsers MUST convert these to upper case if exporting as iCalendar.

Dates and Times

Dates and times MUST be expressed in the W3C datetime format. Authors MAY take advantage of the ABBR design pattern, but SHOULD take into account accessibility issues.

Durations

Durations MUST be expressed as ISO 8601 durations of time, as per RFC 2445. Some examples:

The <span class="summary">management meeting</span> with last approximately
<abbr class="duration" title="PT2H30M">two and a half hours</abbr>.
This <abbr title="2008-06-23" class="dtstart">summer</abbr>, we begin our
<abbr class="duration" title="P13W">season</abbr> of light entertainment.

Links

When a class is found indicating a property of type "link", then it SHOULD be parsed as follows:

  1. If the element is an <a> element, the "href" attribute is used as the value;
  2. Otherwise, if the element is an <img> element, the "src" attribute is used as the value;
  3. Otherwise, if the element is an <object> element, the "data" attribute is used as the value;
  4. If all else fails, the element is interpreted as if it were a non-link element, with the textual content of the element being treated as the value. If authors rely on this behavior, absolute URLs SHOULD be specified.

UID

As a special case, the UID property is parsed as follows:

  1. If the element with class "uid" has a fragment identifier (that is, if it has an "id" attribute or is <a name>), then the value of the UID property MUST be set to the absolute URL of that fragment;
  2. Otherwise the element with class "uid" is parsed using the procedure described in the previous section on links in general.
  3. If there is no element with class "uid", then the element bearing the root class name (e.g. "vevent" or "vtodo") is checked. If that element has a fragment identifier (that is, if it has an "id" attribute or is <a name>), then the value of the UID property MUST be set to the absolute URL of that fragment.
  4. If all else fails, an hCalendar parser MAY choose to generate its own UID for the item. Reasonable care MUST be taken to ensure the uniqueness of this UID. Authors SHOULD NOT rely on this behavior.
  5. Otherwise, the item has no UID value.

Related-To Links

The value of the related-to property MUST be a link, and SHOULD be the UID of another hCalendar event or todo item (not necessarily on the same page). If the element with the "related-to" class is <a> or <area>, then it MAY take a rel attribute with any of the following values:

  • vcalendar-parent
  • vcalendar-child
  • vcalendar-sibling

These correspond to the PARENT, CHILD and SIBLING values of the RELTYPE sub-property.

Recurrence

In RFC 2445, recurrence (RDATE) and exclusion dates (EXDATE) may be a comma-separated list of ISO dates. In hCalendar, each "rdate" and "exdate" class MUST each be a single date. Each of these can occur zero or more times within todo items and events.

Recurrence rules (RRULE) and exclusion rules (EXRULE) are complex. hCalendar parsers are not required to support them, and MAY choose to ignore the entire contents of "rrule" and "exrule" properties. But if "rrule" and "exrule" are supported, then they MUST be parsed according to the guidelines in this section of the specification.

That is, parsers MUST aim to implement "rrule" and "exrule" entirely, or not at all.

A Worked Example

The following example iCalendar recurrence rule is given in RFC 2445:

DTSTART;TZID=US-Eastern:19970105T083000
RRULE:FREQ=YEARLY;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;
    BYMINUTE=30

This represents an event which occurs every Sunday in January at 08:30 and 09:30, starting on 5 January 1997 and only occurring on odd-numbered years. Here is an example of how that might be translated into HTML:

<p>Our organisation has been offering a series of summer lectures since
<abbr class="dtstart" title="19970105T083000">January 1997</abbr>. They
are
  <span class="rrule">
    held <span class="freq">yearly</span>,
    every <span class="interval">2</span>nd year (1999, 2001, etc),
    every <span class="byday">Sunday</span>
    in January <abbr class="bymonth" title="1" style="display:none"></abbr>
    at <span class="byhour">8</span>:<span class="byminute">30</span> and
    repeated at <span class="byhour">9</span>:30.
  </span>
</p>

This might be rendered as:

Our organisation has been offering a series of summer lectures since January 1997. They are held yearly, every 2nd year (1999, 2001, etc), every Sunday in January at 8:30 and repeated at 9:30.

Notes

  1. The examples above show only the DTSTART and RRULE properties and do not represent an entire VEVENT (which would require an element with class "vevent", and one with class "summary").
  2. For further information and allowed values, see section 4.3.10 of RFC 2445.
  3. Although iCalendar doesn't allow the "BY*" properties to be repeated (BYHOUR=8;BYHOUR=9) it does allow a single "BY*" property to contain a comma-separated list of numbers (BYHOUR=8,9). When an hCalendar recurrence rule specifies a repeated "BY*" property, parsers MUST interpret this as being equivalent to a comma-separated list in iCalendar.
  4. RFC 2445 section 4.3.10 defines the tokens "SECONDLY" / "MINUTELY" / "HOURLY" / "DAILY" / "WEEKLY" / "MONTHLY" / "YEARLY" as possible values for FREQ. hCalendar allows these to be specified in a case-insensitive manner. Parsers SHOULD convert them to upper-case if exporting as an iCalendar file.
  5. hCalendar recurrence rules MAY use tokens longer than two characters to identify the day. Parsers MUST trim the token down to its first two non-whitespace characters and upper-case them if wishing to convert them to iCalendar BYDAY tokens.
  6. hCalendar recurrence rules SHOULD NOT include multiple occurrences of "until" or "count" sub-properties, and SHOULD NOT specify both an "until" and a "count" sub-property for the same rule. If a rule violates this requirement, parsers MUST use only the first "until" or "count" sub-property and MUST ignore subsequent uses of "until" or "count".

Simplified Notation

In the notation above, an element with class "freq" is a required child element of "rrule" and "exrule". When a parser encounters a recurrence rule with no "freq" specified, then the entire contents of the "rrule" or "exrule" element MUST be treated as a literal iCalendar RRULE or EXRULE. For example:

<p>Our organisation has been offering a series of summer lectures since
<abbr class="dtstart" title="19970105T083000">January 1997</abbr>. They
are held every second year (1999, 2001, etc), every Sunday in January at
8:30 and repeated at 9:30.
<abbr title="FREQ=YEARLY;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;BYMINUTE=30"
class="rrule" style="display:none"></abbr>
</p>

This allows authors to express complicated rules in more natural language without having to worry about how to map their language onto the various recurrance rule sub-properties.

Nested Events and Todos

As with hCard, events and todos MAY be nested:

<div class="vevent">
  <h1 class="summary">Technology Conference</h1>
  <p class="dtstart">2008-03-01</p>

  <h2>Workshops</h2>
  <ul>
    <li class="vevent">
      <b class="summary">Microformats</b>
      <abbr class="dtstart" title="2008-03-01T10:30:00Z">10:30am</abbr>
    </li>
    <li class="vevent">
      <b class="summary">RDFa</b>
      <abbr class="dtstart" title="2008-03-01T11:30:00Z">11:30am</abbr>
    </li>
    <li class="vtodo">
      <b class="summary">Lunch</b>
      <abbr class="dtstart" title="2008-03-01T12:45:00Z">12:45pm</abbr>
    </li>
  </ul>
</div>

The events and todos are to be parsed as independent items, with properties from the children not being applied to the parent, nor vice versa. The only thing a parser MAY infer from the nesting is the RELATED-TO property. However, if the items explicitly specify a "related-to" class, the explicit relation MUST override any implied relation.

People embedded in hCalendar items

The "attendee", "contact" and "organizer" properties each describe a person. These elements may be treated as hCards even when no class "vcard" is found on the element.

YES: <div class="attendee vcard"><span class="fn">...</span></div>
YES: <div class="attendee"><span class="fn">...</span></div>
NO:  <div class="attendee"><p class="vcard"><span class="fn">...</span></p></div>

If the hCards do not contain an "fn" property (formatted name), then:

  • The entire contents of the element are taken to be the person's formatted name.
  • If the element is a link with href beginning with "mailto:" then the e-mail address linked to is taken to be the person's e-mail address.
  • If the element is a link with href not beginning with "mailto:" then the link is taken to be the person's URL.

Some parameters may then be mapped from the hCard to various parameters used in iCalendar.

Attendees

  • hCard "fn" maps to the iCalendar "CN" parameter
  • hCard "role" maps to the iCalendar "ROLE" parameter
  • the first hCard "email" of the first hCard "agent" maps to the iCalendar "DELEGATED-TO" parameter
  • the first hCard "email" maps to the iCalendar "ATTENDEE" property itself
  • Additional class names within the hCard MAY which be parsed (or ignored, as they are not part of hCard):
    • class name "kind" (terminology from vCard 4.0), implied contact type (individual or organisation) or "cutype" (term: iCalendar) maps to the iCalendar "CUTYPE" parameter
    • class name "rsvp" maps to the iCalendar "RSVP" parameter
    • class name "partstat" maps to the iCalendar "PARTSTAT" parameter
    • class name "member" (e-mail address) maps to the iCalendar "MEMBER" parameter
    • class name "delegated-from" (e-mail address) maps to the iCalendar "DELEGATED-FROM" parameter

For example, the following:

<p class="attendee">Alice Smith</p>
<p class="attendee">
  <a class="fn email" href="mailto:bob@example.net">Bob Jones</a>,
  <span class="role">Req-Participant</span>
  (RSVP <span class="rsvp">true</span>)
  <span class="agent vcard">
    <a href="fn email" href="mailto:dave@example.net">Dave Wong</a>
  </span>
</p>
<p><a class="attendee" href="mailto:eve@example.net">Eve Ville</a></p>
<p class="attendee">
  <a class="fn org" href="mailto:corp@example.net">Example Corp</a>
</p>

is equivalent to this in iCalendar:

ATTENDEE;VALUE=TEXT:Alice Smith
ATTENDEE;CN=Bob Jones;ROLE=REQ-PARTICIPANT;RSVP=TRUE;CUTYPE=INDIVIDUAL
 DELEGATED-TO:"MAILTO:dave@example.net":MAILTO:bob@example.net
ATTENDEE;CN=Eve Ville;CUTYPE=INDIVIDUAL:MAILTO:eve@example.net
ATTENDEE;CN=Example Corp;CUTYPE=GROUP:MAILTO:corp@example.net

Contacts

The CONTACT is essentially a free-form string in iCalendar. Parsers should generate this string from the "fn" property and other properties if desired. For example:

<p class="contact">Alice Smith</p>
<p class="contact">
  <a class="fn email" href="mailto:bob@example.net">Bob Jones</a>,
  <span class="role">Req-Participant</span>
  (RSVP <span class="rsvp">true</span>)
  <span class="agent vcard">
    <a href="fn email" href="mailto:dave@example.net">Dave Wong</a>
  </span>
  <span class="tel">01234 567 890</span>
</p>
CONTACT:Alice Smith
CONTACT:Bob Jones\, Tel: 01234 567 890

Organizer

  • hCard "fn" maps to the iCalendar "CN" parameter
  • the first hCard "email" of the first hCard "agent" maps to the iCalendar "SENT-BY" parameter
  • the first hCard "email" maps to the iCalendar "ORGANIZER" property itself

Categories and Attachments

RFC 2445 specifies that a VEVENT or VTODO MAY have a single CATEGORIES property, which takes a comma-separated list of categories applicable to the item. For example:

CATEGORIES:BUSINESS,HUMAN RESOURCES

This specification allows the "categories" property to occur multiple times, and also allows categories to be specified using rel-tag. An hCalendar-to-iCalendar converter MUST coalesce multiple hCalendar categories into a single iCalendar CATEGORIES string. It MAY convert these to upper-case. As an example, the following hCalendar and iCalendar events are considered equivalent:

<div class="vevent">
  <span class="dtstart">2008-04-01</span> <span class="summary">April Fools' Day</span>
  <span class="categories">Days, Foolishness,</span>
  <a rel="tag" href="http://en.wikipedia.org/wiki/April">April (on Wikipedia)</a>
  <span class="categories">Practical Jokes</span>
</div>
BEGIN:VEVENT
DTSTART:2008-04-01
SUMMARY:April Fools' Day
CATEGORIES:DAYS,FOOLISHNESS,APRIL,PRACTICAL JOKES
END:VEVENT

hCalendar components (except freebusy) MAY include one or more attachments -- documents related to the component. For example, an hCalendar event describing a meeting might have the agenda attached. In RFC 2445, binary attachments are allowed; in hCalendar, all attachments must be given as URLs (though they may be "data:" URLs). This specification allows two equivalent syntaxes for attaching files to a component:

  1. An HTML class of "attach" may be set on an element, in which case it should be parsed according to the general rules for links.
  2. If the element is <a> or <area>, then rel-enclosure may be used.

The following five examples should be considered equivalent in hCalendar:

<img class="attach" src="map.jpeg" alt="Map to meeting location.">
<a class="attach" href="map.jpeg">Map to meeting location.</a>
<a rel="enclosure" href="map.jpeg">Map to meeting location.</a>
<a class="attach" rel="enclosure" href="map.jpeg">Map to meeting location.</a>
<span class="attach">http://example.org/map.jpeg</span> <!-- note: absolute URL recommended -->

Include Pattern

The include pattern MAY be used within hCalendar mark-up to reference material elsewhere on the page.

ABBR Pattern

The ABBR design pattern MAY be used within hCalendar, but authors SHOULD take into account potential accessibility issues.

VTODO List XOXO Minimization

The following minimization is defined for VTODO when used with xoxo:

<ol class="vtodo-list xoxo">
    <li>Eat breakfast <span class="status">COMPLETED</span></li>
    <li>
        Go to work
        <ol>
            <li>Walk to station</li>
            <li>Buy ticket</li>
            <li>Board train</li>
        </ol>
    </li>
    <li>Attend <span class="summary">meeting</span></li>
</ol>

When class "vtodo-list" is found on an element with class "xoxo", then each list item corresponds to a todo item. For each item, if no summary is found in, then the entire contents of the item (less any nested lists) are taken to be the summary. Nested lists correspond to the RELATED property of VTODO with RELTYPE of PARENT/CHILD. An example iCalendar translation of the above XOXO list might be:

BEGIN:VTODO
UID:f4bc9c52b4a13dd53-01
SUMMARY:Eat breakfast COMPLETED
STATUS:COMPLETED
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-02
SUMMARY:Go to work
RELATED;RELTYPE=CHILD:f4bc9c52b4a13dd53-02-01
RELATED;RELTYPE=CHILD:f4bc9c52b4a13dd53-02-02
RELATED;RELTYPE=CHILD:f4bc9c52b4a13dd53-02-03
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-02-01
SUMMARY:Walk to station
RELATED;RELTYPE=PARENT:f4bc9c52b4a13dd53-02
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-02-02
SUMMARY:Buy ticket
RELATED;RELTYPE=PARENT:f4bc9c52b4a13dd53-02
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-02-03
SUMMARY:Board train
RELATED;RELTYPE=PARENT:f4bc9c52b4a13dd53-02
END:VTODO
BEGIN:VTODO
UID:f4bc9c52b4a13dd53-03
SUMMARY:meeting
END:VTODO

Examples

Simple hCalendar Event

Here is a sample event in an iCalendar:

BEGIN:VCALENDAR
PRODID:-//XYZproduct//EN
VERSION:2.0
BEGIN:VEVENT
URL:http://www.web2con.com/
DTSTART:20071005
DTEND:20071020
SUMMARY:Web 2.0 Conference
LOCATION:Argent Hotel\, San Francisco\, CA
END:VEVENT
END:VCALENDAR

and an equivalent event in hCalendar format with various elements optimized appropriately. See hcalendar-example1-steps for the derivation.

<div class="vevent">
 <a class="url" href="http://www.web2con.com/">http://www.web2con.com/</a>
  <span class="summary">Web 2.0 Conference</span>: 
  <abbr class="dtstart" title="2007-10-05">October 5</abbr>-
  <abbr class="dtend" title="2007-10-20">19</abbr>,
 at the <span class="location">Argent Hotel, San Francisco, CA</span>
 </div>

which could be displayed as:

http://www.web2con.com/  Web 2.0 Conference: October 5- 19, at the Argent Hotel, San Francisco, CA

Note that this is a live hCalendar microformat, which will be found on this page by parsers.

Full hCalendar Example

The following hCalendar example includes three events and a todo item. It makes use of nested hCalendar components, embedded hCards and recurrences.

<div class="vcalendar">

  <div class="vevent">
    <h1 class="uid" id="xmas">
      <span class="summary">Christmas</span> Schedule
    </h1>
    <abbr class="dtstart" title="0001-12-25" style="display:none"></abbr>
    <p class="comment rrule"><span class="freq">Yearly</span>
    period of festive merriment.</p>
    <div class="attendee vcard">
      <b class="role">
        <abbr title="REQ-PARTICIPANT">Required for merriment:</abbr>
      </b><br>
      <span class="fn">
        <span class="honorific-prefix nickname">Santa</span>
        <span class="given-name">Claus</span>
      </span>
      (<span class="adr><span class="region">North Pole</span></span>)
    </div>
    
    <div class="vtodo">
      <h2 class="uid" id="shopping">Shopping</h2>
      <abbr class="dtstart" title="2008-12-01">In December</abbr>, don't forget
      to <span class="summary">buy everyone their presents</span> before the
      shops shut on <abbr class="due" title="2008-12-24T16:00:00">Christmas
      Eve</abbr>!
    </div>
    
    <div class="vevent">
      <h2 id="jones" class="uid summary">Jones' Christmas Lunch</h2>
      <p class="comment">The Joneses have been having a wonderful lunch 
      <abbr class="rrule" title="FREQ=YEARLY">every year</abbr> at
      <abbr class="dtstart" title="2003-12-25T13:00:00Z">1pm for the last
      few years</abbr>.</p>
      <p><span class="attendee">Everyone</span>'s invited.</p>
    </div>
  </div>
  
  <div class="vevent">
    <h2 class="summary">Boxing Day</h2>
    <p class="comment">
      <abbr class="rrule" title="FREQ=YEARLY">Every year</abbr>
      <abbr class="dtstart" title="0001-12-26">the day after</abbr>
      <a class="related-to" href="#xmas" rel="vcalendar-sibling">Christmas</a>
      is Boxing Day. Nobody knows quite why this day is called that.
    </p>
  </div>
  
</div>

This might be transformed to iCalendar as:

BEGIN:VCALENDAR
BEGIN:VEVENT
UID:<http://example.org/hcalendar#xmas>
SUMMARY:Christmas
DTSTART:0001-12-25
RRULE:FREQ=YEARLY
COMMENT:Yearly period of festive merriment.
ATTENDEE;ROLE=REQ-PARTICIPANT;VALUE=TEXT:Santa Claus
RELATED-TO;REL-TYPE=CHILD:<http://example.org/hcalendar#shopping>
RELATED-TO;REL-TYPE=CHILD:<http://example.org/hcalendar#jones>
END:VEVENT
BEGIN:VTODO
UID:<http://example.org/hcalendar#shopping>
SUMMARY:buy everyone their presents
DTSTART:2008-12-01
DUE:2008-12-24T16:00:00
RELATED-TO;REL-TYPE=PARENT:<http://example.org/hcalendar#xmas>
END:VTODO
BEGIN:VEVENT
UID:<http://example.org/hcalendar#jones>
SUMMARY:Jones' Christmas Lunch
DTSTART:2003-12-25T13:00:00Z
RRULE:FREQ=YEARLY
COMMENT:The Joneses have been having a wonderful lunch every year at
  1pm for the last few years.
ATTENDEE:Everyone
RELATED-TO;REL-TYPE=PARENT:<http://example.org/hcalendar#xmas>
END:VEVENT
BEGIN:VEVENT
SUMMARY:Boxing Day
DTSTART:0001-12-26
RRULE:FREQ=YEARLY
COMMENT:Every year the day after Christmas is Boxing Day. Nobody knows quite
  why this day is called that.
RELATED-TO;REL-TYPE=SIBLING:<http://example.org/hcalendar#xmas>
END:VEVENT
END:VCALENDAR

The following vCard can also be extracted from it:

BEGIN:VCARD
FN:Santa Claus
N:;Claus;;Santa;
NICKNAME:Santa
ROLE:REQ-PARTICIPANT
ADR:;;;;North Pole;;
END:VCARD

References

Normative References

Informative References

Specifications That Use hCalendar

Related Work

Further Reading

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.

Related Pages

This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added. These thoughts, issues, and questions are kept in separate pages.