Last active
March 10, 2020 13:35
-
-
Save caschwartz/5860521 to your computer and use it in GitHub Desktop.
XQuery - Query to locate EAD documents with <controlaccess> element containing subject headings
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/6/12 Query to locate EAD documents that have a <controlaccess> element with subject headings. :) | |
declare namespace ead = "urn:isbn:1-931666-22-9"; | |
for $doc in xdmp:directory("/EAD/") | |
let $controlAccess := $doc/ead:ead/ead:archdesc/ead:controlaccess[2] (: Second controlaccess element contains subjects :) | |
let $title := $doc/ead:ead/ead:eadheader/ead:filedesc/ead:titlestmt/ead:titleproper | |
return $controlAccess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment