Status of this Document

This document specifies version 0.9 the OPDS Catalog specification. Distribution of this document is unlimited.

Published: 25 May 2010

This version
https://specs.opds.io/opds-0.9.html
Latest version
https://specs.opds.io/opds-1.2

License

This document is licensed under 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.

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:

An OPDS Catalog is a set of one or more Atom Feeds, which are themselves list 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 Atom Entries may have a more extensive, standalone representation outside of the version included in the Acquisition Feed at a unique URI.

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

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.

4. RELAX NG Schema

Some sections of this specification are illustrated with fragments of a non-normative RELAX NG Compact schema RNC. However, the text of this specification provides the definition of conformance. Complete schemas appear in Appendix B.

5. Terminology

The following terminology is used by this specification:

Acquisition Feed
An Atom Feed whose Atom Entries are exclusively OPDS Catalog Entries.
Acquisition Link
An atom:link element with a relation that begins with "http://opds-spec.org/acquisition" and refers to the Resource which holds the content of the described Publication or the Resource through which it may be acquired for any OPDS Catalog Entry. See Sections 8.4.1. Acquisition Relations and 9. Acquiring Publications. They are serialized as OPDS Catalog Feed Documents.
Complete Catalog Entry
An OPDS Catalog Entry that includes all known metadata about the described Publication and is referenced by a Partial Catalog Entry.
IRI
An Internationalized Resource Identifier as defined in RFC3987.
Navigation Feed
An Atom Feed whose Atom Entries are not OPDS Catalog Entries but instead link to other Navigation Feeds, Acquisition Feeds, or other Resources to establish a hierarchical, browseable presentation of the OPDS Catalog. They are serialized as OPDS Catalog Feed Documents.
OPDS Catalog
All of the Atom Feeds (Acquisition and Navigation) and Entries (Partial and Complete) following this specification published together to describe a consolidated group of available Publications.
OPDS Catalog Entry
An Atom Entry that provides a representation of an available Publication and includes an Acquisition Link. They are serialized as OPDS Catalog Entry Documents.
OPDS Catalog Entry Document
The formal name for the XML documents that are the a refinement of an "atom:entry" from the Atom Syndication Format RFC4287 that this specification defines.
OPDS Catalog Feed Document
The formal name for XML documents that are the refinement of an "atom:feed" from the Atom Syndication Format RFC4287 that this specification defines.
OPDS Catalog Root
The Atom Feed that represents either the complete OPDS Catalog (a single Acquisition Feed) or the Atom Feed that starts a set of Navigation Feeds. External links to the OPDS Catalog SHOULD reference the OPDS Catalog Root Resource.
Partial Catalog Entry
An OPDS Catalog Entry that includes the minimal required metadata about the described Publication but no other metadata and links to the Complete Catalog Entry.
Publication
An electronic document, typically available as a single file. OPDS Catalogs are agnostic about the particular format of Publications.
relation (or "relation of")
Refers to the "rel" attribute value of an atom:link element.
Representation
An entity included with a request or response as defined in RFC2616.
Resource
A network-accessible data object or service identified by an IRI, as defined in RFC2616. See REC-webarch for further discussion on Resources.
URI
A Uniform Resource Identifier as defined in RFC3986. In this specification, the phrase "the URI of a document" is shorthand for "a URI which, when dereferenced, is expected to produce that document as a representation".

5.1. Acquisition Types

Additional terminology describes the acquisition scenario for a particular Publication:

  • "Direct Acquisition" - The Acquisition Link will return the actual bytes of the Publication when dereferenced, either directly or via HTTP redirection.
  • "Indirect Acquisition" - The Acquisition Link will lead to one or more intermediate Resources with media types that MAY differ from the Publication before the Publication is able to be acquired.

The most typical Indirect Acquisition scenario is an Acquisition Link to an (X)HTML page which prompts a user for authentication and/or payment. When the transaction is satisfactorily completed, the Publication's bytes are eventually returned.

For more on acquisition, see Section 9. Acquiring Publications.

6. Document Types

This specification defines two kinds of documents -- OPDS Catalog Feed Documents and OPDS Catalog Entry Documents.

An OPDS Catalog Feed Document is a refinement of an "atom:feed" from the Atom Syndication Format RFC4287.

An OPDS Catalog Entry Document is a refinement of an "atom:entry" from the Atom Syndication Format RFC4287.

The namespace name REC-xml-names for elements defined in this specification and used in OPDS Catalog Feed Documents and OPDS Catalog Entry Documents is:

http://opds-spec.org/2010/catalog

OPDS Catalog Feed Documents and OPDS Catalog Entry Documents MUST be "namespace-well-formed" as specified in Section 7 of REC-xml-names.

This specification uses the prefix "opds:" for the namespace name. The prefix "atom:" is used for "http://www.w3.org/2005/Atom ", the namespace name of the Atom Syndication Format RFC4287. The prefix "dc:" is used for"http://purl.org/dc/terms/", the namespace name of Dublin Core Metadata Initiative (DCMI) Metadata Terms DCTERMS. These namespace prefixes are not semantically significant.

Producers of OPDS Catalogs SHOULD produce OPDS Catalog Feed Documents and OPDS Catalog Entry Documents that are conformant to both Atom and the OPDS Catalog RELAX NG schemas.

6.1. Document Extensibility

Unrecognized markup in any Atom Feed or Atom Entry in an OPDS Catalog is considered "foreign markup" as defined in Section 6 of the Atom Syndication Format RFC4287. Foreign markup can be used anywhere within an OPDS Catalog unless it is explicitly forbidden. Processors that encounter foreign markup MUST NOT stop processing and MUST NOT signal an error. Clients SHOULD preserve foreign markup when transmitting or aggregating such documents.

The namespace name "http://opds-spec.org/2010/catalog" is reserved for forward-compatible revisions of the OPDS Catalog format. This does not exclude the addition of elements and attributes that might not be recognized by processors conformant to this specification. Such unrecognized markup from the "http://opds-spec.org/2010/catalog" namespace MUST be treated as foreign markup.

7. OPDS Catalog Feed Documents

OPDS Catalog Feed Documents are Atom RFC4287 Feeds. They serve two purposes:

While Navigation Feeds do provide a suggested hierarchy from the OPDS Catalog publisher, OPDS Catalog Feed Documents MAY contain other relations that allow for other methods of consumption and display.

Every OPDS Catalog Feed Document MUST either be an Acquisition Feed or a Navigation Feed. An Acquisition Feed can be identified by the presence of Acquisition Links in each Atom Entry.

7.1. OPDS Catalog Root

The OPDS Catalog Root is the top-level OPDS Catalog Feed Document. It is either a single Acquisition Feed in the simple case or the start of a set of Navigation Feeds. Every OPDS Catalog MUST have one and only one OPDS Catalog Root.

External links to the OPDS Catalog Resource SHOULD use the IRI of the OPDS Catalog Root.

Each OPDS Catalog Feed Document SHOULD contain an atom:link element with a link relation of "start", which references the OPDS Catalog Root Resource.

7.3. Acquisition Feeds

An Acquisition Feed is an OPDS Catalog Feed Document that collects OPDS Catalog Entries into a single, ordered set. The simplest complete OPDS Catalog would be a single Acquisition Feed listing all of the available OPDS Catalog Entries from that provider. In more complex OPDS Catalogs, Acquisition Feeds are used to present and organize sets of related OPDS Catalog Entries for browsing and discovery by clients and aggregators.

Links to Acquisition Feeds SHOULD use the type attribute "application/atom+xml;type=feed;profile=opds-catalog".

For further details on limiting the size of Acquisition Feeds through pagination, Partial Catalog Entries, and compression, see Section 10.1. Listing Acquisition Feeds.

7.4. OPDS Catalog Relations

OPDS Catalog Feed Documents SHOULD include links to other available Acquisition and Navigation Feeds and other related Resources to encourage independent navigation. This specification defines six new relations for linking from OPDS Catalog Feed Documents at the atom:feed level:

The following relations are derived from DRAFT-Web-Linking, with some clarification:

  • "alternate": This OPDS Catalog in another format.
  • "first": The initial page in a paginated Acquisition Feed.
  • "help": A Resource that describes how the OPDS Catalog or Publications may be used.
  • "last": The final page in a paginated Acquisition Feed.
  • "license": The license under which this OPDS Catalog is released.
  • "next": The following page in a paginated Acquisition Feed.
  • "previous": The previous page in a paginated Acquisition Feed.
  • "related": A related or suggested Acquisition Feed. An example would be a "related" link from the newest releases in a category to the most popular in a category.
  • "self": This Atom Feed.
  • "start": The OPDS Catalog Root.
  • "subsection": A Navigation Feed not better described by a more specific relation.
  • "up": The parent Navigation Feed of this Navigation Feed.

7.6. Feed Examples

An OPDS Catalog Root that is the top of a set of Navigation Feeds references three Acquisition Feeds using atom:links:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>urn:uuid:2853dacf-ed79-42f5-8e8a-a7bb3d1ae6a2</id>
  <link rel="self"  
        href="/opds-catalogs/root.xml" 
        type="application/atom+xml;type=feed;profile=opds-catalog"/>
  <link rel="start" 
        href="/opds-catalogs/root.xml" 
        type="application/atom+xml;type=feed;profile=opds-catalog"/>
  <title>OPDS Catalog Root Example</title>
  <updated>2010-01-10T10:03:10Z</updated>
  <author>
    <name>Spec Writer</name>
    <uri>http://opds-spec.org</uri>
  </author>

  <entry>
    <title>Popular Publications</title>
    <link type="application/atom+xml;type=feed;profile=opds-catalog" 
          rel="http://opds-spec.org/sort/popular" 
          href="/opds-catalogs/popular.xml"/>
    <updated>2010-01-10T10:01:01Z</updated>
    <id>urn:uuid:d49e8018-a0e0-499e-9423-7c175fa0c56e</id>
    <content type="text">Popular publications from this catalog based on downloads.</content>
  </entry>
  <entry>
    <title>New Publications</title>
    <link 
          type="application/atom+xml;type=feed;profile=opds-catalog" 
          rel="http://opds-spec.org/sort/new" 
          href="/opds-catalogs/new.xml"/>
    <updated>2010-01-10T10:02:00Z</updated>
    <id>urn:uuid:d49e8018-a0e0-499e-9423-7c175fa0c56c</id>
    <content type="text">Recent publications from this catalog.</content>
  </entry>
  <entry>
    <title>Unpopular Publications</title>
    <link type="application/atom+xml;type=feed;profile=opds-catalog" 
          rel="subsection" 
          href="/opds-catalogs/unpopular.xml"/>
    <updated>2010-01-10T10:01:00Z</updated>
    <id>urn:uuid:d49e8018-a0e0-499e-9423-7c175fa0c56d</id>
    <content type="text">Publications that could use some love.</content>
  </entry>
</feed>

An Acquisition Feed listing OPDS Catalog Entries from the "Unpopular Publications" Entry in the Navigation Feed above:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:dc="http://purl.org/dc/terms/"
      xmlns:opds="http://opds-spec.org/2010/catalog">
  <id>urn:uuid:433a5d6a-0b8c-4933-af65-4ca4f02763eb</id>

  <link rel="related" 
        href="/opds-catalogs/vampire.farming.xml" 
        type="application/atom+xml;type=feed;profile=opds-catalog"/>
  <link rel="self"    
        href="/opds-catalogs/unpopular.xml"       
        type="application/atom+xml;type=feed;profile=opds-catalog"/>
  <link rel="start"   
        href="/opds-catalogs/root.xml"            
        type="application/atom+xml;type=feed;profile=opds-catalog"/>
  <link rel="up"      
        href="/opds-catalogs/root.xml"            
        type="application/atom+xml;type=feed;profile=opds-catalog"/>

  <title>Unpopular Publications</title>
  <updated>2010-01-10T10:01:11Z</updated>
  <author>
    <name>Spec Writer</name>
    <uri>http://opds-spec.org</uri>
  </author>

  <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>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 type="image/png" 
          rel="http://opds-spec.org/cover"     
          href="/covers/4561.lrg.png"/>
    <link type="image/gif" 
          rel="http://opds-spec.org/thumbnail" 
          href="/covers/4561.thmb.gif"/>

    <link type="application/atom+xml;type=entry;profile=opds-catalog" 
          rel="alternate"
          href="/opds-catalogs/entries/4571.complete.xml"
          title="Complete Catalog Entry for Bob, Son of Bob"/>

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

 <entry>
    <title>Modern Online Philately</title>
    <id>urn:uuid:7b595b0c-e15c-4755-bf9a-b7019f5c1dab</id>
    <author>
      <name>Stampy McGee</name>
      <uri>http://opds-spec.org/authors/21285</uri>
    </author>
    <author>
      <name>Alice McGee</name>
      <uri>http://opds-spec.org/authors/21284</uri>
    </author>
    <author>
      <name>Harold McGee</name>
      <uri>http://opds-spec.org/authors/21283</uri>
    </author>
    <updated>2010-01-10T10:01:10Z</updated>
    <rights>Copyright (c) 2009, Stampy McGee</rights>
    <dc:identifier>urn:isbn:978029536341X</dc:identifier>
    <dc:publisher>StampMeOnline, Inc.</dc:publisher>
    <dc:language>en</dc:language>
    <dc:issued>2009-10-01</dc:issued>
    <content type="text">The definitive reference for the web-curious philatelist.</content>
    <link type="image/jpeg" 
          rel="http://opds-spec.org/cover" 
          href="/covers/11241.lrg.jpg"/>

    <link type="text/html"           
          rel="http://opds-spec.org/acquisition/buy" 
          href="/content/buy/11241.epub">
      <dc:format>application/epub+zip</dc:format>
      <opds:price currencycode="USD">18.99</opds:price>
    </link>
 </entry>
</feed>

7.7. Element Definitions

7.7.1. The "atom:feed" Element

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

The following child elements are refined by this specification:

  • OPDS Catalog Feed Documents SHOULD contain one atom:link element with a rel attribute value of "self". This is the preferred URI for retrieving the atom:feed representing this OPDS Catalog Feed Document.

8. 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 Publication described by the OPDS Catalog Entry in a particular media type. Acquisition Links use one of the relations described in the Section 8.4.1. Acquisition Relations.

8.1. 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:rights
  • dc:extent
  • dc:identifier
  • dc:issued
  • dc:language
  • dc:publisher
  • 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.

8.2. 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. 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 inlcude 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."

8.3. Summary and Content

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. The content of an "atom:summary" element MUST be text and SHOULD NOT duplicate the content of "atom:title" or "atom:content".

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.

8.4. Entry Relations

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

The following relations are derived from DRAFT-Web-Linking, with some clarification:

  • "alternate": Identifies a Resource that describes this Publication in another format.
  • "copyright": Refers to a copyright statement that applies to this OPDS Catalog Entry.
  • "latest-version": Refers to a more recent version of the Publication described by this OPDS Catalog Entry.
  • "license": Refers to a license associated with this OPDS Catalog Entry.
  • "related": Refers to a similar OPDS Catalog Entry.
  • "replies ": Refers to a comment on or discussion of this OPDS Catalog Entry.

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 five acquisition relations, which all begin with "http://opds-spec.org/acquisition":

8.4.2. Covers and 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 cover or other distinguishing artwork. These atom:links MUST use one of the following relations for these images:

More than one atom:link with either relation SHOULD NOT be provided for a single OPDS Catalog Entry.

The maximum size of the longest dimension of http://opds-spec.org/thumbnail images SHOULD be 120 pixels.

The atom:links with these relations MUST include a type attribute of "image/gif", "image/jpeg", or "image/png" and the image Resources MUST be in GIF, JPEG, or PNG 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/thumbnail image Resources using the "data" URL scheme from RFC2397. OPDS Catalog clients SHOULD support the "data" URL scheme if they support Covers and Artwork relations.

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 using Direct Acquisition:

  <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>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 type="image/png" 
          rel="http://opds-spec.org/cover"     
          href="/covers/4561.lrg.png"/>
    <link type="image/gif" 
          rel="http://opds-spec.org/thumbnail" 
          href="/covers/4561.thmb.gif"/>

    <link type="application/atom+xml;type=entry;profile=opds-catalog" 
          rel="alternate"
          href="/opds-catalogs/entries/4571.complete.xml"
          title="Complete Catalog Entry for Bob, Son of Bob"/>

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

The Complete Catalog Entry for the same Publication:

  <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>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 type="image/png" 
          rel="http://opds-spec.org/cover"     
          href="/covers/4561.lrg.png"/>
    <link type="image/gif" 
          rel="http://opds-spec.org/thumbnail" 
          href="/covers/4561.thmb.gif"/>

    <link type="application/atom+xml;type=entry;profile=opds-catalog" 
          rel="self"
          href="/opds-catalogs/entries/4571.complete.xml"/>

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

A Complete Catalog Entry with a complex, paid, Indirect Acquisition, where three formats are available for a single price:

  <entry> 
    <title>Personal Investing: The Missing Manual</title> 
    <id>http://apps.oreilly.com/opds/product/9781449381806.EBOOK</id> 
    <updated>2010-05-20T13:17:29</updated>
    <dc:identifier>urn:isbn:9781449381806</dc:identifier>
    <dc:publisher>O'Reilly Media</dc:publisher>
    <dc:issued>2010-05-12</dc:issued>
    <author> 
      <name>Bonnie Biafore</name> 
    </author> 
    <author> 
      <name>Amy E. Buttell</name> 
    </author> 
    <author> 
      <name>Carol Fabbri</name> 
    </author> 
    <link type="text/html" 
          rel="alternate" 
          href="http://oreilly.com/catalog/0636920001386"/>
    <link type="text/html" 
          rel="http://opds-spec.org/acquisition/buy"
          href="/product/9781449381806.EBOOK/buy">
      <dc:format>application/pdf</dc:format> 
      <dc:format>application/x-mobipocket-ebook</dc:format> 
      <dc:format>application/epub+zip</dc:format> 
      <opds:price currencycode="USD">17.99</opds:price> 
    </link> 
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Did your personal investments take a hit in the recession? It's time to take control of your funds 
          with <em>Personal Investing: The Missing Manual</em>. This lively and easy-to-understand guide provides 
          the confidence, tools, and insight you need to evaluate and invest in financial products that target 
          success over the long term. You'll learn how to set goals and research the types of investments -- 
          mutual funds, stocks, bonds, and other financial products -- that can best help you achieve them.</p>
      </div>
    </content>

    <link href="http://covers.oreilly.com/images/0636920001386/bkt.gif" 
          type="image/gif" 
          rel="http://opds-spec.org/thumbnail" /> 
    <link href="http://covers.oreilly.com/images/0636920001386/cat.gif" 
          type="image/gif" 
          rel="http://opds-spec.org/cover" /> 
  </entry> 

8.6. Element Definitions

8.6.1. 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".

8.6.3. The "opds:price" Element

The "opds:price" element represents the acquisition price 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.

opdsPrice = 
  element opds:price {
    attribute currencycode xsd:string { pattern = "[A-Z]{3,3}" },
    text
  }

8.6.3.1. The "currencycode" Attribute

On the opds:price element, the value of the "currencycode" attribute MUST be an "Alphabetic code" from ISO4217. It defines the currency code used for the content of the opds:price element.

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.

If the Publication is available using Direct Acquisition, the type attribute of the Acquisition Link MUST represent the media type of the Publication Resource itself. These Acquisition Link elements MAY contain a "dc:format" element, but in this scenario it is optional. For Acquisition Links using Direct Acquisition, the dc:format element MUST contain the same content value as the type parameter of its parent.

If the Publication is available using Indirect Acquisition, the type attribute of the Acquisition Link SHOULD represent the media type of the first Resource a client must dereference to begin the acquisition. These Acquisition Link elements MUST contain one or more "dc:format" elements which describe the media type(s) of the Publication Resource(s) that will be available following a successful acquisition. This scenario may require human interaction to complete.

Publications in a format using Digital Rights Management SHOULD use a different value for the type attribute or dc:format child 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 and dc:format children of Acquisition Links to support both Direct and Indirect Acquisition. Support for Indirect Acquisition is OPTIONAL.

9.1. Acquisition Examples

The simplest case is a Publication available by Direct Acquisition in one format:

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

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

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

If the Publication is available using Indirect Acquisition, a dc:format element is required:

  <link type="text/html" 
        rel="http://opds-spec.org/acquisition/sample"
        href="/product/9781449381806.EBOOK/sample">
    <dc:format>application/pdf</dc:format> 
    <dc:format>application/x-mobipocket-ebook</dc:format> 
    <dc:format>application/epub+zip</dc:format> 
  </link> 

If the Publication is requires payment, an opds:price element is required:

  <link type="text/html" 
        rel="http://opds-spec.org/acquisition/buy"
        href="/product/9781449381806.EBOOK/buy">
    <dc:format>application/pdf</dc:format> 
    <dc:format>application/x-mobipocket-ebook</dc:format> 
    <dc:format>application/epub+zip</dc:format> 
    <opds:price currencycode="USD">17.99</opds:price> 
  </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 8.1. Partial and Complete Catalog Entries.

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 a single, unpaged atom:feed to faciliate crawling and aggregation. 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 the 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. 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.

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

12. 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;type=feed;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:

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

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

Auto-discovery links MAY also be expressed using HTTP headers as defined in DRAFT-Web-Linking.

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

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

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.

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.

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

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.

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

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

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

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

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

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

18. References

18.1. Normative References

  • DRAFT-Web-Linking Nottingham, M., "Web Linking", draft-nottingham-http-link-header-10, May 2010, http://tools.ietf.org/html/draft-nottingham-http-link-header.
  • 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 L. Masinter, "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.
  • RFC3187 J. Hakala, J. and H. Walravens, "Using International Standard Book Numbers as Uniform Resource Names", RFC 3187, October 2001.
  • 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.
  • RFC5005 Nottingham, M., "Feed Paging and Archiving", RFC 5005, September 2007.
  • RFC5012 Gregorio, J. and B. de hOra, "The Atom Publishing Protocol", RFC 5023, October 2007.

18.2. Informative References

Appendix A. Contributors

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

Appendix B. RELAX NG Compact Schema

This appendix is normative.

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.

TODO

The Schema for OPDS Catalog Feed Documents:

# -*- rnc -*- # RELAX NG Compact Syntax Grammar for OPDS Catalog Feed Documents:

http://openpub.googlecode.com/svn/trunk/schemas/opds_catalog_feed.rnc

The Schema for OPDS Catalog Entry Documents:

# -*- rnc -*- # RELAX NG Compact Syntax Grammar for OPDS Catalog Entry Documents:

http://openpub.googlecode.com/svn/trunk/schemas/opds_catalog_entry.rnc