Extending Atom: Thoughts on OPDS #2

First of all, Roger Sperberg wrote an excellent comment about the current OPDS draft:

With blogging, the Atom feed entry ought to include either a content child — containing the full blog post or a link to it (and the link relationship identified as ‘alternate’) — or a summary child whose content is an extract, abstract or short summary of one of the three types above.

If OPDS is a catalog of books, then there’s a mismatch between the blog model and the catalog model. The content in the catalog is material about a book, and the feed therefore ought to have the full material in content or a summary of it. A link child of contentshould take the feed’s consumer to that “full material.”

So maybe the catalog copy shouldn’t be likened to blog posts.

Then content could contain a link to the epub, and the catalog description would go into summary. Of course, the full descriptions in the catalog might be too long to use as intended in this type of feed.

In that case, just create a new type of relationship link, as was done in the examples for cover image and thumbnail, that describes whether this longer content is a synopsis, review or just longer description.

I agree with most of this comment. It makes more sense to use content for the EPUB file and summary for the description. We should also extend Atom rather than describe everything in XHTML: using DublinCore to describe the language, copyright status, publication date and other metadata.

Partial entry/Full entry

The current draft is full of new rel values, a design choice that we should avoid as much as possible (most of the time, a type and a rel value registered at the IANA link registry would be enough).

To support entries with longer content, as recommended by Roger Sperberg, we don’t need a new relationship link. In AtomPub:

Clients MUST NOT assume that an Atom Entry returned in the Feed is a full representation of an Entry Resource and SHOULD perform a GET on the URI of the Member Entry before editing it.

In the same RFC5023 for AtomPub, the “type” parameter was defined:

This specification defines a new “type” parameter for use with the “application/atom+xml” media type. The “type” parameter has a value of “entry” or “feed”.
Neither the parameter name nor its value are case sensitive.
The value “entry” indicates that the media type identifies an Atom Entry Document. The root element of the document MUST be atom:entry.
The value “feed” indicates that the media type identifies an Atom Feed Document. The root element of the document MUST be atom:feed.
If not specified, the type is assumed to be unspecified, requiring Atom processors to examine the root element to determine the type of Atom document.

Thanks to this type parameter, it’s fairly easy to point from a partial entry to a full entry using a link@rel="alternate"

<link rel="alternate" type="application/atom+xml;type=entry" href="..." />

For sources with a RDF document available (such as O’Reilly, and Feedbooks in the upcoming weeks), the same link@rel="alternate" could be used with application/rdf+xml.

Controlled vocabularies

The publication metadata required and allowed in OPF, should have the same status in OPDS.

Once the goals for OPDS are clearly defined (oops), we might extend this.

Any provider should be allowed to use additional extensions in their full entries.

Relationship to AtomPub

To allow such things as comments/reviews, OPDS could also support AtomPub.  With both the Atom Threading Extension and the current work on Collection Discovery, it should be fairly simple to support.

Tags: , ,

5 Responses to “Extending Atom: Thoughts on OPDS #2”

  1. Keith Fahlgren says:

    While it’s attractive to consider putting the EPUB content for a title inside the atom:content, my own thinking was that OPDS catalogs would be a mechanism to distribute and discover available titles and how to get/purchase them. The atom:content would include machine-readable metadata about this particular producer’s ability to serve a customer with the title. An O’Reilly-centric example:

    atom:title The Twitter Book
    atom:summary Twitter is teh bestest…
    atom:link rel=”http…buy-this” https://epoch.oreilly.com/shop/cart.orm?prod=9780596804107.EBOOK
    opds:pay-with “VISA”
    other:price $15.99 USD
    dc:format application/epub+zip

    A digital book search engine finds this entry and indexes it. When someone searches for Twitter + format:EPUB + price:<20, they see that they could purchase it by clicking “BUY NOW FROM {X}!”.

    This is similar, in some ways, to how kayak.com works… (hat tip to Andrew Savikas for making that connection)

  2. Hadrien says:

    I also believe that one of the goals for OPDS should be to distribute/buy e-books, and this process shouldn’t be limited to redirecting the user to a website, but also make it possible to integrate this process into any application (a la AppStore).

    I don’t think that using atom:link with no MIME type + dc:format is a very good idea though (in your example), it makes much more sense to use a unique link@type=”application/epub+zip”.

    Not sure what you mean when you say “atom:content would include machine-readable metadata”, why would you do such a thing when you can use Atom extensions to express metadata ?

  3. Keith Fahlgren says:

    Sorry, I was being overly hasty in writing up my description. My key point was that the OPDS should not put the title’s content in atom:content. Instead, put something else in the atom:content and give a link (or set of links) where a client might find the content (perhaps after a purchasing process).

  4. Hadrien says:

    If I remember things correctly, you’re not required to have an atom:content if you have an atom:summary.
    In this case, when a payment is involved, the reading system could point out to the right place through a link@rel=”payment” (as defined in the IANA link registry).
    If the book doesn’t require payment though, it could be directly linked in either atom:content or a link@type=”application/epub+zip”.

  5. Hadrien says:

    By the way: we’ve already implemented the partial/full entry model at Feedbooks.
    For example, books from Paulo Coelho (collection feed): http://www.feedbooks.com/author/1055/books.atom
    And the first book in this collection (full entry): http://www.feedbooks.com/book/3889.atom

Leave a Reply