X hits on this document

492 views

0 shares

1 downloads

0 comments

123 / 142

Harvesting metadata with OAI-PMH

[http://www.infomotions.com/alex/oai/?verb=ListRecords&metadataPrefix=oai_dc]

Responses -- the XML stream

Upon receiving any one of the verbs outlined above it is the responsibility of the repository to reply in the form of an XML stream, and since this communication is happening on top of the HTTP protocol, the HTTP header's content-type must be text/xml. Error codes are passed via the HTTP status-code.

All responses have a similar format. They begin with an XML declaration. The root of the XML stream always echoes the name of the verb sent in the request as well as a listing of name spaces and schema. This is followed by a date stamp and an echoing of the original request.

For each of the verbs there are a number of different XML elements expected in the response. For ex- ample, the Identify verb requires the elements: repositoryName, baseURL, protocolVersion, and ad- minEmail. Below is very simple but valid reply to the Identify verb:

<?xml version="1.0" encoding="UTF-8" ?> <Identify xmlns="http://www.openarchives.org/OAI/1.0/OAI_Identify" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/1.0/OAI Identify http://www.openarchives.org/OAI/1.0/OAI_Identify.xsd"> _

<responseDate>2002-02-16T09:40:35-7:00</responseDate> <requestURL>http://www.infomotions.com/alex/oai/index.php?verb=Identify</requestU

<!-- Identify-specific content --> <repositoryName>Alex Catalogue of Electronic Texts</repositoryName> <baseURL>http://www.infomotions.com/alex/</baseURL> <protocolVersion>1.0</protocolVersion> <adminEmail>eric_morgan@infomotions.com</adminEmail> </Identify>

The output of the ListMetadataFormats verb requires information about what meta data formats are sup- ported by the repository. Therefore, the response of a ListMetadataFormats request includes a metadata- Format element with a number of children: metadataPrefix, schema, metadataNamespece. Here is an ex- ample:

<?xml version="1.0" encoding="UTF- <ListMetadataFormats xmlns="http://www.openarchives.or xmlns:xsi="http://www.w3.org/2000 xsi:schemaLocation="http://www.op http://www.openarchives.org/OAI/1

<responseDate>2002-02-16T09:51:49 <requestURL>http://www.infomotion

<!-- ListMetadataFormats-specific <metadataFormat> <metadataPrefix>oai_dc</metadata <schema>http://www.openarchives. <metadataNamespace>http://purl.o

8" ?>

g/OAI/1.0/OAI_ListMetadataFormats" /10/XMLSchema-instance" enarchives.org/OAI/1.0/OAI_ListMetadataFormats .0/OAI_ListMetadataFormats.xsd">

  • -

    7:00</responseDate>

    • s.

      com/alex/oai/index.php?verb=ListMetadataFormat

content -->

Prefix> org/OAI/dc.xsd</schema> rg/dc/elements/1.1/</metadataNamespace>

115

Document info
Document views492
Page views498
Page last viewedMon Jan 16 11:03:29 UTC 2017
Pages142
Paragraphs3126
Words34660

Comments