Skip to content

Instantly share code, notes, and snippets.

@caschwartz
Created February 19, 2015 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caschwartz/b482db0ec13635024339 to your computer and use it in GitHub Desktop.
Save caschwartz/b482db0ec13635024339 to your computer and use it in GitHub Desktop.
Query to find properties concerning editor review dates for postcards project
xquery version "1.0-ml";
(: This query finds properties information :)
declare namespace ia = "http://my.namespace/ia";
declare namespace m = "http://www.loc.gov/MARC21/slim";
for $doc in fn:collection()
let $property := fn:QName("", "metadata-editor-reviewed-by")
let $editor-name := xdmp:document-properties(fn:base-uri($doc))/property::metadata-editor-reviewed-by
let $last-modified := xdmp:document-properties(fn:base-uri($doc))/property::prop:last-modified
let $editor-reviewed-date := xdmp:document-properties(fn:base-uri($doc))/property::metadata-editor-reviewed-when
where $editor-name = "jrtanis" and $editor-reviewed-date
order by $editor-reviewed-date
return (fn:base-uri($doc), $editor-name, $editor-reviewed-date)
(: (fn:base-uri($doc), $editor-name, $editor-reviewed-date) :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment