hcalendar-ja: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (elsitcaor)
(Undo revision 35760 by CoracBasol (Talk))
Line 1: Line 1:
relricouo
<!-- english: 00:23, 9 Apr 2007 -->
<!-- english: 00:23, 9 Apr 2007 -->
<h1>hCalendar</h1>
<h1>hCalendar</h1>
http://www.boogdesign.com/images/buttons/microformat_hcalendar.png
http://www.boogdesign.com/images/buttons/microformat_hcalendar.png


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


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


__TOC__
__TOC__


== 仕様 ==
== 仕様 ==


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


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


=== 特許方針 ===
=== 特許方針 ===
{{MicroFormatPatentStatement-ja}}
{{MicroFormatPatentStatement-ja}}


=== 謝辞 ===
=== 謝辞 ===
以下の方に感謝します。
以下の方に感謝します。
* [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOOキャンプ 2004の「カレンダー表示のためのHTML」]を先導してくれた、アダム・ブロスウォース。このおかげでhCalendarへの関心が本格的な者になりました。
* [http://wiki.oreillynet.com/foocamp04/index.cgi?HTMLForCalendars FOOキャンプ 2004の「カレンダー表示のためのHTML」]を先導してくれた、アダム・ブロスウォース。このおかげでhCalendarへの関心が本格的な者になりました。


== 概要 ==
== 概要 ==
iCalendar ([http://www.ietf.org/rfc/rfc2445.txt RFC2445])はAppleのiCalなど、スケジュール管理用アプリケーションに広く採用され、また実装上の相互運用性も高いフォーマットになっています。
iCalendar ([http://www.ietf.org/rfc/rfc2445.txt RFC2445])はAppleのiCalなど、スケジュール管理用アプリケーションに広く採用され、また実装上の相互運用性も高いフォーマットになっています。


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


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


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


{{semantic-xhtml-design-principles}}
{{semantic-xhtml-design-principles}}


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


== 書式 ==
== 書式 ==


=== 通例 ===
=== 通例 ===


iCalendar 標準規約([http://www.ietf.org/rfc/rfc2445.txt RFC2445])がhCalendarのもととなっています。
iCalendar 標準規約([http://www.ietf.org/rfc/rfc2445.txt RFC2445])がhCalendarのもととなっています。


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


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


=== More Semantic Equivalents ===
=== More Semantic Equivalents ===
Line 71: Line 70:
* DTSTART, DTEND, DURATION, RDATE, RRULE
* DTSTART, DTEND, DURATION, RDATE, RRULE


== 例 ==
== ==


以下は、iCalendarの例です。
以下は、iCalendarの例です。
<pre><nowiki>
<pre><nowiki>
BEGIN:VCALENDAR
BEGIN:VCALENDAR
Line 82: Line 81:
DTSTART:20071005
DTSTART:20071005
DTEND:20071020
DTEND:20071020
SUMMARY:Web 2.0 カンファレンス
SUMMARY:Web 2.0 カンファレンス
LOCATION:アージェントホテル\, サンフランシスコ\, カリフォルニア州
LOCATION:アージェントホテル\, サンフランシスコ\, カリフォルニア州
END:VEVENT
END:VEVENT
END:VCALENDAR
END:VCALENDAR
</nowiki></pre>
</nowiki></pre>


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


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


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


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


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


=== Example 2===
=== Example 2===

Revision as of 09:20, 20 December 2008

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デザイン指針

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

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

書式

通例

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

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

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

More Semantic Equivalents

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

  • URL in iCalendar becomes <a class="url" href="...">...</a> inside the element with class="vevent" in hCalendar.
  • ATTENDEE, CONTACT, and ORGANIZER in iCalendar may be represented by an hCard in hCalendar .
  • A named LOCATION (potentially with an address and/or geo) in iCalendar may be represented by a nested hCard in hCalendar. Similarly, an address LOCATION may be represented by an adr, and a geo (latitude and longitude) LOCATION may be represented by a geo.
  • UID in iCalendar simply becomes another semantic applied to a specific URL for an hCalendar event.

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.

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

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

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