Created
July 14, 2015 20:07
-
-
Save CJHArch/80dab7bb8306f8145ebb to your computer and use it in GitHub Desktop.
This xquery will retrieve all records from the namespace-stripped Digitool OAI feed that contain a 264 MARC field.
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 $OAIMarcRecord in /repository/record[metadata/record/datafield[@tag="264"]] | |
let $callno:= $OAIMarcRecord/metadata/record/datafield[@tag[contains(., "09")]][1]/subfield[@code="a"] | |
let $title := $OAIMarcRecord/metadata/record/datafield[@tag="245"] | |
let $publisher := $OAIMarcRecord/metadata/record/datafield[@tag="264"] | |
let $PID := $OAIMarcRecord/header/identifier/substring-after(., "oai:digital.cjh.org:") | |
return | |
<record> | |
<callno>{data($callno)}</callno> | |
<title>{data($title)}</title> | |
<publisher>{data($publisher)}</publisher> | |
<pid>{data($PID)}</pid> | |
</record> | |
} | |
</results> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment