Created
January 16, 2015 15:56
-
-
Save CJHArch/3f9a5fb0a9d04df10270 to your computer and use it in GitHub Desktop.
This xQuery will grab PIDs and access rights metadata records from Digitool digital entities imported into BaseX. Namespaces were NOT stripped, so the name space declaration in line two is necessary.
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"; | |
declare namespace xb="http://com/exlibris/digitool/repository/api/xmlbeans"; | |
<data> | |
{ | |
for $Record in /xb:digital_entity_call | |
let $PID := $Record/xb:digital_entity/pid | |
let $arrecord := $Record/xb:digital_entity/mds/md[type[contains (., 'rights_md')]] | |
return | |
<record><pid>{data($PID)}</pid> {$arrecord}</record> | |
} | |
</data> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment