OAI-PMH in XQuery

Posted by Michael Giarlo on September 25, 2007

Thanks for the nod, Winona. Hopefully you folks will get some good use out of the XQuery-based OAI-PMH data provider I've been working on.

I just want to clarify that only one small bit of the code is specific to X-Hive, and that's a call to an extension that gets last-modified dates from the X-Hive service. We do not reliably store this information in the metadata itself, and so I needed to go this route. Some folks do store this in MODS or elsewhere in descriptive or administrative metadata. It should be a two-line change to short-circuit this behavior (xhive-exts:last-update() is only invoked in two places, I believe).

I'm currently working on adding EAD support, modularizing things a bit more, and streamlining configuration. resumptionTokens will come after that, I hope.

I'll be interested to hear more of UVM's implementation and how I can make this thing more useful to others.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. Winona Tue, 25 Sep 2007 14:56:15 UTC

    Hi Mike,
    I haven't really gone over the code, so I can't say for sure, but I know in the past that X-Hive and eXist have some differences in xquery syntax, such as declaring external variables and such. So there may need to be a little tweaking there.

    I imagine that UVM will be able to use this mostly out of the box, except for needing resumption tokens, and the X-Hive/eXist differences (which sound fairly minor). I'll let you know how it goes when I finally get around to testing it.

  2. mjgiarlo Tue, 25 Sep 2007 15:10:11 UTC

    Good point about the different XQuery syntaxes. I wonder which one (if not both) deviates from the 1.0 spec. If we could come up with some style conventions that handle the differences, that would be fantastic.

    As for resumptionTokens, we kicked around a number of different ways of handling them. Ultimately, if we're designing an OAI-PMH provider for native XML databases, we think it might be best just to do it all in within the NXD, using something like XUpdate to store and manage cached result sets. It's an open question and I'd be interested in your thoughts on the matter.

  3. Martin Probst Tue, 25 Sep 2007 15:32:56 UTC

    X-Hive follows the XQuery specification regarding the external variables etc., it passes 99.7% of the XQTS Test Suite (http://www.w3.org/XML/Query/test-suite/XQTSReportSimple.html). eXist scores well there, too. Are you sure you're using a current version of both?

  4. mjgiarlo Tue, 25 Sep 2007 15:45:22 UTC

    Martin, thanks for your comment. I may have been too hasty in pointing fingers. :)

    I'm testing on a server running X-Hive 7.4. Not sure what version of eXist Winona has up.

  5. Rolf Kwakkelaar Sat, 13 Feb 2010 11:36:49 UTC

    I would be keen on running the code on eXist, but do encounter a few syntax errors. The version of the code I am using is what is available on http://code.google.com/p/xqoai/. Did anyone ever pursue an eXist version ?

  6. Michael Giarlo Sat, 13 Feb 2010 16:16:57 UTC

    @Rolf:

    I believe Winona Salesky at UVM was running this code on eXist. She co-developed xqOAI with me. I'm not sure if they're still running the code, or this version of the code, though. You might contact her at: winona.salesky@uvm.edu

    Good luck. And if you have any patches, I'd be willing to incorporate them, or start up an eXist branch if you figure out what the syntax errors are. It has been a few years since I touched the code, but it worked on X-Hive/DB at that point.

Comments