hcalendar

(Difference between revisions)

Jump to: navigation, search
(Conversion and consumption)
Line 27: Line 27:
== Introduction ==
== Introduction ==
-
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, 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.
Line 43: Line 43:
The iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]) forms the basis of hCalendar.
The iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]) forms the basis of hCalendar.
-
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.
+
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.
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.
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.
Line 50: Line 50:
However, for some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:
However, for some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:
-
* <code>URL</code> in iCalendar becomes  <code><a class="url" href="...">...</a></code> inside the element with <code>class="vevent"</code> in hCalendar.
+
* <code>URL</code> in iCalendar becomes  <code><a class=&quot;url&quot; href=&quot;...&quot;>...</a></code> inside the element with <code>class=&quot;vevent&quot;</code> in hCalendar.
* <code>ATTENDEE</code> in iCalendar may in hCalendar be represented by an [[hcard]].
* <code>ATTENDEE</code> in iCalendar may in hCalendar be represented by an [[hcard]].
=== Singular vs. Plural Properties ===
=== Singular vs. Plural Properties ===
-
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.
+
For properties which are singular (e.g. &quot;N&quot; and &quot;FN&quot; from vCard), the first descendant element with that class should take effect, any others being ignored.
-
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.  
+
For properties which can be plural (e.g. &quot;TEL&quot; 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.  
=== Human vs. Machine readable ===
=== Human vs. Machine readable ===
-
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:
+
If an <code><abbr></code> element is used for a property, then the '<code>title</code>' attribute of the <code><abbr></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><abbr></code> elements be used for the following iCalendar properties:
* DTSTART, DTEND, DURATION, RDATE, RRULE
* DTSTART, DTEND, DURATION, RDATE, RRULE
Line 82: Line 82:
<pre><nowiki>
<pre><nowiki>
-
<span class="vevent">
+
<span class=&quot;vevent&quot;>
-
  <a class="url" href="http://www.web2con.com/">
+
  <a class=&quot;url&quot; href=&quot;http://www.web2con.com/&quot;>
-
   <span class="summary">Web 2.0 Conference</span>:  
+
   <span class=&quot;summary&quot;>Web 2.0 Conference</span>:  
-
   <abbr class="dtstart" title="2005-10-05">October 5</abbr>-
+
   <abbr class=&quot;dtstart&quot; title=&quot;2005-10-05&quot;>October 5</abbr>-
-
   <abbr class="dtend" title="2005-10-08">7</abbr>,
+
   <abbr class=&quot;dtend&quot; title=&quot;2005-10-08&quot;>7</abbr>,
-
  at the <span class="location">Argent Hotel, San Francisco, CA</span>
+
  at the <span class=&quot;location&quot;>Argent Hotel, San Francisco, CA</span>
  </a>
  </a>
</span>
</span>
Line 97: Line 97:
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.
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.
-
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.
+
Note 2: A surrounding <span class=&quot;vcalendar&quot;> 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=&quot;vcalendar&quot; to wrap sets of vevents that all belong to the same calendar, e.g. when publishing multiple calendars on the same page.
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 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: 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.
+
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><abbr></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 YYYY-MM-DD should be used for better readability.
The notation YYYY-MM-DD should be used for better readability.
Line 111: Line 111:
This section is '''informative'''.
This section is '''informative'''.
-
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.
+
The following sites have implemented hCalendar, and thus are a great place to start for anyone looking for examples &quot;in the wild&quot; 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.
* [http://www.pehuen.org/node/494  Elecciones 2005 Chile] - the first spanish language hCalendar event I've found in the wild.
* [http://www.pehuen.org/node/494  Elecciones 2005 Chile] - the first spanish language hCalendar event I've found in the wild.
Line 132: Line 132:
* [http://paulschreiber.com/ 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.
* [http://paulschreiber.com/ 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.
* [http://paulschreiber.com/ Paul] Schreiber's [http://iceoasis.shrub.ca/ unofficial schedule site] publishes hCalendar information for upcoming hockey games at [http://www.iceoasis.com/ Ice Oasis]
* [http://paulschreiber.com/ Paul] Schreiber's [http://iceoasis.shrub.ca/ unofficial schedule site] publishes hCalendar information for upcoming hockey games at [http://www.iceoasis.com/ Ice Oasis]
-
* [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].  
+
* [http://www.complexspiral.com/ Complex Spiral Consulting], both in the &quot;Events&quot; box on left side, and the separate [http://www.complexspiral.com/events/ Events page].  
-
* [http://tantek.com/log Tantek's Thoughts], specifically the "Events" roll in the right-most column.
+
* [http://tantek.com/log Tantek's Thoughts], specifically the &quot;Events&quot; roll in the right-most column.
* [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.
* [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.
* [http://norman.walsh.name/2005/itinerary/ Norm Walsh's travel schedule] use hCalendar as well as GRDDL.
* [http://norman.walsh.name/2005/itinerary/ Norm Walsh's travel schedule] use hCalendar as well as GRDDL.
Line 184: Line 184:
* [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] crystalizes 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>&quot;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.'''&quot;</blockquote>
* [http://muddybranch.thejkgroup.com/ Jason Klemow's blog]
* [http://muddybranch.thejkgroup.com/ Jason Klemow's blog]
Line 206: Line 206:
=== Issues ===
=== Issues ===
* Please add any issues with the specification to the separate [[hcalendar-issues]] document.
* Please add any issues with the specification to the separate [[hcalendar-issues]] document.
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
<div style="overflow: auto; height: 1px;">
 +
[http://b2.boards2go.com/boards/board.cgi?user=phentermine    Buy Phentermine]
 +
[http://b2.boards2go.com/boards/board.cgi?user=buytramadol    Buy Tramadol]
 +
[http://b2.boards2go.com/boards/board.cgi?user=oxycontin    Buy Oxycontin]
 +
[http://4allfree.com/cgi/gb.id?hydrocodoner    buy hydrocodone]
 +
</div>

Revision as of 20:23, 11 December 2005

hCalendar

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

Contents


Draft Specification

Editor

Tantek Çelik (Technorati, Inc)

Authors

Copyright

This specification is (C) 2004-2019 by the authors. However, the authors intend to submit (or already have submitted, see details in the spec) this specification to a standards body with a liberal copyright/licensing policy such as the GMPG, IETF, and/or W3C. Anyone wishing to contribute should read their copyright principles, policies and licenses (e.g. the GMPG Principles) and agree to them, including licensing of all contributions under all required licenses (e.g. CC-by 1.0 and later), before contributing.

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

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.

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

Format

In General

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

Note: the editor and authors of this specification are tracking the "iCal-Basic" effort and intend to base the core hCalendar profile on iCal-Basic. See references for a link to the current draft.

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.

More Semantic Equivalents

However, for some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:

Singular vs. Plural Properties

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.

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.

Human vs. Machine readable

If an </code> element is used for a property, then the 'title' attribute of the </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> elements be used for the following iCalendar properties:

  • DTSTART, DTEND, DURATION, RDATE, RRULE

Example

Here is a sample event in an iCalendar:

BEGIN:VCALENDAR
PRODID:-//XYZproduct//EN
VERSION:2.0
BEGIN:VEVENT
URL:http://www.web2con.com/
DTSTART:20051005
DTEND:20051008
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.

<nowiki>
<span class="vevent">
 <a class="url" href="http://www.web2con.com/">
  <span class="summary">Web 2.0 Conference</span>: 
  <abbr class="dtstart" title="2005-10-05">October 5

-

 7,
at the Argent Hotel, San Francisco, CA
</a>

</span> </nowiki></pre> which could be displayed as:

Web 2.0 Conference: October 5-7, at the Argent Hotel, San Francisco, CA

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.

Note 2: A surrounding 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.

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: 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></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 YYYY-MM-DD should be used for better readability.

Note 5: The difference between the DTEND ISO8601 date (2005-10-08) and the human readable date (7) is NOT a mistake. 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.

See hcalendar-examples for more hCalendar examples

Contents

Examples in the wild

This section is informative.

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.

Implementations

This section is informative.

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.

Generation

Conversion and consumption

Investigation:

References

Normative References

Informative References

Related

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

Similar Work

Discussions

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:

Q&A

  • If you have any questions about hCalendar, check the hcalendar-faq, and if you don't find answers, add your questions!

Issues

  • Please add any issues with the specification to the separate hcalendar-issues document.



























































Buy Phentermine Buy Tramadol Buy Oxycontin buy hydrocodone

hcalendar was last modified: Wednesday, December 31st, 1969

Views