Created
June 8, 2016 14:47
-
-
Save caschwartz/e9b4ab6cf24f5af43434e0d88871b9aa to your computer and use it in GitHub Desktop.
Function to get copy numbers from Ex Libris Voyager items record
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
(: Check for copy numbers in the items record :) | |
declare function mpm:get-copy-info($seq as xs:integer) | |
as node()* | |
{ | |
let $records := xdmp:directory(concat("/Monographs/", $seq, "/"), "infinity") | |
let $items := $records/holdings/institution/holding/item (: May be more than one item record :) | |
for $item in $items | |
let $copy-info := $item/itemData[@name = "copy"] | |
return $copy-info | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wrote this function for an XQuery module to submit our print holdings to the HathiTrust, but did not end up using it.