Internet Archive News

updates about

Understanding Acquisition Links

OPDS is all about links: that’s how we define where a user can browse, search and acquire publications.

Every publication available in an OPDS catalog is required to have at least one acquisition link with:

  • a rel attribute, which indicates the type of acquisition that a client can expect
  • a type attribute, which indicates the format of the publication

The following rel values are available:

In the spec we offer the following example:

<link rel="" 

If the same publication is available in multiple formats as unique resources, they would simply be listed using multiple acquisition links in the same entry:

<link rel="" 
<link rel="" 

Price element

If the publication requires payment, at least one opds:price element is required, where the value is the price and the currencycode attribute indicates the currency:

<link rel=""
  <opds:price currencycode="USD">1.99</opds:price> 

The price element can only be used with the following rel values:

Indirect Acquisition

In certain cases, the acquisition link doesn’t point directly to the publication.

This could be the case for example with a bundle, where a zip file is distributed with the same publication available in different formats inside.

In this case, an opds:indirectAcquisition element is required, where the type attribute is the media type:

<link type="application/zip" rel="" href="/item/1111/buy/">
  <opds:indirectAcquisition type="application/epub+zip" />
  <opds:indirectAcquisition type="application/pdf" />
  <opds:indirectAcquisition type="application/x-mobipocket-ebook" />

This could also be the case of a DRM format, such as ACS4 for EPUB & PDF, where the client acquires the final publication through an ACSM file:

<link type="application/vnd.adobe.adept+xml" rel="" href="/item/4141/buy">
  <opds:price currencycode="USD">4.29</opds:price>
  <opds:indirectAcquisition type="application/epub+zip" />

Aside from container formats, indirect acquisition is also widely used to handle a transaction in the browser. In this case, the atom:link points to a webpage, while the opds:indirectAcquisition element indicates the format that the client can expect to acquire at the end of the transaction:

<link type="text/html" rel="" href="/item/4141/buy">
  <opds:price currencycode="USD">4.29</opds:price>
  <opds:indirectAcquisition type="application/vnd.adobe.adept+xml">
    <opds:indirectAcquisition type="application/epub+zip" />

Filtering publications

OPDS clients can filter publications based on these acquisition links and opds:indirectAcquisition elements and decide to display only a subset or even none of the publications if they consider that they can’t open them or deal with the workflow described.

Originally posted on The OPDS blog by Hadrien Gardeur.

Written by internetarchive

June 19, 2011 at 6:05 pm

Posted in OPDS

%d bloggers like this: