Skip to content

Instantly share code, notes, and snippets.

@caschwartz
Created December 18, 2014 16:10
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/551907c9a8dda23dc650 to your computer and use it in GitHub Desktop.
Save caschwartz/551907c9a8dda23dc650 to your computer and use it in GitHub Desktop.
Normalize authors for Bollettino della Società di studi valdesi in Theological Commons to the society's currently used form of name
xquery version "1.0-ml";
(: 12/18/14 Normalize authors for Bollettino della Società di studi valdesi in Theological Commons to the society's currently used form of name :)
declare namespace ia = "http://digital.library.ptsem.edu/ia";
for $doc in xdmp:directory("/ia-xml/b/", "infinity")
let $name := $doc/ia:doc/ia:metadata/ia:name
where fn:contains($name, "Société d'histoire vaudoise")
or fn:contains($name, "Società di storia valdes")
or fn:contains($name, "Società di studi valdese")
or contains($name, "Società di storia valdese")
or contains($name, "Società di studi valdesi.")
return xdmp:node-replace($name/text(), text{ "Società di studi valdesi" })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment