Created
February 9, 2015 22:01
-
-
Save CJHArch/564e1ab7fc51e8fce1bb to your computer and use it in GitHub Desktop.
This xquery looks at a list of PIDs and grabs the associated records out of the OAI feed. There is probably a more efficient way to do this, but it works.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.0"; | |
<results> | |
{ | |
for $PIDlist in doc('OH_PIDS_XML.xml')/data/pid/text() | |
let $OAIRecord := repository/record[header/identifier/substring-after(., "oai:digital.cjh.org:") = $PIDlist] | |
return | |
$OAIRecord | |
} | |
</results> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment