hAtom の hfeed は optional なんだってさ。必須かと思った。

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.

hatom - Microformats

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
hatom - Microformats


hAtom の hfeed は optional なんだってさ。必須かと思った。

まあ、Atom の Feed を生成したい(?)訳じゃなくて Autopagerize とか LDRize とかこれから先現われるはずのまだ見ぬイカシタtoolの恩恵にあずかるためなので、厳密である必要はないんだろーけど。

requiterd なのは hentry はまあいいとして、entry-title updated auther なんだってさ。

Entry Updated

  • if there is no Entry Updated element,
    • use the Entry Published element, if present
    • otherwise the page is invalid hAtom
hatom - Microformats

ってことなので、updated は published に置き換わるみたい。そんで、

Entry Author

  • if the Entry Author is missing
    • find the Nearest In Parent
      element(s) with class name author and that is/are a valid hCard
    • otherwise the entry is invalid hAtom
hatom - Microformats

つうことなので、実は Author は厳密には無いとダメっぽいんだね。まあそいうことらしい。そんで、

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
hatom - Microformats

なので、これは無ければ empty string になるっつうことらしい。


正直、hentryだけが必須ってことでいいじゃん、なんてシロウト考え? 必要なツールが必要なところを上手いこと利用するってことでしょー。ページの創造主はひとまずここタイトル入れとくか、とか、ココのコンテンツはこっち、とか、パーマリンクこれなのでよろしく、とか、定義しときたいとこだけ明記すればいいじゃん。そんでそんで、利用する人の立場でいったらSITEINFOがあるぜってことになるのか。

あーなんか自分の中で、こここ何ヶ月だかの右往左往が、つながったような気がしたりしなかったり。