Query Responses

Queries return a Atom feed or an Atom entry.

XML Namespaces

XML namespaces being assumed as part of the OCLC Data Protocol

  1. xmlns:atom="http://www.w3.org/2005/Atom"
  2. xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
  3. xmlns:gd="http://schemas.google.com/g/2005"

Representing collections of resources as Atom feeds

Collections contain many resources entries and are represented as Atom feeds. Each entry in the Atom feed represents a resource that matches the request's query.

Atom feed elements

Feed Schema Item Atom Representation
Feed ID /feed/id
Feed Title /feed/title
Feed Link /feed/link[[]@rel="alternate"][[]@type="text/html"]/@href
Feed Description /feed/subtitle
Feed Copyright /feed/rights
Feed Author
  • /feed/author/name
  • /feed/author/email
  • /feed/entry/author/uri
  • (Required in certain cases; see Atom specification.)
Feed Last Update Date
Feed Category /feed/category/@term
Feed Category Scheme /feed/category/@scheme
Feed Generator
  • /feed/generator
  • /feed/generator/@uri
Feed Contributor
  • /feed/entry/contributor/name
  • /feed/entry/contributor/email
  • /feed/entry/contributor/uri
  • Required in certain cases; see Atom specification.
Feed Icon /feed/icon
Feed Logo /feed/logo

OpenSearch elements:

OpenSearch Element Atom Representation Description
opensearch:totalResults /feed/opensearch:totalResults Total number of search results for the query (not necessarily all present in results feed).
opensearch:startIndex /feed/opensearch:startIndex The 1-based index of the first result.
opensearch:itemsPerPage /feed/opensearch:itemsPerPage The maximum number of items that appear in one page. This allows clients to generate direct links to subsequent pages.

Google elements

OCLC Feed Attribute Description
gd:etag Attribute defined using the Google GData namespace whose value is an Etag associated with the entry. This ETag is used for caching and handling concurrent updates.

Sample Atom feed response

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:os="http://a9.com/-/spec/opensearch/1.1/" 
      xmlns:gd="http://schemas.google.com/g/2005" 
      gd:etag='"98a81b5448280a50618d9b4191e14915"'>
  <id>info:circulation/item/searchResults</id>
  <title type="text">WMS Circulation Item Service Search Results</title>
  <updated>1970-01-01T00:00:00.000Z</updated>  
  <os:totalResults>2</os:totalResults>
  <os:startIndex>1</os:startIndex>
  <os:itemsPerPage>2</os:itemsPerPage>
  <entry gd:etag='"20110113190556000"'>
    <title type="text">Java in a nutshell : a desktop quick reference /</title>
    <id>49044523</id>
    <link />
    <author>
      <name>Flanagan, David.</name>
    </author>
    <published>2006-03-08T00:00:00.000Z</published>
    <updated>2011-01-13T19:05:56.000Z</updated>
    <content type="application/xml">
      <item xmlns="http://schemas.oclc.org/item-1.0">
        <addedDate>2006-03-08T00:00:00Z</addedDate>
        <publicationDate>2002</publicationDate>
        <keyword>Java (Computer program language);Web servers.;Object-oriented programming (Computer science);
        Java (Lenguaje de programacioÃÅn);ProgramacioÃÅn orientada a objetos (Computadoras);Java (programmeertaal);</keyword>
        <title>Java in a nutshell : a desktop quick reference /</title>
        <author>Flanagan, David.</author>
        <circulationStatus>AVAILABLE</circulationStatus>
        <lastCheckinDate>2011-01-13T19:05:56Z</lastCheckinDate>
        <callNumber>test1 24324 4433</callNumber>
        <itemId>00480bf5-5d4b-4ee7-ae05-defff886a22c</itemId>
        <oclcNumber>49044523</oclcNumber>
        <institutionId>1</institutionId>
        <location>
          <holdingLocation>NORT</holdingLocation>
          <shelvingLocation>NORT Periodicals test</shelvingLocation>
        </location>
        <materialFormat>Book</materialFormat>
      </item>
    </content>
  </entry>
  <entry gd:etag='"20110824140616131"'>
    <title type="text">Web analytics : an hour a day /</title>
    <id>144566695</id>
    <link />
    <author>
      <name>Kaushik, Avinash.</name>
    </author>
    <published>2008-03-27T00:00:00.000Z</published>
    <updated>2011-08-24T14:06:16.131Z</updated>
    <content type="application/xml">
      <item xmlns="http://schemas.oclc.org/item-1.0">
        <addedDate>2008-03-27T00:00:00Z</addedDate>
        <publicationDate>2007</publicationDate>
        <keyword>Web usage mining.;Internet users;Internet marketing.;Web site development.;Internet searching.;
        Analyse du comportement des internautes (Informatique);Internautes;Marketing sur Internet.;Sites Web;</keyword>
        <title>Web analytics : an hour a day /</title>
        <author>Kaushik, Avinash.</author>
        <circulationStatus>AVAILABLE</circulationStatus>
        <callNumber>111 111</callNumber>
        <itemId>6a8f526d-4fa6-4eaa-8236-4ac49febf311</itemId>
        <oclcNumber>144566695</oclcNumber>
        <institutionId>1</institutionId>
        <location>
          <holdingLocation>WAUA</holdingLocation>
          <shelvingLocation>STACKS</shelvingLocation>
        </location>
        <materialFormat>Book</materialFormat>
      </item>
    </content>
  </entry>
</feed>

Representing resources as Atom entries

Resources in a query response are presented as a Atom entry.

Atom entry elements

Entry Schema Item Atom Representation
Entry ID /feed/entry/id
Entry Title /feed/entry/title
Entry Link /feed/entry/link
Entry Summary
  • /feed/entry/summary
  • Required in certain cases; see Atom specification.
Entry Content
  • /feed/entry/content
  • Required in certain cases; see Atom specification.
Entry Author
  • /feed/entry/author/name
  • /feed/entry/author/email
  • /feed/entry/author/uri
  • Required in certain cases; see Atom specification.
Entry Category /feed/entry/category/@term
Entry Category Scheme /feed/entry/category/@scheme
Entry Contributor
  • /feed/entry/contributor/name
  • /feed/entry/contributor/email
  • /feed/entry/contributor/uri
  • Required in certain cases; see Atom specification.
Entry Publication Date
  • /feed/entry/published
  • (RFC 3339 format)
Entry Updated Date

Google elements

Entry Attribute Description
gd:etag Attribute defined in the Google GData namespace whose value is an Etag associated with the entry. This ETag is used for caching and handling concurrent updates.

Sample Atom entry response

<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom" 
       xmlns:gd="http://schemas.google.com/g/2005"
       gd:etag='"20110824142227976"'>
  <title type="text">Atlas Shrugged</title>
  <id>0</id>
  <link />
  <summary type="text">BOOK</summary>
  <author>
    <name>Titan</name>
  </author>
  <published>2011-08-24T14:22:27.976Z</published>
  <updated>2011-08-24T14:22:27.976Z</updated>
  <content type="application/xml">
    <item xmlns="http://schemas.oclc.org/book-1.0">
      <author>Titan</author>
      <holdingLocation>MAIN BRANCH</holdingLocation>
      <isbn>c6a0420a-7d85-4951-8638-cfbfcdb5ca3d</isbn>
      <materialFormat>BOOK</materialFormat>
      <oclcNumber>0</oclcNumber>
      <published>2011-08-24T14:22:27.976Z</published>
      <shelfLocation>MAIN STACKS</shelfLocation>
      <title>Atlas Shrugged</title>
      <updated>2011-08-24T14:22:27.976Z</updated>
    </item>
  </content>
</entry>

 

We are a worldwide library cooperative, owned, governed and sustained by members since 1967. Our public purpose is a statement of commitment to each other—that we will work together to improve access to the information held in libraries around the globe, and find ways to reduce costs for libraries through collaboration. Learn more »