Skip to content

Instantly share code, notes, and snippets.

@CJHArch
Last active August 29, 2015 14:14
Show Gist options
  • Save CJHArch/46dc92bc54c5a9c4c7b2 to your computer and use it in GitHub Desktop.
Save CJHArch/46dc92bc54c5a9c4c7b2 to your computer and use it in GitHub Desktop.
Xquery to get a list of records from the OAI feed based on an XML list of PIDs
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