Open Publication Distribution System (OPDS) カタログフォーマット ver.1.1 仕様書(日本語訳)

この文書(日本語訳を指す)をご覧になる上ので注意事項(必ずお読みください)

  • この文書は、2011年6月27日付の “OPDS Catalog 1.1”kzakzaがOPDSの仕様を理解するために個人的に日本語に翻訳したものです。公式な日本語訳ではございません。
  • Open Publication Distribution System (OPDS) ver.1.1 の公式な仕様は2011年6月27日付の “OPDS Catalog 1.1”です。必ずこちらをご参照ください。
  • この文書には翻訳上の間違い、あるいは不適切な表現が含まれている可能性があります。翻訳の正確性、その内容について一切保証をするものではありません。ご覧になる際はご自身の責任において利用してください。当方は、この文書によって利用者が被るいかなる損害の責任を負いません。
  • この文書(日本語訳を指す)の基本情報

    この文書(日本語訳を指す)の翻訳上の注意事項

    • この文書は参考までに、本文書の原文であり、公式の仕様である英語版の本文を併記しています(   のボックスで囲った部分)。
    • なるべく原文に忠実に訳したつもりですが、一部、直訳ではなく、意訳した箇所もあり、原文と表現が異なるところもありますのでご注意ください。
    • 用語(Terminology)」など、日本語に訳したものだけでは正確に原文の意図する内容を伝えることができないと訳者が判断した箇所については、括弧でくくる形で該当する箇所の原文も併記しています。
    • 上述の併記する原文のうち、「用語(Terminology)」は、原文で複数形で表記された用語も全て単数形に統一してあります。

OPDS Catalog 1.1

この文書のステータス Status of this Document

This document specifies version 1.1 of the OPDS Catalog specification.

Published: 27 June 2011

This version
http://opds-spec.org/specs/opds-catalog-1-1-20110627
Latest version
http://opds-spec.org/specs/opds-catalog-1-1
Previous version
http://opds-spec.org/specs/opds-catalog-1-0

このドキュメントはOpen Publication Distribution System (OPDS) カタログのversion 1.1の仕様を規定するものである。

公開: 2011年6月27日

このバージョン
http://opds-spec.org/specs/opds-catalog-1-1-20110627
最新のバージョン
http://opds-spec.org/specs/opds-catalog-1-1
前のバージョン
http://opds-spec.org/specs/opds-catalog-1-0

許諾 License

This document is licensed under Creative Commons Attribution-Share Alike.

このドキュメントは Creative Commons Attribution-Share Alikeの下で使用を許諾されているものである。

概要 Abstract

The Open Publication Distribution System (OPDS) Catalog format is a syndication format for electronic publications based on Atom and HTTP. OPDS Catalogs enable the aggregation, distribution, discovery, and acquisition of electronic publications. OPDS Catalogs use existing or emergent open standards and conventions, with a priority on simplicity.

Open Publication Distribution System(OPDS)カタログフォーマットは AtomとHTTPをベースとする電子出版物のための配信フォーマットである。OPDSカタログ(OPDS Catalog)によって電子出版物の集約(aggregation)、配信(distribution)、発見(discovery)、 取得(acquisition)が可能となる。OPDSカタログ(OPDS Catalog)は簡潔さを優先させるため、既存の、または新生のオープンスタンダード及び規定を使用する。

目次 Table of Contents

1. イントロダクション Introduction

The Open Publication Distribution System (OPDS) Catalog format is a syndication format for electronic publications based on Atom[RFC4287] and HTTP [RFC2616]. OPDS Catalogs enable available electronic publications to be:

  • discovered, using optional search or a range of optional browsing techniques
  • acquired, using direct downloads, lending, or vending

An OPDS Catalog is a set of one or more Atom Feeds, which are themselves listings of Atom Entries. The Atom Feeds that make up all OPDS Catalogs can be divided into two groups: Navigation Feeds, which create a hierarchy for browsing, and Acquisition Feeds, which list available electronic publications. Each Atom Entry in an Acquisition Feed includes basic metadata about the publication, the publication’s format, and how the publication can be acquired. These included Atom Entries may be minimal subsets of the complete metadata, with a link to a more extensive, standalone representation URI (see the Section Listing Acquisition Feeds for more).

OPDS Catalogs may be aggregated and combined into larger OPDS Catalogs.

Open Publication Distribution System(OPDS)Catalogフォーマットは Atom [RFC4287] と HTTP [RFC2616]をベースとする電子出版物のための配信フォーマットである。OPDSカタログ(OPDS Catalog)により利用可能な電子出版物について以下のことが可能となる。

  • 任意の検索や様々な任意のブラウジング技術の使用によって発見されること。
  • 直接ダウンロード、貸出、販売によって取得されること。

1つのOPDSカタログ(OPDS Catalog)は1つ以上のAtomフィードのセットである。AtomフィードはAtomエントリの一覧である。全てのOPDSカタログ(OPDS Catalog)を構成するAtomフィードは次の2つのグループに分けることができる。ブラウジングのために階層をつくるナビゲーションフィード(Navigation Feed)と利用可能な電子出版物を一覧する取得フィード(Acquisition Feed)である。取得フィード(Acquisition Feed)にあるそれぞれのAtomエントリにはその出版物の基本的なメタデータ、その出版物のフォーマット、そして、その出版物の入手方法が含まれている。Atomエントリを含むこれらのフィードはさらに完全なメタデータの最小限のサブセットかもしれない。それはより広範で独立したものを表現するURIへのリンクを持つ(より詳細については「取得フィードの一覧(Listing Acquisition Feeds)」セクションを参照すること)。

OPDSカタログ(OPDS Catalog)は集約され、より大きなOPDSカタログ(OPDS Catalog)に統合されるかもしれない。

2. 表記規約 Notational Conventions

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC2119].

このドキュメントに出てくる“MUST”“MUST NOT”“REQUIRED”“SHALL”“SHALL NOT”“SHOULD”“SHOULD NOT”“RECOMMENDED”“MAY”、そして、“OPTIONAL”[RFC2119] で規定されている通りに解釈されることとする。.

8. OPDSカタログエントリドキュメント OPDS Catalog Entry Documents

OPDS Catalog Entry Documents are Atom [RFC4287] Entry documents that provide a complete representation of the metadata and data associated with an available Publication.

Each OPDS Catalog Entry Document MUST include at least one Acquisition Link, which is an atom:link element with a relation that begins “http://opds-spec.org/acquisition“. This link refers to the Resource which is the content of the Resource described by the OPDS Catalog Entry in a particular media type. Acquisition Links use one of the relations described in the Section Acquisition Relations.

OPDSカタログエントリドキュメント(OPDS Catalog Entry Document)はメタデータと利用可能な出版物(Publication)との関連のあるデータを完全な表現を提供するAtom [RFC4287]エントリドキュメントである。

それぞれのOPDSカタログエントリドキュメント(OPDS Catalog Entry Document)は少なくとも1つの取得リンク(Acquisition Link)を含まなくてはならない(MUST)。その取得リンク(Acquisition Link)は“http://opds-spec.org/acquisition“で始まるリレーションを持つatom:link要素である。このリンクはOPDSカタログエントリ(OPDS Catalog Entry)によって記述されたリソース(Resource)の特定のメディアタイプのコンテンツであるリソース(Resource)を参照する。取得リンク(Acquisition Link)は「取得リレーション(Acquisition Relations)」セクションで記述されるリレーションの1つを使用する。

8.1. AtomとDublin Core Metadataとの関係 Relationship Between Atom and Dublin Core Metadata

OPDS Catalog providers are encouraged to include metadata from the Dublin Core Metadata Initiative (DCMI) Metadata Terms [DCTERMS] whenever appropriate. However, these elements are not required. Some of the elements defined in [DCTERMS] overlap in meaning with similar elements defined by Atom in [RFC4287]. In general, OPDS Catalog Entries prefer the Atom elements over the [DCTERMS] elements and the following rules should be used by OPDS Catalog providers when choosing elements:

  • OPDS Catalog Entries MUST be identified by an “atom:id”. One or more “dc:identifier” elements SHOULD be used to identify the represented Publication, if appropriate metadata is available, and MUST NOT identify the OPDS Catalog Entry.
  • OPDS Catalog Entries MUST include an “atom:updated” element indicating when the OPDS Catalog Entry was last updated. A “dc:issued” element SHOULD be used to indicate the first publication date of the Publication and MUST NOT represent any date related to the OPDS Catalog Entry.
  • OPDS Catalog Entries MUST include an “atom:title” representing the Publication’s title and MUST NOT use “dc:title”.
  • OPDS Catalog Entries SHOULD use “atom:author” to represent the Publication’s creators and SHOULD NOT use “dc:creator”.
  • OPDS Catalog Entries SHOULD use “atom:category” to represent the Publication’s category, keywords, key phrases, or classification codes and SHOULD NOT use “dc:subject”.
  • OPDS Catalog Entries SHOULD use “atom:rights” to represent rights held in and over the Publication and SHOULD NOT use “dc:rights”.
  • OPDS Catalog Entries SHOULD use “atom:summary” and/or “atom:content” to describe the Publication SHOULD NOT use “dc:description” or “dc:abstract”.
  • OPDS Catalog Entries MAY use “atom:contributor” to represent contributors to the Publication beside its creators.
  • OPDS Catalog Entries MAY use “atom:published” to indicate when the OPDS Catalog Entry was first accessible.

All metadata elements required by Atom are required in OPDS Catalog Entries and Feeds.

Following Atom [RFC4287] Section 4.2.6, the content of an “atom:id” identifying an OPDS Catalog Entry MUST NOT change when the OPDS Catalog Entry is “relocated, migrated, syndicated, republished, exported, or imported” and “MUST be created in a way that assures uniqueness.”

OPDSカタログ(OPDS Catalog)プロバイダは適切な時にいつでもDublin Core Metadata Initiative (DCMI) Metadata Terms [DCTERMS]で規定されるメタデータを含めることが奨励される。しかし、これらの要素は必須ではない。[DCTERMS]で定義されるいくつかの要素は[RFC4287]のAtomによって定義される似た要素と意味において重複する部分がある。一般的にOPDSカタログエントリ(OPDS Catalog Entry)では[DCTERMS]の要素よりAtom要素のほうを使用するほうがよい。以下は要素を選択する際にOPDSカタログ(OPDS Catalog)プロバイダによって使用されるべき規則である。

  • OPDSカタログエントリ(OPDS Catalog Entry)は“atom:id”によって識別されなければならない(MUST)。1つ以上の“dc:identifier”要素は、適切なメタデータが利用できる場合に(そのメタデータによって)表現される出版物(Publication)を識別するために使用されるべきであり(SHOULD)、OPDSカタログエントリ(OPDS Catalog Entry)を識別してはならない(MUST NOT)
  • OPDSカタログエントリ(OPDS Catalog Entry)は最後にいつ更新したかを示す“atom:updated”要素を含まなければならない(MUST)。“dc:issued”要素はその出版物(Publication)の最初の出版日を示すために使用されるべきであり(SHOULD)、OPDSカタログエントリ(OPDS Catalog Entry)に関連する日付を表現してはならない(MUST NOT)
  • OPDSカタログエントリ(OPDS Catalog Entry)はその出版物(Publication)のタイトルを表現する“atom:title”を含めなければならない(MUST)。“dc:title”は使用してはならない(MUST NOT)
  • OPDSカタログエントリ(OPDS Catalog Entry)はその出版物(Publication)の作成者(creator)を表現するために“atom:author”を使うべきである(SHOULD)。“dc:creator”を使用するべきではない(SHOULD NOT)
  • OPDSカタログエントリ(OPDS Catalog Entry)はその出版物(Publication)のカテゴリ、キーワード、キーフレーズ、または分類コードを表現するために“atom:category”を使うべきである(SHOULD)。“dc:subject”を使用するべきではない(SHOULD NOT)
  • OPDSカタログエントリ(OPDS Catalog Entry)はその出版物(Publication)の権利に関係する情報を表現するために“atom:rights”を使用するべきである(SHOULD)。“dc:rights”を使用するべきではない(SHOULD NOT)
  • OPDSカタログエントリ(OPDS Catalog Entry)はその出版物(Publication)を説明するために“atom:summary” 及び/または“atom:content”を使用するべきである(SHOULD)。“dc:description”や“dc:abstract”を使用するべきではない(SHOULD NOT)
  • OPDSカタログエントリ(OPDS Catalog Entry)は作成者(creator)に加え、その出版物(Publication)の寄与者(contributor)を表現するために“atom:contributor”を使用してもよい(MAY)
  • OPDSカタログエントリ(OPDS Catalog Entry)はOPDSカタログエントリ(OPDS Catalog Entry)が最初にいつ利用できるようになったのかを示すために“atom:published”を使用してもよい(MAY)

Atomで必須とされる全てのメタデータ要素はOPDSカタログエントリ(OPDS Catalog Entry)やOPDSカタログフィード(OPDS Catalog Feed)においても必須である。

Atom [RFC4287]のセクション4.2.6に従い、OPDSカタログエントリ(OPDS Catalog Entry)が「再配置(relocated)、移動(migrated)、配信(syndicated)、再発行(republished)、エクスポート(exported)、インポート(imported)」された場合でも、OPDSカタログエントリ(OPDS Catalog Entry)を識別する“atom:id”の内容は変わってはならない(MUST NOT)。 そして、「一意であることが保証される方法によって生成されなければならない(MUST be created in a way that assures uniqueness)(MUST)」。

8.2. 部分的なカタログエントリと完全なカタログエントリ Partial and Complete Catalog Entries

An OPDS Catalog Entry may be represented as either a Partial or Complete Catalog Entry. Partial Catalog Entries include only critical metadata elements to reduce the size of OPDS Catalog documents for bandwidth- and resource-limited clients and link to their alternate representation as a Complete Catalog Entries, which include all metadata elements.

A Partial Catalog Entry MUST include an “alternate” link relation referencing the Complete Catalog Entry Resource and that atom:link MUST use the “type” attribute “application/atom+xml;type=entry;profile=opds-catalog”.

Any OPDS Catalog Entry without a link to a Complete Catalog Entry MUST include all metadata elements.

Partial Catalog Entries SHOULD include the following metadata elements, if available:

  • atom:category
  • atom:contributor
  • atom:rights
  • opds:price

OPDS Catalog providers are strongly encouraged to limit metadata elements not required by Atom, OPDS, or listed above from Partial Catalog Entries to help facilitate the efficient transmission and consumption of OPDS Catalog documents. Implementers are encouraged to include metadata elements from other vocabularies in Complete Catalog Entries.

1つのOPDSカタログエントリ(OPDS Catalog Entry)は部分的なカタログエントリ(Partial Catalog Entry)または完全なカタログエントリ(Complete Catalog Entry)として表現されるかもしれない。部分的なカタログエントリ(Partial Catalog Entry)は帯域幅やリソースが制限されたクライアント向けにOPDSカタログ(OPDS Catalog)ドキュメントのサイズを抑えるために必要不可欠なメタデータ要素のみを含む。そして、部分的なカタログエントリ(Partial Catalog Entry)は全てのメタデータ要素を含む完全なカタログエントリ(Complete Catalog Entry)を代替する表現にリンクしている。

部分的なカタログエントリ(Partial Catalog Entry)には完全なカタログエントリリソース(Complete Catalog Entry Resource)を参照する“alternate”リンクリレーションが含まれていなければならない(MUST)。そして、そのatom:linkには“type” 属性として“application/atom+xml;type=entry;profile=opds-catalog”を使用しなければならない(MUST)

完全なカタログエントリ(Complete Catalog Entry)へのリンクを持たないOPDSカタログエントリ(OPDS Catalog Entry)には全てのメタデータ要素が含まれていなければならない(MUST)

部分的なカタログエントリ(Partial Catalog Entry)には可能であれば、以下のメタデータ要素が含まれているべきである(SHOULD)

  • atom:category
  • atom:contributor
  • atom:rights
  • opds:price

OPDSカタログ(OPDS Catalog)プロバイダはOPDSカタログ(OPDS Catalog)ドキュメントの効率的な伝送(transmission)や利用(consumption)を容易にするためにAtom、OPDSまたは部分的なカタログエントリ(Partial Catalog Entry)で上で一覧にされたものによって必須とされないメタデータ要素を制限することが強く推奨される。OPDSカタログ(OPDS Catalog)実装者は完全なカタログエントリー(Complete Catalog Entry)にあるその他の語彙に由来するメタデータ要素を含めることが推奨される。

8.3.要約とコンテンツ Summary and Content

OPDS Catalog Entries use “atom:content” and “atom:summary” elements to describe a Publication. This is a distinction from Atom [RFC4287], which uses “atom:content” for the “content of the entry.” Instead, OPDS Catalog Entries reference an electronic document with the Publication’s content using Acquisition Links. OPDS Catalog Entries SHOULD include either “atom:summary” or “atom:content” elements or both to provide a description, summary, abstract, or excerpt of the Publication.

An “atom:summary” element in an OPDS Catalog Entry MUST use a “type” attribute of “text” and the content MUST NOT contain child elements. The content of an “atom:summary” element SHOULD NOT duplicate the content of “atom:title” or “atom:content”. Such text is intended to be presented to humans in a readable fashion. The restriction of the content of “atom:summary” and the “type” attribute is a restriction of Atom [RFC4287].

An “atom:content” element in an OPDS Catalog Entry either contains or links to a description, summary, abstract, or excerpt of the Publication. The behavior or “atomOutOfLineContent” and the “src” attribute is defined in Section 4.1.3 of [RFC4287].

If an OPDS Catalog Entry includes both “atom:content” and “atom:summary”, the “atom:content” SHOULD NOT be included in the Partial Catalog Entry. Both elements SHOULD be included in the Complete Catalog Entry.

OPDSカタログエントリ(OPDS Catalog Entry)は出版物(Publication)を説明するために“atom:content”要素と“atom:summary”要素を使用する。Atom [RFC4287]によって“atom:content”は「エントリのコンテンツ(content of the entry)」のために使用されるよう区別がされている。OPDSカタログエントリ(OPDS Catalog Entry)では代わりに取得リンク(Acquisition Link)を使用し、出版物(Publication)のコンテンツを持つ電子的ドキュメントを参照する。OPDSカタログエントリ(OPDS Catalog Entry)には出版物の説明(description)、要約(summary)、摘要(abstract)、または抜粋(excerpt)を提供するために“atom:summary”要素または“atom:content”要素のどちらか、またはその両方が含まれているべきである(SHOULD)

OPDSカタログエントリ(OPDS Catalog Entry)にある“atom:summary”要素は“text” の値を持つ“type”属性を使用しなければならない(MUST)。その内容には子要素が含まれてはならない(MUST NOT)。“atom:summary” 要素の内容は“atom:title”または“atom:content”の内容を複製するべきではない(SHOULD NOT)。そのようなテキストは人間が読むことが可能な方法で提供されることが意図されている。“atom:summary”の内容と“type”属性に対する制限はAtom [RFC4287]の制限によるものである。

OPDSカタログエントリ(OPDS Catalog Entry)にある“atom:content”要素は出版物(Publication)の説明(description)、要約(summary)、摘要(abstract)、または抜粋(excerpt)を含む、またはそれらへのリンクが貼られている。 その振る舞い(behavior)、または“atomOutOfLineContent”と“src”属性は[RFC4287]のセクション4.1.3に定義されている。

OPDSカタログエントリ(OPDS Catalog Entry)に“atom:content”と“atom:summary”の両要素がいっしょに含まれる場合には、“atom:content”は部分的なカタログエントリ(Partial Catalog Entry)に含まれるべきではない(SHOULD NOT)。両要素は完全なカタログエントリ(Complete Catalog Entry)に含まれるべきである(SHOULD)

atomSummary =
  element atom:summary {
  atomCommonAttributes,
  attribute type { "text" }?,
    text
  }

8.4. エントリリレーション Entry Relations

OPDS Catalog Entry Documents SHOULD include links to related Resources. This specification defines new relations for linking from OPDS Catalog Entry Documents. They are defined in the Sections Acquisition Relations and Artwork Relations.

OPDS Catalog providers are encouraged to use relations from [RFC5988] inside OPDS Catalog Entry Documents where appropriate.

OPDSカタログエントリドキュメント(OPDS Catalog Entry Document)には関連するリソース(Resource)へのリンクが含まれるべきである(SHOULD)。本仕様はOPDSカタログエントリドキュメント(OPDS Catalog Entry Document)からのリンクで使用する新しいatom:linkのリレーションを定義するものである。それらは「取得リレーション(Acquisition Relations)」セクションと 「アートワークリレーション(Artwork Relations)」セクションで定義されている。

OPDSカタログプロバイダは適切なOPDSカタログエントリードキュメントの中に[RFC5988]からリレーションを使用することが推奨される。

8.4.1. 取得リレーション Acquisition Relations

Acquisition relations describe the extent of the content referred to by an Acquisition Link or the manner in which that Resource may be acquired. This specification defines six Acquisition Relations, which all begin with “http://opds-spec.org/acquisition“:

取得リレーション(Acquisition Relations)は取得リンク(Acquisition Link)またはリソース(Resource)が取得されるかもしれない方法によって参照されるコンテンツの範囲を記述する。本仕様では以下の6つの取得リレーション(Acquisition Relation)を定義する。それらは全て“http://opds-spec.org/acquisition“で始まる。

8.4.2. アートワークリレーション Artwork Relations

OPDS Catalog Entries MAY include atom:links to images that provide a visual representation of the Publication. For many Publications, these images will be the Publication’s artwork. This specification defines two Artwork Relations, which begin with “http://opds-spec.org/image“:

Image resources related by http://opds-spec.org/image/thumbnail SHOULD be suitable for presentation at a small size.

The atom:links with these relations SHOULD include at least one link with a type attribute of “image/gif”, “image/jpeg”, or “image/png” and the image Resources MUST be in GIF, JPEG, or PNG format.

Additional atom:links MAY also include additional resources using a vector-based format.

While either image Resource is optional and may be included independently, OPDS Catalog providers are encouraged to provide both these relations and Resources whenever possible.

Some OPDS Catalog providers MAY choose to provide http://opds-spec.org/image/thumbnail image Resources using the “data” URL scheme from [RFC2397]. [OPDS Catalog clients SHOULD support the "data" URL]※ scheme if they support Artwork relations.

※訳者補記。OPDS1.0及びOPDS1.2 Draftに同じ記述があるため、OPDS1.1でも本来は同様の記述されているはずであると判断し、角括弧の部分を補記した。

OPDSカタログエントリ(OPDS Catalog Entry)には出版物(Publication)の視覚表現を提供するイメージへのatom:linksを含めてもよい(MAY)。多くの出版物(Publication)にとって、これらのイメージは出版物(Publication)のアートワークになるだろう。本仕様では以下の2つのアートワークリレーション(Artwork Relations)を定義する。それらは全て“http://opds-spec.org/image“で始まる。

  • http://opds-spec.org/image“: OPDSカタログエントリ(OPDS Catalog Entry)に関連するグラフィカルリソース(Resource)。
  • http://opds-spec.org/image/thumbnail“: OPDSカタログエントリ(OPDS Catalog Entry)に関連するグラフィカルリソース(Resource)のサイズを縮小したバージョン。

http://opds-spec.org/image/thumbnailによって関連付けられているイメージリソースは小さなサイズによる表現に適しているべきである(SHOULD)

これらのリレーションを持つatom:linksには“image/gif”、“image/jpeg”、または“ image/png”のtype属性をもつリンクを少なくとも1つが含まれるべきである(SHOULD)。そして、イメージリソース(Resource)はGIF形式、JPEG形式、またはPNG形式でなければならない(MUST)

さらなるatom:linksとしてベクターベースの形式を使用するさらなるリソースを含めてもよい(MAY)

イメージリソースは任意であり、単独で含められているかもしれない。OPDSカタログ(OPDS Catalog )プロバイダには可能な時にこれらのリレーションとリソース(Resource)を提供することが推奨される。

OPDSカタログ(OPDS Catalog)プロバイダは[RFC2397]の“data” URLスキームを使用したhttp://opds-spec.org/image/thumbnailのイメージリソース(Resource)を提供することを選択してもよい(MAY)。OPDSカタログ(OPDS Catalog)クライアントはもしアートワークリレーション(Artwork Relation)をサポートするのであれば、その“data” URLスキームをサポートするべきである(SHOULD)

8.5. エントリの例 Entry Examples

An example of a Partial Catalog Entry (as would appear in an Acquisition Feed) for a Publication available in two formats:

以下は2つのフォーマットで利用可能な1つの出版物(Publication)を表す(取得フィード(Acquisition Feed)に現れる時の)1つの部分的なカタログエントリ(Partial Catalog Entry)の例である。

<entry>
  <title>Bob, Son of Bob</title>
  <id>urn:uuid:6409a00b-7bf2-405e-826c-3fdff0fd0734</id>
  <updated>2010-01-10T10:01:11Z</updated>
  <author>
    <name>Bob the Recursive</name>
    <uri>http://opds-spec.org/authors/1285</uri>
  </author>
  <dc:language>en</dc:language>
  <dc:issued>1917</dc:issued>
  <category scheme="http://www.bisg.org/standards/bisac_subject/index.html"
            term="FIC020000"
            label="FICTION / Men's Adventure"/>
  <summary type="text">The story of the son of the Bob and the gallant part he played in
    the lives of a man and a woman.</summary>
  <link rel="http://opds-spec.org/image"     
        href="/covers/4561.lrg.png"
        type="image/png"/> 
  <link rel="http://opds-spec.org/image/thumbnail" 
        href="/covers/4561.thmb.gif"
        type="image/gif"/>
  <link rel="alternate"
        href="/opds-catalogs/entries/4571.complete.xml"
        type="application/atom+xml;type=entry;profile=opds-catalog" 
        title="Complete Catalog Entry for Bob, Son of Bob"/>
  <link rel="http://opds-spec.org/acquisition" 
        href="/content/free/4561.epub"
        type="application/epub+zip"/>
  <link rel="http://opds-spec.org/acquisition" 
        href="/content/free/4561.mobi"
        type="application/x-mobipocket-ebook"/>
</entry>

The Complete Catalog Entry for the same Publication:

以下は同じ出版物(Publication)の完全なカタログエントリ(Complete Catalog Entry)である。

<entry>
  <title>Bob, Son of Bob</title>
  <id>urn:uuid:6409a00b-7bf2-405e-826c-3fdff0fd0734</id>
  <updated>2010-01-10T10:01:11Z</updated>
 
  <author>
    <name>Bob the Recursive</name>
    <uri>http://opds-spec.org/authors/1285</uri>
  </author>
  <dc:language>en</dc:language>
  <dc:issued>1917</dc:issued>
  <category scheme="http://www.bisg.org/standards/bisac_subject/index.html"
            term="FIC020000"
            label="FICTION / Men's Adventure"/>

  <summary type="text">The story of the son of the Bob and the gallant part he played in
    the lives of a man and a woman.</summary>
  <content type="text">The story of the son of the Bob and the gallant part
    he played in the lives of a man and a woman. Bob begins his humble life
    under the wandering eye of his senile mother, but quickly learns how to
    escape into the wilder world. Follow Bob as he uncovers his father's past
    and uses those lessons to improve the lives of others.</content>
 
  <link rel="http://opds-spec.org/image"     
        href="/covers/4561.lrg.png"
        type="image/png"/> 
  <link rel="http://opds-spec.org/image/thumbnail" 
        href="/covers/4561.thmb.gif"
        type="image/gif"/>
 
  <link rel="self"
        href="/opds-catalogs/entries/4571.complete.xml"
        type="application/atom+xml;type=entry;profile=opds-catalog"/>
 
  <link rel="http://opds-spec.org/acquisition" 
        href="/content/free/4561.epub"
        type="application/epub+zip"/>
  <link rel="http://opds-spec.org/acquisition" 
        href="/content/free/4561.mobi"
        type="application/x-mobipocket-ebook"/>
</entry>

8.6. 要素定義 Element Definitions

8.6.1. “atom:entry”要素 The “atom:entry” Element

The “atom:entry” element is the document (i.e., top-level) element of an OPDS Catalog Entry Document, acting as a container for metadata and data associated with an available Publication.

The following child elements are refined by this specification:

  • OPDS Catalog Entry Documents MUST contain at least one Acquisition Link, an atom:link element with a rel attribute that begins with “http://opds-spec.org/acquisition“.

“atom:entry”要素はOPDSカタログエントリドキュメント(OPDS Catalog Entry Document)のdocument(すなわち、最上位の)要素であり、メタデータや利用可能な出版物(Publication)と関連したデータを格納するコンテナの役割を果たす。

本仕様は以下の子要素を定義する。

  • OPDSカタログエントリドキュメント(OPDS Catalog Entry Document)は取得リンク(Acquisition Link)、つまり、“http://opds-spec.org/acquisition“で始まるrel属性の値を持つatom:link要素を少なくとも1つは格納していなければならない(MUST)
8.6.3. “opds:price”要素 The “opds:price” Element

The “opds:price” element represents the acquisition price in a particular currency of an individual Publication in a particular format from a particular provider. This element can appear as a child of the atom:link element (in OPDS Catalog Entry Documents).

The content of opds:price is text describing a currency value. A currency sign MUST NOT be included.

“opds:price”要素は特定のプロバイダから特定のフォーマットによって提供される個別の出版物(Publication)の特定の通貨による取得価格を表現するものである。この要素はOPDSカタログエントリドキュメント(OPDS Catalog Entry Document)のatom:link要素の子要素として表示させることができる。

opds:priceの内容は通貨価値を記述するテキストである。通貨記号を含んではならない(MUST NOT)

opdsPrice =
  element opds:price {
    atomCommonAttributes,
    attribute currencycode { opdsPriceCurrencyCode },
    xsd:decimal { minInclusive="0.0" }
  }
8.6.3.1. “currencycode”属性 The “currencycode” Attribute

On the opds:price element, the value of the “currencycode” attribute MUST be an active code from [ISO4217] representing a currency. It defines the currency used for the content of the opds:price element.

opds:price要素にある“currencycode”属性の値は通貨を表現する[ISO4217]の現行のコード(active code)でなければならない(MUST)。この属性はopds:price要素の内容で表示される通貨を定義する。

8.6.4.“opds:indirectAcquisition“要素 The “opds:indirectAcquisition“ Element

In some cases, the OPDS Catalog provider MAY require the client to acquire an intermediate Resource before acquiring the final Publication. This can be the case for example with containers (archive formats, multimedia containers for various formats) or when a payment is required (need to go through a series of HTML pages to handle the transaction).

The “opds:indirectAcquisition“ element represents these secondary media types [MIMEREG] that the client can expect to acquire if they follow the Acquisition Link.

These “opds:indirectAcquisition“ elements CAN be arbitrarily nested to represent several levels of indirection.

場合によっては、OPDSカタログ(OPDS Catalog)プロバイダは最終的に出版物(Publication)を取得する前に間接的なリソースを取得するようクライアントに要求してよい(MAY)。これは例えばコンテナの問題(アーカイブフォーマット、様々なフォーマットに対応したマルチメディアコンテナ)または支払いを要求されること(トランザクションを処理するために一連のHTMLのページを経由する必要があるケース)で起こりうる。

“opds:indirectAcquisition“要素はクライアントが取得リンク(Acquisition Link)をたどると取得できるこれらの二次的なメディアタイプ [MIMEREG]を表現する。

これらの“opds:indirectAcquisition“要素は間接の複数の階層を表現するために任意で入れ子にすることができる(CAN)

opdsIndirectAcquisition =
  element opds:indirectAcquisition {
    atomCommonAttributes,
    attribute type { atomMediaType },
    (  anyOPDSForeignElement |
      opdsIndirectAcquisition) *
  }

9. 出版物の取得 Acquiring Publications

The goal of OPDS Catalogs is to make Publications both discoverable and straightforward to acquire on a range of devices and platforms. To support that goal, this specification strives to provide a framework for describing how a Publication may be acquired while not attempting to constrain this very complex topic. Commonly-used acquisition scenarios may be specified in an update to this specification.

All Acquisition Links MUST include a “type” attribute that advises clients on the media type of the representation that is expected to be returned when the value of the href attribute is dereferenced. As with Atom, the value of the type attribute MUST conform to the syntax of a MIME media type [MIMEREG].

Publications in a format using Digital Rights Management SHOULD use a different value for the type attribute of the Acquisition Link than the same format without Digital Rights Management.

OPDS Catalog clients may only support a subset of all possible Publication media types. These clients will need to filter both the type attribute of Acquisition Links.

OPDS Catalogs may only provide certain Publications through an Indirect Acquisition, either through a container or a different Acquisition workflow. In such cases, it is up to the clients to filter these publications based on both the "opds:indirectAcquisition" and "atom:link" type attributes.

OPDSカタログ(OPDS Catalog)の目標は出版物(Publications)を発見できるようにし、デバイスやプラットフォームなどから直接取得できるようにすることである。その目標をサポートするために、本仕様は出版物(Publication)がどのように取得されるかについて、このまさに複雑なテーマを制約することは試みないが、記述するためにフレームワークの提供を目指している。一般的に使用される取得のシナリオは本仕様のアップデート版で定義されるかもしれない。

全ての取得リンク(Acquisition Link)はhref属性の値が指す場所にアクセスする時に返ってくると期待される表現のメディアタイプをクライアントにアドバイスする“type”属性を含めなければならない(MUST)。Atomと同様に“type”属性の値はMIMEメディアタイプ [MIMEREG]のシンタックスに従わなくてはならない(MUST)

あるフォーマットでDigital Rights Managementを使用する場合、その出版物(Publications)の取得リンク(Acquisition Link)のtype属性の値には、Digital Rights Managementを使用しない同じフォーマットのものとは異なる値を使用するべきである(SHOULD)

OPDSカタログ(OPDS Catalog)クライアントは出版物(Publication)に利用可能な全てのメディアタイプの一部のみをサポートするだけかもしれない。これらのクライアントは取得リンク(Acquisition Link)のtype属性でフィルターをかける必要あるだろう。

OPDSカタログ(OPDS Catalog)は間接取得によって、コンテナまたは異なる取得のたワークフローを経由してのみ出版物(Publication)を提供するかもしれない。クライアントは“opds:indirectAcquisition“要素と “atom:link“要素のtype属性を使用してこれらの出版物にフィルターをかける場合がある。

9.1. 取得の例 Acquisition Examples

The simplest case is a Publication available in one format:

最もシンプルなケースは以下のような1つのフォーマットで利用可能な出版物(Publication)のケースである。

<link rel="http://opds-spec.org/acquisition" 
      type="video/mp4v-es" 
      href="/content/free/4561.mp4"/>

If the Publication was available in multiple formats as unique Resources, they would simply be listed:

ただ1つのリソースで複数のフォーマットが利用可能な出版物(Publication)の場合は、以下のようにシンプルに列記されるだろう。

<link rel="http://opds-spec.org/acquisition/borrow" 
      href="/content/borrow/4561.mobi"
      type="application/x-mobipocket-ebook" />

<link rel="http://opds-spec.org/acquisition/borrow" 
      href="/content/borrow/4561.epub"
      type="application/epub+zip" />

If the Publication requires payment, at least one ”opds:price” element is required:

出版物(Publication)が支払いを要求するなら、以下のように少なくとも1つの”opds:price”要素が必須である。

<link rel="http://opds-spec.org/acquisition/buy"
      href="/product/song1.mp3"
      type="audio/mpeg">
  <opds:price currencycode="USD">1.99</opds:price> 
</link>

If the same Publication requires a payment through an HTML page, then an ”opds:indirectAcquisition” element is required to describe the content type of the final Publication Representation:

同じ出版物(Publication)がHTMLのページを経由した支払いを要求するなら、 ”opds:indirectAcquisition”要素は以下のように最終的な出版物の表現(Publication Representation)のコンテンツタイプを記述することが必須である。

<link rel="http://opds-spec.org/acquisition/buy"
      href="/product/1"
      type="text/html">
  <opds:price currencycode="USD">1.99</opds:price>
  <opds:indirectAcquisition type="audio/mpeg" />
</link>

Multiple ”opds:indirectAcquisition” elements can also be used as child elements of an Acquisition Link or another "opds:indirectAcquisition" when this is necessary (a bundle would be a good example):

複数の”opds:indirectAcquisition”は必要に応じて(以下のようなバンドルはよい例になるだろう)取得リンクまたは他の”opds:indirectAcquisition”要素の子要素として使用されることもありうる。

<link type="text/html" 
      rel="http://opds-spec.org/acquisition/buy" 
      href="/item/1111/buy/">
  <opds:price currencycode="EUR">10.99</opds:price>
  <opds:indirectAcquisition type="application/zip">
    <opds:indirectAcquisition type="application/epub+zip" />
    <opds:indirectAcquisition type="application/pdf" />
    <opds:indirectAcquisition type="application/x-mobipocket-ebook" />
  </opds:indirectAcquisition>
</link>

10. フィードの処理 Feed Handling

10.1. 取得フィードの一覧 Listing Acquisition Feeds

OPDS Catalog Feed Documents, especially Acquisition Feeds, may contain large numbers of Atom Entries.

A client such as a web spider or web browser might be overwhelmed if the response to a GET contained every Atom Entry in an Acquisition Feed — in turn the server might also waste bandwidth and processing time on generating a response that cannot be handled. For this reason, servers MAY respond to Acquisition Feed GET requests with a paginated response: an OPDS Catalog Feed Document containing a partial list of the Acquisition Feed’s member Atom Entries and a link to the next partial Acquisition Feed, if it exists, as defined in Section 3 of [RFC5005].

OPDS Catalog providers SHOULD use Partial Catalog Entries in all Acquisition Feeds except Complete Acquisition Feeds, which are intended for crawling and are referenced using the http://opds-spec.org/crawlable relation.

Clients MUST NOT assume that an OPDS Catalog Entry returned in the Acquisition Feed is a full representation of an OPDS Catalog Entry Resource, as described in the Section Partial and Complete Entries.

OPDSカタログフィードドキュメント(OPDS Catalog Feed Document)、特に取得フィード(Acquisition Feed)は多くのAtomエントリを格納しているかもしれない。(may contain)

GETメソッドによるリクエストに対するレスポンスが取得フィード(Acquisition Feed)にある全てのAtomエントリを格納しているものであるならば、WebスパイダーやWebブラウザのようなクライアントは困惑するかもしれない。サーバーも帯域幅や処理できないレスポンスを生成するための処理時間を浪費するかもしれない。このために、サーバーは取得フィード(Acquisition Feed)へのGETメソッドによるリクエストに対してページを分割したレスポンス(paginated response)で応じてもよい(MAY)。すなわち、[RFC5005]のセクション3で定義されているように取得フィード(Acquisition Feed)に含まれるAtomエントリの部分的なリストとその次の部分的な取得フィード(Acquisition Feed)へのリンクを格納するOPDSカタログフィードドキュメント(OPDS Catalog Feed Document)である。

OPDSカタログ(OPDS Catalog)プロバイダは完全な取得フィード(Complete Acquisition Feed)を除き、全ての取得フィード(Acquisition Feed)に部分的なカタログエントリ(Partial Catalog Entry)を使用するべきである(SHOULD)。完全な取得フィード(Complete Acquisition Feed)はクローリングのためのものであり、http://opds-spec.org/crawlableリレーションを使用して参照される。

「Partial and Complete Entries[sic]」セクション(訳者注: 「部分的なカタログエントリと完全なカタログエントリ(Partial and Complete Catalog Entries)」セクションのことか?)で記述されているように、クライアントは取得フィード(Acquisition Feed)から返ってくるOPDSカタログエントリ(OPDS Catalog Entry)がOPDSカタログエントリリソース(OPDS Catalog Entry Resource)の全ての表現であることを前提としてはならない(MUST NOT)

10.2. 完全な取得フィード Complete Acquisition Feeds

An OPDS Catalog provider MAY provide a single, consolidated Acquisition Feed that includes the complete representation of every unique OPDS Catalog Entry Document in an OPDS Catalog in an atom:feed to facilitate crawling and aggregation. Complete Acquisition Feeds SHOULD NOT be paginated unless they are extremely large.

This representation is called a Complete Acquisition Feed and each OPDS Catalog Entry MUST be ordered by atom:updated, with the most recently updated Atom Entries coming first in the document order.

If available, each OPDS Catalog Feed Document in the OPDS Catalog SHOULD contain an atom:link element with a relation of “http://opds-spec.org/crawlable” that references the Complete Acquisition Feed Resource.

A Complete Acquisition Feed MUST include a fh:complete element from [RFC5005] unless pagination is required. See Section 2 of [RFC5005] for the specification of the fh:complete element.

OPDS Catalog providers SHOULD use a compressed Content-Encoding when transmitting Complete Acquisition Feeds over HTTP. See Section 14.11 of [RFC2616] for more on compression.

OPDS Catalog providers MUST include Complete Catalog Entries when serializing a Complete Acquisition Feed.

OPDSカタログ(OPDS Catalog)プロバイダはクローリングや集約を容易にするためにatom:feedにあるOPDSカタログ(OPDS Catalog)の全てのユニークなOPDSカタログエントリドキュメント(OPDS Catalog Entry Document)の完全な表現を格納した1つの統合された取得フィード(Acquisition Feed)を提供してもよい(MAY)。完全な取得フィード(Complete Acquisition Feed)は極端に大きいものではない限り、ページは分割されるべきではない(SHOULD NOT)

この表現は完全な取得フィード(Complete Acquisition Feed)と呼ばれる。それぞれのOPDSカタログエントリ(OPDS Catalog Entry)はドキュメントの順番において最も最近更新されたAtomエントリが最初にくるようにatom:updatedによって排列されなければならない(MUST)

もし利用することが可能であれば、OPDSカタログ(OPDS Catalog)にあるそれぞれのOPDSカタログフィードドキュメント(OPDS Catalog Feed Document Resource)は完全な取得フィードリソース(Complete Acquisition Feeds Resource)を参照する“http://opds-spec.org/crawlable”のリレーションを持つatom:link要素を格納するべきである(SHOULD)

ページの分割が要求されているのではない限り、完全な取得フィード(Complete Acquisition Feed)は[RFC5005] のfh:complete要素を含まなければならない(MUST)。fh:complete要素の仕様は [RFC5005]のセクション2を参照すること。

完全な取得フィード(Complete Acquisition Feed)をHTTPを介して伝送する場合、OPDSカタログ(OPDS Catalog)プロバイダは圧縮されたContent-Encodingを使用するべきである(SHOULD)。圧縮についての更なる詳細については[RFC2616]のセクション14.11を参照すること。

OPDSカタログ(OPDS Catalog)プロバイダは完全な取得フィード(Complete Acquisition Feed)をシリアライズする場合は完全なカタログエントリ(Complete Catalog Entry)を含まなければならない(MUST)

11. OPDSカタログの集約 Aggregating OPDS Catalogs

OPDS Catalogs may be aggregated using the same techniques as Atom Feeds. Aggregators SHOULD use the atom:source element from Section 4.2.11 of [RFC4287] to include information about the original OPDS Catalog.

OPDSカタログ(OPDS Catalog)はAtomフィードとして同じ技術を使用して集約されるかもしれない。アグリゲータはオリジナルのOPDSカタログ(OPDS Catalog)についての情報を含めるために[RFC4287]のセクション4.2.11にあるatom:source要素を使用するべきである(SHOULD)

12. OPDSカタログの検出 Discovering OPDS Catalogs

OPDS Catalogs may be referenced in HTML/XHTML pages, HTTP headers, or using other techniques. These links may reference both OPDS Catalog Entries or Feeds. Links to OPDS Catalog Entry Document Resources MUST use a type attribute of “application/atom+xml;type=entry;profile=opds-catalog”. Links to OPDS Catalog Feed Document Resources MUST use a type attribute of “application/atom+xml;profile=opds-catalog”.

The most common mechanism for encouraging the auto-discovery of OPDS Catalogs is to link from an HTML document to the OPDS Catalog Root Resource, using the auto-discovery pattern popularized by the syndicated feed community [AUTODISCOVERY].

Multiple links to OPDS Catalog Resources MAY be expressed in a single HTML document.

An example of two links inside an HTML page about the same Publication:

OPDSカタログ(OPDS Catalog)はHTML/XHTMLページ、HTTPヘッダ、またはその他の技術によって参照されるかもしれない。これらのリンクはOPDSカタログエントリ(OPDS Catalog Entry)またはOPDSカタログフィード(OPDS Catalog Feed)を参照するかもしれない。OPDSカタログエントリドキュメントリソース(OPDS Catalog Entry Document Resource)へのリンクはtype属性の値に“application/atom+xml;type=entry;profile=opds-catalog”を使用しなければならない(MUST)。OPDSカタログフィードドキュメントリソース(OPDS Catalog Feed Document Resource)へのリンクはtype属性の値に“application/atom+xml;profile=opds-catalog”を使用しなければならない(MUST)

OPDSカタログ(OPDS Catalog)のauto-discovery(自動検出)を奨励するために最も普及しているメカニズムはシンジケーテッドフィードコミュニティによって広く普及したauto-discovery(自動検出)パターンを使用してHTMLドキュメントからOPDSカタログルートリソース(OPDS Catalog Root Resource)へリンクを貼ることである[AUTODISCOVERY]

OPDSカタログリソース(OPDS Catalog Resource)への多様なリンクは1つのHTMLドキュメント内で表わされてもよい(MAY)

以下はある同じ出版物(Publication)について1つのHTMLページ内にある2つのリンクの例である。

<link rel="related"   
      href="/opds-catalogs/root" 
      type="application/atom+xml;profile=opds-catalog"  
      title="Example OPDS Catalog" /> 
 
<link rel="alternate" 
      href="/entry/1"
      type="application/atom+xml;type=entry;profile=opds-catalog" 
      title="Example OPDS Entry" />

Auto-discovery links MAY also be expressed using HTTP headers as defined in [RFC5988].

Auto-discoveryリンクは[RFC5988]で定義されているようにHTTPヘッダを使用して表示してもよい(MAY)

13. OPDSカタログの保護 Securing OPDS Catalogs

OPDS Catalogs are delivered over HTTP. Authentication requirements for HTTP are covered in Section 11 of [RFC2616].

The type of authentication required for any OPDS Catalog is a decision to be made by the OPDS Catalog provider. OPDS Catalog clients are likely to face authentication schemes that vary across OPDS Catalogs. At a minimum, client and server implementations MUST be capable of being configured to use HTTP Basic Authentication [RFC2617] in conjunction with a connection made with TLS 1.0 [RFC2246] or a subsequent standards-track version of TLS supporting the conventions for using HTTP over TLS described in [RFC2818]. It is RECOMMENDED that OPDS Catalog clients be implemented in such a way that new authentication schemes can be deployed.

Because this protocol uses HTTP response status codes as the primary means of reporting the result of a request, OPDS Catalog providers are advised to respond to unauthorized or unauthenticated requests using an appropriate 4xx HTTP response code (e.g., 401 “Unauthorized” or 403 “Forbidden”) in accordance with [RFC2617].

OPDSカタログ(OPDS Catalog)はHTTPを介して配信される。HTTPのための認証の要件は[RFC2616]のセクション11でカバーされている。

OPDSカタログ(OPDS Catalog)で要求される認証のタイプはOPDSカタログ(OPDS Catalog)プロバイダによって決定されるものである。OPDSカタログ(OPDS Catalog)クライアントはOPDSカタログ(OPDS Catalog)によって異なる認証スキームに直面する可能性がある。少なくともクライアントとサーバーへの実装はTLS 1.0 [RFC2246]または[RFC2818]で記述されているTLSを介したHTTPを使用するための規約をサポートするTLSの次の標準化過程のバージョンでの接続を併用したHTTP Basic認証 [RFC2617]を利用する設定が可能となるようにされていなければならない(MUST)。OPDSカタログ(OPDS Catalog)クライアントは新しい認証スキームが展開しうるように実装されることが推奨される(RECOMMENDED )

このプロトコルはリクエストの結果を報告する主要な手段HTTPレスポンスステータスコードを使用しているため、OPDSカタログ(OPDS Catalog)プロバイダは[RFC2617]に従い、権限のない、または認証されていないリクエストに対して適切な4xx HTTP レスポンスコード(例えば、401 “Unauthorized”または403 “Forbidden”)を使用したレスポンスを返すことが勧められる。

14. 帯域幅と処理についての考慮事項 Bandwidth and Processing Considerations

Many OPDS Catalog clients operate in mobile environments, which may impose strict limitations on bandwidth and processing resources. OPDS Catalog publishers are strongly encouraged to publish their OPDS Catalogs using compression and caching techniques and the partial feeds described in the Section Listing Acquisition Feeds. Implementers are encouraged to investigate and use alternative mechanisms regarded as equivalently good or better at the time of deployment. See [CACHING] for more on caching techniques.

多くのOPDSカタログ(OPDS Catalog)クライアントは帯域幅や処理リソースが厳しく制限されうるモバイル環境で運用されている。OPDSカタログ(OPDS Catalog)出版者には圧縮技術やキャッシュ技術、そして「取得フィードの一覧(Listing Acquisition Feeds)」セクションで記述されている部分的なフィードを使用してOPDSカタログ(OPDS Catalog)を公開することが強く推奨される。 実装者は展開時に同等またはよりよいと見なされる代替手段となるメカニズムの調査及び使用が推奨される。キャッシュ技術についてのさらなる詳細については[CACHING]を参照すること。

15. セキュリティについての考慮事項 Security Considerations

OPDS Catalogs are Atom documents delivered over HTTP and thus subject to the security considerations found in Section 15 of [RFC2616] and Section 5 of [RFC4287].

OPDSカタログはHTTPを介して配信されるAtomドキュメントであり、[RFC2616]のセクション15と [RFC4287]のセクション5にあるSecurity Considerations(セキュリティについての考慮事項)の影響を受ける。

15.1. リンクされたリソース Linked Resources

OPDS Catalogs can contain XML External Entities as defined in Section 4.2.2 of [REC-xml]. OPDS Catalog implementations are not required to load external entities. External entities are subject to the same security concerns as any network operation and can alter the semantics of an OPDS Catalog Feed Document or OPDS Catalog Entry Document. The same issues exist for Resources linked to by elements such as atom:link and atom:content.

OPDSカタログ(OPDS Catalog)は[REC-xml]のセクション4.2.2で定義されているようにXML外部エンティティを格納することができる。OPDSカタログ(OPDS Catalog)の実装には外部エンティティの読み込みを要求されない。外部エンティティはどのネットワークで運用されていたとしても同じセキュリティ上の問題の影響を受け、OPDSカタログフィードドキュメント(OPDS Catalog Feed Document)またはOPDSカタログエントリドキュメント(OPDS Catalog Entry Document)のセマンティックスを変える可能性がある。同じ問題はatom:link要素や atom:content要素のような要素によってリンクされたリソース(Resource)にも存在する。

15.2. URIとIRI URIs and IRIs

OPDS Catalog implementations handle URIs and IRIs. See Section 7 of [RFC3986] and Section 8 of [RFC3987] for security considerations related to their handling and use.

OPDSカタログ(OPDS Catalog)の実装ではURIとIRIを処理する。URIとIRIの処理と使用に関連するSecurity Considerations(セキュリティについての考慮事項)については[RFC3986]のセクション7や[RFC3987]のセクション8を参照すること。

15.3. コードインジェクションとクロスサイトスクリプティング Code Injection and Cross Site Scripting

OPDS Catalogs can contain a broad range of content types including code that might be executable in some contexts. Malicious publishers could attempt to attack servers or other clients by injecting code into OPDS Catalog Feed Documents or OPDS Catalog Entry Documents or Media Resources.

Server implementations are strongly encouraged to verify that external content is safe prior to aggregating, processing, or publishing it. In the case of HTML, experience indicates that verification based on a white list of acceptable content is more effective than a black list of forbidden content.

Additional information about XHTML and HTML content safety can be found in Section 8.1 of [RFC4287].

OPDSカタログ(OPDS Catalog)はある状況で実行可能かもしれないコードを含む広い範囲のcontent typeを格納することができる。悪意のある出版者はOPDSカタログフィードドキュメント(OPDS Catalog Feed Document)、OPDSカタログエントリドキュメント(OPDS Catalog Entry Document)やメディアリソース(Media Resource)にコードを埋め込むことによりサーバーやその他のクライアントへの攻撃を試みることがありうる。

サーバーの実装には集約、処理、公開に先だって外部コンテンツが安全であることを検証することが強く推奨される。HTMLの場合、経験によれば禁止コンテンツのブラックリストより受け入れ可能なコンテンツのホワイトリストに基づく検証がより効果がある。

XHTMLとHTMLコンテンツの安全性についてにさらに詳細な情報は[RFC4287]のセクション8.1で見つけることができる。

16. Atom フォーマット Type パラメータ The Atom Format Type Parameter

The Atom Publishing Protocol [RFC5023] defines the Atom Format Type Parameter.

Publishers of OPDS Catalogs SHOULD use the “type” parameter to help clients distinguish between relations to OPDS Catalog Entries and OPDS Catalog Feeds.

The Atom Publishing Protocol [RFC5023]はAtomフォーマットTypeパラメータ(Atom Format Type Parameter)を定義する。

OPDSカタログ(OPDS Catalog)の出版者はクライアントがOPDSカタログエントリ(OPDS Catalog Entry)とOPDSカタログフィード(OPDS Catalog Feed)へのリレーションを区別することを助けるために“type”パラメータを使用するべきである(SHOULD)

17. OPDS カタログ Profile パラメータ The OPDS Catalog Profile Parameter

Relations to OPDS Catalog Feed Document and OPDS Catalog Entry Document Resources SHOULD use a “profile” parameter following Section 4.3 of [RFC4288] with the value “opds-catalog”. This profile parameter provides clients with an advisory hint that the Resource should be a component of an OPDS Catalog.

OPDSカタログフィードドキュメント(OPDS Catalog Feed Document)とOPDSカタログエントリドキュメントリソース(OPDS Catalog Entry Document Resource)へのリレーションには“opds-catalog”の値といっしょに[RFC4288]のセクション4.3に従って“profile”パラメータを使用するべきである(SHOULD)。このprofileパラメータはクライアントにリソース(Resource)がOPDSカタログ(OPDS Catalog)のコンポーネントであると助言的なヒントを提供する。

The complete media type for a relation to an OPDS Catalog Entry Document Resource SHOULD be:

OPDSカタログエントリドキュメントリソース(OPDS Catalog Entry Document Resource)へのリレーションに使用する完全なメディアタイプは以下のようにするべきである(SHOULD)

application/atom+xml;type=entry;profile=opds-catalog

The complete media type for a relation to an OPDS Catalog Feed Document Resource SHOULD be:

OPDSカタログフィードドキュメントリソース(OPDS Catalog Feed Document Resource)へのリレーションに使用する完全なメディアタイプは以下のようにするべきである(SHOULD)

application/atom+xml;profile=opds-catalog

18. OPDS Kind パラメータ The OPDS Kind Parameter

In addition to the new “profile” parameter, this specification also introduces a new "kind" parameter following Section 4.3 of [RFC4288] with the value "acquisition" or "navigation". This "kind" parameter provides clients with an advisory hint whether the Resource should be an Acquisition Feed or a Navigation Feed.

新しい“profile”パラメータに加え、本仕様は[RFC4288]のセクション4.3に従って新しい“kind”パラメータを“acquisition“または“navigation“という値といっしょに導入する。“kind”パラメータはクライアントにリソース(Resource)が取得フィード(Acquisition Feed)かナビゲーションフィード(Navigation Feed)かについて助言的なヒントを提供する。

The complete media type for a relation to an Acquisition Feed SHOULD be:

取得フィード(Acquisition Feed)へのリレーションに使用する完全なメディアタイプは以下のようにするべきである(SHOULD)

application/atom+xml;profile=opds-catalog;kind=acquisition

The complete media type for a relation to a Navigation Feed SHOULD be:

ナビゲーションフィード(Navigation Feed)へのリレーションに使用する完全なメディアタイプは以下のようにするべきである(SHOULD)

application/atom+xml;profile=opds-catalog;kind=navigation

19. リファレンス References

19.1. 引用規定 Normative References

  • [DCTERMS] DCMI Usage Board, "DCMI Metadata Terms", January 2008, http://dublincore.org/documents/dcmi-terms/.
  • [ISO4217] "ISO 4217 currency and funds name and code elements", International Standard ISO 4217, http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html.
  • [MIMEREG] Freed, N. and J. Klensin, "Media Type Specifications and Registration Procedures", BCP 13, RFC 4288, December 2005.
  • [OpenSearch] Clinton D., "Open Search 1.1 Draft 4", http://www.opensearch.org/Specifications/OpenSearch/1.1.
  • [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen?, C., and E. Maler, "Extensible Markup Language (XML) 1.0 (Fourth Edition)", World Wide Web Consortium Recommendation REC-xml-20060816, August 2006, http://www.w3.org/TR/2006/REC-xml-20060816.
  • [REC-xml-infoset] Cowan, J. and R. Tobin, "XML Information Set (Second Edition)", World Wide Web Consortium Recommendation REC-xml-infoset-20040204, February 2004, http://www.w3.org/TR/2004/REC-xml-infoset-20040204.
  • [REC-xml-names] Hollander, D., Bray, T., Tobin, R., and A. Layman, "Namespaces in XML 1.0 (Second Edition)", World Wide Web Consortium Recommendation REC-xml-names-20060816, August 2006, http://www.w3.org/TR/2006/REC-xml-names-20060816.
  • [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
  • [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC 2246, January 1999.
  • [RFC2397] Masinter, L., "The 'data' URL scheme", RFC 2397, August 1998.
  • [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol ? HTTP/1.1", RFC 2616, June 1999.
  • [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P., Luotonen, A., and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, June 1999.
  • [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
  • [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.
  • [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, January 2005.
  • [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication Format", RFC 4287, December 2005.
  • [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and Registration Procedures", RFC 4288, December 2005.
  • [RFC4685] Snell, J., "Atom Threading Extensions", RFC 4685, September 2006.
  • [RFC5005] Nottingham, M., "Feed Paging and Archiving", RFC 5005, September 2007.
  • [RFC5988] Nottingham, M., "Web Linking", RFC5988, October 2010.

19.2. 参考文献 Informative References

付録A.貢献者 Contributors

The content and concepts within this specification are a product of the openpub community.

本仕様の内容とコンセプトはopenpubコミュニティの成果である。

付録B RELAX NG Compact Schema RELAX NG Compact Schema

This appendix is informative.

The RELAX NG schema explicitly excludes elements in the OPDS Catalog namespace that are not defined in this revision of the specification. Requirements for Atom Protocol processors encountering such markup are given in Sections 6.2 and 6.3 of [RFC4287].

The Schema for OPDS Catalog Feed & Entry Documents:

本付録は参考(informative)である。

以下のRELAX NG schemaは本仕様のこの改訂で定義されていないOPDSカタログ(OPDS Catalog)の名前空間の要素を明示的に除外している。こうしたマークアップに遭遇したAtom Protocolの処理系の要件は、[RFC4287]のセクション6.2とセクション6.3にある。

OPDSカタログフィードドキュメント(OPDS Catalog Feed Document)とOPDSカタログエントリドキュメント(OPDS Catalog Entry Document)のスキーマは以下の通りである。

# -*- rnc -*-
# RELAX NG Compact Syntax Grammar for OPDS Catalog Feed & Entry Documents
# Version 2010-08-18
namespace atom = "http://www.w3.org/2005/Atom"
namespace opds = "http://opds-spec.org/2010/catalog"
namespace local = ""

# The OPDS Catalog spec extends Atom (RFC4287), and the additions require some
# patterns not used in the Atom schema. The first is atomUriExceptOPDS, which
# is used to describe an atomLink whose rel value is an atomNCName (no-colon
# name) or any URI other than these from OPDS Catalogs. In these cases, no
# opds:price element should appear.
atomUriExceptOPDS = string - ( string "http://opds-spec.org/acquisition/buy"
                             | string "http://opds-spec.org/acquisition/borrow"
                             | string "http://opds-spec.org/acquisition/subscribe"
                             | string "http://opds-spec.org/acquisition/sample" )

# Next is OPDSUrisExceptBuy, which is used to describe an atomLink whose
# rel value is from OPDS Catalogs but is not ".../acquisition/buy". In such
# cases, an opds:price element is optional.
OPDSUrisExceptBuy = string "http://opds-spec.org/acquisition/borrow"
                  | string "http://opds-spec.org/acquisition/subscribe"
                  | string "http://opds-spec.org/acquisition/sample"

# To simplify OPDS Catalog validation, we do not use Schematron to assert that
# any atom:link with a rel value of ".../acquisition/buy" must be accompanied
# by one or more opds:price elements.
# Instead we rely on Relax NG to describe one of three situations:
# - the rel value is ".../acquisition/buy" and at least one opds:price element
#   is required
# - the rel value is ".../acquisition/borrow" or ".../acquisition/subscribe" or
#   ".../acquisition/sample", in case opds:price elements may be
#   included; or
# - the value of the rel attribute is any other URI or an Atom-defined no-colon
#   name, and no opds:price element is permitted

# Note that this OPDS Catalog schema includes atom.rnc, so that schema must be
# present for validation.
#
# Note also that atom.rnc defines atomUri as text and not as xsd:anyURI, and so
# wherever the Atom spec requires an IRI, the schema will not check the value
# against any URI pattern or logic. The OPDS Catalog schema overrides atom.rnc
# to provide a relatively accurate test. With the approval of XSD 1.1, the
# schema definition should change to xsd:anyURI to match what the spec text
# says.
include "atom.rnc" {

undefinedAttribute =
  attribute * - (xml:base | xml:lang | local:*| opds:* ) { text }

  atomLink =
    element atom:link {
      atomCommonAttributes ,
      attribute href { atomUri },
      attribute type { atomMediaType }? ,
      attribute hreflang { atomLanguageTag }? ,
      attribute title { text }? ,
      attribute length { text }? ,
      ((attribute rel { "http://opds-spec.org/facet" }, (attribute
       opds:facetGroup { text }? & attribute opds:activeFacet { "true" }? ))
      |
      (attribute rel { "http://opds-spec.org/acquisition/buy" }, opdsPrice+ )
      |
      (attribute rel { OPDSUrisExceptBuy }, opdsPrice*)
      |
      (attribute rel { atomNCName | ( atomUriExceptOPDS ) } ))? ,
      (opdsIndirectAcquisition |
      anyOPDSForeignElement |
      text)*
    }

# Here is where OPDS Catalogs use John Cowan's pragmatic evaluation of an
# IRI. This modifies xsd:anyURI in XSD 1.0 to exclude ASCII characters not
# valid in 1.1 or IRI's without being escaped. This matches the OPDS and Atom
# specs, but not the non-normative atom.rnc.
  atomUri = xsd:anyURI - xsd:string {pattern = '.*[ <>{}|^`"\nrt].*'}

# Here we override Atom to account for HTML abuse in the summary element,
# restricting it in OPDS Catalog to text:
  atomSummary =
    element atom:summary {
      atomCommonAttributes,
      attribute type { "text" }?,
      text
    }
  } 

  anyOPDSForeignElement =
    element * - ( atom:* | opds:* ) {
      ( attribute * { text }
      | text
      | anyElement )*
    } 

# An opds:indirectAcquisition should use strictly MIME media type for
#its type attribute
  opdsIndirectAcquisition =
    element opds:indirectAcquisition {
      atomCommonAttributes,
      attribute type { atomMediaType },
      (  anyOPDSForeignElement |
        opdsIndirectAcquisition) *
    }

# An opds:price element should not contain a currency symbol; it is
# restricted to non-negative decimal numbers.
  opdsPrice =
    element opds:price {
      atomCommonAttributes,
      attribute currencycode { opdsPriceCurrencyCode },
      xsd:decimal { minInclusive="0.0" }
    }

# Instead of allowing every possible 3-letter or 3-digit combination as a
# currency code, here the permissible codes (as identified in ISO4217 as of
# 2010-08-25) are enumerated. In 2012 or so, that standard may add, remove or
# change some currency codes, thus requiring this schema to be updated. Note
# that codes for metals and funds are not included.
  opdsPriceCurrencyCode =  (
    "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" |
    "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYR" | "BZD" |
    "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" |
    "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EEK" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" |
    "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" |
    "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" |
    "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LVL" | "LYD" |
    "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" |
    "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" |
    "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" |
    "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" |
    "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "USS" | "UYI" | "UYU" | "UZS" |
    "VEF" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" |
    "XFU" | "XOF" | "XPD" | "XPF" | "XPT" | "XTS" | "XXX" | "YER" | "ZAR" | "ZMK" | "ZWL" | "008" | "012" |
    "032" | "036" | "044" | "048" | "050" | "051" | "052" | "060" | "064" | "068" | "072" | "084" | "090" |
    "096" | "104" | "108" | "116" | "124" | "132" | "136" | "144" | "152" | "156" | "170" | "174" | "188" |
    "191" | "192" | "203" | "208" | "214" | "222" | "230" | "232" | "233" | "238" | "242" | "262" | "270" |
    "292" | "320" | "324" | "328" | "332" | "340" | "344" | "348" | "352" | "356" | "360" | "364" | "368" |
    "376" | "388" | "392" | "398" | "400" | "404" | "408" | "410" | "414" | "417" | "418" | "422" | "426" |
    "428" | "430" | "434" | "440" | "446" | "454" | "458" | "462" | "478" | "480" | "484" | "496" | "498" |
    "504" | "512" | "516" | "524" | "532" | "533" | "548" | "554" | "558" | "566" | "578" | "586" | "590" |
    "598" | "600" | "604" | "608" | "634" | "643" | "646" | "654" | "678" | "682" | "690" | "694" | "702" |
    "704" | "706" | "710" | "748" | "752" | "756" | "760" | "764" | "776" | "780" | "784" | "788" | "800" |
    "807" | "818" | "826" | "834" | "840" | "858" | "860" | "882" | "886" | "894" | "901" | "931" | "932" |
    "934" | "936" | "937" | "938" | "940" | "941" | "943" | "944" | "946" | "947" | "948" | "949" | "950" |
    "951" | "952" | "953" | "955" | "956" | "957" | "958" | "959" | "960" | "961" | "962" | "963" | "964" |
    "968" | "969" | "970" | "971" | "972" | "973" | "974" | "975" | "976" | "977" | "978" | "979" | "980" |
    "981" | "984" | "985" | "986" | "990" | "997" | "998" | "999"
  )

This schema is also maintained in version control: http://openpub.googlecode.com/svn/trunk/schemas/opds_catalog.rnc

このスキーマは以下でもバージョンの管理が維持されている。
http://openpub.googlecode.com/svn/trunk/schemas/opds_catalog.rnc