Harvesting metadata with OAI-PMH
Run the Perl script named oai.pl and give the script input such as verb=Identify, verb=ListSets, verb=GetRecord&identifier=oai:water:brides-bay&metadataPrefix=oai_dc, or verb=ListRecords&metadataPrefix=oai_dc. The output should be standard OAI-PMH XML streams. You're more than half way there.
Make scripts available via the Web
Assuming a Web server is installed on your computer, copy the oai directory to a place where its contents can be read by the server.
Open your Web browser and try opening a connection to the oai.pl script. The URL will look something like this: http://www.example.edu/cgi-bin/oai/oai.pl.
Try additional URLs but this time include the verbs from the second part of this exercise,
above. You should see good o' XML streams in the form of OAI-PMH responses.
Use the Open Archives Initiative - Repository Explorer
tp://oai.dlib.vt.edu/cgi-bin/Explorer/oai2.0/testoai to test your newly created OAI repository, and congratulations, you have made a set of data available via OAI-PMH.
Exercise - Making MARCXML data available via OAI
As an extra exercise transform MARCXML data into simple OAI files and make them available via the OAI protocol. This exercise is based on the previous exercise.
Use your text editor to open xslt/MARC21slim2OAIDC.xsl. This stylesheet was created by the good folks at the Library of Congress.
Use xsltproc to use the stylesheet to transform a previously created MARCXML file: xsltproc xslt/ MARC21slim2OAIDC.xsl xml-data/marc/many/milne-when-1071456632.xml . The output will be a simple OAI stream in Dublin Core data.
Use xsltproc to save a number of file transformations to the data directory of the oai directory of the previous exercise. For example:
xsltproc xslt/MARC21slim2OAIDC.xsl xml- data/marc/many/feiler-making-1074959890.xml > /oai/data/feiler-making-1074959890.xml
xsltproc xslt/MARC21slim2OAIDC.xsl xml- data/marc/many/willinger-red-1072543737.xml > /oai/data/willinger-red-1072543737.xml
xsltproc xslt/MARC21slim2OAIDC.xsl xml-data/marc/many/milne-when-1071456632.xml
xsltproc xslt/MARC21slim2OAIDC.xsl data/marc/many/mumford-herman-1072061308.xml oai/data/mumford-herman-1072061308.xml