Atom配信フォーマット(各Atom要素の定義)

広告

広告

原文

最終更新
2006-10-02T21:21:00+09:00
この記事のURI参照
https://www.7key.jp/rfc/4287/rfc4287_4.html#source

Atom配信フォーマット(和訳)

最終更新
2006-10-05T21:46:00+09:00
この記事のURI参照
https://www.7key.jp/rfc/4287/rfc4287_4.html#translation

4. 各Atom要素の定義

4.1. コンテナ要素

4.1.1. "atom:feed"要素
   The "atom:feed" element is the document (i.e., top-level) element of
   an Atom Feed Document, acting as a container for metadata and data
   associated with the feed.  Its element children consist of metadata
   elements followed by zero or more atom:entry child elements.

atom:feed要素は、Atomフィード文書のドキュメント要素(つまりトップレベル要素)であり、フィードに関連付けられたメタデータ及びデータのコンテナ要素の役割を果たすものである。その子要素は、メタデータ要素とその後に続く0以上のatom:entry子要素で構成される。

   atomFeed =
      element atom:feed {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId
          & atomLink*
          & atomLogo?
          & atomRights?
          & atomSubtitle?
          & atomTitle
          & atomUpdated
          & extensionElement*),
         atomEntry*
      }

   This specification assigns no significance to the order of atom:entry
   elements within the feed.

当仕様書で表すフィード内のatom:entry要素の順番は意味を持つものではない。

   The following child elements are defined by this specification (note
   that the presence of some of these elements is required):

   o  atom:feed elements MUST contain one or more atom:author elements,
      unless all of the atom:feed element's child atom:entry elements
      contain at least one atom:author element.
   o  atom:feed elements MAY contain any number of atom:category
      elements.
   o  atom:feed elements MAY contain any number of atom:contributor
      elements.
   o  atom:feed elements MUST NOT contain more than one atom:generator
      element.
   o  atom:feed elements MUST NOT contain more than one atom:icon
      element.
   o  atom:feed elements MUST NOT contain more than one atom:logo
      element.
   o  atom:feed elements MUST contain exactly one atom:id element.
   o  atom:feed elements SHOULD contain one atom:link element with a rel
      attribute value of "self".  This is the preferred URI for
      retrieving Atom Feed Documents representing this Atom feed.
   o  atom:feed elements MUST NOT contain more than one atom:link
      element with a rel attribute value of "alternate" that has the
      same combination of type and hreflang attribute values.
   o  atom:feed elements MAY contain additional atom:link elements
      beyond those described above.
   o  atom:feed elements MUST NOT contain more than one atom:rights
      element.
   o  atom:feed elements MUST NOT contain more than one atom:subtitle
      element.
   o  atom:feed elements MUST contain exactly one atom:title element.
   o  atom:feed elements MUST contain exactly one atom:updated element.

当仕様書では以下の子要素を定義する(いくつかの要素が必須となっている点に注意が必要):

   If multiple atom:entry elements with the same atom:id value appear in
   an Atom Feed Document, they represent the same entry.  Their
   atom:updated timestamps SHOULD be different.  If an Atom Feed
   Document contains multiple entries with the same atom:id, Atom
   Processors MAY choose to display all of them or some subset of them.
   One typical behavior would be to display only the entry with the
   latest atom:updated timestamp.

Atomフィード文書内に同一のatom:id値を持つatom:entry要素が複数ある場合、それらは同一のエントリであることを意味する。従って、それらのatom:updatedの値が取る日時は異なるべきである(SHOULD)。仮にAtomフィード文書内に同一のatom:id値を持つatom:entry要素が複数あるならば、Atom処理装置は重複するエントリを全て表示するのか一部のみ表示するのかを判断してもよい(MAY)。ただしこのような場合には、atom:updatedの値が示す日時が最新のエントリのみを表示することが、一般的に推奨される処理と言えるだろう。

4.1.1.1. 原文コンテンツの提供
   Experience teaches that feeds that contain textual content are in
   general more useful than those that do not.  Some applications (one
   example is full-text indexers) require a minimum amount of text or
   (X)HTML to function reliably and predictably.  Feed producers should
   be aware of these issues.  It is advisable that each atom:entry
   element contain a non-empty atom:title element, a non-empty
   atom:content element when that element is present, and a non-empty
   atom:summary element when the entry contains no atom:content element.
   However, the absence of atom:summary is not an error, and Atom
   Processors MUST NOT fail to function correctly as a consequence of
   such an absence.

経験上、原文コンテンツを含むフィードは含まないフィードよりも一般的に役立つと考えられる。アプリケーションによっては(一例として全文インデクサ)、確実且つ期待通りの機能を得るため、最少量の文字列もしくは(X)HTMLを必要とするものがある。フィードを生成する際にこれらのことを考慮すべきである。各atom:entry要素は、空ではないatom:title要素と、その要素によって表される空ではないatom:content要素、子要素としてatom:content要素を持たない空ではないatom:summary要素を含むことが望ましい。ただし、atom:summaryは必須要素ではないので、Atom処理装置はこのように要素がないことを理由に思い通りの機能が提供されないとの事態を避けねばならない(MUST)。

4.1.2. "atom:entry"要素
   The "atom:entry" element represents an individual entry, acting as a
   container for metadata and data associated with the entry.  This
   element can appear as a child of the atom:feed element, or it can
   appear as the document (i.e., top-level) element of a stand-alone
   Atom Entry Document.

atom:entry要素は個々のエントリを表し、そのエントリに関連付けられたメタデータとデータのコンテナ要素の役割を果たす。この要素は、atom:feed要素の子要素として、もしくは独立するAtomエントリ文書のドキュメント要素(つまり、トップレベル要素)として用いることができる。

   atomEntry =
      element atom:entry {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContent?
          & atomContributor*
          & atomId
          & atomLink*
          & atomPublished?
          & atomRights?
          & atomSource?
          & atomSummary?
          & atomTitle
          & atomUpdated
          & extensionElement*)
      }

   This specification assigns no significance to the order of appearance
   of the child elements of atom:entry.

当仕様書で表すatom:entryの子要素の順番は意味を持つものではない。

   The following child elements are defined by this specification (note
   that it requires the presence of some of these elements):

   o  atom:entry elements MUST contain one or more atom:author elements,
      unless the atom:entry contains an atom:source element that
      contains an atom:author element or, in an Atom Feed Document, the
      atom:feed element contains an atom:author element itself.
   o  atom:entry elements MAY contain any number of atom:category
      elements.
   o  atom:entry elements MUST NOT contain more than one atom:content
      element.
   o  atom:entry elements MAY contain any number of atom:contributor
      elements.
   o  atom:entry elements MUST contain exactly one atom:id element.
   o  atom:entry elements that contain no child atom:content element
      MUST contain at least one atom:link element with a rel attribute
      value of "alternate".
   o  atom:entry elements MUST NOT contain more than one atom:link
      element with a rel attribute value of "alternate" that has the
      same combination of type and hreflang attribute values.
   o  atom:entry elements MAY contain additional atom:link elements
      beyond those described above.
   o  atom:entry elements MUST NOT contain more than one atom:published
      element.
   o  atom:entry elements MUST NOT contain more than one atom:rights
      element.
   o  atom:entry elements MUST NOT contain more than one atom:source
      element.
   o  atom:entry elements MUST contain an atom:summary element in either
      of the following cases:
      *  the atom:entry contains an atom:content that has a "src"
         attribute (and is thus empty).
      *  the atom:entry contains content that is encoded in Base64;
         i.e., the "type" attribute of atom:content is a MIME media type
         [MIMEREG], but is not an XML media type [RFC3023], does not
         begin with "text/", and does not end with "/xml" or "+xml".
   o  atom:entry elements MUST NOT contain more than one atom:summary
      element.
   o  atom:entry elements MUST contain exactly one atom:title element.
   o  atom:entry elements MUST contain exactly one atom:updated element.

当仕様書では以下の子要素を定義する(いくつかの要素が必須となっている点に注意が必要):

4.1.3. "atom:content"要素
   The "atom:content" element either contains or links to the content of
   the entry.  The content of atom:content is Language-Sensitive.

   atomInlineTextContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "text" | "html" }?,
         (text)*
      }

   atomInlineXHTMLContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { "xhtml" },
         xhtmlDiv
      }

   atomInlineOtherContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         (text|anyElement)*
      }

   atomOutOfLineContent =
      element atom:content {
         atomCommonAttributes,
         attribute type { atomMediaType }?,
         attribute src { atomUri },
         empty
      }

   atomContent = atomInlineTextContent
    | atomInlineXHTMLContent
    | atomInlineOtherContent
    | atomOutOfLineContent

atom:content要素は、エントリのコンテンツもしくはエントリのコンテンツへのリンクを内容とする。atom:contentの内容は言語依存である。

4.1.3.1. "type"属性
   On the atom:content element, the value of the "type" attribute MAY be
   one of "text", "html", or "xhtml".  Failing that, it MUST conform to
   the syntax of a MIME media type, but MUST NOT be a composite type
   (see Section 4.2.6 of [MIMEREG]).  If neither the type attribute nor
   the src attribute is provided, Atom Processors MUST behave as though
   the type attribute were present with a value of "text".

atom:content要素が取り得るtype属性の値は、texthtmlxhtmlのいずれか1つを選んでもよい(MAY)。その3つから選ばないのであれば、MIMEメディアタイプの構文に準拠しなければならず(MUST)、且つ混合タイプは用いてはならない(MUST NOT)([MIMEREG]の4.2.6章を参照)。type属性及びsrc属性が指定されていない場合、Atom処理装置はtype属性値がtextであると解釈をしなければならない(MUST)。

4.1.3.2. "src"属性
   atom:content MAY have a "src" attribute, whose value MUST be an IRI
   reference [RFC3987].  If the "src" attribute is present, atom:content
   MUST be empty.  Atom Processors MAY use the IRI to retrieve the
   content and MAY choose to ignore remote content or to present it in a
   different manner than local content.

atom:contentsrc属性を指定することができ(MAY)、その値はIRI参照[RFC3987]でなければならない(MUST)。src属性を指定するのであれば、atom:content要素は空要素としなければならない(MUST)。また、Atom処理装置は、内容を取得するためにIRIを用いることができ(MAY)、参照先のコンテンツを無視するかローカルコンテンツとは違う方法で提示するのかを選ぶことができる(MAY)。

   If the "src" attribute is present, the "type" attribute SHOULD be
   provided and MUST be a MIME media type [MIMEREG], rather than "text",
   "html", or "xhtml".  The value is advisory; that is to say, when the
   corresponding URI (mapped from an IRI, if necessary) is dereferenced,
   if the server providing that content also provides a media type, the
   server-provided media type is authoritative.

src属性を指定するのであれば同時にtype属性も指定すべきであり(SHOULD)、texthtmlxhtmlではなくMIMEメディアタイプ[MIMEREG]をその値としなければならない(MUST)。この値の属性はあくまでも補助的な役割となる。つまり、対応するURI(必要に応じてIRIからマッピングしたURI)が参照される際、そのコンテンツを提供するサーバがメディアタイプを明示するのであればそちらが優先されることとなる。

4.1.3.3. 処理モデル
   Atom Documents MUST conform to the following rules.  Atom Processors
   MUST interpret atom:content according to the first applicable rule.

Atom文書は以下で示す規則に準拠しなければならない(MUST)。Atom処理装置は最初に適用される規則によってatom:contentを解釈しなければならない(MUST)。

   1.  If the value of "type" is "text", the content of atom:content
       MUST NOT contain child elements.  Such text is intended to be
       presented to humans in a readable fashion.  Thus, Atom Processors
       MAY collapse white space (including line breaks), and display the
       text using typographic techniques such as justification and
       proportional fonts.

1:type属性の値がtextであれば、atom:content要素の内容に子要素を含んではならない(MUST NOT)。そのような場合の内容は、人間によって判読可能な形式を提示することが意図されている。そのためAtom処理装置は、(改行を含め)複数の空白をまとめたり、行端揃えやプロポーショナルフォントのような印刷技術を用いて文字列を整形表示したりすることができる(MAY)。

   2.  If the value of "type" is "html", the content of atom:content
       MUST NOT contain child elements and SHOULD be suitable for
       handling as HTML [HTML].  The HTML markup MUST be escaped; for
       example, "<br>" as "<br>".  The HTML markup SHOULD be such
       that it could validly appear directly within an HTML <DIV>
       element.  Atom Processors that display the content MAY use the
       markup to aid in displaying it.

2:type属性の値がhtmlであれば、atom:content要素の内容に子要素を含んではならず(MUST NOT)、その内容はHTMLとして処理に適したものであるべきだ(SHOULD)。例えば<br>であれば&lt;br&gt;のように、内容としてのマークアップは全てエスケープしなければならず(MUST)、エスケープを解除した後に直接HTMLの<DIV>要素に正当に含まれるようなものであるべきだ(SHOULD)。Atom処理装置は、マークアップを解釈した上でその内容を表示してもよい(MAY)。

   3.  If the value of "type" is "xhtml", the content of atom:content
       MUST be a single XHTML div element [XHTML] and SHOULD be suitable
       for handling as XHTML.  The XHTML div element itself MUST NOT be
       considered part of the content.  Atom Processors that display the
       content MAY use the markup to aid in displaying it.  The escaped
       versions of characters such as "&" and ">" represent those
       characters, not markup.

3:type属性値がxhtmlの場合、atom:contentの内容は1つのXHTML div要素でなければならず(MUST)、そのatom:contentの内容はXHTMLとして処理に適したものであるべきだ(SHOULD)。XHTMLのdiv要素そのものを、そのコンテンツの一部と解釈すべきではない(MUST NOT)。アトム処理装置は、マークアップを解釈した上でその内容を表示してもよい(MAY)。"&"や">"のようにエスケープされた文字の結果については、マークアップとしてではなく文字そのものとして表すこととなる。

   4.  If the value of "type" is an XML media type [RFC3023] or ends
       with "+xml" or "/xml" (case insensitive), the content of
       atom:content MAY include child elements and SHOULD be suitable
       for handling as the indicated media type.  If the "src" attribute
       is not provided, this would normally mean that the "atom:content"
       element would contain a single child element that would serve as
       the root element of the XML document of the indicated type.

4:type属性の値がXMLメディアタイプ[RFC3023]、もしくは+xml又は/xmlで終るのであれば(大文字小文字は問わない)、atom:contentは内容に子要素を含んでもよく(MAY)、その内容は与えられたメディアタイプとして処理に適したものであるべきだ(SHOULD)。src属性が指定されていない場合、atom:content要素は、示されたタイプでXML文書のルート要素として用いられるただ1つの子要素を含むことを一般には意味する。

   5.  If the value of "type" begins with "text/" (case insensitive),
       the content of atom:content MUST NOT contain child elements.

5:type属性の値がtext/で始まるのであれば(大文字小文字は問わない)、atom:contentは内容に子要素を含んではならない(MUST NOT)。

   6.  For all other values of "type", the content of atom:content MUST
       be a valid Base64 encoding, as described in [RFC3548], section 3.
       When decoded, it SHOULD be suitable for handling as the indicated
       media type.  In this case, the characters in the Base64 encoding
       MAY be preceded and followed in the atom:content element by white
       space, and lines are separated by a single newline (U+000A)
       character.

6:type属性の値が上記以外であれば、atom:contentの内容は[RFC3548]の3章で規定される有効なBase64エンコードを施さねばならず(MUST)、デコードされた際に示されたメディアタイプとして処理に適したものであるべきだ(SHOULD)。この際、先頭に空白を挿入した上でBase64エンコード化された文字をatom:content要素の内容としてもよく(MAY)、1つの改行(U+000A)によって行は分割される。

4.1.3.4. 例
   XHTML inline:

   ...
   <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
         This is <b>XHTML</b> content.
      </div>
   </content>
   ...
   <content type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml">
         This is <xhtml:b>XHTML</xhtml:b> content.
      </xhtml:div>
   </content>
   ...
   The following example assumes that the XHTML namespace has been bound
   to the "xh" prefix earlier in the document:

   ...
   <content type="xhtml">
      <xh:div>
         This is <xh:b>XHTML</xh:b> content.
      </xh:div>
   </content>
   ...

XHTML名前空間が、文書内で既に"xh"プレフィックスに結び付けられている場合の例:

4.2. メタ要素

4.2.1. "atom:author"要素
   The "atom:author" element is a Person construct that indicates the
   author of the entry or feed.

   atomAuthor = element atom:author { atomPersonConstruct }

atom:author要素は、エントリやフィードの著者を示すPersonコンストラクトである。

   If an atom:entry element does not contain atom:author elements, then
   the atom:author elements of the contained atom:source element are
   considered to apply.  In an Atom Feed Document, the atom:author
   elements of the containing atom:feed element are considered to apply
   to the entry if there are no atom:author elements in the locations
   described above.

atom:entry要素にatom:author要素が含まれていない場合は、atom:source要素内のatom:author要素が適用されたと見なされる。Atomフィード文書において、atom:author要素が前述の場所になければ、atom:feed要素内のatom:author要素が適用されたと見なされる。

4.2.2. "atom:category"要素
   The "atom:category" element conveys information about a category
   associated with an entry or feed.  This specification assigns no
   meaning to the content (if any) of this element.

   atomCategory =
      element atom:category {
         atomCommonAttributes,
         attribute term { text },
         attribute scheme { atomUri }?,
         attribute label { text }?,
         undefinedContent
      }

atom:category要素は、エントリやフィードに関連付けられたカテゴリ情報を伝達するものである。当仕様書ではこの要素の内容に何ら制限を加えるものではない。

4.2.2.1. "term"属性
   The "term" attribute is a string that identifies the category to
   which the entry or feed belongs.  Category elements MUST have a
   "term" attribute.

term属性は、エントリやフィードが属するカテゴリを識別する文字列である。atom:category要素にてterm属性は必須である(MUST)。

4.2.2.2. "scheme"属性
   The "scheme" attribute is an IRI that identifies a categorization
   scheme.  Category elements MAY have a "scheme" attribute.

scheme属性は、スキームの種類を識別するIRIである。atom:category要素にてterm属性は必須である(MUST)。

4.2.2.3. "label"属性
   The "label" attribute provides a human-readable label for display in
   end-user applications.  The content of the "label" attribute is
   Language-Sensitive.  Entities such as "&" and "<" represent
   their corresponding characters ("&" and "<", respectively), not
   markup.  Category elements MAY have a "label" attribute.

label属性は、エンドユーザアプリケーションが表示するための人間によって判読可能なラベルを提供するものである。label要素の内容は言語依存である。"&amp;"や"&gt;"のような実体は、マークアップとしてではなくそれに対応する文字(それぞれ"&"と"<")を表すこととなる。atom:category要素はlabel属性を任意で取り得る(MAY)。

4.2.3. "atom:contributor"要素
   The "atom:contributor" element is a Person construct that indicates a
   person or other entity who contributed to the entry or feed.

   atomContributor = element atom:contributor { atomPersonConstruct }

atom:contributor要素は、エントリやフィードの作成に貢献したpersonや他の団体を示すPersonコンストラクトである。

4.2.4. "atom:generator"要素
   The "atom:generator" element's content identifies the agent used to
   generate a feed, for debugging and other purposes.

   atomGenerator = element atom:generator {
      atomCommonAttributes,
      attribute uri { atomUri }?,
      attribute version { text }?,
      text
   }

atom:generator要素の内容は、デバック等の目的に用いられることを想定し、フィードを生成したエージェントを示すものである。

   The content of this element, when present, MUST be a string that is a
   human-readable name for the generating agent.  Entities such as
   "&" and "<" represent their corresponding characters ("&" and
   "<" respectively), not markup.

この要素の内容は、生成したエージェントの名前を人間によって判読可能な文字列としなければならない(MUST)。"&amp;"や"&gt;"のような実体は、マークアップとしてではなくそれに対応する文字(それぞれ"&"と"<")を表すこととなる。

   The atom:generator element MAY have a "uri" attribute whose value
   MUST be an IRI reference [RFC3987].  When dereferenced, the resulting
   URI (mapped from an IRI, if necessary) SHOULD produce a
   representation that is relevant to that agent.

atom:generator要素にはuri属性を指定してもよく(MAY)、その値はIRI参照[RFC3987]でなければならない(MUST)。そのIRIが指定された場合、結果のURI(必要に応じてIRIからマッピングされたURI)が示すリソースはそのエージェントに関する情報を示すべきである(SHOULD

   The atom:generator element MAY have a "version" attribute that
   indicates the version of the generating agent.

atom:generator要素は、生成エージェントのバージョンを示すversion属性を用いてもよい(MAY)。

4.2.5. "atom:icon"要素
   The "atom:icon" element's content is an IRI reference [RFC3987] that
   identifies an image that provides iconic visual identification for a
   feed.

   atomIcon = element atom:icon {
      atomCommonAttributes,
      (atomUri)
   }

atom:icon要素の内容は、フィードを象徴する視覚的な識別子となり得る画像を示すIRI参照[RFC3987]である。

   The image SHOULD have an aspect ratio of one (horizontal) to one
   (vertical) and SHOULD be suitable for presentation at a small size.

その画像は縦幅と横幅を等しくすべきであり(SHOULD)、小さく適切に表示可能なものとすべきである(SHOULD)。

4.2.6. "atom:id"
   The "atom:id" element conveys a permanent, universally unique
   identifier for an entry or feed.

   atomId = element atom:id {
      atomCommonAttributes,
      (atomUri)
   }

atom:id要素は、エントリやフィードの永続的で完全に一意な識別子を伝達するものである。

   Its content MUST be an IRI, as defined by [RFC3987].  Note that the
   definition of "IRI" excludes relative references.  Though the IRI
   might use a dereferencable scheme, Atom Processors MUST NOT assume it
   can be dereferenced.

atom:idの内容は、[RFC3987]で定義されるIRIでなければならない(MUST)。IRIの定義に相対参照は含まれていないことに注意が必要である。IRIは参照可能なスキームを用いることもあるが、Atom処理装置はスキームが必ず参照可能であると想定してはならない(MUST NOT)。

   When an Atom Document is relocated, migrated, syndicated,
   republished, exported, or imported, the content of its atom:id
   element MUST NOT change.  Put another way, an atom:id element
   pertains to all instantiations of a particular Atom entry or feed;
   revisions retain the same content in their atom:id elements.  It is
   suggested that the atom:id element be stored along with the
   associated resource.

Atom文書を移動、移行、配信、再発行、出力、入力した場合においてもそのatom:id要素の内容を変更してはならない(MUST NOT)。つまり1つのatom:id要素は、ある特定のAtomエントリもしくはAtomフィードの全てのインスタンスに付随するものであり、例えそれらが修正されてもatom:id要素の内容は同一の値として保持される。atom:id要素は関連リソースと共に保存されることが推奨される。

   The content of an atom:id element MUST be created in a way that
   assures uniqueness.

atom:id要素の内容は、一意性が保証される方法で生成しなければならない(MUST)。

   Because of the risk of confusion between IRIs that would be
   equivalent if they were mapped to URIs and dereferenced, the
   following normalization strategy SHOULD be applied when generating
   atom:id elements:

   o  Provide the scheme in lowercase characters.
   o  Provide the host, if any, in lowercase characters.
   o  Only perform percent-encoding where it is essential.
   o  Use uppercase A through F characters when percent-encoding.
   o  Prevent dot-segments from appearing in paths.
   o  For schemes that define a default authority, use an empty
      authority if the default is desired.
   o  For schemes that define an empty path to be equivalent to a path
      of "/", use "/".
   o  For schemes that define a port, use an empty port if the default
      is desired.
   o  Preserve empty fragment identifiers and queries.
   o  Ensure that all components of the IRI are appropriately character
      normalized, e.g., by using NFC or NFKC.

atom:id要素を生成する際、URIマッピングにより同等なIRIと同等ではないIRIの間で混乱を招く恐れがあるため、以下に示す正規化方針を適用すべきである:

4.2.6.1. "atom:id"の比較
   Instances of atom:id elements can be compared to determine whether an
   entry or feed is the same as one seen before.  Processors MUST
   compare atom:id elements on a character-by-character basis (in a
   case-sensitive fashion).  Comparison operations MUST be based solely
   on the IRI character strings and MUST NOT rely on dereferencing the
   IRIs or URIs mapped from them.

atom:id要素のインスタンスは、エントリやフィードが以前のものと同一かどうかを判断するために比較される。処理装置はatom:id要素を1文字ごとに(大文字小文字を区別して)比較しなければならない(MUST)。比較処理は単にIRI文字列に基づかなければならず(MUST)、参照されたIRIやIRIからマッピングされたURIを当てにしてはならない(MUST NOT)。

   As a result, two IRIs that resolve to the same resource but are not
   character-for-character identical will be considered different for
   the purposes of identifier comparison.

結果的に同一のリソースを指してはいても、文字ごとに異なる2つのIRIは識別子比較の目的からすると異なるとみなされるだろう。

   For example, these are four distinct identifiers, despite the fact
   that they differ only in case:

      http://www.example.org/thing
      http://www.example.org/Thing
      http://www.EXAMPLE.org/thing
      HTTP://www.example.org/thing

例えば、単に大文字小文字の違いしかないが、これらの4つは異なる識別子である。

   Likewise, these are three distinct identifiers, because IRI
   %-escaping is significant for the purposes of comparison:

      http://www.example.com/~bob
      http://www.example.com/%7ebob
      http://www.example.com/%7Ebob

同様に、IRIのパーセントエスケープは比較に際して意味をなすため、これらの3つは異なる識別子である。

   The "atom:link" element defines a reference from an entry or feed to
   a Web resource.  This specification assigns no meaning to the content
   (if any) of this element.

   atomLink =
      element atom:link {
         atomCommonAttributes,
         attribute href { atomUri },
         attribute rel { atomNCName | atomUri }?,
         attribute type { atomMediaType }?,
         attribute hreflang { atomLanguageTag }?,
         attribute title { text }?,
         attribute length { text }?,
         undefinedContent
      }

atom:link要素は、エントリやフィードからWebリソースへの参照を定義するものである。当仕様書ではこの要素の内容に何ら制限を加えるものではない。

   The "href" attribute contains the link's IRI. atom:link elements MUST
   have an href attribute, whose value MUST be a IRI reference
   [RFC3987].

href属性はリンクのIRIを明示するものである。atom:link要素には1つのhref属性を指定せねばならず(MUST)、その値はIRI参照[RFC3987]でなければならない(MUST)。

   atom:link elements MAY have a "rel" attribute that indicates the link
   relation type.  If the "rel" attribute is not present, the link
   element MUST be interpreted as if the link relation type is
   "alternate".

atom:link要素には、リンクリレーションタイプを示すrel属性を指定してもよい(MAY)。rel属性を持たないatom:link要素は、リンクリレーションタイプにalternateを指定されたものと解釈されなければならない(MUST)。

   The value of "rel" MUST be a string that is non-empty and matches
   either the "isegment-nz-nc" or the "IRI" production in [RFC3987].
   Note that use of a relative reference other than a simple name is not
   allowed.  If a name is given, implementations MUST consider the link
   relation type equivalent to the same name registered within the IANA
   Registry of Link Relations (Section 7), and thus to the IRI that
   would be obtained by appending the value of the rel attribute to the
   string "http://www.iana.org/assignments/relation/".  The value of
   "rel" describes the meaning of the link, but does not impose any
   behavioral requirements on Atom Processors.

rel属性の値には何かを指定せねばならず、"isegment-nz-nc"もしくは[RFC3987]のIRI形式のいずれかに則する文字列を指定せねばならない(MUST)。単一の識別子とならない相対参照を用いることは認められていない点に注意が必要である。名前が与えられている場合、リンクリレーションタイプが「7.1. リンクリレーションの登記」で示す名前と等しいことを考慮した実装をしなければならず(MUST)、よってrel属性の値を文字列"http://www.iana.org/assignments/relation/"の後に付けることによって得られるIRIと同様となる。rel属性の値はリンクを表すが、その値がAtom処理装置に何らかの処理を要求するものではない。

   This document defines five initial values for the Registry of Link
   Relations:

当文書はリンクリレーションの登記に対して初期値を5つ定義する:

   1.  The value "alternate" signifies that the IRI in the value of the
       href attribute identifies an alternate version of the resource
       described by the containing element.

alternateは、atom:link要素が含む要素が示すリソースの代替リソースを、href属性の値にあるIRIが特定することを示すものである。

   2.  The value "related" signifies that the IRI in the value of the
       href attribute identifies a resource related to the resource
       described by the containing element.  For example, the feed for a
       site that discusses the performance of the search engine at
       "http://search.example.com" might contain, as a child of
       atom:feed:

       <link rel="related" href="http://search.example.com/"/>

       An identical link might appear as a child of any atom:entry whose
       content contains a discussion of that same search engine.

relatedは、atom:link要素が含む要素が示すリソースと関連するリソースを、href属性の値にあるIRIが特定することを示すものである。例えば、"http://search.example.com"の検索エンジンのパフォーマンスについて議論するサイトのフィードは、atom:feedの子要素として、<link rel="related" href="http://search.example.com/"/>を含むだろう。これと同じリンクは、同じ検索エンジンの議論を含むatom:entryの子要素として用いられるだろう。

   3.  The value "self" signifies that the IRI in the value of the href
       attribute identifies a resource equivalent to the containing
       element.

selfは、atom:link要素が含む要素と等しいリソースを、href属性の値にあるIRIが特定することを示すものである。

   4.  The value "enclosure" signifies that the IRI in the value of the
       href attribute identifies a related resource that is potentially
       large in size and might require special handling.  For atom:link
       elements with rel="enclosure", the length attribute SHOULD be
       provided.

enclosureは、サイズが大きいため特別な扱いを要する関連リソースを、href属性の値にあるIRIが特定することを示すものである。rel="enclosure"が指定されたatom:link要素には、length属性を指定すべきである(SHOULD)。

   5.  The value "via" signifies that the IRI in the value of the href
       attribute identifies a resource that is the source of the
       information provided in the containing element.

viaは、atom:link要素が含む要素の情報元となるリソースを、href属性の値にあるIRIが特定することを示すものである。

   On the link element, the "type" attribute's value is an advisory
   media type: it is a hint about the type of the representation that is
   expected to be returned when the value of the href attribute is
   dereferenced.  Note that the type attribute does not override the
   actual media type returned with the representation.  Link elements
   MAY have a type attribute, whose value MUST conform to the syntax of
   a MIME media type [MIMEREG].

atom:link要素において、type属性の値はメディアタイプを補助的に明示するものであり、href属性の値が参照された際に返されるであろうメディアタイプのヒントにすぎない。即ち、type属性の指定によってそのリソースの取得と共に返されるメディアタイプが無視されるようなことにはならない。atom:link要素には任意でtype属性を指定でき(MAY)、その値はMIMEメディアタイプ[MIMEREG]の構文に準拠しなければならない。

   The "hreflang" attribute's content describes the language of the
   resource pointed to by the href attribute.  When used together with
   the rel="alternate", it implies a translated version of the entry.
   Link elements MAY have an hreflang attribute, whose value MUST be a
   language tag [RFC3066].

hreflang属性の値は、href属性が示すリソースで用いられる言語を表すものである。rel="alternate"と共に用いられた場合、そのエントリが翻訳されたものであることを暗示することとなる。atom:link要素には任意でhreflang属性を指定でき(MAY)、その値は言語タグ[RFC3066]でなければならない(MUST)。

   The "title" attribute conveys human-readable information about the
   link.  The content of the "title" attribute is Language-Sensitive.
   Entities such as "&" and "<" represent their corresponding
   characters ("&" and "<", respectively), not markup.  Link elements
   MAY have a title attribute.

title属性は、リンクに関する人間によって判読可能な情報を伝達するものである。title属性の内容は言語依存である。"&amp;"や"&gt;"のような実体は、マークアップとしてではなくそれに対応する文字(それぞれ"&"と"<")を表すこととなる。link要素には任意でtitle属性を指定することができる(MAY)。

   The "length" attribute indicates an advisory length of the linked
   content in octets; it is a hint about the content length of the
   representation returned when the IRI in the href attribute is mapped
   to a URI and dereferenced.  Note that the length attribute does not
   override the actual content length of the representation as reported
   by the underlying protocol.  Link elements MAY have a length
   attribute.

length属性は、リンクされたコンテンツのサイズを単位オクテットで補助的に示すものであり、あくまでもhref属性の値であるIRIがURIにマッピングされたり参照された際に返されるコンテンツのサイズを示すヒントに過ぎない。即ち、length属性の指定によって元となるプロトコルが返す実際のコンテンツ長が無視されるようなことにはならない。link要素には任意でlength属性を指定できる(MAY)。

4.2.8. "atom:logo"要素
   The "atom:logo" element's content is an IRI reference [RFC3987] that
   identifies an image that provides visual identification for a feed.

   atomLogo = element atom:logo {
      atomCommonAttributes,
      (atomUri)
   }

   The image SHOULD have an aspect ratio of 2 (horizontal) to 1
   (vertical).

atom:logo要素のとり得る値は、フィードを象徴する視覚的な識別子を提供する画像のIRI参照[RFC3987]を表すものである。また、その画像の縦横比は2(幅):1(高)とすべきである(SHOULD)。

4.2.9. "atom:published"要素
   The "atom:published" element is a Date construct indicating an
   instant in time associated with an event early in the life cycle of
   the entry.

   atomPublished = element atom:published { atomDateConstruct }

   Typically, atom:published will be associated with the initial
   creation or first availability of the resource.

atom:published要素は、エントリのライフサイクル初期のイベントに関連付けられた時間を示すDateコンストラクトである。

一般的には、atom:publishedは最初の生成時かそのリソースが利用可能となった時に関連付けられるものである。

4.2.10. "atom:rights"要素
   The "atom:rights" element is a Text construct that conveys
   information about rights held in and over an entry or feed.

   atomRights = element atom:rights { atomTextConstruct }

   The atom:rights element SHOULD NOT be used to convey machine-readable
   licensing information.

atom:rights要素は、エントリやフィードに付随する権利についての情報を伝達するTextコンストラクトである。

atom:rights要素は、人間によって判読不可能なライセンス情報を伝達するために用いられるべきではない(SHOULD NOT)。

   If an atom:entry element does not contain an atom:rights element,
   then the atom:rights element of the containing atom:feed element, if
   present, is considered to apply to the entry.

atom:entry要素にatom:rights要素がない場合、atom:feed要素にatom:rights要素があるのであればその内容を各エントリに適用することを考慮にいれてもよい。

4.2.11. "atom:source"要素
   If an atom:entry is copied from one feed into another feed, then the
   source atom:feed's metadata (all child elements of atom:feed other
   than the atom:entry elements) MAY be preserved within the copied
   entry by adding an atom:source child element, if it is not already
   present in the entry, and including some or all of the source feed's
   Metadata elements as the atom:source element's children.  Such
   metadata SHOULD be preserved if the source atom:feed contains any of
   the child elements atom:author, atom:contributor, atom:rights, or
   atom:category and those child elements are not present in the source
   atom:entry.

atom:entryをあるフィードから別のフィードに複製する場合、元となるatom:feedのメタデータ(atom:feedatom:entry以外の全ての子要素)は、既にエントリに存在する場合を除いて元のフィードの一部まはた全てのメタデータ要素をatom:source要素の子要素として含むことにより、複製されたエントリ内に適用してもよい(MAY)。元となるatom:feedが子要素、atom:authoratom:contributoratom:rightsatom:categoryのいずれかを含み、それらの子要素が元となるatom:entryに含まれない場合は、そのようなメタデータが適用されるべきである(SHOULD)。

   atomSource =
      element atom:source {
         atomCommonAttributes,
         (atomAuthor*
          & atomCategory*
          & atomContributor*
          & atomGenerator?
          & atomIcon?
          & atomId?
          & atomLink*
          & atomLogo?
          & atomRights?
          & atomSubtitle?
          & atomTitle?
          & atomUpdated?
          & extensionElement*)
      }

   The atom:source element is designed to allow the aggregation of
   entries from different feeds while retaining information about an
   entry's source feed.  For this reason, Atom Processors that are
   performing such aggregation SHOULD include at least the required
   feed-level Metadata elements (atom:id, atom:title, and atom:updated)
   in the atom:source element.

atom:source要素は、エントリの元となるフィードに関する情報を保持しつつ、異なるフィードからエントリの集約が可能な設計となっている。従って、このような集約を行うAtom処理装置は、atom:source要素内に少なくともフィードレベルで必須となるメタデータ要素(atom:idatom:titleatom:updated)を含めるべきである(SHOULD)。

4.2.12. "atom:subtitle"要素
   The "atom:subtitle" element is a Text construct that conveys a human-
   readable description or subtitle for a feed.

   atomSubtitle = element atom:subtitle { atomTextConstruct }

atom:subtitle要素は、人間によって判読可能なフィードについての説明や副題を伝達するTextコンストラクトである。

4.2.13. "atom:summary"要素
   The "atom:summary" element is a Text construct that conveys a short
   summary, abstract, or excerpt of an entry.

   atomSummary = element atom:summary { atomTextConstruct }

   It is not advisable for the atom:summary element to duplicate
   atom:title or atom:content because Atom Processors might assume there
   is a useful summary when there is none.

atom:summary要素は、エントリの要約、要点、抜粋を伝達するTextコンストラクトである。Atom処理装置はatom:summary要素内に有用な要約があると見なすため、atom:titleatom:contentの情報を流用するのは好ましくない。

4.2.14. "atom:title"要素
   The "atom:title" element is a Text construct that conveys a human-
   readable title for an entry or feed.

   atomTitle = element atom:title { atomTextConstruct }

atom:title要素は、エントリやフィードの人間によって判読可能なタイトルを伝達するTextコンストラクトである。

4.2.15. "atom:updated"要素
   The "atom:updated" element is a Date construct indicating the most
   recent instant in time when an entry or feed was modified in a way
   the publisher considers significant.  Therefore, not all
   modifications necessarily result in a changed atom:updated value.

   atomUpdated = element atom:updated { atomDateConstruct }

   Publishers MAY change the value of this element over time.

atom:updated要素は、発行者が重要であると考える変更がエントリやフィードに対して行われた最新の時間を示すDateコンストラクトである。つまり、修正を加えたからといって必ずatom:updatedの値を変更しなければならないわけではない。

発行者は必要に応じてこの要素の値を変更してもよい(MAY)。

広告

Copyright (C) 2006 七鍵 key@do.ai 初版:2006年10月02日 最終更新:2006年10月05日