hAtom-ja

From Microformats Wiki
Jump to navigation Jump to search


hAtom 0.1

この文書は microformat のドラフト仕様です。ドラフトなので開発段階においてはいくらかは完成していますが、この文書の安定性は保証できません。なので開発者は将来の発展と変化に対応できるよう準備しておく必要があります。最新の情報を得るには、この wiki ページを見るか microformats-new mailing list の議論から学んで下さい。

hAtom is a microformat for content that can be syndicated, primarily but not exclusively weblog postings. hAtom is based on a subset of the Atom syndication format. hAtom will be one of several microformats open standards.

Draft Specification

Editor/Author
David Janes (BlogMatrix, Inc.)
Contributors
Benjamin Carlyle
Tantek Çelik (http://tantek.com/ and before at Technorati, Inc.)

copyright and patents statements apply.

Status

hAtom 0.1 is a microformats.org draft specification. Public discussion on hAtom takes place on hatom-feedback, the #microformats irc channel on irc.freenode.net, and microformats-discuss mailing list.

Available languages

The English version of this specification is the only normative version. For translations of this document see the #translations section.

Errata and Updates

Known errors and issues in this specification are corrected in resolved and closed issues. Please check there before reporting issues.

The hAtom 0.2 update is currently under development and incorporates known errata corrections as well as the value-class-pattern.

Introduction

hAtom is a microformat for identifying semantic information in weblog posts and practically any other place Atom may be used, such as news articles. hAtom content is easily added to most blogs by simple modifications to the blog's template definitions.

この文書内の語句 "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" は、RFC 2119 で記述される解釈で使われます。

Semantic XHTML Design Principles

注:セマンティック 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 日付問題の解決)

Format

In General

The Atom Syndication Format provides the conceptual basis for this microformat, with the following caveats:

  • Atom provides a lot more functionality than we need for a "blog post" microformat, so we've taken the minimal number of elements needed.
  • the "logical" model of hAtom is that of Atom. If there is a conflict, Atom should be taken as correct.
  • the "physical" model of hAtom -- the actual writing of elements -- is a lot more varied than Atom provides for, due to the variety of ways weblogs are actually produced in the wild. The hAtom microformat provides a number of rules for "bridging the gap"

Schema

Schema elements are based on the Atom nomenclature and follow the microformat pattern of prefixing a unique identifier (in this case, 'h') on the outermost container elements -- the Feed or Entry. The parts of this microformat are based on analysis of many weblog, bulletin board and media posts and can be read blog-post-brainstorming#Discovered_Elements.

The hAtom schema consists of the following:

  • hfeed (hfeed). optional.
    • feed category. optional. keywords or phrases, using rel-tag.
    • hentry (hentry).
      • entry-title. required. text.
      • entry-content. optional (see field description). text. [*]
      • entry-summary. optional. text.
      • updated. required using datetime-design-pattern. [*]
      • published. optional using datetime-design-pattern.
      • author. required using hCard. [*]
      • bookmark (permalink). optional, using rel-bookmark.
      • tags. optional. keywords or phrases, using rel-tag.

[*] Some required elements have defaults if missing, see below.

Field and Element Details

Feed
  • a Feed element is identified by the class name hfeed
  • a Feed element represents the concept of an Atom feed
  • the Feed element is optional and, if missing, is assumed to be the page
  • hAtom documents MAY have multiple Feed elements
Feed Category
  • a Feed Category element is identified by rel-tag
  • a Feed MAY have a Feed Category
  • a Feed Category element represents the concept of an Atom category inside a feed
  • Feed Category elements MUST appear inside a Feed element but not inside an Entry element
  • the rel-tag href encodes the atom category:term; the link text defines the atom category:label
Entry
  • an Entry element is identified by class name hentry
  • an Entry element represents the concept of an Atom entry
  • any microformat content inside a <blockquote> or <q> element within the Entry should not be considered part of the Entry.
This allows quoting other microformated data without worry of corrupting the model
Entry Category
  • an Entry Category element is identified by rel-tag
  • an Entry MAY have an Entry Category
  • an Entry Category element represents the concept of an Atom category inside an entry
  • the rel-tag href encodes the atom category:term; the link text defines the atom category:label
Entry Title
  • an Entry Title element is identified by the class name entry-title
  • an Entry SHOULD have an Entry Title
  • an Entry Title element represents the concept of an Atom entry title
  • if the Entry Title is missing, use
    • the first <h#> element in the Entry, or
    • the <title> of the page, if there is no enclosing Feed element, or
    • assume it is the empty string
Entry Content
  • an Entry Content element is identified by class name entry-content
  • an Entry SHOULD have Entry Content
  • an Entry Content element represents the concept of an Atom content
  • an Entry MAY have 0 or more Entry Content elements. The "logical Entry Content" of an Entry is the concatenation, in order of appearance, of all the Entry Contents within the Entry
Many web logs split content into multiple sections with a "Read More" link and JavaScript tricks. This is also needed in cases where Entry Titles are coded in-line and are considered part of the content.
  • if the Entry Content is missing, assume it is the empty string
Entry Summary
  • an Entry Summary element is identified by class name entry-summary
  • an Entry Summary element represents the concept of an Atom summary
  • an Entry MAY have 0 or more Entry Summary elements. The "logical Entry Summary" of an Entry is the concatenation, in order of appearance, of all the Entry Summarys within the Entry
Entry Permalink
  • an Entry Permalink element is identified by rel-bookmark
  • an Entry SHOULD have an Entry Permalink
  • an Entry Permalink element represents the concept of an Atom link in an entry
  • if the Entry Permalink is missing, use the URI of the page; if the Entry has an "id" attribute, add that as a fragment to the page URI to distinguish individual entries
Entry Updated
  • an Entry Updated element is identified by class name updated
  • an Entry Updated element represents the concept of Atom updated
  • an Entry SHOULD have an Entry Updated element
  • use the datetime-design-pattern to encode the updated datetime
  • if there is no Entry Updated element,
    • use the Entry Published element, if present
    • otherwise the page is invalid hAtom
Entry Published
  • an Entry Published element is identified by the class name published
  • an Entry Published element represents the concept of Atom published
  • use the datetime-design-pattern to encode the published datetime
Entry Author
  • an Entry Author element is represented by class name author
  • an Entry Author element represents the concept of an Atom author
  • an Entry Author element MUST be encoded in an hCard
  • an Entry Author element SHOULD be encoded in an <address> element
  • an Entry SHOULD have at least one Entry Author element
  • an Entry MAY have more than one Entry Author elements
  • if the Entry Author is missing
    • find the Nearest In Parent <address> element(s) with class name author and that is/are a valid hCard
    • otherwise the entry is invalid hAtom

XMDP Profile

See hatom-profile.

Examples

See hatom-examples.

Examples in the wild

See hatom-examples-in-wild.

Implementations

This section is informative.

The following implementations have been developed which either generate or parse hAtom links. If you have an hAtom 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.

Copyright

This specification is (C) 2005-2024 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.

  • Tantek: I release all my contributions to this specification into the public domain and I encourage the other authors to do so as well.
    • When all authors/editors have done so, we can remove the MicroFormatCopyrightStatement template reference and replace it with the MicroFormatPublicDomainContributionStatement.

特許

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

References

Normative References

Informative References

Further Reading

Work in progress

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 hAtom:

Version 0.1

Version 0.1 was released 28 February 2006.

Discussions

Q&A

  • If you have any questions about hAtom, check the hAtom FAQ, and if you don't find answers, add your questions!

Issues

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

See Also

Translations

Read the hAtom draft specification in additional languages: