Last active
August 29, 2018 14:08
-
-
Save caschwartz/e758fbc0976e33fdce471869917fd3a6 to your computer and use it in GitHub Desktop.
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 "1.0-ml"; | |
(: 8/29/18 Query used to add three attributes: type, integer, and id to new <relatedNumber> element :) | |
declare namespace ia = "http://digital.library.ptsem.edu/ia"; | |
for $doc in collection("pts-journals") | |
let $vol-info := $doc/ia:doc/ia:metadata/ia:relatedItem/ia:volumeInfo | |
let $volume := $vol-info/ia:volume | |
let $number := $vol-info/ia:number | |
let $rel-number := $vol-info/ia:relatedNumber | |
where $vol-info | |
return xdmp:node-insert-child($rel-number, attribute id { $number/@id }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment