Print

Print


Hi,

I've created an xquery file (see below) which generates a teiCorpus
document from a collection of TEI files. I've also created a TEI
customization. Is there a way to have xquery or eXist insert an <?xml-model
?> statement at the head of the corpus document, with the URL pointing to
my TEI customization RNG file? I've noticed that inside the corpus file,
these xml-model statements appear before every TEI element.

thanks!

Joe Easterly
Digital Humanities Librarian
University of Rochester River Campus Libraries

*xquery version *"3.0";
*declare default element namespace *"http://www.tei-c.org/ns/1.0";
*declare option **exist:serialize* "method=xml media-type=text/xml";
*declare variable **$collection* := *collection*('/db/mcelroy/tei');

(:BEGIN-SCRIPT-DOCUMENTATION
|TITLE Corpus Generator for Nellie McElroy Ledgers
|CREATOR Joe Easterly
|UPDATED 2018-05-30
|DESCRIPTION This script collects TEI files from the Nellie McElroy ledgers
into a corpus file.
|LICENSE This work is licensed under the Creative Commons
Attribution-ShareAlike 4.0 International
         License. To view a copy of this license, visit
         http://creativecommons.org/licenses/by-sa/4.0/.
END-SCRIPT-DOCUMENTATION
:)
<teiCorpus>
    <teiHeader>
        <fileDesc>
            <titleStmt>
                <title>Nellie McElroy Ledger</title>
            </titleStmt>
            <publicationStmt>
                <p>Released by the University of Rochester River Campus
Libraries</p>
            </publicationStmt>
            <sourceDesc>
                <p>Nellie L McElroy Journal, 1913-1916. Manuscript
Collection CY.21. Journal of work
                    as Rochester's first policewoman.</p>
            </sourceDesc>
        </fileDesc>
    </teiHeader>
    {
        *for **$collItem* *in **$collection*
        *let* *$page* := *base-uri*(*$collItem*)
        *return*
            *doc*(*$page*)
    }
</teiCorpus>