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"; | |
(: This query finds properties information :) | |
declare namespace ia = "http://my.namespace/ia"; | |
declare namespace m = "http://www.loc.gov/MARC21/slim"; | |
let $docs := xdmp:directory("/ia-xml/1/", "infinity") | |
for $doc in $docs |
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"; | |
(: 3/8/12 Query to add TYPE attributes for incomplete items in the kuyper-dl database :) | |
declare namespace mets = "http://www.loc.gov/METS/"; | |
declare namespace dc = "http://purl.org/dc/elements/1.1/"; | |
fn:distinct-values( | |
for $doc in fn:collection() |
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"; | |
(: 12/9/13 Query newly imported Benson collection books for names :) | |
declare namespace ia = "http://my.namespace/ia"; | |
declare namespace m = "http://www.loc.gov/MARC21/slim"; | |
for $doc in fn:collection("Benson") | |
let $name := fn:normalize-space($doc/ia:doc/ia:metadata/ia:name) |
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"; | |
(: 5/8/14 Build a sequence of numbers and count the number of items in the sequence :) | |
fn:count(let $unprocessedfootage := "10-17" | |
let $firstNum := xs:integer(fn:substring-before($unprocessedfootage, "-")) | |
let $lastNum := xs:integer(fn:substring-after($unprocessedfootage, "-")) | |
return for $box in ($firstNum to $lastNum) | |
return $box) |
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"; | |
(: 10/9/14 Query accessions database to correct the location of the xml schema document for validation :) | |
declare namespace arch = "http://www.inmagic.com/webpublisher/query"; | |
for $doc in fn:collection() | |
let $oldAttributeNode := $doc/arch:Record/@xsi:schemaLocation | |
let $schemaLoc := $doc/arch:Record/@xsi:schemaLocation/fn:string() | |
where $schemaLoc |
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"; | |
let $directory := "/theocom/" | |
let $uris := cts:uris("","document",cts:directory-query($directory,"infinity"))[70001 to 80000] | |
let $parts := (for $i in $uris let $x := fn:doc($i) return $x) | |
let $manifest := <parts xmlns="xdmp:zip"> | |
{ | |
for $i in $uris |
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"; | |
(: 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") |
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"; | |
(: 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") |
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"; | |
(: | |
: This main module queries basic Tanis postcards metadata for IA to create a | |
: CSV file to import into Excel. For Excel import, quotation marks are needed | |
: if value could contain a comma. Needed quotes for Title, Location, and Postcard-type. | |
:) | |
declare namespace ia = "http://digital.library.ptsem.edu/ia"; | |
declare namespace m = "http://www.loc.gov/mods/v3"; |
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"; | |
(: 12/20/14 Query to get a list of URIs from the dcweb database and delete .DS_Store files :) | |
declare namespace ia = "http://digital.library.ptsem.edu/ia"; | |
declare namespace m = "http://www.loc.gov/MARC21/slim"; | |
for $uri in cts:uris() | |
where contains($uri, "._.DS_Store") or contains($uri, ".DS_Store") or matches($uri, "\._") |
OlderNewer