hcalendar-ja: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(english: 08:51, 14 Jul 2006)
 
 
(23 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<!-- english: 08:51, 14 Jul 2006 -->
<!-- english: 00:23, 9 Apr 2007 -->
<h1>hCalendar</h1>
http://www.boogdesign.com/images/buttons/microformat_hcalendar.png


<h1> hCalendar </h1>
hCalendarはiCalendar ([http://www.ietf.org/rfc/rfc2445.txt RFC2445])を基とした、シンプルでオープンなカレンダー・イベント情報配信用の[[microformats-ja|microformat]]です。(X)HTMLやAtom, RSS, 任意のXMLなど、広範囲に適用可能なフォーマットとなっています。


hCalendar is a simple, open, distributed calendaring and events format, based on the  iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]), suitable for embedding in (X)HTML, Atom, RSS, and arbitrary XML. hCalendar is one of several open [[microformats|microformat]] standards.
hCalendarでイベント情報を配信するにはいくつかの方法があります。手っ取り早いのは、「[http://microformats.org/code/hcalendar/creator hCalendar クリエーター]」ツールを使うこと。でももし、すでにイベントの情報を自分のブログやwikiなどに書いている場合は、[[hcalendar-authoring|hCalendarを書くコツ]]を読み、hCalendarに沿うようマークアップをし直しましょう。


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.
__TOC__
 
== 仕様 ==
 
; 編者 : [http://tantek.com/ Tantek Çelik] ([http://technorati.com Technorati, Inc])
; 作者 : [http://tantek.com/ Tantek Çelik], [http://technorati.com Technorati, Inc]
: [http://suda.co.uk/ Brian Suda]


=== 著作権 ===
{{MicroFormatCopyrightStatement2004-ja}}


__TOC__
=== 特許方針 ===
{{MicroFormatPatentStatement-ja}}
 
=== 謝辞 ===
以下の方に感謝します。
* [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOOキャンプ 2004の「カレンダー表示のためのHTML」]を先導してくれた、アダム・ブロスウォース。このおかげでhCalendarへの関心が本格的な者になりました。
 
== 概要 ==
iCalendar ([http://www.ietf.org/rfc/rfc2445.txt RFC2445])はAppleのiCalなど、スケジュール管理用アプリケーションに広く採用され、また実装上の相互運用性も高いフォーマットになっています。


== Specification ==
この広く使われているフォーマットを、ブログで言及されるイベント情報に応用できないでしょうか。今後行われるイベントや、これまでに参加したイベントについて自分のブログ上に記事を書くブロガーはたくさんいます。それらのイベント情報を少し構造化し、iCalendarとして出力可能にすれば、アプリケーションやWebサービスが自動的にその情報を利用できるようになります。


; Editor : [http://tantek.com/ Tantek Çelik] ([http://technorati.com Technorati, Inc])
この'''hCalendar'''という仕様は、XHTMLによってiCalendarを表現する書式です。ブロガーはhCalendarを直接webページに埋め込んだり、またその情報をCSSでデザインすることが可能です。それだけではありません。アプリケーションはイベント情報を直接そのhCalendarから取ってくることができるようになります。イベントについて書かれたファイルを、webページと別に用意する必要はもうありません。
; Authors : [http://tantek.com/ Tantek Çelik], [http://technorati.com Technorati, Inc]
: [http://suda.co.uk/ Brian Suda]


=== Copyright ===
== セマンティックXHTMLデザイン指針 ==
{{MicroFormatCopyrightStatement2004}}


=== Patents ===
{{semantic-xhtml-design-principles-ja}}
{{MicroFormatPatentStatement}}


=== Inspiration and Acknowledgments ===
実用的な導入を考えた場合、Internet Explorerでは <code><nowiki><abbr></nowiki></code> 要素のCSSスタイリングがきちんとサポートされていないため、別の追加要素が必要になることがあるのを覚えておくと良いでしょう。
Thanks to:
* Adam Bosworth for leading the [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOO Camp 2004 HTML For Calendars presentation] which brought together a critical mass of interested parties.


== 書式 ==


=== 通例 ===


== Introduction ==
iCalendar 標準規約([http://www.ietf.org/rfc/rfc2445.txt RFC2445])がhCalendarのもととなっています。
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.
注意:この仕様書の編集者および執筆者は、[http://lists.osafoundation.org/pipermail/ietf-calsify/ 「iCal-Basic」の取り組み]を追い、 hCalendarのコア・プロファイルを iCal-Basic に基づいたものにしようとしています。リンク先にある現在の草稿をご覧ください。


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.
hCalendarの基本的な書式は、iCalendarのオブジェクトおよび変数名をclass名として小文字で書くようにしたものです。また、iCalendarの入れ子方式に配置されたオブジェクトを、そのまま入れ子方式のXHTMLにマッピングします。


== Semantic XHTML Design Principles ==
=== ルート class 名 ===
hCalendar のルート class 名は "vcalendar" です。"vcalendar" という class 名が指定された要素自体を ''hCalendar'' と呼びます。


{{semantic-xhtml-design-principles}}
イベントの class 名は "vevent" です。"vevent" という class 名が指定された要素自体を ''hCalendar イベント''と呼びます。


== Format ==
hCalendar を書く便宜上、"vevent" と "vcalendar" は両方ともパースのためのルート class 名として扱います。文書上に "vevent" という class 名があって "vcalendar" が無い場合には、文書全体が "vcalendar" の文脈を持ちます。


=== In General ===
'''vevent''' はイベント一覧のそれぞれに必要だと考えるべきです。


The iCalendar standard ([http://www.ietf.org/rfc/rfc2445.txt RFC2445]) forms the basis of hCalendar.
=== プロパティとサブプロパティ ===
ある hCalendar のプロパティはその hCalendar 内の要素で表現します。一覧に挙げたプロパティの class 名を持つ要素は、そのプロパティの値を表しています。プロパティがサブプロパティを持つこともあり、プロパティ用の要素の内側にある要素で表現します。


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.
=== プロパティ一覧 ===
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.
'''必須プロパティ'''
* '''dtstart'''([[iso-8601|ISO date]])
* '''summary'''
任意プロパティ
* location
* url
* dtend(ISO date)、duration(ISO date duration)
* rdate、rrule
* category、description
* uid
* geo(latitude、longitude)
* …… 編注:これは完全な一覧ではなく(完全でないことはまったく無いよりはよいのです)、今 RFC2445 からここへ持ってきて編集しました。上のプロパティ一覧は hCalendar で最も一般的に使われるものです。


=== More Semantic Equivalents ===
=== More Semantic Equivalents ===


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.
* iCalendar の <code>URL</code> は、hCalendar では <code>class="vevent"</code> を持つ要素内の <code><a class="url" href="...">...</a></code> になります。
* <code>ATTENDEE</code>, <code>CONTACT</code>, and <code>ORGANIZER</code> in iCalendar may be represented by an [[hcard|hCard]] in hCalendar .
* iCalendar の <code>ATTENDEE</code><code>CONTACT</code><code>ORGANIZER</code> は、hCalendar では [[hcard-ja|hCard]] で表現できます({{may}})。
* A named <code>LOCATION</code> (potentially with an address and/or geo) in iCalendar may be represented by a nested [[hcard|hCard]] in hCalendar.  Similarly, an address <code>LOCATION</code> may be represented by an [[adr]], and a geo (latitude and longitude) <code>LOCATION</code> may be represented by a [[geo]].
* iCalendar の名前の付いた <code>LOCATION</code>(住所や位置情報を伴っている可能性がある)は、hCalendar では [[hcard-ja|hCard]] を埋め込んで表現できます({{may}})。同様に、住所による <code>LOCATION</code> [[adr]] で、位置情報(緯度と経度)による <code>LOCATION</code> [[geo]] で表現できます({{may}})。
* <code>UID</code> in iCalendar simply becomes another semantic applied to a specific URL for an hCalendar event.
* iCalendar の <code>UID</code> は単に別の意味、hCalendar のイベント用に使われる URL ということになります。


=== 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.
単数のプロパティ(例えば vCard の "N" "FN")としてはその class を持つ最初の子孫要素が効果を持ち、その他はすべて無視します。


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.
複数が許されるプロパティ(例えば vCard 由来の "TEL")としては、各 class のインスタンスがそのプロパティのインスタンスを作るべきです。サブタイプを持つ複数のプロパティ(例えば vCard の WORK、HOME、CELL を持った TEL)は、そのプロパティ用の共通要素を共有して最適化できます。サブタイプの各インスタンスは、プロパティの要素の子孫要素に適切に分類されるのです。


==== Plural Properties Singularized ====
==== Plural Properties Singularized ====


Since plural property names become their singular equivalents, even if the original plural property permitted only a single value with multiple components, those multiple components are represented each with their own singularly named property and the the property is effectively multivalued and subject to the above treatment of multivalued properties.
複数形のプロパティ名は相当する単数形になるため、元の複数形のプロパティで複数の構成要素を持つ一つだけの値が許される場合でも、その複数の構成要素はそれぞれ名前が単数形のプロパティ名で表現し、そのプロパティは値が複数でも有効で、上記の複数値プロパティの扱いの対象となります。


=== Human vs. Machine readable ===
=== Human vs. Machine readable ===
If an <code><nowiki><abbr></nowiki></code> element is used for a property, then the '<code>title</code>' attribute of the <code><nowiki><abbr></nowiki></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><nowiki><abbr></nowiki></code> elements be used for the following iCalendar properties:
* DTSTART, DTEND, DURATION, RDATE, RRULE


== Example ==
あるプロパティ用に <code><nowiki><abbr></nowiki></code> を使った場合、要素内容ではなく、その <code><nowiki><abbr></nowiki></code> 要素の '<code>title</code>' 属性がプロパティの値になります。この仕様では次の iCalendar プロパティに対してそういった <code><nowiki><abbr></nowiki></code> の仕様を推奨します。
* DTSTART、DTEND、DURATION、RDATE、RRULE
 
== ==


Here is a sample event in an iCalendar:
以下は、iCalendarの例です。
<pre><nowiki>
<pre><nowiki>
BEGIN:VCALENDAR
BEGIN:VCALENDAR
Line 80: Line 108:
BEGIN:VEVENT
BEGIN:VEVENT
URL:http://www.web2con.com/
URL:http://www.web2con.com/
DTSTART:20051005
DTSTART:20071005
DTEND:20051008
DTEND:20071020
SUMMARY:Web 2.0 Conference
SUMMARY:Web 2.0 カンファレンス
LOCATION:Argent Hotel\, San Francisco\, CA
LOCATION:アージェントホテル\, サンフランシスコ\, カリフォルニア州
END:VEVENT
END:VEVENT
END:VCALENDAR
END:VCALENDAR
</nowiki></pre>
</nowiki></pre>
and an equivalent event in hCalendar format with various elements optimized appropriately.  See [[hcalendar-example1-steps]] for the derivation.
 
hCalendar書式で同様のイベントを表示する場合、各種要素が最適化され、以下のようになります。元になった内容については、[[hcalendar-example1-steps]]をご覧ください。


<pre><nowiki>
<pre><nowiki>
<span class="vevent">
<div class="vevent">
  <a class="url" href="http://www.web2con.com/">
  <a class="url" href="http://www.web2con.com/">http://www.web2con.com/</a>
   <span class="summary">Web 2.0 Conference</span>:
   <span class="summary">Web 2.0 カンファレンス </span>
   <abbr class="dtstart" title="2005-10-05">October 5</abbr>-
   <abbr class="dtstart" title="2007-10-05">10月5日</abbr>
   <abbr class="dtend" title="2005-10-08">7</abbr>,
   <abbr class="dtend" title="2007-10-20">19日</abbr>
at the <span class="location">Argent Hotel, San Francisco, CA</span>
  <span class="location">アージェントホテル(カリフォルニア州サンフランシスコ)</span>にて。
  </a>
  </div>
</span>
</nowiki></pre>
</nowiki></pre>
which could be displayed as:


[http://www.web2con.com/ 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.
<div class="vevent">
<span class="url">http://www.web2con.com/</span>&nbsp;<!-- note modified to account for idiosyncrasy of wiki software -->
<span class="summary">Web 2.0 カンファレンス </span>:
<abbr class="dtstart" title="2007-10-05">10月5日</abbr>〜
<abbr class="dtend" title="2007-10-20"> 19日 </abbr>、<span class="location"> アージェントホテル(カリフォルニア州サンフランシスコ)</span>にて。
</div>


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.
これは、'''本物''の'hCalendarマイクロフォーマットであり、パーサーがこのページ内から検出できることに注意してください。


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.
=== Example 2===


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><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 following example specifies a scheduled meeting that begins
The notation YYYY-MM-DD should be used for better readability.
at 8:30 AM EST on March 12, 1998 and ends at 9:30 AM EST on March 12,
1998.  


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.
<pre><nowiki>
    BEGIN:VCALENDAR
    BEGIN:VEVENT
    UID:guid-1.host1.com
    DTSTAMP:19980309T231000Z
    DESCRIPTION:Project XYZ Review Meeting
    SUMMARY:XYZ Project Review
    DTSTART:19980312T133000Z
    DTEND:19980312T143000Z
    LOCATION:1CP Conference Room 4350
    END:VEVENT
    END:VCALENDAR
</nowiki></pre>


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.
The equivalent in hCalendar:


See [[hcalendar-examples]] for more hCalendar examples
<pre><nowiki>
<div class="vevent">
<h3 class="summary">XYZ Project Review</h3>
<p class="description">Project XYZ Review Meeting</p>
<p>To 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>
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
<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>
</nowiki></pre>


== Examples in the wild ==
This could be displayed as:
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.
----


=== New Examples ===
<div class="vevent">
Please add new examples to this section.
* [http://2006.dconstruct.org/schedule/ Conference schedule for d.Construct 2006] is published using hCalendar.
* [http://local.yahoo.com Yahoo Local] now supports hCalendar
* We used hcalendar for the [http://www.fuckparade.org/flyer/2006/ F’parade flyer 2006], a counter demonstration to the Love Parade in Berlin, alas two issues arose: the '''Firefox tails extension''' doesn't get a summary when it's an alt-text in an image. Also the '''default charset''' when creating an iCal file through the [http://feeds.technorati.com/events/http://www.fuckparade.org/flyer/2006/ Technorati feed] is UTF-8, but our website is ISO-8859-15. Is there a way to define a different charset, or why doesn’t the API respect the charset given by the website in the first place (in our case it’s in the HTPP header, in the XML declaration, ''and'' the meta tag)?
* [http://www.harper-adams.ac.uk/press/events.cfm Harper Adams University College] uses hCalendar to mark up all University events on the Homepage and Events Calendar page.
* [http://www.capital.edu/ Capital University] uses hCalendar on multiple pages to provide feeds of events, relevant to page content
* [http://www.thesession.org/events/ The Session events] uses hCalendar to mark up concerts, festivals and workshops related to Irish traditional music.
* [http://rubyandrails.org/usergroups/newcastle ncl.rb] uses hCalendar to mark up new meetings.
* [http://www.worldcupkickoff.com/ World Cup KickOff] where you can download and keep all the fixtures you are interested in so you will never miss a single game of the 2006 football World Cup!
** This link was on the [http://www.lifehacker.com/software/sports/world-cup-start-times-for-ical-etc-175393.php Lifehackers site] and made its way to the yahoo news site:


Mon May 22, 4:00 PM ET
<h3 class="summary">XYZ Project Review</h3>
The World Cup, one of the world's most watched sporting events, is almost upon us. If you've ever tried to follow your favorite team through the Cup you know that it can sometimes be difficult to know when they're on. World Cup Kickoff can help.
<p class="description">Project XYZ Review Meeting</p>
<p>To 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>
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
<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>


World Cup KickOff is all you will ever need for knowing all the match details for the upcoming World Cup 2006. Whether you use your mobile phone, MS Outlook, Apple iCal or Mozilla Calendar, you can download and keep all the fixtures you are interested in so you will never miss a single game!
----
ADVERTISEMENT


Next tip? We'll show you how to get up at 2 AM to watch your matches. ;0) Thanks to Tom for the tip!
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.


* [http://gross.org.za/calendar GROSSUG Calendar] - Uses hCalendar to mark up meetings and other events.
Note 2: A surrounding <code><nowiki><span class="vcalendar"></nowiki></code> element is optional, and is left out as suchIt 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.
* [http://www.webanalyticsassociation.org/en/calendarevents/search.asp  Web Analytics Association] - hCalendar microformat is in place on all Tendenci sites on the calendar events search page and consolidated list page.
* [http://www.tendenci.com/en/calendarevents/search.asp Tendenci Calendar Events] with hCalendar
* [http://www.argolon.com/2006/04/17/web20-conference-in-dublin/ Web2.0 Conference in Dublin] hCalendar event
* [http://www.meetup.com/ Meetup.com] has marked up [http://www.meetup.com/cities/us/ny/new_york city event calendars], [http://photo.meetup.com/100/events/ group event lists], and [http://www.meetup.com/ signed-in homepages] with hCalendar.
* [http://ukwindsurfing.com/ ukwindsurfing.com] has marked upcoming events with hCalendar, and the [http://ukwindsurfing.com/events/ events page] in a table.
* [http://ocono.com/ ocono.com] has marked up it's "Upcoming Events" list with hCalendar.
* [http://www.austinbloggers.org/ Austin Bloggers] has marked up their "Upcoming Events" box with hCalendar ([http://www.austinbloggers.org/blog/a/001123.html announcement]).
* Ning's cloneable Group app has [[hcalendar|hCalendar]] markup on its [http://group.ning.com/index.php?controller=event&action=list event calendar] and [http://group.ning.com/index.php?controller=event&action=view&id=727220 event detail] pages.
* [http://tantek.com/microformats/2006/03-01-TechPlenAgenda.html Agenda: W3C Technical Plenary Day, March 1 2006] has [[hcard|hCard]] and [[hcalendar|hCalendar]] markup. ([http://www.w3.org/2006/03/01-TechPlenAgenda.html original here]).
* The National Arbor Day Foundation has started using hCalendars for their [http://arborday.org/programs/conferences/communityforestry/index.cfm upcoming] [http://arborday.org/programs/conferences/hazardtrees-treeplanting/ conferences].
* [http://www.stateofflux.com/ State of Flux street art site] has started adding events in hCalendar format
* The [http://barcamp.org/#BarCamps BarCamp home page lists upcoming BarCamps marked up with hCalendar] and even has a "Subscribe..." link.
* [http://www.w3.org/2005/12/allgroupoverview.html 2006 W3C Technical Plenary Week] has marked up the schedule and events for the week with hCalendar.
* [http://www.code4lib.org/2006/schedule code4lib Conference 2006 Schedule] is marked up with hCalendar as [http://www.code4lib.org/node/65 announced on their blog].
* [http://grouper.ieee.org/groups/754 IEEE 754 Working Group] - trying hCalendar for upcoming meetings.
* [http://www.pehuen.org/node/494 Elecciones 2005 Chile] - the first spanish language hCalendar event found in the wild.
* [http://www.codewitch.org/it/2005/11/17/no-creative-commons-no-party/ Giocolando » No Creative Commons? No Party!] is marked up with hCalendar
* [http://www.cmprofessionals.org/events/calendar.html CM Pros Events Calendar] by Bob Doyle
* [http://www.midgard-project.org/community/events/ Midgard CMS Event calendar] - as [http://bergie.iki.fi/blog/new-event-calendar-for-midcom.html blogged by Henri Bergius]
* [http://www.iowamilitaryveteransband.com/schedule/ Iowa Military Veterans Band Schedule] - hCalendar markup [http://weblog.randomchaos.com/archive/2005/10/24/Microformats/ added by Scott Reynen]
* [http://www.funfairgames.net/weblog/posts/00000011.html Upcoming events on Jason A.R. Moody Amusements Weblog] posted by Jason Moody on 15 Oct 2005. [http://www.funfairgames.net/weblog/index.html His weblog] in general has hCalendar events posted inside the blog posts.
* [http://tantek.com/microformats/2005/syndicate/tracks-sessions-schedule.html Syndicate - Tracks &amp; Sessions]
* [http://tantek.com/microformats/2005/web2/program.html Web 2.0 Conference schedule page marked up with hCalendar]
* [http://www.thisiscmon.com/ C'MON] is a rock band from Canada, and their [http://www.thisiscmon.com/shows/ tour dates] have been marked up by [http://www.d2digitalmedia.com/ Ray Dickman] with hCalendar.
* [http://ifreebusy.com/ ifreebusy.com] will display freebusy information using hCalendar. See this [http://ifreebusy.com/neiljensen/freebusy/ example].
* [http://we05.com/ Web Essentials 05] has marked up their [http://we05.com/program.cfm program schedule table with hCalendar], using the 'axis' and 'headers' attributes.
* [http://www.asdvbonaparte.nl/ ASDV Bonaparte] is a Dutch debating society. Their events calendar has been marked up with the hCalendar conventions.
* [http://chocnvodka.blogware.com/blog Suw Charman] has marked up [http://suw.org.uk/archives/category/events/ her events] with hCalendar.
* [http://www.blogbusinesssummit.com/ Blog Business Summit] has published their [http://www.blogbusinesssummit.com/details.htm event details] marked up with hCalendar.
* [http://eventful.com Eventful.com] publishes all events with hCalendar and venues with [[hcard|hCard]].  Took them only 15 minutes to implement both! Their Atom feeds also contain hCalendar/hCard.
* [http://upcoming.org Upcoming.org] publishes all events and lists of events with hCalendar.  Took them only an hour to add hCalendar support to the site.
* The [http://laughingsquid.com/squidlist/calendar/ Laughing Squid Calendar] events, [http://laughingsquid.com/squidlist/calendar/9949/2005/5/9 e.g. this party], now supports hCalendar.
* [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://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://tantek.com/log Tantek's Thoughts], specifically the "Events" 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://norman.walsh.name/2005/itinerary/ Norm Walsh's travel schedule] use hCalendar as well as GRDDL.
* [http://www.policyawareweb.org/2005/ftf2/paw-mtg Policy Aware Web (PAW) Project Meeting] uses hCalendar to record date-related decisions, and uses a vtodo microformat to record action items.
* The [http://lufgi4.informatik.rwth-aachen.de Laboratory for Dependable Distributed Systems] publishes it's [http://lufgi4.informatik.rwth-aachen.de/cfps list of notable CfPs on dependability and security] with hCalendar-todo elements.
* The [http://laughingsquid.com/laughing-squid-10th-anniversary-party/ Laughing Squid 10th Anniversary Party] has an hcalendar page.
* SPRACI has hcalendar versions of its nightlife/clubbing/gigs/festivals listings for many cities worldwide - eg: [http://www.spraci.com/listhcalendar.php?parea=sydney&category=all Events in Sydney] (check the [http://www.spraci.com/api/ API] pages in the faq section of [http://www.spraci.com/ SPRACI] for more info about the area/city keywords and category tags to use to get data for your city/categories
* WWF-Australia events calendars: [http://wwf.org.au/act/events/ What's on], [http://wwf.org.au/act/volunteer/ Volunteer]
* [http://rubyholic.com rubyholic] uses hCalendar to publish calendars for ruby groups.
* [http://www.bath.ac.uk/whats-on/ University of Bath What's On] uses hCalendar on individual event pages


=== Examples with some problems ===
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.
* [http://www.bokle.de/ s'Bokle] is a German music pub. Their events calendar has been marked up with hCalendar.
** improper use of rrule --[[User:RyanKing|RyanKing]] 16:04, 6 Jan 2006 (PST)
* [http://plan9.tryphon.org/nancy/list Plan9] - Uses hCalendar to mark up events !
** dtstart/dtend are implemented on span element [[User:TomArmitage|Tom Armitage]] June 23, 2006
* [http://www.socaltech.com socalTECH] is a news and information site. Their front page event listing is marked up with hCalendar.
** dtstart/dtend implemented on span element [[User:TomArmitage|Tom Armitage]] June 23, 2006
* [http://www.multipack.co.uk The Multipack] features a vevent for the next meeting information.
** dtstart/dtend are implemented on em element [[User:TomArmitage|Tom Armitage]] June 23, 2006
* [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]
** dtstart/dtend are implemented on td element [[User:TomArmitage|Tom Armitage]] June 23, 2006
* The [http://www.kiez-ev.de/ Kiez] is a small cinema and has published its [http://www.kiez-ev.de/programm.htm program] marked up with hCalendar.
** dtstart/dtend implemented on dt element [[User:TomArmitage|Tom Armitage]] June 23, 2006


- whilst Tails parses dtstart/dtend on <em>any</em> element, technically it really needs to be on abbr. Technorati Microformats Search only looks for the title element on <code><nowiki><abbr></nowiki></code> tags, for instance.
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><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.


== Implementations ==
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.
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.
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.


=== Authoring ===
==Buttons==
Implementations you can use to author, create, and publish hCalendar events.
Don't forget that you can add one of our [[buttons#hCalendar|buttons]] to the page, to indicate the presence of hCalendar microformats. For example: http://www.boogdesign.com/images/buttons/microformat_hcalendar.png. If you can link it back to this page (or even page on your website, about your use of the microformat), so much the better!


==== Blogging and CMS tools ====
=== More Examples ===
;Midgard CMS : [http://www.midgard-project.org/documentation/net-nemein-calendar/ Midgard CMS - net.nemein.calendar] - as [http://bergie.iki.fi/blog/new-event-calendar-for-midcom.html blogged by Henri Bergius]
See [[hcalendar-examples|hCalendar examples]] for more examples, including examples from iCalendar RFC 2445 converted into hCalendar.


;Drupal module : [http://hybernaut.com/upcoming-hcal Drupal Upcoming.org syndication module emits hCalendar]
== Examples in the wild ==
;MovableType and WordPress plug-ins : [http://structuredblogging.org/formats.php StructuredBlogging] is a set of plugins  [http://structuredblogging.org/structuredblogging-wp-latest.zip for  WordPress] and [http://structuredblogging.org/structuredblogging-wp-latest.zip for MovableType] that supports embedding hCalendar and other microformats in templates and blog posts.
This section is '''informative'''. The number of hCalendar examples in the wild has expanded far beyond the capacity of being kept inline in this specification. They have been moved to a [[hcalendar-examples-in-wild|separate page]].
;Textpattern plug-in : [http://placenamehere.com/TXP/pnh_mf/ pnh_mf] is a plugin for [http://textpattern.com/ Textpattern] that supports embedding hCalendar and other microformats in templates and blog posts. Written by [http://placenamehere.com/ Chris Casciano].


==== Browser scripts and plug-ins ====
See [[hcalendar-examples-in-wild|hCalendar Examples in the wild]].
Browser plugins that work with existing authoring tools:
; Any browser with javascript and a little bit of CSS : [http://microformats.org/code/hcalendar/creator microformats.org hCalendar creator]  (see also original: [http://theryanking.com/ Ryan King] has an [http://theryanking.com/microformats/hcalendar-creator.html hCalendar creator]).
; Firefox Greasemonkey user script hCalendar creator : [http://www.decafbad.com/blog/2005/06/08/greasemonkey_magic magic_hcalendar Greasemonkey user script by Les Orchard] - allows easy form entry of an event into any textarea, e.g. into a blog post text area.
; Firefox Greasemonkey user script hCalendar to Google Calendar: [http://torrez.us Elias Torres] has created a [http://torrez.us/archives/2006/04/13/431/ simple script] that will parse hCalendar entries and create a link to add event to [http://www.google.com/calendar/ Google Calendar's] service. Based on [http://virtuelvis.com/archives/2005/11/learn-to-love-microformats George's] and [http://virtuelvis.com/archives/2005/11/learn-to-love-microformats Arve's] work.


==== Desktop Authoring Tools ====
== Implementations ==
;Dreamweaver Extension : [http://www.webstandards.org/action/dwtf/microformats/ Extension suite] for Dreamweaver 8 from the [http://webstandards.org/ Web Standards Project].
This section is '''informative'''. The number of hCalendar implementations has also expanded beyond the capacity of keeping them inline. They have been moved to a [[hcalendar-implementations|separate page]].
;xfy :
In [https://www.xfytec.com/community/ xfy Community], there are some hCalendar implementations.
 
* [https://www.xfytec.com/community/modules/mydownloads/singlefile.php?cid=15&lid=25 hCalendar via RSS] parses an RSS feed, retrieves XHTML documents linked from that feed, and syndicates hCalendars into a calendar view.
* [https://www.xfytec.com/community/modules/mydownloads/singlefile.php?cid=19&lid=23 hCalendar Marker XVCD] helps to mark up an event information in XHTML document with hCalendar.
* [https://www.xfytec.com/community/modules/mydownloads/singlefile.php?cid=15&lid=17 Simple RDF Calendar XVCD] is a schedule tool which uses RDF Calendar format. It also converts RDF Calendar format to iCalendar and hCalendar format.
 
=== Search and Discovery ===
 
* [http://kitchen.technorati.com/search Technorati Microformats Search] indexes [[hcard|hCard]], [[hcalendar|hCalendar]], and [[hreview|hReview]] as [http://tantek.com/log/2006/05.html#d31t1802 announced by Tantek].
 
=== Conversion and Import ===
Implementations you can use to importing into a Calendar Application, typically by converting hCalendar to iCalendar/vCalendar.
 
==== Web Services ====
These return iCalendar (.ics) and other calendar formats for easy importing into typical calendar programs or other processing.
* [http://feeds.technorati.com/events Technorati Events Feed service] uses X2V library to parse hCalendar and return iCalendar (.ics).  Note friendly URL, e.g. http://feeds.technorati.com/events/http%3A//microformats.org
* [http://suda.co.uk/projects/X2V/ X2V] parses hCalendar and produces a .ics (iCalendar) stream.  Note: needs to be updated to track changes in the specification as they occur.
* [http://lifelint.net/ Life Lint Parser] parses hCalendar and produces .ics, .rdf and debugging information and attempts to be more fully compliant to the iCal standard than previous implementations.  It can be used in the same manner as X2V.  Can output iCal (w optional Outlook 2002 compat), and RDF.
* [http://spanningsalesforce.com/ Spanning Salesforce] produces hCalendar-enabled RSS feeds and .ics calendars from Salesforce.com.
 
==== Firefox Greasemonkey Plugins ====
* [http://george.hotelling.net/90percent/ George] has built a [http://george.hotelling.net/90percent/geekery/greasemonkey_and_microformats.php Greasemonkey user script that detects hCalendar events and allows users to easily add them to their calendar application(s)].
* [http://inside.glnetworks.de/ Martin Rehfeld] has updated the work of [http://blogmatrix.blogmatrix.com/ David Janes] and produced a [[Greasemonkey]] [http://inside.glnetworks.de/2006/06/05/microformats-have-arrived-in-firefox-15-greasemonkey-06/ script] that finds many microformat elements, including hCalendar events, and [http://blog.davidjanes.com/mtarchives/2005_08.html#003379 provides a popup menu of actions]. The hCalendar to vCalendar conversion is done internally within the script. ''This will work with FireFox 1.5+/GreaseMonkey 0.6.4+ now.''
 
==== Aggregators ====
* [http://placenamehere.com/mf/nnwextract/ Extract Microformats] is a script for NetNewsWire that supports extracting hCard and hCalendar data in blog posts (via technorati service). Written by [[User:ChrisCasciano|Chris Casciano]]
* [http://kula.jp/software/endo/screenshots/ Endo], an OS X aggregator, supports discovering hCal and adding those events to iCal. Look at the last screenshot at the bottom of the page.


=== Browsing ===
See [[hcalendar-implementations|hCalendar Implementations]].
Implementations that detect, display and otherwise highlight hCalendar events in pages.
 
* In [http://www.xfytec.com/community/ xfy Community], there are some hCalendar implementations. "hCalendar via RSS" parses an RSS feed, retrieves XHTML documents linked from that feed, and syndicates hCalendars into a calendar view.
* [http://web.mit.edu/glasser/www/JSCalendar/ JSCalendar] parses hCalendar and produces a displayable HTML table/CSS-based calendar.
 
==== Firefox extension ====
[http://blog.codeeg.com/tails-firefox-extension/ Tails is a Firefox Extension] that will display the presence of microformats ([[hcard|hCard]], [[hcalendar|hCalendar]], [[hreview|hReview]], [[xfolk|xFolk]]) on a webpage.
 
==== Flock extension ====
[http://blog.codeeg.com/2006/03/20/flock-tails-flocktails/ Flocktails] - port of Tails extension for Flock 0.5.12 that looks for hCards, hCalendar, xFolk and hReview and tosses them into a handy topbar
 
=== Libraries ===
Open source libraries of hCalendar parsers and other related code for building hCalendar implementations.
; Javascript : [http://virtuelvis.com/archives/2005/11/learn-to-love-microformats simple hCalendar parser] by [http://virtuelvis.com/ Arve Bersvendsen]
; PHP : [http://randomchaos.com/microformats/base/ Microformat Base] is an open-source PHP microformat aggregation crawler, currently recognizing hreview, hcalendar, and hcard.
; Ruby : [http://opensource.reevoo.com/2006/03/08/release-uformats-12/ uformats] is a ruby library that can parse [[hCalendar]], [[hCard]], [[hReview]] and [[rel-tag]]
; XSLT :
* X2V is available as an XSLT library
* [http://dev.w3.org/cvsweb/2001/palmagent/ palmagent] by [[User:DanC]] includes  toICal.xsl and test materials; it works much like xhtml2vcal.xsl in X2V. See also: [http://www.w3.org/2002/12/cal/ RDF Calendar workspace] with icalendar test materials.
 
=== Potential implementations ===
 
These are open source projects that could be potentially enhanced to support hCalendar.
 
* [http://www.k5n.us/webcalendar.php?topic=About WebCalendar]
* [http://phpicalendar.net/documentation/index.php?title=Main_Page PHP iCalendar]
* [http://www.vcalendar.org VCalendar]
* Investigation: [http://wiki.mozilla.org/Calendar_Talk:Lightning#hCalendar_publish_and_subscribe_support Mozilla Calendar / Lightning / Sunbird hCalendar support discussion]


== References ==
== References ==
Line 298: Line 229:
* [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOO Camp 2004 HTML For Calendars presentation, 20040911]
* [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOO Camp 2004 HTML For Calendars presentation, 20040911]
* [http://wiki.oreillynet.com/foocamp04/index.cgi?SimpleSemanticFormats FOO Camp 2004 Simple Semantic Formats presentation, 20040910]
* [http://wiki.oreillynet.com/foocamp04/index.cgi?SimpleSemanticFormats FOO Camp 2004 Simple Semantic Formats presentation, 20040910]
* [http://www.ietf.org/internet-drafts/draft-royer-ical-basic-04.txt iCal-Basic draft 04]
* [http://ietfreport.isoc.org/idref/draft-royer-ical-basic/ iCal-Basic (latest)] [http://www.faqs.org/ftp/pub/pub/internet-drafts/draft-royer-ical-basic-04.txt (draft 04)]
* Contributed from http://developers.technorati.com/wiki/hCalendar
* Contributed from http://developers.technorati.com/wiki/hCalendar
* [http://www.w3.org/TR/xhtml11 XHTML 1.1]
* [http://www.w3.org/TR/xhtml11 XHTML 1.1]
* [http://www.imc.org/pdi/ Internet Mail Consortium Personal Data Interchange vCard and vCalendar]


==== Related ====
==== Specifications That Use hCalendar ====
* [[icalendar-implementations|iCalendar implementations]]
* [[hreview|hReview]]
* [[hcalendar-tests]]
 
==== Similar Work ====
* [http://lists.osafoundation.org/pipermail/ietf-calsify/ IETF-calsify archives]
* [http://lists.osafoundation.org/pipermail/ietf-calsify/ IETF-calsify archives]
* [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):
<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>
* [http://muddybranch.thejkgroup.com/ Jason Klemow's blog]
* [http://www.softwarestudio.org/iCal/2445Issues.html RFC2445 Issues List]
* [http://www.softwarestudio.org/iCal/2445Issues.html RFC2445 Issues List]
* [http://ietf.webdav.org/calsify/ CALSIFY WG Links And Resources]
* [http://ietf.webdav.org/calsify/ CALSIFY WG Links And Resources]


=== Similar Work ===
== Further Reading ==
* [[XOXO]]
* [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>


== Discussions ==
* [http://muddybranch.thejkgroup.com/ Jason Klemow's blog]
 
* [http://weblog.infoworld.com/udell/2006/01/11.html#a1368 Moving forward with microformats] by [http://weblog.infoworld.com/udell Jon Udell] provides an hCalendar example and some discussion.
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:
* See also [http://www.technorati.com/cosmos/referer.html blogs discussing this page] and the [http://technorati.com/tags/hcalendar hCalendar tag]
 
* [http://en.wikipedia.org/wiki/HCalendar Wikipedia article on hCalendar] (requires expansion)
* [[hcalendar-brainstorming]]
 
* See also [http://www.technorati.com/cosmos/referer.html blogs discussing this page].
** [http://weblog.infoworld.com/udell/2006/01/11.html#a1368 Moving forward with microformats] by [http://weblog.infoworld.com/udell Jon Udell] provides an hCalendar example and some discussion.
 
=== Q&A ===
* If you have any questions about hCalendar, check the [[hcalendar-faq]], and if you don't find answers, add your questions!


=== Issues ===
== Related Pages ==
* Please add any issues with the specification to the separate [[hcalendar-issues]] document.
{{hcalendar-related-pages}}

Latest revision as of 06:18, 10 May 2009

hCalendar

microformat_hcalendar.png

hCalendarはiCalendar (RFC2445)を基とした、シンプルでオープンなカレンダー・イベント情報配信用のmicroformatです。(X)HTMLやAtom, RSS, 任意のXMLなど、広範囲に適用可能なフォーマットとなっています。

hCalendarでイベント情報を配信するにはいくつかの方法があります。手っ取り早いのは、「hCalendar クリエーター」ツールを使うこと。でももし、すでにイベントの情報を自分のブログやwikiなどに書いている場合は、hCalendarを書くコツを読み、hCalendarに沿うようマークアップをし直しましょう。

仕様

編者
Tantek Çelik (Technorati, Inc)
作者
Tantek Çelik, Technorati, Inc
Brian Suda

著作権

© 2004-2024 by the authors.

この仕様の著作権は、ページ編集に関わった人全てが保有しています。 しかし、著者はこの仕様をGMPGIETFW3Cなどの標準化団体に提出することを考えています。この仕様に貢献したい場合は、これらの団体が持つ著作権に対する方針やポリシー(例:GMPG Principles)を読み、ライセンスに関する規定(例:CC-by 1.0や後のバージョン)を理解した上でお願いします。

特許方針

この仕様はロイヤリティーフリーの特許方針に帰属するものです。特許方針に関してはW3C Patent PolicyRFC3667RFC3668をご覧下さい。

謝辞

以下の方に感謝します。

概要

iCalendar (RFC2445)はAppleのiCalなど、スケジュール管理用アプリケーションに広く採用され、また実装上の相互運用性も高いフォーマットになっています。

この広く使われているフォーマットを、ブログで言及されるイベント情報に応用できないでしょうか。今後行われるイベントや、これまでに参加したイベントについて自分のブログ上に記事を書くブロガーはたくさんいます。それらのイベント情報を少し構造化し、iCalendarとして出力可能にすれば、アプリケーションやWebサービスが自動的にその情報を利用できるようになります。

このhCalendarという仕様は、XHTMLによってiCalendarを表現する書式です。ブロガーはhCalendarを直接webページに埋め込んだり、またその情報をCSSでデザインすることが可能です。それだけではありません。アプリケーションはイベント情報を直接そのhCalendarから取ってくることができるようになります。イベントについて書かれたファイルを、webページと別に用意する必要はもうありません。

セマンティックXHTMLデザイン指針

注:セマンティック XHTML デザイン指針は、始め hCardhCalendar 開発の文脈で書かれました。そのため、この指針は hCard デザインの方法論の文脈において理解しやすくなるでしょう(つまり、そちらをまず読んでください)。Tantek

XHTML は XML に基づいて作られており、そのため XHTML に基づいたフォーマットは、表示に便利なだけでなく一般的なデータ交換目的にも使えます。XHTML に基づいたフォーマットは、多くの点で HTML と XML の世界双方の最もよい所を体現しています。とは言え、XHTML に基づいたフォーマットを作成する時、指針を集めたものがあると役立ちます。

  1. 可能な限り、言及している、既存の確立されてよくサポートされている標準からスキーマ(名前、オブジェクト、プロパティ、値、種類、階層、制約)を再利用する。元の標準で表現されている制約を再宣言することは避ける。参考情報のために言及するのはよい。
    1. 複数の構成要素からなる種類のものには、その構成要素の名前に相当する class 名を持った要素を入れ子にして使う。
    2. 複数の構成要素は一つずつにする。そのため、カンマ区切りの複数のテキスト値を表すには、複数の要素を埋め込んで使う。
  2. 各オブジェクトなどのブロックを構成するのに一番適した意味的な XHTML を使う。
  3. そういったものが無ければ、構造を作る一般的な要素(例えば <span><div>)か文脈に適した要素(例えば <ul><ol> 中の <li>)を使う。
  4. 元のスキーマのその部分を的確に表現する XHTML の構成ブロックが無ければ、元のスキーマ由来の名前に基づいた class 名を使う。元のスキーマ中の名前が大文字と小文字を区別しないならば、相当するものを全て小文字にして使う。構成要素の(明確に定義されたスキーマではなく)日常語風の暗黙的な名前も、使いやすさのために、相当するものを全て小文字にして使うべきである。構成要素名中のスペースはダッシュ '-' 文字になる。
  5. 最後に、元のスキーマに従ったデータの形式があまりに長かったり人間に馴染まない場合、構造を作る一般的な要素の代わりに <abbr> を使い、忠実に従ったデータを(表現を記述する属性である)'title' 属性の中へ、相当するより簡潔で人間に読みやすいものを要素自体の中へ置く。<abbr> のこの使い方に関する説明のより多くの情報:Human vs. ISO8601 dates problem solved(人間 vs ISO8601 日付問題の解決)

実用的な導入を考えた場合、Internet Explorerでは <abbr> 要素のCSSスタイリングがきちんとサポートされていないため、別の追加要素が必要になることがあるのを覚えておくと良いでしょう。

書式

通例

iCalendar 標準規約(RFC2445)がhCalendarのもととなっています。

注意:この仕様書の編集者および執筆者は、「iCal-Basic」の取り組みを追い、 hCalendarのコア・プロファイルを iCal-Basic に基づいたものにしようとしています。リンク先にある現在の草稿をご覧ください。

hCalendarの基本的な書式は、iCalendarのオブジェクトおよび変数名をclass名として小文字で書くようにしたものです。また、iCalendarの入れ子方式に配置されたオブジェクトを、そのまま入れ子方式のXHTMLにマッピングします。

ルート class 名

hCalendar のルート class 名は "vcalendar" です。"vcalendar" という class 名が指定された要素自体を hCalendar と呼びます。

イベントの class 名は "vevent" です。"vevent" という class 名が指定された要素自体を hCalendar イベントと呼びます。

hCalendar を書く便宜上、"vevent" と "vcalendar" は両方ともパースのためのルート class 名として扱います。文書上に "vevent" という class 名があって "vcalendar" が無い場合には、文書全体が "vcalendar" の文脈を持ちます。

vevent はイベント一覧のそれぞれに必要だと考えるべきです。

プロパティとサブプロパティ

ある hCalendar のプロパティはその hCalendar 内の要素で表現します。一覧に挙げたプロパティの class 名を持つ要素は、そのプロパティの値を表しています。プロパティがサブプロパティを持つこともあり、プロパティ用の要素の内側にある要素で表現します。

プロパティ一覧

hCalendar のプロパティ(サブプロパティはこのように括弧内に記述)

必須プロパティ

任意プロパティ

  • location
  • url
  • dtend(ISO date)、duration(ISO date duration)
  • rdate、rrule
  • category、description
  • uid
  • geo(latitude、longitude)
  • …… 編注:これは完全な一覧ではなく(完全でないことはまったく無いよりはよいのです)、今 RFC2445 からここへ持ってきて編集しました。上のプロパティ一覧は hCalendar で最も一般的に使われるものです。

More Semantic Equivalents

いくつかのプロパティについては意味的にもっとふさわしいものがあるので、特別な扱い方をします。例えばこうです。

  • iCalendar の URL は、hCalendar では class="vevent" を持つ要素内の <a class="url" href="...">...</a> になります。
  • iCalendar の ATTENDEECONTACTORGANIZER は、hCalendar では hCard で表現できます(MAY)。
  • iCalendar の名前の付いた LOCATION(住所や位置情報を伴っている可能性がある)は、hCalendar では hCard を埋め込んで表現できます(MAY)。同様に、住所による LOCATIONadr で、位置情報(緯度と経度)による LOCATIONgeo で表現できます(MAY)。
  • iCalendar の UID は単に別の意味、hCalendar のイベント用に使われる URL ということになります。

Singular vs. Plural Properties

単数のプロパティ(例えば vCard の "N" や "FN")としてはその class を持つ最初の子孫要素が効果を持ち、その他はすべて無視します。

複数が許されるプロパティ(例えば vCard 由来の "TEL")としては、各 class のインスタンスがそのプロパティのインスタンスを作るべきです。サブタイプを持つ複数のプロパティ(例えば vCard の WORK、HOME、CELL を持った TEL)は、そのプロパティ用の共通要素を共有して最適化できます。サブタイプの各インスタンスは、プロパティの要素の子孫要素に適切に分類されるのです。

Plural Properties Singularized

複数形のプロパティ名は相当する単数形になるため、元の複数形のプロパティで複数の構成要素を持つ一つだけの値が許される場合でも、その複数の構成要素はそれぞれ名前が単数形のプロパティ名で表現し、そのプロパティは値が複数でも有効で、上記の複数値プロパティの扱いの対象となります。

Human vs. Machine readable

あるプロパティ用に <abbr> を使った場合、要素内容ではなく、その <abbr> 要素の 'title' 属性がプロパティの値になります。この仕様では次の iCalendar プロパティに対してそういった <abbr> の仕様を推奨します。

  • DTSTART、DTEND、DURATION、RDATE、RRULE

以下は、iCalendarの例です。

BEGIN:VCALENDAR
PRODID:-//XYZproduct//EN
VERSION:2.0
BEGIN:VEVENT
URL:http://www.web2con.com/
DTSTART:20071005
DTEND:20071020
SUMMARY:Web 2.0 カンファレンス
LOCATION:アージェントホテル\, サンフランシスコ\, カリフォルニア州
END:VEVENT
END:VCALENDAR

hCalendar書式で同様のイベントを表示する場合、各種要素が最適化され、以下のようになります。元になった内容については、hcalendar-example1-stepsをご覧ください。

<div class="vevent">
 <a class="url" href="http://www.web2con.com/">http://www.web2con.com/</a>
  <span class="summary">Web 2.0 カンファレンス </span>:
  <abbr class="dtstart" title="2007-10-05">10月5日</abbr>〜
  <abbr class="dtend" title="2007-10-20">19日</abbr>、
  <span class="location">アージェントホテル(カリフォルニア州サンフランシスコ)</span>にて。
 </div>

これは、以下のように表示されます。

http://www.web2con.com/  Web 2.0 カンファレンス 10月5日 19日 アージェントホテル(カリフォルニア州サンフランシスコ)にて。

これは、'本物の'hCalendarマイクロフォーマットであり、パーサーがこのページ内から検出できることに注意してください。

Example 2

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.

     BEGIN:VCALENDAR
     BEGIN:VEVENT
     UID:guid-1.host1.com
     DTSTAMP:19980309T231000Z
     DESCRIPTION:Project XYZ Review Meeting
     SUMMARY:XYZ Project Review
     DTSTART:19980312T133000Z
     DTEND:19980312T143000Z
     LOCATION:1CP Conference Room 4350
     END:VEVENT
     END:VCALENDAR

The equivalent in hCalendar:

<div class="vevent">
<h3 class="summary">XYZ Project Review</h3>
<p class="description">Project XYZ Review Meeting</p>
<p>To 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>
<p>Location: <span class="location">1CP Conference Room 4350</span></p>
<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>

This could be displayed as:


XYZ Project Review

Project XYZ Review Meeting

To held on 12 March 1998 from 8:30am EST until 9:30am EST

Location: 1CP Conference Room 4350

Booked by: guid-1.host1.com on

9 Mar 1998 6:00pm

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 <span class="vcalendar"> 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 <abbr> 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-DDThh:mm:ss 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. 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. See hCalendar brainstorming: hCard locations for a informative explanation of how to do this.

Buttons

Don't forget that you can add one of our buttons to the page, to indicate the presence of hCalendar microformats. For example: microformat_hcalendar.png. If you can link it back to this page (or even page on your website, about your use of the microformat), so much the better!

More Examples

See hCalendar examples for more examples, including examples from iCalendar RFC 2445 converted into hCalendar.

Examples in the wild

This section is informative. The number of hCalendar examples in the wild has expanded far beyond the capacity of being kept inline in this specification. They have been moved to a separate page.

See hCalendar Examples in the wild.

Implementations

This section is informative. The number of hCalendar implementations has also expanded beyond the capacity of keeping them inline. They have been moved to a separate page.

See hCalendar Implementations.

References

Normative References

Informative References

Specifications That Use hCalendar

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