OAI-PMH API implementation
I've started implementing some back-end XQuery to respond to requests from OAI-PMH harvesters, according to the specifications and guidelines here. I'm intending to implement the baseURL as bcgenesis.uvic.ca/oai.xq
, and handle all requests through a single XQuery library, which I've begun writing. So far I've implemented verb checking, return of passed arguments in the request element, and the UTC response date-time. Most of the time so far has been spent wading through the spec, which is predictably meticulously unilluminating, but there are examples, and it looks straightforward. My projected implementation of identifiers is going to look like this: oai:bcgenesis.uvic.ca:B63030SP.scx.xml
, where the last component has the @xml:id
attribute of any XML file in the database, and the final suffix dictates the format (XML or XHTML) of the resource, so we can treat XHTML and XML versions of the data as separate items. I think this makes sense, although my plans may change through the process of implementation.
I'm proposing to use sets for document type, year, and possibly others, with a hierarchy of type:year; this also may change. I'm hoping this won't take too long to implement, given that we're already spitting out pretty comprehensive Dublin Core for all the transcription documents, but handling the personography and other modern data may be more problematic.