<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0"
  xmlns:sch="http://purl.oclc.org/dsdl/schematron" xml:lang="en">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>GFL - Goethes Farbenlehre</title>
        <author xml:id="MT">Maike Tech</author>
        <author xml:id="MG">Mathias Göbel</author>
      </titleStmt>
      <publicationStmt>
        <publisher>TEI Consortium</publisher>
        <availability status="free">
          <licence target="http://creativecommons.org/licenses/by-sa/3.0/"> Distributed under a
            Creative Commons Attribution-ShareAlike 3.0 Unported License </licence>
          <licence target="http://www.opensource.org/licenses/BSD-2-Clause">
            <p>Copyright 2013 TEI Consortium.</p>
            <p>All rights reserved.</p>
            <p>Redistribution and use in source and binary forms, with or without modification, are
              permitted provided that the following conditions are met:</p>
            <list>
              <item>Redistributions of source code must retain the above copyright notice, this list
                of conditions and the following disclaimer.</item>
              <item>Redistributions in binary form must reproduce the above copyright notice, this
                list of conditions and the following disclaimer in the documentation and/or other
                materials provided with the distribution.</item>
            </list>
            <p>This software is provided by the copyright holders and contributors "as is" and any
              express or implied warranties, including, but not limited to, the implied warranties
              of merchantability and fitness for a particular purpose are disclaimed. In no event
              shall the copyright holder or contributors be liable for any direct, indirect,
              incidental, special, exemplary, or consequential damages (including, but not limited
              to, procurement of substitute goods or services; loss of use, data, or profits; or
              business interruption) however caused and on any theory of liability, whether in
              contract, strict liability, or tort (including negligence or otherwise) arising in any
              way out of the use of this software, even if advised of the possibility of such
              damage.</p>
          </licence>
          <p>TEI material can be licensed differently depending on the use you intend to make of it.
            Hence it is made available under both the CC+BY and BSD-2 licences. The CC+BY licence is
            generally appropriate for usages which treat TEI content as data or documentation. The
            BSD-2 licence is generally appropriate for usage of TEI content in a software
            environment. For further information or clarification, please contact the <ref
              target="mailto:info@tei-c.org">TEI Consortium</ref>. </p>
        </availability>
      </publicationStmt>
      <sourceDesc>
        <p>Created from scratch by James Cummings, but looking at previous tei_minimal and tei_bare
          exemplars by SPQR and LR.</p>
      </sourceDesc>
    </fileDesc>
  </teiHeader>
  <text>
    <body>
      <head>A TEI Customization for the GFL Project: Goethes Farbenlehre</head>
      <p>This TEI ODD defines a TEI customization that is as minimal as possible and the schema
        generated from it will validate a document that is minimally valid against the TEI scheme.
        It includes only the ten required elements: <list rend="numbered">
          <item><gi>teiHeader</gi> from the header module to store required metadata</item>
          <item><gi>fileDesc</gi> from the header module to record information about this
            file</item>
          <item><gi>titleStmt</gi> from the header module to record information about the
            title</item>
          <item><gi>publicationStmt</gi> from the header module to detail how it is published</item>
          <item><gi>sourceDesc</gi> from the header module to record where it is from</item>
          <item><gi>p</gi> from the core module for use in the header and the body</item>
          <item><gi>title</gi> from the core module for use in the titleStmt</item>
          <item><gi>TEI</gi> from the textstructure module because what is a TEI file without
            that?</item>
          <item><gi>text</gi> from the textstructure module to hold some text</item>
          <item><gi>body</gi> from the textstructure module as a place to put that text</item>
        </list>
      </p>
      <schemaSpec ident="tei_color" start="TEI" prefix="tei_" targetLang="en" docLang="en">
        <!-- required minimal header elements -->
        <moduleRef key="header"
          include="abstract availability biblFull catDesc catRef change classCode classDecl correction creation distributor edition editionStmt editorialDecl encodingDesc extent fileDesc funder handNote hyphenation idno keywords langUsage language licence listChange listPrefixDef namespace normalization notesStmt prefixDef profileDesc projectDesc publicationStmt refsDecl rendition revisionDesc samplingDecl seriesStmt sourceDesc tagUsage tagsDecl taxonomy teiHeader textClass titleStmt xenoData"/>
        <!-- required core elements (p and title for use in titleStmt) -->
        <moduleRef key="core"
          include="abbr add addrLine address author bibl biblScope cb choice corr date del editor expan foreign graphic head hi item label lb list listBibl milestone name note orig p pb pubPlace publisher ref relatedItem resp respStmt rs sic term title"/>
        <!-- required textstructure elements (TEI, text, and body) -->
        <moduleRef key="textstructure"
          include="TEI text body argument back byline closer dateline div docAuthor docDate docEdition docImprint docTitle epigraph front imprimatur opener postscript salute signed titlePage titlePart trailer"/>
        <!-- required module tei instantiates lots of classes used for further expansion of this odd -->
        <moduleRef key="tei"/>
        <moduleRef key="figures" include="figure table row cell"/>
        <moduleRef key="namesdates" include="country listPerson listPlace person place settlement"/>
        <moduleRef key="msdescription"
          include="additional altIdentifier bindingDesc collation collection colophon condition dimensions explicit handDesc height incipit institution layout layoutDesc msContents msDesc msItem msIdentifier objectDesc physDesc repository supportDesc support material width"/>
        <moduleRef key="tagdocs" include="tag gi att"/>
        <moduleRef key="linking" include="seg"/>
        <moduleRef key="textcrit" include="app rdg"/>
        <moduleRef key="transcr" include="facsimile fw handShift sourceDoc space subst supplied"/>
        <classSpec ident="att.breaking" type="atts" mode="change" module="tei">
          <attList>
            <attDef ident="break" mode="change">
              <valList type="closed" mode="replace">
                <valItem ident="no"/>
                <valItem ident="keep-hyphen"/>
                <valItem ident="both"/>
              </valList>
            </attDef>
          </attList>
        </classSpec>
        <classSpec ident="att.canonical" type="atts" mode="change">
          <attList>
            <attDef ident="key" mode="delete"/>
          </attList>
        </classSpec>
        <classSpec ident="att.citing" type="atts" mode="change">
          <attList>
            <attDef ident="unit" mode="change">
              <valList type="closed" mode="change">
                <valItem mode="delete" ident="issue"/>
                <valItem mode="delete" ident="column"/>
                <valItem mode="delete" ident="entry"/>
              </valList>
            </attDef>
          </attList>
        </classSpec>
        <classSpec ident="att.dimensions" type="atts" mode="change">
          <attList>
            <attDef ident="unit" mode="change">
              <valList type="closed" mode="change">
                <valItem mode="add" ident="word">
                  <desc versionDate="2021-10-22" xml:lang="en">words</desc>
                </valItem>
                <valItem mode="add" ident="page">
                  <desc versionDate="2021-10-22" xml:lang="en">pages</desc>
                </valItem>
              </valList>
            </attDef>
            <attDef ident="precision" mode="delete"/>
          </attList>
        </classSpec>
        <classSpec ident="att.global.rendition" type="atts" mode="change">
          <attList>
            <attDef ident="rend" mode="delete"/>
            <attDef ident="style" mode="delete"/>
            <attDef ident="rendition" mode="change">
              <constraintSpec ident="renditionpointer" scheme="schematron">
                <constraint>
                  <sch:rule context="tei:*[@rendition]">
                    <sch:let name="results"
                      value="for $val in tokenize(normalize-space(@rendition),'\s+') return starts-with($val,'simple:') or (starts-with($val,'#') and //tei:rendition[@xml:id=substring($val,2)])"/>
                    <sch:assert test="every $x in $results satisfies $x"> Error: Each of the
                      rendition values in "<sch:value-of select="@rendition"/>" must point to a
                      local ID or to a rendition defined in the TEI-Simple scheme (<sch:value-of
                        select="$results"/>) </sch:assert>
                  </sch:rule>
                </constraint>
              </constraintSpec>

              <valList type="semi" mode="change">
                <valItem mode="add" ident="simple:allcaps">
                  <desc versionDate="2021-10-22" xml:lang="en">all capitals</desc>
                </valItem>
                <valItem mode="add" ident="simple:blackletter">
                  <desc versionDate="2021-10-22" xml:lang="en">black letter or gothic
                    typeface</desc>
                </valItem>
                <valItem mode="add" ident="simple:bold">
                  <desc versionDate="2016-08-15" xml:lang="en">bold typeface</desc>
                </valItem>
                <valItem mode="add" ident="simple:bottombraced">
                  <desc versionDate="2016-08-15" xml:lang="en">marked with a brace under the bottom
                    of the text</desc>
                </valItem>
                <valItem mode="add" ident="simple:boxed">
                  <desc versionDate="2016-08-15" xml:lang="en">border around the text</desc>
                </valItem>
                <valItem mode="add" ident="simple:centre">
                  <desc versionDate="2016-08-15" xml:lang="en">centred</desc>
                </valItem>
                <valItem mode="add" ident="simple:cursive">
                  <desc versionDate="2016-08-15" xml:lang="en">cursive typeface</desc>
                </valItem>
                <valItem mode="add" ident="simple:display">
                  <desc versionDate="2016-08-15" xml:lang="en">block display</desc>
                </valItem>
                <valItem mode="add" ident="simple:doublestrikethrough">
                  <desc versionDate="2016-08-15" xml:lang="en">strikethrough with double line</desc>
                </valItem>
                <valItem mode="add" ident="simple:doubleunderline">
                  <desc versionDate="2016-08-15" xml:lang="en">underlined with double line</desc>
                </valItem>
                <valItem mode="add" ident="simple:dropcap">
                  <desc versionDate="2016-08-15" xml:lang="en">initial letter larger or
                    decorated</desc>
                </valItem>
                <valItem mode="add" ident="simple:float">
                  <desc versionDate="2016-08-15" xml:lang="en">floated out of main flow</desc>
                </valItem>
                <valItem mode="add" ident="simple:hyphen">
                  <desc versionDate="2016-08-15" xml:lang="en">with a hyphen here (eg in line
                    break)</desc>
                </valItem>
                <valItem mode="add" ident="simple:inline">
                  <desc versionDate="2016-08-15" xml:lang="en">inline rendering</desc>
                </valItem>
                <valItem mode="add" ident="simple:justify">
                  <desc versionDate="2016-08-15" xml:lang="en">justified text</desc>
                </valItem>
                <valItem mode="add" ident="simple:italic">
                  <desc versionDate="2016-08-15" xml:lang="en">italic typeface</desc>
                </valItem>
                <valItem mode="add" ident="simple:larger">
                  <desc versionDate="2016-08-15" xml:lang="en">larger type</desc>
                </valItem>
                <valItem mode="add" ident="simple:left">
                  <desc versionDate="2016-08-15" xml:lang="en">aligned to the left or
                    left-justified</desc>
                </valItem>
                <valItem mode="add" ident="simple:leftbraced">
                  <desc versionDate="2016-08-15" xml:lang="en">marked with a brace on the left side
                    of the text</desc>
                </valItem>
                <valItem mode="add" ident="simple:letterspace">
                  <desc versionDate="2016-08-15" xml:lang="en">larger-than-normal spacing between
                    letters, usually for emphasis</desc>
                </valItem>
                <valItem mode="add" ident="simple:literal">
                  <desc versionDate="2016-08-15" xml:lang="en">fixed-width typeface, spacing
                    preserved</desc>
                </valItem>
                <valItem mode="add" ident="simple:normalstyle">
                  <desc versionDate="2016-08-15" xml:lang="en">upright shape and default weight of
                    typeface</desc>
                </valItem>
                <valItem mode="add" ident="simple:normalweight">
                  <desc versionDate="2016-08-15" xml:lang="en">normal typeface weight</desc>
                </valItem>
                <valItem mode="add" ident="simple:right">
                  <desc versionDate="2016-08-15" xml:lang="en">aligned to the right or
                    right-justified</desc>
                </valItem>
                <valItem mode="add" ident="simple:rightbraced">
                  <desc versionDate="2016-08-15" xml:lang="en">marked with a brace to the right of
                    the text</desc>
                </valItem>
                <valItem mode="add" ident="simple:rotateleft">
                  <desc versionDate="2016-08-15" xml:lang="en">rotated to the left</desc>
                </valItem>
                <valItem mode="add" ident="simple:rotateright">
                  <desc versionDate="2016-08-15" xml:lang="en">rotated to the right</desc>
                </valItem>
                <valItem mode="add" ident="simple:smallcaps">
                  <desc versionDate="2016-08-15" xml:lang="en">small caps</desc>
                </valItem>
                <valItem mode="add" ident="simple:smaller">
                  <desc versionDate="2016-08-15" xml:lang="en">smaller type</desc>
                </valItem>
                <valItem mode="add" ident="simple:strikethrough">
                  <desc versionDate="2016-08-15" xml:lang="en">strike through</desc>
                </valItem>
                <valItem mode="add" ident="simple:subscript">
                  <desc versionDate="2016-08-15" xml:lang="en">subscript</desc>
                </valItem>
                <valItem mode="add" ident="simple:superscript">
                  <desc versionDate="2016-08-15" xml:lang="en">superscript</desc>
                </valItem>
                <valItem mode="add" ident="simple:topbraced">
                  <desc versionDate="2016-08-15" xml:lang="en">marked with a brace above the
                    text</desc>
                </valItem>
                <valItem mode="add" ident="simple:typewriter">
                  <desc versionDate="2016-08-15" xml:lang="en">fixed-width typeface, like
                    typewriter</desc>
                </valItem>
                <valItem mode="add" ident="simple:underline">
                  <desc versionDate="2016-08-15" xml:lang="en">underlined with single line</desc>
                </valItem>
                <valItem mode="add" ident="simple:wavyunderline">
                  <desc versionDate="2016-08-15" xml:lang="en">underlined with wavy line</desc>
                </valItem>
                <valItem mode="add" ident="simple:half-broken">
                  <desc versionDate="2016-08-15" xml:lang="en">half broken</desc>
                </valItem>
                <valItem mode="add" ident="simple:column-left">
                  <desc versionDate="2016-08-15" xml:lang="en">column left</desc>
                </valItem>
                <valItem mode="add" ident="simple:column-right">
                  <desc versionDate="2016-08-15" xml:lang="en">column right</desc>
                </valItem>
              </valList>
            </attDef>
          </attList>
        </classSpec>
        <classSpec ident="att.naming" mode="change" type="atts">
          <attList>
            <attDef ident="role" mode="change" usage="opt">
              <valList mode="add" type="closed">
                <valItem ident="aut"/>
                <valItem ident="crr"/>
                <valItem ident="dtc"/>
                <valItem ident="dub"/>
                <valItem ident="edt"/>
                <valItem ident="fnd"/>
                <valItem ident="pbl"/>
                <valItem ident="prt"/>
                <valItem ident="rcp"/>
                <valItem ident="trc"/>
                <valItem ident="wac"/>
              </valList>
            </attDef>
          </attList>
        </classSpec>
        <classSpec ident="att.placement" mode="change" type="atts">
          <attList>
            <attDef ident="place" mode="change">
              <valList type="closed" mode="replace">
                <valItem ident="above">
                  <desc versionDate="2016-08-15" xml:lang="en">above the line</desc>
                </valItem>
                <valItem ident="below">
                  <desc versionDate="2016-08-15" xml:lang="en">below the line</desc>
                </valItem>
                <valItem ident="top">
                  <desc versionDate="2016-08-15" xml:lang="en">at the top of the page</desc>
                </valItem>
                <valItem ident="top-right">
                  <desc versionDate="2016-08-15" xml:lang="en">at the top right of the page</desc>
                </valItem>
                <valItem ident="top-left">
                  <desc versionDate="2016-08-15" xml:lang="en">at the top left of the page</desc>
                </valItem>
                <valItem ident="top-centre">
                  <desc versionDate="2016-08-15" xml:lang="en">at the top center of the page</desc>
                </valItem>
                <valItem ident="bottom-right">
                  <desc versionDate="2016-08-15" xml:lang="en">at the bottom right of the
                    page</desc>
                </valItem>
                <valItem ident="bottom-left">
                  <desc versionDate="2016-08-15" xml:lang="en">at the bottom left of the page</desc>
                </valItem>
                <valItem ident="bottom-centre">
                  <desc versionDate="2016-08-15" xml:lang="en">at the bottom centre of the
                    page</desc>
                </valItem>
                <valItem ident="bottom">
                  <desc versionDate="2016-08-15" xml:lang="en">at the foot of the page</desc>
                </valItem>
                <valItem ident="tablebottom">
                  <desc versionDate="2016-08-15" xml:lang="en">underneath a table</desc>
                </valItem>
                <valItem ident="margin-right">
                  <desc versionDate="2016-08-15" xml:lang="en">in the right-hand margin</desc>
                </valItem>
                <valItem ident="margin">
                  <desc versionDate="2016-08-15" xml:lang="en">in the outer margin</desc>
                </valItem>
                <valItem ident="margin-inner">
                  <desc versionDate="2016-08-15" xml:lang="en">in the inner margin</desc>
                </valItem>
                <valItem ident="margin-left">
                  <desc versionDate="2016-08-15" xml:lang="en">in the left-hand margin</desc>
                </valItem>
                <valItem ident="opposite">
                  <desc versionDate="2016-08-15" xml:lang="en">on the opposite, i.e. facing,
                    page.</desc>
                </valItem>
                <valItem ident="overleaf">
                  <desc versionDate="2016-08-15" xml:lang="en">on the other side of the leaf.</desc>
                </valItem>
                <valItem ident="overstrike">
                  <desc versionDate="2016-08-15" xml:lang="en">superimposed on top of the current
                    context</desc>
                </valItem>
                <valItem ident="end">
                  <desc versionDate="2016-08-15" xml:lang="en">at the end of the volume.</desc>
                </valItem>
                <valItem ident="divend">
                  <desc versionDate="2016-08-15" xml:lang="en">at the end the current
                    division.</desc>
                </valItem>
                <valItem ident="parend">
                  <desc versionDate="2016-08-15" xml:lang="en">at the end the current
                    paragraph.</desc>
                </valItem>
                <valItem ident="inline">
                  <desc versionDate="2016-08-15" xml:lang="en">within the body of the text.</desc>
                </valItem>
                <valItem ident="inspace">
                  <desc versionDate="2016-08-15" xml:lang="en">in a predefined space, for example
                    left by an earlier scribe.</desc>
                </valItem>
                <valItem ident="block">
                  <desc versionDate="2016-08-15" xml:lang="en">formatted as an indented
                    paragraph</desc>
                </valItem>
                <valItem ident="left-side">
                  <desc versionDate="2016-08-15" xml:lang="en">on the left side paragraph</desc>
                </valItem>
                <valItem ident="right-side">
                  <desc versionDate="2016-08-15" xml:lang="en">on the right side paragraph</desc>
                </valItem>
              </valList>
            </attDef>
          </attList>
        </classSpec>
        <classSpec ident="att.cReferencing" type="atts" mode="delete"/>
        <classSpec ident="att.damaged" type="atts" mode="delete"/>
        <classSpec ident="att.datable" module="tei" mode="change" type="atts">
          <attList>
            <attDef ident="calendar" mode="delete"/>
            <attDef ident="period" mode="delete"/>
          </attList>
        </classSpec>
        <classSpec ident="att.datable.custom" type="atts" mode="delete"/>
        <classSpec ident="att.datable.iso" type="atts" mode="delete"/>
        <classSpec ident="att.datcat" type="atts" mode="delete"/>
        <classSpec ident="att.declarable" type="atts" mode="delete"/>
        <classSpec ident="att.declaring" type="atts" mode="delete"/>
        <classSpec ident="att.divLike" type="atts" mode="delete"/>
        <classSpec ident="att.docStatus" type="atts" mode="delete"/>
        <classSpec ident="att.duration.iso" type="atts" mode="delete"/>
        <classSpec ident="att.editLike" type="atts" mode="delete"/>
        <classSpec ident="att.edition" type="atts" mode="delete"/>
        <classSpec ident="att.personal" type="atts" mode="delete"/>
        <classSpec ident="att.ranging" type="atts" mode="delete"/>
        <elementSpec ident="name" mode="change">
          <attList>
            <attRef class="att.canonical"/>
            <attDef ident="type" mode="change" usage="req">
              <valList type="closed" mode="change">
                <valItem mode="add" ident="person">
                  <desc versionDate="2021-10-22" xml:lang="en">Ein Eigenname als Bezeichnung einer
                    Person, entweder in ausgeschriebener oder abgekürzter Form. Hierbei kann es sich
                    um den tatsächlichen Namen oder einen Spitznamen handeln.</desc>
                </valItem>
                <valItem mode="add" ident="org">
                  <desc versionDate="2021-10-22" xml:lang="en">Ein Eigenname zu Bezeichnung einer
                    Organisation, entweder in ausgeschriebener oder abgekürzter Form.</desc>
                </valItem>
                <valItem mode="add" ident="place">
                  <desc versionDate="2021-10-22" xml:lang="en">Ein Eigenname zur Bezeichnug eines
                    Orts, entweder in ausgeschriebener oder abgekürzter Form.</desc>
                </valItem>
                <valItem mode="add" ident="object">
                  <desc versionDate="2021-10-22" xml:lang="en">Eine Bezeichnung eines Objekts,
                    entweder in ausgeschriebener oder abgekürzter Form.</desc>
                </valItem>
              </valList>
            </attDef>
            <attDef ident="subtype" mode="change">
              <valList type="closed" mode="change">
                <valItem ident="aut">
                  <gloss>author</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Autor des
                    Werkes</desc>
                </valItem>
                <valItem ident="scr">
                  <gloss>scribe</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person:
                    Handschriftlicher Schreiber</desc>
                </valItem>
                <valItem ident="crr">
                  <gloss>corrector</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Korrektor des
                    Werkes</desc>
                </valItem>
                <valItem ident="dtc">
                  <gloss>data contributor</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Zulieferer
                    von Daten</desc>
                </valItem>
                <valItem ident="dub">
                  <gloss>dubious author</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Zweifelhafter
                    Autor</desc>
                </valItem>
                <valItem ident="edt">
                  <gloss>editor</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Editor</desc>
                </valItem>
                <valItem ident="fnd">
                  <gloss>funder</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person:
                    Kostenträger</desc>
                </valItem>
                <valItem ident="pbl">
                  <gloss>publisher</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person:
                    Herausgeber</desc>
                </valItem>
                <valItem ident="prt">
                  <gloss>printer</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person:
                    Drucker</desc>
                </valItem>
                <valItem ident="rcp">
                  <gloss>addressee / recipient</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Adressat /
                    Empfänger</desc>
                </valItem>
                <valItem ident="trc">
                  <gloss>transcriber</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Ersteller der
                    Transcription</desc>
                </valItem>
                <valItem ident="wac">
                  <gloss>writer of added comment</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Schreiber
                    eines zugefügten Kommentars</desc>
                </valItem>
                <valItem ident="dtn">
                  <gloss>destination</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname eines Ortes: Ziel</desc>
                </valItem>
                <valItem ident="orn">
                  <gloss>origin</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname eines Ortes:
                    Herkunftsort</desc>
                </valItem>
                <valItem ident="pup">
                  <gloss>publication place</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname eines Ortes:
                    Publikationsort</desc>
                </valItem>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <elementSpec ident="rs" mode="change">
          <attList>
            <attDef ident="type" mode="replace" usage="req">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="person">
                  <gloss>person</gloss>
                  <desc xml:lang="de" versionDate="2018-07-06">Ein Eigenname als Bezeichnung einer
                    Person, entweder in ausgeschriebener oder abgekürzter Form. Hierbei kann es sich
                    um den tatsächlichen Namen oder einen Spitznamen handeln.</desc>
                </valItem>
                <valItem ident="org">
                  <gloss>organization</gloss>
                  <desc xml:lang="de" versionDate="2018-07-06">Ein Eigenname zu Bezeichnung einer
                    Organisation, entweder in ausgeschriebener oder abgekürzter Form.</desc>
                </valItem>
                <valItem ident="place">
                  <gloss>place</gloss>
                  <desc xml:lang="de" versionDate="2018-07-06">Ein Eigenname zur Bezeichnug eines
                    Orts, entweder in ausgeschriebener oder abgekürzter Form.</desc>
                </valItem>
                <valItem ident="object">
                  <gloss>object</gloss>
                  <desc xml:lang="de" versionDate="2018-07-06">Eine Bezeichnung eines Objekts,
                    entweder in ausgeschriebener oder abgekürzter Form.</desc>
                </valItem>
              </valList>
            </attDef>
            <attDef ident="subtype" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="aut">
                  <gloss>author</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Autor des
                    Werkes</desc>
                </valItem>
                <valItem ident="scr">
                  <gloss>scribe</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person:
                    Handschriftlicher Schreiber</desc>
                </valItem>
                <valItem ident="crr">
                  <gloss>corrector</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Korrektor des
                    Werkes</desc>
                </valItem>
                <valItem ident="dtc">
                  <gloss>data contributor</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Zulieferer
                    von Daten</desc>
                </valItem>
                <valItem ident="dub">
                  <gloss>dubious author</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Zweifelhafter
                    Autor</desc>
                </valItem>
                <valItem ident="edt">
                  <gloss>editor</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Editor</desc>
                </valItem>
                <valItem ident="fnd">
                  <gloss>funder</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person:
                    Kostenträger</desc>
                </valItem>
                <valItem ident="pbl">
                  <gloss>publisher</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person:
                    Herausgeber</desc>
                </valItem>
                <valItem ident="prt">
                  <gloss>printer</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person:
                    Drucker</desc>
                </valItem>
                <valItem ident="rcp">
                  <gloss>addressee / recipient</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Adressat /
                    Empfänger</desc>
                </valItem>
                <valItem ident="trc">
                  <gloss>transcriber</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Ersteller der
                    Transcription</desc>
                </valItem>
                <valItem ident="wac">
                  <gloss>writer of added comment</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname einer Person: Schreiber
                    eines zugefügten Kommentars</desc>
                </valItem>
                <valItem ident="dtn">
                  <gloss>destination</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname eines Ortes: Ziel</desc>
                </valItem>
                <valItem ident="orn">
                  <gloss>origin</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname eines Ortes:
                    Herkunftsort</desc>
                </valItem>
                <valItem ident="pup">
                  <gloss>publication place</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Eigenname eines Ortes:
                    Publikationsort</desc>
                </valItem>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <!--
                element: tei:handNote
                  - @xml:id is required 
                  better than scribe, because this is free text and has no validation
              -->
        <elementSpec ident="handNote" mode="change">
          <attList>
            <attDef ident="xml:id" mode="change" usage="req"/>
            <attDef ident="medium" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="ink"/>
                <valItem ident="pencil"/>
                <valItem ident="pncInk"/>
                <valItem ident="redInk"/>
                <valItem ident="redChalk"/>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <!--
                element: tei:handShift
                  - @scribe is deleted, use @scribeRef instead
                  -> xml:id for scribeRef must be defined in the header
              -->
        <elementSpec ident="handShift" mode="change">
          <attList>
            <attDef ident="scribe" mode="delete"/>
            <attDef ident="scribeRef" mode="change" usage="req"/>
          </attList>
        </elementSpec>
        <elementSpec ident="date" mode="change">
          <attList>
            <attDef ident="type" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="orn">
                  <gloss>origin</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Entstehungsdatum</desc>
                </valItem>
                <valItem ident="pub">
                  <gloss>publication date</gloss>
                  <desc xml:lang="de" versionDate="2018-08-02">Publikationsdatum</desc>
                </valItem>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <elementSpec ident="note" mode="change">
          <attList>
            <attDef ident="type" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="com"/>
                <valItem ident="footnote"/>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <elementSpec ident="add" module="core" mode="change">
          <attList>
            <attDef ident="type" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="archive"/>
                <valItem ident="courseBus"/>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <!--
                element: tei:pb
                  - schematron constraint on @facs
              -->
        <elementSpec ident="pb" mode="change">
          <!-- Business Rule: "page-beginnings may be marked in a note but must not link an image as faksimile" -->
          <constraintSpec ident="pbinnote" scheme="schematron">
            <constraint>
              <sch:rule context="tei:pb[parent::tei:note]">
                <sch:report test="@facs"> Error: <sch:name/> may not contain @facs if it is placed
                  in a note </sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>

        </elementSpec>
        <elementSpec ident="height" mode="change">
          <attList>
            <attDef ident="scope" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="all"/>
                <valItem ident="most"/>
                <valItem ident="range"/>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <elementSpec ident="width" mode="change">
          <attList>
            <attDef ident="type" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="all"/>
                <valItem ident="most"/>
                <valItem ident="range"/>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <elementSpec ident="relatedItem" mode="change">
          <attList>
            <attDef ident="type" mode="replace" usage="req">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="print"/>
                <valItem ident="document"/>
                <valItem ident="letter"/>
                <valItem ident="onlineedition"/>
              </valList>
            </attDef>
            <attDef ident="subtype" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="related"/>
                <valItem ident="response"/>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <elementSpec ident="title" mode="change">
          <attList>
            <attDef ident="type" mode="replace" usage="opt">
              <datatype minOccurs="1" maxOccurs="1">
                <rng:ref name="data.enumerated"/>
              </datatype>
              <valList type="closed">
                <valItem ident="main"/>
                <valItem ident="sub"/>
                <valItem ident="alt"/>
                <valItem ident="short"/>
                <valItem ident="desc"/>
              </valList>
            </attDef>
          </attList>
        </elementSpec>
        <elementSpec ident="language" module="header" mode="change">
          <attList>
            <attDef ident="ident" mode="change">
              <defaultVal>ger</defaultVal>
              <valList type="closed" mode="replace">
                <valItem ident="ger"/>
                <valItem ident="eng"/>
                <valItem ident="lat"/>
                <valItem ident="fre"/>
                <valItem ident="ita"/>
              </valList>
            </attDef>
          </attList>
        </elementSpec>

      	<dataSpec module="tei" ident="teidata.pointer" mode="change">
          <content>
            <dataRef name="anyURI"/>
          </content>
          <remarks>
            <p>Unlike vanilla TEI, we allow spaces in a URI (and thus
            give up the capability to differentiate a single URI with
            a space from 2 URIs) in order to get ID pop-ups to work in
            oXygen. See the <ref target="https://github.com/TEIC/TEI/issues/2296">
            corresponding Issue at GitHub</ref>.</p>
          </remarks>
        </dataSpec>

        <!-- Attribute: @scribeRef -->
        <constraintSpec ident="scribereferences" scheme="schematron">
          <!-- Business Rule: "Every Scribe-Reference must correspond to an identified Entity in the validated Document" -->
          <constraint>
            <sch:rule context="tei:*[@scribeRef]">
              <sch:let name="scribe-references"
                value="for $scribe in tokenize(normalize-space(@scribeRef),'\s+') return starts-with($scribe,'#') and id(substring($scribe,2))"/>
              <sch:assert test="every $x in $scribe-references satisfies $x"> Error: Every
                referenced scribe in <sch:name/>/@scibeRef ("<sch:value-of select="@scribeRef"/>")
                must point to a personal entity identified by an @xml:id in this document
                  (<sch:value-of select="$scribe-references"/>) </sch:assert>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- Attributes: @ref, @target -->
        <constraintSpec ident="validrefandtarget" scheme="schematron">
          <!-- Business Rule: "Each Reference in @ref or @target must be explicitly marked as Pointer ('#') and must correlate to an ID" -->
          <constraint>
            <sch:rule context="@*[name() = 'ref' or name() = 'target']">
              <sch:let name="declared-prefixes" value="//tei:prefixDef/@ident"/>
              <sch:let name="external-references"
                value="for $t in tokenize(normalize-space(.),'\s+') return if( not(starts-with($t, 'http')) ) then (substring-before($t, ':')) else ()"/>
              <sch:let name="results"
                value="for $t in  tokenize(normalize-space(.),'\s+') return starts-with($t,'#') and not(id(substring($t,2)))"
              /> <sch:report test="some $x in $results satisfies $x"> Error: Every local pointer in
                @<sch:name/> ("<sch:value-of select="."/>") must point to an ID in this document
                  (<sch:value-of select="$results"/>) </sch:report> <sch:report
                test="some $x in $external-references satisfies $x[not(.= $declared-prefixes)]">
                Error: Every prefix ("<sch:value-of
                  select="$external-references[not(.= $declared-prefixes)]"/>") used in @<sch:name/>
                must be predeclared in a tei:prefixDef in the header </sch:report>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- Element: name Attribute: @ref -->
        <constraintSpec ident="nameref" scheme="schematron">
          <!-- Business Rule: "Every tei:name should have a valid gnd in its @ref value" -->
          <constraint>
            <sch:rule context="tei:name[@ref]">
              <sch:let name="ref" value="string(./@ref)"/>
              <sch:let name="gndValue" value="substring-after($ref, 'gnd:')"/>
              <sch:assert test="matches($ref, '^gnd:\d')"> Error: Every referenced authority file
                should start with "gnd:" followed by a digit. Value here: "<sch:value-of
                  select="string(./@ref), ."/>" </sch:assert>
              <sch:report test="matches($ref, '\s')"> Error: A gnd MUST NOT contain a whitespace.
                Value here: "<sch:value-of select="."/>" </sch:report>
              <sch:report test="contains($ref, '_')"> Error: A gnd MUST NOT contain an underscore.
                Value here: "<sch:value-of select="."/>" </sch:report>
              <sch:assert
                test="for $i in tokenize($gndValue) return doc(string-join(('https://d-nb.info/gnd/', $i, '/about/rdf'), ''))/*:RDF"
                > Error: GND file not found for value "<sch:value-of select="string(./@ref)"/>". In
                case of other errors reported here, fix these at first and check the provided ID if
                the error consists. </sch:assert> </sch:rule>
          </constraint>
        </constraintSpec>
        <constraintSpec ident="name-string" scheme="schematron">
          <!-- Business Rule: "A tei:name MUST not end with punctuation" -->
          <constraint>
            <sch:rule context="tei:name">
              <sch:report test="ends-with(., ',') or ends-with(., ';')"> Error: tei:name should not
                end with "," or ";". Value here: "<sch:value-of select="."/>" </sch:report>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <constraintSpec ident="idno-string" scheme="schematron">
          <!-- Business Rule: "A tei:idno MUST start with a verified sigla (used for processing the docs, image license)" -->
          <constraint>
            <sch:rule context="tei:msIdentifier/tei:idno">
              <sch:assert test="
                  starts-with(., 'Autographensammlung Günther Schmid ') or
                  starts-with(., 'BBAW ') or
                  starts-with(., 'FDH-FGM, ') or
                  starts-with(., 'GSA ') or
                  starts-with(., 'GStA PK,') or
                  starts-with(., 'HAAB ') or
                  starts-with(., 'HU UA,') or
                  starts-with(., 'Leopoldina Archiv / ') or
                  starts-with(., 'RSA ') or
                  starts-with(., 'SBB Handschriftenabt., ') or
                  starts-with(., 'SMB-ZA, ') or
                  starts-with(., 'SUB Göttingen, ') or
                  starts-with(., 'UAHW, ') or
                  starts-with(., 'GMD, ') or
                  starts-with(., 'HAStK')
                "> Error: tei:idno refers to a instituion not available for
                processing. Value here: "<sch:value-of select="."/>. Allowed values the text should
                start with are 'Autographensammlung Günther Schmid ', 'BBAW ', 'FDH-FGM, ', 'GSA ',
                'GStA PK,', 'HAAB ', 'HU UA,', 'Leopoldina Archiv / ', 'RSA ', 'SBB
                Handschriftenabt., ', 'SMB-ZA, ', 'SUB Göttingen, ', 'UAHW, ' or 'GMD,
                '.</sch:assert>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <constraintSpec ident="idno-empty" scheme="schematron">
          <!-- Business Rule: "A tei:idno MUST start with a verified sigla (used for processing the docs, image license)" -->
          <constraint>
            <sch:rule context="tei:idno">
              <sch:assert test="string-length(.) gt 0">Error: An empty tei:idno has no function and
                should be removed.</sch:assert>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- editorial commentary -->
        <constraintSpec ident="body-note" scheme="schematron">
          <constraint>
            <sch:rule context="(tei:body/tei:*)[local-name() eq 'note']">
              <sch:report role="info" test="true()"> Consider moving the editorial comment regarding
                the complete document to teiHeader/profileDesc/abstract. </sch:report>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- document MUST contain a tei:pb -->
        <constraintSpec ident="body-pb" scheme="schematron">
          <constraint>
            <sch:rule context="tei:body">
              <sch:assert test=".//tei:pb"> At least a single tei:pb element is required.
              </sch:assert>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- disallow for tei:name/tei:name -->
        <constraintSpec ident="name-name" scheme="schematron">
          <constraint>
            <sch:rule context="tei:name">
              <sch:report role="info" test=".//tei:name"> Nested tei:name adressing <sch:value-of
                  select=".//tei:name/string()"/> within <sch:value-of select="./string()"/>.
              </sch:report>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- disallow already specified @rendition -->
        <constraintSpec ident="rendition-rendition" scheme="schematron">
          <constraint>
            <sch:rule context="tei:*[@rendition]">
              <sch:report
                test=".[tokenize(@rendition, ' ') = ./ancestor::tei:*[@rendition][not(@hand eq ./@hand)]/tokenize(@rendition, ' ')]"
                > The rendition is specified before. </sch:report>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- disallow ending characters in tei:supplied 
        <constraintSpec ident="supplied-endingChar" scheme="schematron">
          <constraint>
            <sch:rule context="tei:supplied">
              <sch:report test="matches(., '[\-–—]$')"> A tei:supplied is not allowed to end with
                hyphenation character (“-”, “–” or “—”). Value here: “<sch:value-of
                  select="./string()"/>” </sch:report>
            </sch:rule>
          </constraint>
        </constraintSpec> -->

        <!-- check for tei:text/@xml:id to match filename -->
        <constraintSpec ident="filename-text-id" scheme="schematron">
          <constraint>
            <sch:rule context="tei:text">
              <sch:assert
                test="./@xml:id = substring-before(tokenize(document-uri(/), '/')[last()], '.xml')">
                The xml:id given for element tei:text should match the filename (w/o filename
                extension). filename w/o extension: “<sch:value-of
                  select="substring-before(tokenize(document-uri(/), '/')[last()], '.xml')"/>”
                tei:text/@xml:id: “<sch:value-of select="string(./@xml:id)"/>” </sch:assert>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- test referenced entities for availabiltiy -->
        <constraintSpec ident="ref-target-availability" scheme="schematron">
          <constraint>
            <sch:rule xmlns="http://www.tei-c.org/ns/1.0"
              xmlns:rng="http://relaxng.org/ns/structure/1.0"
              xmlns:sch="http://purl.oclc.org/dsdl/schematron"
              context="tei:ref[@target][not(contains(@target, 'textgrid:3zhh5'))][not(contains(@target, 'textgrid:3zhh6'))][not(contains(@target, 'd-nb.info'))][not( ./parent::tei:relatedItem )]">
              <sch:let name="docPath" value="if ( contains(./@target, '#') ) then substring-before(./@target, '#') else string(@target) " />
              <sch:let name="idref" value="substring-after(./@target, '#')" />
              <!-- check for the file at first -->
              <sch:assert test="doc-available($docPath) or doc-available('../TEI_doc_bearb/' || $docPath)"> File is not available.
                “<sch:value-of select="$docPath"/>”
              </sch:assert>
              <!-- check for the idref beeing available -->
              <sch:assert test="if ($idref != '') then doc($docPath)/id($idref) or doc('../TEI_doc_bearb/' || $docPath)/id($idref) else true()"> IDREF 
                “<sch:value-of select="$idref"/>” is not available in file “<sch:value-of select="$docPath"/>”.
                
              </sch:assert>
            </sch:rule>
          </constraint>
        </constraintSpec>
        
        <!-- test referenced entities for availabiltiy, corresp → bibliography -->
        <constraintSpec ident="bilb-corresp-availability" scheme="schematron">
          <constraint>
            <sch:rule xmlns="http://www.tei-c.org/ns/1.0"
              xmlns:rng="http://relaxng.org/ns/structure/1.0"
              xmlns:sch="http://purl.oclc.org/dsdl/schematron"
              context="tei:bibl[@corresp]">
              <sch:let name="docPath" value="if ( contains(./@corresp, '#') ) then substring-before(./@corresp, '#') else string(@corresp) " />
              <sch:let name="idref" value="substring-after(./@corresp, '#')" />
              <!-- check for the file at first -->
              <sch:assert test="doc-available($docPath) or doc-available('../TEI_doc_bearb/' || $docPath)"> File is not available.
                “<sch:value-of select="$docPath"/>”
              </sch:assert>
              <!-- check for the idref beeing available -->
              <sch:assert test="if ($idref != '') then doc($docPath)/id($idref) or doc('../TEI_doc_bearb/' || $docPath)/id($idref) else true()"> IDREF 
                “<sch:value-of select="$idref"/>” is not available in file “<sch:value-of select="$docPath"/>”.
                
              </sch:assert>
            </sch:rule>
          </constraint>
        </constraintSpec>

        <!-- test if graphic is available in S3 -->
        <constraintSpec ident="s3-content" scheme="schematron">
          <constraint>
            <sch:rule xmlns="http://www.tei-c.org/ns/1.0"
              xmlns:rng="http://relaxng.org/ns/structure/1.0"
              xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:graphic[@url][starts-with(@url, 'Graph')]">
              <sch:assert test="./@url = doc('s3-content.xml')//item/text()"> File is not available in S3. Please check for the path: “<sch:value-of select="string(./@url)"/>”
              </sch:assert>
            </sch:rule>
          </constraint>
        </constraintSpec>
        
      </schemaSpec>
    </body>
  </text>
</TEI>
