This file contains hidden or 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"; | |
| (: 4/17/13 Query to find TEI documents lacking biographies and insert correct biographies :) | |
| declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
| declare namespace localtei = "http://digital.library.ptsem.edu/lectures/tei"; | |
| declare namespace dc = "http://purl.org/dc/elements/1.1/"; | |
| let $teiDocs := fn:collection() |
This file contains hidden or 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"; | |
| (: 4/18/13 Query to find TEI documents lacking biographies :) | |
| declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
| declare namespace localtei = "http://digital.library.ptsem.edu/lectures/tei"; | |
| declare namespace dc = "http://purl.org/dc/elements/1.1/"; | |
| let $teiDocs := fn:collection() |
This file contains hidden or 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"; | |
| (: 4/18/13 Query to find TEI documents lacking introductions and insert correct introductions based on year of lecture :) | |
| declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
| declare namespace localtei = "http://digital.library.ptsem.edu/lectures/tei"; | |
| declare namespace dc = "http://purl.org/dc/elements/1.1/"; | |
| let $teiDocs := fn:collection() |
This file contains hidden or 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/1/13 This query find and corrects problem names in the theocom database :) | |
| declare namespace ia = "http://digital.library.ptsem.edu/ia"; | |
| for $doc in xdmp:directory("/ia-xml/h/hi/his/", "infinity") | |
| let $name := $doc/ia:doc/ia:metadata/ia:name | |
| let $newNameNode := <name xmlns="http://digital.library.ptsem.edu/ia">Goodspeed, Edgar J. (Edgar Johnson), 1871–1962</name> |
This file contains hidden or 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"; | |
| (: 6/7/13 Query to add <dc:type> element to TEI documents in lectures database :) | |
| declare namespace tei = "http://www.tei-c.org/ns/1.0"; | |
| declare namespace localtei = "http://digital.library.ptsem.edu/lectures/tei"; | |
| declare namespace dc = "http://purl.org/dc/elements/1.1/"; | |
| for $teiDoc in xdmp:directory("/TEI/", "infinity") | |
| let $id := $teiDoc/tei:TEI/tei:teiHeader/localtei:metadata/dc:identifier |
This file contains hidden or 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 |
This file contains hidden or 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"; | |
| (: 7/11/12 This query adds the @integer attribute to the <number> element :) | |
| declare namespace ia = "http://digital.library.ptsem.edu/ia"; | |
| declare namespace m = "http://www.loc.gov/MARC21/slim"; | |
| let $docs := xdmp:directory("/ia-xml/d/", "infinity") |
This file contains hidden or 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"; | |
| (: 6/19/12 Query theocom documents for edition statements and create <edition> elements :) | |
| declare namespace ia = "http://digital.library.ptsem.edu/ia"; | |
| declare namespace m = "http://www.loc.gov/MARC21/slim"; | |
| for $doc in xdmp:directory("/ia-xml/l/ly/", "infinity") | |
| let $marc := $doc/ia:doc/ia:metadata/ia:marc/m:record |
This file contains hidden or 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/29/11 Query theocom documents for edition for works by John Calvin :) | |
| declare namespace ia = "http://digital.library.ptsem.edu/ia"; | |
| declare namespace m = "http://www.loc.gov/MARC21/slim"; | |
| for $doc in xdmp:directory("/ia-xml/8/", "infinity") | |
| let $marc := $doc/ia:doc/ia:metadata/ia:marc/m:record |
This file contains hidden or 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/21/13 Query to list unique PTS collection names (taken from MARC 730 fields) :) | |
| declare namespace ia = "http://my.local.namespace"; | |
| declare namespace m = "http://www.loc.gov/MARC21/slim"; | |
| (: Finds unique collection names other than Benson and Torrance :) | |
| let $collNames := fn:distinct-values(for $doc in fn:collection()[1 to 10000] | |
| let $marc := $doc/ia:doc/ia:metadata/ia:marc/m:record |