Created
July 24, 2014 15:33
-
-
Save meau/98d2db7463de6fe4bc96 to your computer and use it in GitHub Desktop.
Which boxes in which collections have a "Folder 1"?
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"; | |
declare namespace ead="urn:isbn:1-931666-22-9"; | |
declare namespace xlink = "http://www.w3.org/1999/xlink"; | |
<root> | |
{ | |
for $ead in ead:ead | |
let $doc := base-uri($ead) | |
return | |
<document uri="{$doc}"> | |
{ | |
for $ead in $ead | |
let $box := $ead/(//ead:container[@type="Box"]) | |
let $folder1 := $box/following-sibling::ead:container[@type ="Folder"][. eq "1"] | |
let $boxbelong := $folder1/preceding-sibling::ead:container[@type ="Box"] | |
return | |
$boxbelong | |
} | |
</document> | |
} | |
</root> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment