<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_odds.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<!--
  Adapted from DHBern/simler_data, schema/tei_simler.odd, 2026-11-13 (bbc9563): the register of
  persons and places in standOff, which the examples carry, and without the constraint of the
  commentary import and two clean-up checks; examples/README.md lists the changes.
-->
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:eg="http://www.tei-c.org/ns/Examples">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>TEI Simler: A focused TEI customization for the Simler Digital Scholarly Edition</title>
        <author>Simler Project Team</author>
      </titleStmt>
      <publicationStmt>
        <publisher>Simler Project Team</publisher>
        <availability status="free">
          <licence target="https://creativecommons.org/licenses/by/4.0/">The transcriptions of the Simler
            edition, this ODD and the schema and rendering generated from it: Simler Project Team,
            licensed under CC BY 4.0.</licence>
          <p>The facsimiles are the holding libraries', on the terms e-rara.ch states for each.</p>
        </availability>
      </publicationStmt>
      <sourceDesc>
        <p>This ODD is a project-focused customization of 
          <ref target="https://www.deutschestextarchiv.de/doku/basisformat/">DTA-Basisformat (DTABf)</ref>, and carries all of
          the project's modifications of that customization. Its scope is derived from the encoding of
          Simler's <hi rend="italic">Teutsche Gedichte</hi>; it selects the elements, attributes and
          values the edition uses, and follows the documentation conventions of the TEI
          <ref target="https://github.com/TEIC/TEI/blob/dev/P5/Exemplars/tei_simplePrint.odd"
            >Simple Print (tei_simplePrint)</ref> exemplar — in particular, the appearance of the
          source is recorded with <gi>rendition</gi> declarations in <gi>tagsDecl</gi> referenced
          from the global <att>rendition</att> attribute.</p>
      </sourceDesc>
    </fileDesc>
    <encodingDesc>
      <projectDesc>
        <p>TEI Simler is a TEI P5 customization for the digital scholarly edition of the collected
          poems of the Zurich poet Johann Wilhelm Simler (1605–1672). Several editions of the
          <hi rend="italic">Teutsche Gedichte</hi> are transcribed; this schema serves the whole corpus. 
          The transcription is a line- and page-faithful diplomatic rendering of early-modern printed 
          books set mainly in Fraktur.</p>
      </projectDesc>
      <editorialDecl>
        <p>The transcription preserves the physical layout of the printed source: every printed line
          <emph>end</emph> is marked with <gi>lb</gi> (following the DTABf convention — the line break
          is set after the outermost closing element), every page with <gi>pb</gi>, and hyphenation
          across a line is encoded with <gi>lb</gi> <att>break</att>=<val>no</val> (the hyphen being
          retained). Verse is encoded with <gi>lg</gi> and <gi>l</gi>; front matter with
          <gi>front</gi>, <gi>titlePage</gi> and typed <gi>div</gi>. The appearance of the source is
          recorded on <att>rendition</att> using the pointer tokens declared in <gi>tagsDecl</gi>.</p>
        <p>Obvious printing errors are corrected with <gi>choice</gi> (<gi>sic</gi>/<gi>corr</gi>);
          unreadable passages with <gi>unclear</gi>; editorially supplied text with <gi>supplied</gi>.
          Named entities are tagged with <gi>rs</gi> carrying <att>type</att> and a typed
          <att>key</att>. Editorial comments are anchored with <gi>anchor</gi> pairs and held in
          <gi>note</gi>.</p>
        <p>The source files are a work in progress; content models and value lists are kept
          deliberately permissive (suggested rather than closed value lists) so that minor encoding
          variation does not invalidate a document.</p>
      </editorialDecl>
      <tagsDecl>
        <!-- Source appearance, declared once and pointed to from @rendition. The CSS records how
             the passage looks in the SOURCE; custom properties are the edition's design tokens. -->
        <rendition xml:id="aq" scheme="css">font-family: var(--f-antiqua); font-size-adjust: var(--x-text);</rendition>
        <rendition xml:id="fr" scheme="css">font-family: var(--f-text);</rendition><!-- Fraktur within Antiqua -->
        <rendition xml:id="b" scheme="css">font-weight: 600;</rendition>
        <rendition xml:id="i" scheme="css">font-style: italic;</rendition>
        <rendition xml:id="c" scheme="css">text-align: center;</rendition>
        <rendition xml:id="right" scheme="css">text-align: right;</rendition>
        <rendition xml:id="g" scheme="css">letter-spacing: 0.125em;</rendition><!-- gesperrt -->
        <rendition xml:id="k" scheme="css">font-variant: small-caps;</rendition><!-- Kapitälchen -->
        <rendition xml:id="u" scheme="css">text-decoration: underline;</rendition>
        <rendition xml:id="in" scheme="css">float: left; font-size: 2.1em; font-size-adjust: cap-height 0.65; line-height: 0.86; padding-right: 0.06em; font-weight: 500;</rendition><!-- Initiale: one cap height in Fraktur and Antiqua -->
        <rendition xml:id="sup" scheme="css">vertical-align: super; font-size: smaller;</rendition>
        <rendition xml:id="sub" scheme="css">vertical-align: sub; font-size: smaller;</rendition>
        <rendition xml:id="larger" scheme="css">font-size: larger;</rendition>
        <rendition xml:id="smaller" scheme="css">font-size: smaller;</rendition>
        <rendition xml:id="et" scheme="css">text-indent: 2em;</rendition>
        <rendition xml:id="et2" scheme="css">text-indent: 4em;</rendition>
        <rendition xml:id="et3" scheme="css">text-indent: 6em;</rendition>
        <rendition xml:id="hang" scheme="css">padding-left: 2em; text-indent: -2em;</rendition><!-- hängender Einzug -->
        <rendition xml:id="hr" scheme="css">display: block; border-top: 1px solid rgb(var(--c-ink) / 0.45); width: 20%; margin: 1.2em auto;</rendition>
        <!-- The Buchstabwechsel pages: an interleaved two-column setting (read row by row, so the
             lines alternate left and right) whose acrostic lines carry marginal letters, set in the
             line's padding. The line boxes are laid out by the l models. -->
        <rendition xml:id="twocol" scheme="css">--acro-body: 1.45em; --acro-fin: 1.25em; --indent-step: 1.2em; display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.3em; align-items: baseline;</rendition>
        <rendition xml:id="acrostic" scheme="css">position: relative;</rendition>
        <rendition xml:id="acroInit" scheme="css">position: absolute; left: 0; font-weight: 600;</rendition>
        <rendition xml:id="acroFin" scheme="css">position: absolute; right: 0; font-weight: 600;</rendition>
      </tagsDecl>
    </encodingDesc>
  </teiHeader>
  <text>
    <body>
      <head>TEI Simler: A focused TEI customization for the Simler Digital Scholarly Edition</head>

      <p>This document defines TEI Simler, a slim customization of the
        <ref target="https://tei-c.org/guidelines/">TEI Guidelines</ref> for the digital scholarly
        edition of Johann Wilhelm Simler's <hi rend="italic">Teutsche Gedichte</hi>. It keeps the
        project's modifications of the DTABf-derived schema while excluding the DTABf modules,
        elements and attributes that the project does not use.</p>

      <p>Each source document is a printed edition encoded within a <gi>TEI</gi> element holding a
        <gi>teiHeader</gi> and one <gi>text</gi>. The <gi>text</gi> may open with <gi>front</gi>
        matter (title page, dedication, frontispiece) and continues with a <gi>body</gi> containing a
        hierarchy of <gi>div</gi> elements (book → poem) whose verse is encoded with <gi>lg</gi> and
        <gi>l</gi>.</p>

      <p>The Processing Model renders the edition. Each element takes the first <gi>model</gi> whose
        <att>predicate</att> holds; a <gi>modelSequence</gi> renders each of its models whose
        predicate holds, one after the other. A <gi>modelGrp</gi>'s <gi>outputRendition</gi> styles
        all of its models; having no predicate, a group decides like a model without one, so a
        model behind it is never reached. A styled model among several names its class with
        <att>cssClass</att>.
        Predicates see the text as encoded. Params are
        XPath: the nodes they select are rendered by their own models, anything else as text;
        params named <val>--…</val> become CSS custom properties of the rendered element,
        <val>data-…</val> its attributes. Models with an <att>output</att> belong to that output
        and take precedence over the base models there. The base rendering — the diplomatic text —
        is what the models without an <att>output</att> give; <val>web</val> names it where a model
        wants to say so, and is read here as the base. <val>page</val>, on <gi>TEI</gi>, names
        what the page shows around the text. <val>plain</val>, the text of the search index, is
        rendered on its own. <val>normalized</val> (the reading text) and <val>entities</val> (entity
        highlighting) are views over the base rendering that can be switched on and off: a view's
        model omits the element, restyles it, or gives the same behaviour other params — an
        <val>alternate</val> shows the view's own default; a view's <gi>modelSequence</gi> does so
        model by model for the base sequence. The source appearance
        (<att>rendition</att>) is carried where the model sets <att>useSourceRendition</att>; a model
        that lays out the rendition itself does without. Colours, fonts and measures are the
        edition's design tokens (CSS custom properties).</p>

      <p>The output names other than <val>web</val> are this edition's own, not the TEI's, and so
        are the two param prefixes. A Processing-Model tool that does not know them renders the
        models without an <att>output</att> and leaves the rest out: the base layer alone, which is
        the diplomatic text and a sound reading of the edition. The views are therefore named
        plainly rather than behind a prefix, and nothing the base layer needs is hidden in one of
        them. Within a view, the first <gi>desc</gi> of its models names it for the reading switch
        and a second explains it, so the switches say what the ODD says.</p>

      <schemaSpec ident="tei_simler" start="TEI" prefix="tei_" targetLang="de" docLang="en">

        <!-- ===================================================================
             MODULES — only those the Simler edition uses
             =================================================================== -->
        <moduleRef key="header" include="teiHeader fileDesc titleStmt editionStmt edition publicationStmt sourceDesc biblFull extent idno encodingDesc editorialDecl profileDesc langUsage language textClass classCode"/>
        <moduleRef key="core" include="p lb pb head label hi l lg list item rs choice sic corr abbr unclear milestone note num title author bibl name date pubPlace publisher ref cit quote cb measure respStmt resp gap"/>
        <moduleRef key="textstructure" include="TEI text front body back div titlePage titlePart docTitle docAuthor docImprint docDate docEdition closer signed salute dateline epigraph"/>
        <moduleRef key="namesdates" include="persName surname forename listPerson person birth death listPlace place placeName"/>
        <moduleRef key="msdescription" include="msDesc msIdentifier repository physDesc typeDesc"/>
        <moduleRef key="transcr" include="fw supplied"/>
        <moduleRef key="figures" include="figure"/>
        <moduleRef key="linking" include="anchor standOff"/>
        <moduleRef key="tei"/>

        <!-- ===================================================================
             ATTRIBUTE CLASSES — trimmed as in the DTA base format: the classes it deletes are
             deleted, and of the classes it keeps only its attributes remain
             =================================================================== -->
        <classSpec type="atts" ident="att.cmc" mode="delete"/>
        <classSpec type="atts" ident="att.global.change" mode="delete"/>
        <classSpec type="atts" ident="att.global.source" mode="delete"/>
        <classSpec type="atts" ident="att.breaking" mode="delete"/>
        <classSpec type="atts" ident="att.calendarSystem" mode="delete"/>
        <classSpec type="atts" ident="att.datable.custom" mode="delete"/>
        <classSpec type="atts" ident="att.datable.iso" mode="delete"/>
        <classSpec type="atts" ident="att.declarable" mode="delete"/>
        <classSpec type="atts" ident="att.declaring" mode="delete"/>
        <classSpec type="atts" ident="att.divLike" mode="delete"/>
        <classSpec type="atts" ident="att.docStatus" mode="delete"/>
        <classSpec type="atts" ident="att.edition" mode="delete"/>
        <classSpec type="atts" ident="att.fragmentable" mode="delete"/>
        <classSpec type="atts" ident="att.internetMedia" mode="delete"/>
        <classSpec type="atts" ident="att.measurement" mode="delete"/>
        <classSpec type="atts" ident="att.msExcerpt" mode="delete"/>
        <classSpec type="atts" ident="att.notated" mode="delete"/>
        <classSpec type="atts" ident="att.ranging" mode="delete"/>
        <classSpec type="atts" ident="att.scope" mode="delete"/>
        <classSpec type="atts" ident="att.sortable" mode="delete"/>
        <classSpec type="atts" ident="att.spanning" mode="delete"/>
        <classSpec type="atts" ident="att.written" mode="delete"/>
        <classSpec type="atts" ident="att.global" mode="change">
          <attList>
            <attDef ident="xml:base" mode="delete"/>
            <attDef ident="xml:space" mode="delete"/>
          </attList>
        </classSpec>
        <classSpec type="atts" ident="att.global.linking" mode="change">
          <attList>
            <attDef ident="copyOf" mode="delete"/>
            <attDef ident="exclude" mode="delete"/>
            <attDef ident="select" mode="delete"/>
            <attDef ident="synch" mode="delete"/>
          </attList>
        </classSpec>
        <classSpec type="atts" ident="att.typed" mode="change">
          <attList><attDef ident="subtype" mode="delete"/></attList>
        </classSpec>
        <!-- @key is rs's own (see there) -->
        <classSpec type="atts" ident="att.canonical" mode="change">
          <attList><attDef ident="key" mode="delete"/></attList>
        </classSpec>
        <classSpec type="atts" ident="att.naming" mode="change">
          <attList><attDef ident="nymRef" mode="delete"/></attList>
        </classSpec>
        <classSpec type="atts" ident="att.personal" mode="change">
          <attList><attDef ident="sort" mode="delete"/></attList>
        </classSpec>
        <classSpec type="atts" ident="att.pointing" mode="change">
          <attList>
            <attDef ident="evaluate" mode="delete"/>
            <attDef ident="targetLang" mode="delete"/>
          </attList>
        </classSpec>
        <classSpec type="atts" ident="att.editLike" mode="change">
          <attList>
            <attDef ident="evidence" mode="delete"/>
            <attDef ident="instant" mode="delete"/>
          </attList>
        </classSpec>
        <classSpec type="atts" ident="att.datable" mode="change">
          <attList><attDef ident="period" mode="delete"/></attList>
        </classSpec>
        <classSpec type="atts" ident="att.datable.w3c" mode="change">
          <attList>
            <attDef ident="from" mode="delete"/>
            <attDef ident="to" mode="delete"/>
            <attDef ident="notAfter" mode="delete"/>
            <attDef ident="notBefore" mode="delete"/>
          </attList>
        </classSpec>
        <classSpec type="atts" ident="att.dimensions" mode="change">
          <attList>
            <attDef ident="precision" mode="delete"/>
            <attDef ident="scope" mode="delete"/>
          </attList>
        </classSpec>

        <!-- @rendition: pointer tokens declared in tagsDecl. As in the DTA base format the values are
             a closed list. A new token is declared in tagsDecl and added to the list. -->
        <classSpec type="atts" ident="att.global.rendition" mode="change">
          <constraintSpec ident="rendition-order" scheme="schematron">
            <desc>The tokens of <att>rendition</att> are a set; they are written once, separated by
              single spaces, in the order in which <gi>tagsDecl</gi> declares them, so that the
              same appearance is always the same value. The list below is that order.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:*[@rendition]">
                <sch:let name="order" value="('#aq', '#fr', '#b', '#i', '#c', '#right', '#g', '#k', '#u', '#in', '#sup', '#sub', '#larger', '#smaller', '#et', '#et2', '#et3', '#hang', '#hr', '#twocol', '#acrostic', '#acroInit', '#acroFin')"/>
                <sch:let name="t" value="tokenize(normalize-space(@rendition), ' ')"/>
                <sch:let name="sorted" value="string-join((for $o in $order return $o[. = $t], distinct-values($t[not(. = $order)])), ' ')"/>
                <sch:report role="warning" test="string(@rendition) ne $sorted">[S-REN]
                  @rendition="<sch:value-of select="@rendition"/>" should read "<sch:value-of
                  select="$sorted"/>": its tokens once, in the order of tagsDecl, single-spaced
                  (a token tagsDecl does not declare stays at the end; the schema rejects
                  it).</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <constraintSpec ident="rendition-letter" scheme="schematron">
            <desc>Some renditions describe single letters or a position within a line: an
              initial, superscript, subscript, an acrostic's first or last letter. They stand on
              the <gi>hi</gi> that holds those letters, never on a block. The letter tokens of
              <gi>tagsDecl</gi> are listed here once.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                context="tei:*[not(self::tei:hi)][@rendition]">
                <sch:report role="warning"
                  test="tokenize(@rendition, '\s+') = ('#in', '#sup', '#sub', '#acroInit', '#acroFin')">[S-REP]
                  @rendition="<sch:value-of select="@rendition"/>" on &lt;<sch:name/>&gt;: an
                  initial, superscript, subscript or acrostic letter (#in, #sup, #sub, #acroInit,
                  #acroFin) is marked on the hi that holds the letters.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <attDef ident="rend" mode="delete"/>
            <attDef ident="style" mode="delete"/>
            <attDef ident="rendition" mode="change" usage="opt">
              <desc>One or more pointers to <gi>rendition</gi> elements in <gi>tagsDecl</gi>,
                recording the appearance of the source passage (e.g. <val>#aq</val>,
                <val>#aq #et</val>), in the order of <gi>tagsDecl</gi>.</desc>
              <datatype minOccurs="1" maxOccurs="unbounded">
                <dataRef key="teidata.pointer"/>
              </datatype>
              <valList type="closed" mode="add">
                <valItem ident="#aq"><desc>Antiqua in a Fraktur work</desc></valItem>
                <valItem ident="#fr"><desc>Fraktur within Antiqua</desc></valItem>
                <valItem ident="#b"><desc>bold</desc></valItem>
                <valItem ident="#i"><desc>italic</desc></valItem>
                <valItem ident="#c"><desc>centred</desc></valItem>
                <valItem ident="#right"><desc>right-aligned</desc></valItem>
                <valItem ident="#g"><desc>letter-spaced (gesperrt)</desc></valItem>
                <valItem ident="#k"><desc>small capitals</desc></valItem>
                <valItem ident="#u"><desc>underlined</desc></valItem>
                <valItem ident="#in"><desc>initial</desc></valItem>
                <valItem ident="#sup"><desc>superscript</desc></valItem>
                <valItem ident="#sub"><desc>subscript</desc></valItem>
                <valItem ident="#larger"><desc>larger than the main text</desc></valItem>
                <valItem ident="#smaller"><desc>smaller than the main text</desc></valItem>
                <valItem ident="#et"><desc>indented</desc></valItem>
                <valItem ident="#et2"><desc>indented twice</desc></valItem>
                <valItem ident="#et3"><desc>indented three times</desc></valItem>
                <valItem ident="#hang"><desc>hanging indent: the lines after the first indented</desc></valItem>
                <valItem ident="#hr"><desc>a rule (line) between units</desc></valItem>
                <valItem ident="#twocol"><desc>two interleaved columns</desc></valItem>
                <valItem ident="#acrostic"><desc>an acrostic line</desc></valItem>
                <valItem ident="#acroInit"><desc>the acrostic's initial letter</desc></valItem>
                <valItem ident="#acroFin"><desc>the acrostic's final letter</desc></valItem>
              </valList>
            </attDef>
          </attList>
        </classSpec>

        <!-- ===================================================================
             REUSABLE CONTENT — phrase-level model shared across the transcription
             =================================================================== -->
        <macroSpec ident="macro.simlerInline" mode="add">
          <desc>The phrase-level content shared by the transcription elements: text interspersed with
            highlighting, entity references, editorial interventions, note anchors and line/page/column
            breaks.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/>
              <elementRef key="hi"/>
              <elementRef key="rs"/>
              <elementRef key="choice"/>
              <elementRef key="unclear"/>
              <elementRef key="supplied"/>
              <elementRef key="gap"/>
              <elementRef key="num"/>
              <elementRef key="note"/>
              <elementRef key="anchor"/>
              <elementRef key="abbr"/>
              <elementRef key="fw"/>
              <elementRef key="lb"/>
              <elementRef key="pb"/>
              <elementRef key="cb"/>
            </alternate>
          </content>
        </macroSpec>

        <!-- ===================================================================
             ROOT, HEADER
             =================================================================== -->
        <elementSpec ident="TEI" module="textstructure" mode="change">
          <desc>The root element of a Simler edition document: one <gi>teiHeader</gi> followed by one
            <gi>text</gi>. <att>type</att> is required.</desc>
          <content>
            <sequence>
              <elementRef key="teiHeader"/>
              <elementRef key="text"/>
              <elementRef key="standOff" minOccurs="0"/>
            </sequence>
          </content>
          <attList>
            <attDef ident="version" mode="delete"/>
            <attDef ident="type" mode="change" usage="req">
              <valList type="closed" mode="replace">
                <valItem ident="simler-framework"><desc>Simler edition document</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <model behaviour="document"/>
          <!-- what the page shows around the text: its title and language (German unless the header
               says otherwise), the credit its licence asks for, the facsimile, the entities it names -->
          <model output="page" behaviour="metadata">
            <param name="title" value="normalize-space(teiHeader/fileDesc/titleStmt/title[1])"/>
            <param name="lang" value="if (teiHeader/profileDesc/langUsage/language/@ident) then string((teiHeader/profileDesc/langUsage/language/@ident)[1]) else 'de'"/>
            <param name="credit" value="'Transcription: Simler Project Team, CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Facsimiles: e-rara.ch.'"/>
            <param name="manifest" value="normalize-space((descendant::idno[@type='URLIIIF'])[1])"/>
            <param name="pages" value="descendant::pb/@facs"/>
            <param name="entities" value="descendant::rs/@key"/>
          </model>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <TEI type="simler-framework"><teiHeader><!-- ... --></teiHeader><text><!-- ... --></text></TEI>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="teiHeader" module="header" mode="change">
          <desc>Document metadata: a <gi>fileDesc</gi>, an optional <gi>encodingDesc</gi> and an
            optional (possibly empty) <gi>profileDesc</gi>.</desc>
          <content>
            <sequence>
              <elementRef key="fileDesc"/>
              <elementRef key="encodingDesc" minOccurs="0"/>
              <elementRef key="profileDesc" minOccurs="0"/>
            </sequence>
          </content>
          <model behaviour="metadata"/>
        </elementSpec>

        <elementSpec ident="fileDesc" module="header" mode="change">
          <desc>The bibliographic description of the file.</desc>
          <content>
            <sequence>
              <elementRef key="titleStmt"/>
              <elementRef key="editionStmt" minOccurs="0"/>
              <elementRef key="publicationStmt"/>
              <elementRef key="sourceDesc"/>
            </sequence>
          </content>
        </elementSpec>

        <elementSpec ident="titleStmt" module="header" mode="change">
          <desc>One or more <gi>title</gi>s, optional <gi>author</gi>s and statements of
            responsibility.</desc>
          <content>
            <sequence>
              <elementRef key="title" minOccurs="1" maxOccurs="unbounded"/>
              <elementRef key="author" minOccurs="0" maxOccurs="unbounded"/>
              <elementRef key="respStmt" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
          </content>
        </elementSpec>

        <elementSpec ident="title" module="core" mode="change">
          <desc>A title of the edited text.</desc>
          <content><macroRef key="macro.phraseSeq"/></content>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="semi" mode="replace">
                <valItem ident="main"><desc>main title</desc></valItem>
                <valItem ident="sub"><desc>subtitle</desc></valItem>
              </valList>
            </attDef>
            <attDef ident="level" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="a"><desc>analytic: an article or a part</desc></valItem>
                <valItem ident="j"><desc>a journal</desc></valItem>
                <valItem ident="m"><desc>a monograph: in the header, the printed volume</desc></valItem>
                <valItem ident="s"><desc>a series</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <title type="main">Johann Wilhelm Simlers Teutsche Gedichte</title>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="author" module="core" mode="change">
          <desc>The author of the edited text, normally a structured <gi>persName</gi>.</desc>
          <content>
            <alternate minOccurs="1" maxOccurs="unbounded">
              <textNode/><elementRef key="persName"/>
            </alternate>
          </content>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <author><persName ref="http://d-nb.info/gnd/119151693"><surname>Simler</surname><forename>Johann
                Wilhelm</forename></persName></author>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="persName" module="namesdates" mode="change">
          <desc>A personal name; <att>ref</att> links to an external authority record (GND).</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="surname"/><elementRef key="forename"/>
            </alternate>
          </content>
          <model behaviour="inline">
            <outputRendition>font-weight: 600;</outputRendition>
          </model>
        </elementSpec>

        <elementSpec ident="editionStmt" module="header" mode="change">
          <content><elementRef key="edition"/></content>
        </elementSpec>
        <elementSpec ident="edition" module="header" mode="change">
          <content><macroRef key="macro.phraseSeq"/></content>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <edition>Vollständige digitalisierte Ausgabe.</edition>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="publicationStmt" module="header" mode="change">
          <desc>The publication statement: one or more paragraphs, or structured
            publisher/place/date.</desc>
          <content>
            <alternate minOccurs="1" maxOccurs="unbounded">
              <elementRef key="p"/>
              <elementRef key="publisher"/>
              <elementRef key="pubPlace"/>
              <elementRef key="date"/>
            </alternate>
          </content>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <publicationStmt><p>unknown</p></publicationStmt>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="sourceDesc" module="header" mode="change">
          <desc>Describes the digitised printed source: its bibliographic record (<gi>biblFull</gi> from
            the DTA import, or a loose <gi>bibl</gi>) and the physical copy (<gi>msDesc</gi>).</desc>
          <content>
            <alternate minOccurs="1" maxOccurs="unbounded">
              <elementRef key="bibl"/><elementRef key="biblFull"/><elementRef key="msDesc"/>
            </alternate>
          </content>
        </elementSpec>

        <elementSpec ident="bibl" module="core" mode="change">
          <desc>A loosely structured bibliographic reference holding the identifiers of the
            digitised source.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="idno"/><elementRef key="title"/><elementRef key="author"/>
            </alternate>
          </content>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="semi" mode="replace">
                <valItem ident="M"><desc>monograph</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <bibl><idno type="URLIIIF">https://www.e-rara.ch/i3f/v20/4049159/manifest</idno></bibl>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="idno" module="header" mode="change">
          <desc>An identifier or URI for the source.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="idno"/>
            </alternate>
          </content>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="semi" mode="replace">
                <valItem ident="URLIIIF"><desc>URL of the IIIF presentation manifest; its root is also the
                  root of the page images named by <att>facs</att></desc></valItem>
                <valItem ident="URLImages"><desc>URL of the page images</desc></valItem>
                <valItem ident="URLCatalogue"><desc>URL of the library catalogue record</desc></valItem>
                <valItem ident="DOI"><desc>DOI of the digitised copy</desc></valItem>
                <valItem ident="Transkribus"><desc>Transkribus document/collection identifier</desc></valItem>
                <valItem ident="shelfmark"><desc>library shelfmark of the printed copy</desc></valItem>
                <valItem ident="GND"><desc>in the register: the entry's GND number</desc></valItem>
                <valItem ident="HLS"><desc>in the register: the URL of the entry's article in the Historisches Lexikon der Schweiz</desc></valItem>
                <valItem ident="GeoNames"><desc>in the register: the place's GeoNames number</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <!-- in the register, a link to the authority; the header's are metadata -->
          <model cssClass="idno-link" predicate="@type='GND'" behaviour="link">
            <param name="uri" value="concat('https://d-nb.info/gnd/', normalize-space(.))"/>
            <param name="content" value="'GND'"/>
          </model>
          <model cssClass="idno-link" predicate="@type='HLS'" behaviour="link">
            <param name="uri" value="normalize-space(.)"/>
            <param name="content" value="'HLS'"/>
          </model>
          <model cssClass="idno-link" predicate="@type='GeoNames'" behaviour="link">
            <param name="uri" value="concat('https://www.geonames.org/', normalize-space(.))"/>
            <param name="content" value="'GeoNames'"/>
          </model>
        </elementSpec>

        <elementSpec ident="date" module="core" mode="change">
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="semi" mode="replace">
                <valItem ident="publication"><desc>date of publication of the source</desc></valItem>
                <valItem ident="firstPublication"><desc>date of first publication</desc></valItem>
                <valItem ident="importDTA"><desc>date of the DTA import</desc></valItem>
              </valList>
            </attDef>
          </attList>
        </elementSpec>

        <elementSpec ident="measure" module="core" mode="change">
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="semi" mode="replace">
                <valItem ident="pages"><desc>number of pages</desc></valItem>
              </valList>
            </attDef>
          </attList>
        </elementSpec>

        <elementSpec ident="publisher" module="core" mode="change">
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="rs"/><elementRef key="lb"/>
              <elementRef key="name"/>
            </alternate>
          </content>
          <model behaviour="inline"/>
        </elementSpec>

        <elementSpec ident="profileDesc" module="header" mode="change">
          <desc>Optional descriptive profile (language usage, classification). May be empty.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <elementRef key="langUsage"/><elementRef key="textClass"/>
            </alternate>
          </content>
        </elementSpec>
        <elementSpec ident="language" module="header" mode="change">
          <attList><attDef ident="usage" mode="delete"/></attList>
        </elementSpec>

        <!-- ===================================================================
             TEXT STRUCTURE
             =================================================================== -->
        <elementSpec ident="text" module="textstructure" mode="change">
          <desc>The transcribed text: an optional <gi>front</gi>, a <gi>body</gi> and an optional
            <gi>back</gi>. A front-matter volume may carry <gi>front</gi> without a <gi>body</gi>.</desc>
          <content>
            <sequence>
              <elementRef key="front" minOccurs="0"/>
              <elementRef key="body" minOccurs="0"/>
              <elementRef key="back" minOccurs="0"/>
            </sequence>
          </content>
          <model behaviour="block">
            <outputRendition>font-size: var(--fs-text); line-height: var(--lh-text); hyphens: none; max-width: var(--measure); font-variant-ligatures: common-ligatures;</outputRendition>
          </model>
        </elementSpec>

        <elementSpec ident="front" module="textstructure" mode="change">
          <desc>Front matter: title page(s) and prefatory divisions (dedication, frontispiece).</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <elementRef key="titlePage"/><elementRef key="div"/><elementRef key="figure"/>
              <elementRef key="milestone"/><elementRef key="lb"/><elementRef key="pb"/>
            </alternate>
          </content>
          <model behaviour="block"/>
        </elementSpec>

        <elementSpec ident="back" module="textstructure" mode="change">
          <desc>Back matter: postface, register, corrigenda, appendix.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <elementRef key="div"/><elementRef key="figure"/><elementRef key="milestone"/>
              <elementRef key="lb"/><elementRef key="pb"/>
            </alternate>
          </content>
          <model behaviour="block"/>
        </elementSpec>

        <elementSpec ident="body" module="textstructure" mode="change">
          <desc>The body of the document, holding the page/line stream and the hierarchy of
            structural divisions. A document not yet transcribed holds a single empty <gi>p</gi>.</desc>
          <content>
            <alternate minOccurs="1" maxOccurs="unbounded">
              <elementRef key="div"/><elementRef key="lg"/><elementRef key="l"/><elementRef key="p"/>
              <elementRef key="head"/><elementRef key="pb"/><elementRef key="lb"/>
              <elementRef key="milestone"/><elementRef key="fw"/>
            </alternate>
          </content>
          <model behaviour="body"/>
        </elementSpec>

        <elementSpec ident="div" module="textstructure" mode="change">
          <desc>A structural division — a book, a group of poems, or an individual poem. <att>type</att>
            classifies the division where the DTA base format has a value for it (<val>poem</val>,
            <val>music</val>, <val>dedication</val>, …); a group of poems or a voice part has no
            type. <att>n</att> records its level/running number.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/>
              <elementRef key="div"/><elementRef key="head"/><elementRef key="lg"/><elementRef key="l"/>
              <elementRef key="p"/><elementRef key="list"/><elementRef key="label"/>
              <elementRef key="closer"/><elementRef key="epigraph"/><elementRef key="figure"/>
              <elementRef key="titlePage"/>
              <elementRef key="note"/><elementRef key="fw"/><elementRef key="cb"/>
              <elementRef key="anchor"/><elementRef key="milestone"/><elementRef key="lb"/>
              <elementRef key="pb"/><elementRef key="hi"/><elementRef key="rs"/>
              <elementRef key="choice"/><elementRef key="unclear"/><elementRef key="supplied"/>
              <elementRef key="num"/>
            </alternate>
          </content>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="poem"><desc>an individual poem</desc></valItem>
                <valItem ident="dedication"><desc>a dedication</desc></valItem>
                <valItem ident="frontispiece"><desc>a frontispiece</desc></valItem>
                <valItem ident="letter"><desc>a letter</desc></valItem>
                <valItem ident="preface"><desc>a preface</desc></valItem>
                <valItem ident="music"><desc>notated music (Noten)</desc></valItem>
                <valItem ident="postface"><desc>a postface</desc></valItem>
                <valItem ident="index"><desc>a register</desc></valItem>
                <valItem ident="corrigenda"><desc>a list of errata</desc></valItem>
                <valItem ident="appendix"><desc>an appendix</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <!-- a division directly after another one is set apart from it -->
          <model cssClass="div-after-div" predicate="preceding-sibling::*[not(self::lb or self::pb or self::fw or self::cb or self::milestone or self::anchor)][1][self::div]" behaviour="section">
            <outputRendition>margin-top: 2rem;</outputRendition>
          </model>
          <model behaviour="section"/>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <div n="3" type="poem">
                <head rendition="#c"><hi rendition="#aq">III.</hi></head>
                <lb/>
                <lg type="poem"><!-- ... --></lg>
              </div>
            </egXML>
          </exemplum>
        </elementSpec>

        <!-- ===== title page ===== -->
        <elementSpec ident="titlePage" module="textstructure" mode="change">
          <desc>A title page: in <gi>front</gi>, or in the <gi>div</gi> of a part of the book that has
            its own title page.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <elementRef key="docTitle"/><elementRef key="titlePart"/><elementRef key="docAuthor"/>
              <elementRef key="docImprint"/><elementRef key="docDate"/><elementRef key="docEdition"/>
              <elementRef key="figure"/><elementRef key="label"/><elementRef key="milestone"/>
              <elementRef key="lb"/><elementRef key="pb"/>
            </alternate>
          </content>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="semi" mode="replace">
                <valItem ident="main"><desc>the main title page</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <model behaviour="section">
            <outputRendition>text-align: center;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="docTitle" module="textstructure" mode="change">
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <elementRef key="titlePart"/><elementRef key="lb"/>
            </alternate>
          </content>
          <model behaviour="block">
            <outputRendition>margin: 1.2em 0;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="titlePart" module="textstructure" mode="change">
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="lb"/><elementRef key="list"/>
            </alternate>
          </content>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="main"/><valItem ident="desc"/>
              </valList>
            </attDef>
          </attList>
          <model behaviour="block" useSourceRendition="true">
            <outputRendition>margin: 0.4em 0;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="docAuthor" module="textstructure" mode="change">
          <content><macroRef key="macro.simlerInline"/></content>
          <model behaviour="block" useSourceRendition="true"/>
        </elementSpec>
        <elementSpec ident="docImprint" module="textstructure" mode="change">
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="pubPlace"/>
              <elementRef key="publisher"/><elementRef key="docDate"/><elementRef key="lb"/>
            </alternate>
          </content>
          <model behaviour="block" useSourceRendition="true"/>
        </elementSpec>
        <elementSpec ident="docEdition" module="textstructure" mode="change">
          <model behaviour="block" useSourceRendition="true"/>
        </elementSpec>
        <elementSpec ident="docDate" module="textstructure" mode="change">
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="rs"/><elementRef key="lb"/>
            </alternate>
          </content>
          <model behaviour="inline"/>
        </elementSpec>
        <elementSpec ident="pubPlace" module="core" mode="change">
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="rs"/><elementRef key="lb"/>
            </alternate>
          </content>
          <model behaviour="inline"/>
        </elementSpec>

        <!-- ===================================================================
             VERSE
             =================================================================== -->
        <elementSpec ident="lg" module="core" mode="change">
          <desc>A group of verse lines. The <gi>lg</gi> that holds a whole poem is
            <att>type</att>=<val>poem</val>, one per poem; an <gi>lg</gi> inside an <gi>lg</gi> (a
            stanza, which holds <gi>l</gi>, or a section, which holds <gi>lg</gi>) has no
            <att>type</att>: the nesting says what it is. A voice part on a music page that carries
            the poem's text keeps <val>poem</val>; an underlay copy stays untyped.</desc>
          <content>
            <alternate minOccurs="1" maxOccurs="unbounded">
              <elementRef key="l"/><elementRef key="lg"/><elementRef key="head"/>
              <elementRef key="label"/><elementRef key="p"/><elementRef key="closer"/><elementRef key="note"/>
              <elementRef key="fw"/><elementRef key="figure"/><elementRef key="anchor"/>
              <elementRef key="cb"/><elementRef key="milestone"/><elementRef key="lb"/>
              <elementRef key="pb"/>
            </alternate>
          </content>
          <constraintSpec ident="lg-type" scheme="schematron">
            <desc>One <val>poem</val> per poem, no <att>type</att> below it.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:lg[@type]">
                <sch:report role="warning" test="ancestor::tei:lg">[S-LGN] An lg inside an lg has
                  no @type (here "<sch:value-of select="@type"/>"): a stanza or a section is told by
                  its nesting.</sch:report>
                <sch:report role="warning" test="not(ancestor::tei:lg) and @type ne 'poem'">[S-LGV]
                  @type="<sch:value-of select="@type"/>": the lg that holds a whole poem is
                  type="poem". A stanza standing outside its poem's lg needs that lg round it.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="poem"><desc>the lg that holds a whole poem</desc></valItem>
              </valList>
            </attDef>
            <attDef ident="n" mode="change" usage="opt"/>
          </attList>
          <model cssClass="lg-inner" predicate="ancestor::lg" behaviour="block" useSourceRendition="true">
            <outputRendition>margin: 0.9em 0;</outputRendition>
          </model>
          <model cssClass="lg-outer" behaviour="block" useSourceRendition="true">
            <outputRendition>margin: 1.3em 0;</outputRendition>
          </model>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <lg type="poem">
                <l><hi rendition="#in">W</hi>Er schälk’ und spötter fleucht/ und Gottes wort be<lb break="no"/>trachtet/</l>
                <lb/>
                <l rendition="#et">der gru&#x364;net wie ein baum an einem wasserfluß/</l>
              </lg>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="l" module="core" mode="change">
          <desc>A single verse line. <att>rendition</att> records the indentation of the printed
            line; line/word breaks of the setting are encoded with <gi>lb</gi>.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="rs"/><elementRef key="choice"/>
              <elementRef key="unclear"/><elementRef key="supplied"/><elementRef key="num"/>
              <elementRef key="abbr"/><elementRef key="label"/><elementRef key="note"/>
              <elementRef key="anchor"/><elementRef key="fw"/>
              <elementRef key="lb"/><elementRef key="pb"/>
            </alternate>
          </content>
          <constraintSpec ident="line-inner-space" scheme="schematron">
            <desc>No space or tab directly inside the start or end tag of a verse, a heading or a
              paragraph (<gi>l</gi>, <gi>head</gi>, <gi>p</gi>): it is not part of the text. A line
              break with indentation there is formatting and stays.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                context="tei:text//tei:l | tei:text//tei:head | tei:text//tei:p">
                <sch:report role="warning" test="node()[1][self::text()][matches(., '^[ &#9;]+([^\s]|$)')] or node()[last()][self::text()][matches(., '[^\s][ &#9;]+$')]">[S-WS]
                  A space directly after &lt;<sch:name/>&gt; or before &lt;/<sch:name/>&gt;:
                  leave it out.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <attDef ident="n" mode="change" usage="opt"/>
            <attDef ident="next" mode="change" usage="opt">
              <desc>The next part of a verse line the print splits, e.g. by a heading or a page;
                <att>prev</att> points back. So also on <gi>div</gi> and <gi>head</gi>.</desc>
            </attDef>
            <attDef ident="prev" mode="change" usage="opt"/>
          </attList>
          <!-- A verse line hangs: an overlong line wraps indented, and @rendition indents are counted
               from the hanging edge. On a two-column page the grid cell is the line box. -->
          <modelGrp useSourceRendition="true">
            <outputRendition>margin: 0; line-height: var(--lh-text); padding-left: 1.6em; text-indent: -1.6em;</outputRendition>
            <!-- On a two-column page the lines alternate between the columns. An acrostic line starts
                 behind its marginal letter, and so does an indented line in a column that has them;
                 a closing letter keeps the line's end clear. The model lays out @rendition itself. -->
            <model predicate="parent::lg[contains-token(@rendition, '#twocol')]" behaviour="block" cssClass="l-twocol" useSourceRendition="false">
              <param name="--acro" value="if (contains-token(@rendition, '#acrostic') or (contains-token(@rendition, '#et') or contains-token(@rendition, '#et2')) and (preceding-sibling::l[position() mod 2 = 0], following-sibling::l[position() mod 2 = 0])[contains-token(@rendition, '#acrostic')]) then 1 else 0"/>
              <param name="--fin" value="if (descendant::*[contains-token(@rendition, '#acroFin')]) then 1 else 0"/>
              <param name="--indent" value="if (contains-token(@rendition, '#et2')) then 2 else if (contains-token(@rendition, '#et')) then 1 else 0"/>
              <outputRendition>min-width: 0; position: relative; text-indent: 0; padding-left: calc(var(--acro) * var(--acro-body) + var(--indent) * var(--indent-step)); padding-right: calc(var(--fin) * (var(--acro-fin) + 0.1em));</outputRendition>
            </model>
            <model predicate="contains-token(@rendition, '#et')" behaviour="block" cssClass="l-et">
              <outputRendition>text-indent: 0.4em;</outputRendition>
            </model>
            <model predicate="contains-token(@rendition, '#et2')" behaviour="block" cssClass="l-et2">
              <outputRendition>text-indent: 2.4em;</outputRendition>
            </model>
            <model predicate="contains-token(@rendition, '#et3')" behaviour="block" cssClass="l-et3">
              <outputRendition>text-indent: 4.4em;</outputRendition>
            </model>
            <model behaviour="block"/>
          </modelGrp>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <l rendition="#et">der wird <rs type="place" key="place_027">Sion</rs>sfeind’ auch straffen sonder fehl.</l>
            </egXML>
          </exemplum>
        </elementSpec>

        <!-- ===================================================================
             PHRASE-LEVEL TRANSCRIPTION
             =================================================================== -->
        <elementSpec ident="hi" module="core" mode="change">
          <desc>A typographically distinct span of the source. <att>rendition</att> is required on
            <gi>hi</gi> (it is optional elsewhere) and points to one or more <gi>rendition</gi>
            declarations in <gi>tagsDecl</gi>; tokens combine (e.g. <val>#aq #b</val>). <gi>hi</gi>
            may nest. The renditions of a line or block — alignment (<val>#c</val>,
            <val>#right</val>) and indent (<val>#et</val>, <val>#et2</val>, <val>#et3</val>) — are
            recorded on the block, not on <gi>hi</gi>.</desc>
          <content><macroRef key="macro.simlerInline"/></content>
          <constraintSpec ident="hi-adjacent" scheme="schematron">
            <desc>Two <gi>hi</gi> with the same <att>rendition</att> that only line ends separate are
              one <gi>hi</gi> across them: always across a joined line end (the word goes on), and
              across a plain one inside a block whose lines stay together (<gi>head</gi>,
              <gi>l</gi>, <gi>p</gi>, <gi>signed</gi>, …). A single letter, and positional
              renditions (initials, superscript, acrostic letters), are marked by themselves.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                context="tei:hi[@rendition][count(@*) = 1][ancestor::tei:text][not(tokenize(@rendition, '\s+') = ('#in', '#sup', '#sub', '#acroInit', '#acroFin'))]">
                <sch:report role="warning" test="let $n := following-sibling::*[not(self::tei:lb)][1] return $n[self::tei:hi][count(@*) = 1][@rendition = current()/@rendition] and exists(following-sibling::tei:lb[. &lt;&lt; $n]) and not(following-sibling::node()[. &lt;&lt; $n][self::comment() or self::processing-instruction() or self::text()[normalize-space()] or self::*[not(self::tei:lb)] or self::tei:lb[*]]) and string-length(normalize-space(.)) gt 1 and string-length(normalize-space($n)) gt 1 and (every $b in following-sibling::tei:lb[. &lt;&lt; $n] satisfies $b/@break = 'no' or ancestor::*[not(self::tei:hi)][1][local-name() = ('head', 'l', 'p', 'signed', 'closer', 'salute', 'dateline', 'trailer', 'titlePart', 'docTitle', 'docAuthor', 'docImprint', 'docEdition', 'label', 'item')])">[S-HIA]
                  The next hi has the same rendition and only line ends stand between: one hi
                  across them.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <constraintSpec ident="hi-nesting" scheme="schematron">
            <desc>One <gi>hi</gi> carries all the renditions of a stretch: a <gi>hi</gi> that is the
              whole content of its parent <gi>hi</gi> is merged into it, and a <gi>hi</gi> does not
              repeat a token that an ancestor already has.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                context="tei:hi[@rendition][ancestor::tei:text]">
                <sch:report role="warning" test="parent::tei:hi and not(../text()[normalize-space()]) and count(../*[not(self::tei:lb or self::tei:pb or self::tei:cb or self::tei:milestone or self::tei:anchor or self::tei:gap)]) = 1 and count(@*) = 1">[S-HIN]
                  This hi is the whole content of its parent hi: one hi with both renditions
                  (<sch:value-of select="../@rendition"/> <sch:value-of select="@rendition"/>).</sch:report>
                <sch:report role="warning" test="some $t in tokenize(normalize-space(@rendition), ' ') satisfies $t = (for $a in ancestor::*[@rendition] return tokenize(normalize-space($a/@rendition), ' '))">[S-HIR]
                  A token of this hi (<sch:value-of select="@rendition"/>) is already on an
                  ancestor: leave it out.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <attDef ident="rendition" mode="change" usage="req"/>
          </attList>
          <!-- An initial drops only at the head of running prose: not in verse, not nested, not
               among several initials (an author line "J(ohann) W(ilhelm) S(imler)"), not centred. -->
          <model cssClass="hi-initial-inline" predicate="contains-token(@rendition, '#in') and (ancestor::l or ancestor::hi or ancestor::titlePage or ancestor::*[contains-token(@rendition, '#c')] or preceding-sibling::*[contains-token(@rendition, '#in')] or following-sibling::*[contains-token(@rendition, '#in')])" behaviour="inline" useSourceRendition="true">
            <outputRendition>float: none; font-size: 1.15em; line-height: inherit;</outputRendition>
          </model>
          <!-- Fallback for an alignment or indent left on a hi: on lines of its own within a
               block, the hi is those lines, since a span cannot be aligned or indented. -->
          <model predicate="(contains-token(@rendition, '#c') or contains-token(@rendition, '#right') or contains-token(@rendition, '#et') or contains-token(@rendition, '#et2') or contains-token(@rendition, '#et3')) and (parent::head or parent::p or parent::l or parent::salute or parent::signed or parent::dateline or parent::closer or parent::titlePart or parent::docAuthor or parent::item) and (not(preceding-sibling::*) or preceding-sibling::*[1][self::lb]) and (not(following-sibling::*) or following-sibling::*[1][self::lb])" behaviour="block" useSourceRendition="true"/>
          <model behaviour="inline" useSourceRendition="true"/>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <head rendition="#c">Der <hi rendition="#aq">LXXII.</hi> Pſalm/ des geiſtreichen Poeten/</head>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="head" module="core" mode="change">
          <desc>A heading of a <gi>div</gi>, <gi>lg</gi>, <gi>list</gi> or <gi>figure</gi>.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="label"/><elementRef key="num"/>
              <elementRef key="rs"/><elementRef key="choice"/><elementRef key="unclear"/>
              <elementRef key="supplied"/><elementRef key="note"/><elementRef key="fw"/>
              <elementRef key="anchor"/><elementRef key="lb"/><elementRef key="pb"/>
            </alternate>
          </content>
          <attList>
            <attDef ident="n" mode="change" usage="opt"/>
          </attList>
          <!-- Only a division's head is a document heading, one level below its division; in an
               lg it is a stanza number, in a list or figure a caption. Face, weight and size are
               defaults (:where) that the source's renditions override; one size for every level.
               #larger and #smaller on the head scale that size, as on a hi within it. -->
          <modelGrp useSourceRendition="true">
            <outputRendition>text-wrap: balance; :where(&amp;) { font-family: var(--f-display); font-weight: 600; font-size: 1.15em; } &amp;.r-larger { font-size: 1.38em; } &amp;.r-smaller { font-size: 0.96em; }</outputRendition>
            <model cssClass="head-first" predicate="parent::div and not(preceding-sibling::*[not(self::lb or self::pb or self::fw or self::cb or self::milestone or self::anchor)][1])" behaviour="heading">
              <param name="level" value="count(ancestor::div) + 1"/>
              <outputRendition>margin: 0 0 0.7em;</outputRendition>
            </model>
            <model cssClass="head-div" predicate="parent::div" behaviour="heading">
              <param name="level" value="count(ancestor::div) + 1"/>
              <outputRendition>margin: 1.6em 0 0.7em;</outputRendition>
            </model>
            <!-- a stanza number is set like the verses it numbers -->
            <model cssClass="head-stanza" predicate="parent::lg" behaviour="paragraph">
              <outputRendition>margin: 0 0 0.25em; :where(&amp;) { font-family: var(--f-text); font-weight: 400; }</outputRendition>
            </model>
            <model cssClass="head-caption" predicate="parent::list or parent::figure or parent::listPerson or parent::listPlace" behaviour="paragraph">
              <outputRendition>margin: 0 0 0.3em;</outputRendition>
            </model>
            <model cssClass="head-other" behaviour="paragraph">
              <outputRendition>margin: 1.6em 0 0.7em;</outputRendition>
            </model>
          </modelGrp>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <head rendition="#c">
                <label>[1.]</label>
                <lb/>
                <hi rendition="#b">[Das erst bu&#x364;ch der Psalmen.]</hi>
              </head>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="label" module="core" mode="change">
          <desc>An editorial label, the bracketed number of a heading or poem; it stands on a line of its own.</desc>
          <content><macroRef key="macro.simlerInline"/></content>
          <!-- set apart from the print's text: grey, sans-serif, smaller -->
          <model behaviour="block">
            <outputRendition>font-family: var(--f-ui); font-size: 0.7rem; font-weight: 400; font-style: normal; letter-spacing: 0.03em; color: rgb(var(--c-muted)); margin-bottom: 0.6em;</outputRendition>
          </model>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples"><label>[2.]</label></egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="num" module="core" mode="change">
          <desc>A number (Roman or Arabic) marked as such in the source.</desc>
          <content><macroRef key="macro.simlerInline"/></content>
          <model behaviour="inline"/>
        </elementSpec>

        <elementSpec ident="p" module="core" mode="change">
          <desc>A prose paragraph (e.g. closing formulae of a book, captions, header notes).</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="rs"/><elementRef key="choice"/>
              <elementRef key="unclear"/><elementRef key="supplied"/><elementRef key="gap"/>
              <elementRef key="num"/><elementRef key="note"/><elementRef key="ref"/><elementRef key="lg"/>
              <elementRef key="anchor"/><elementRef key="fw"/><elementRef key="lb"/>
              <elementRef key="pb"/>
            </alternate>
          </content>
          <constraintSpec ident="p-verse" scheme="schematron">
            <desc>Verse stands in a paragraph only in a figure's caption; elsewhere the paragraph
              ends before the verse.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:p[tei:lg]">
                <sch:report role="warning" test="not(parent::tei:figure)">[S-PLG] An lg inside a p
                  outside a figure: close the p before the verse.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <!-- Prose is justified, below any alignment the source gives (:where). A paragraph whose
               first line is indented needs no gap before it. A caption takes the figure's centring. -->
          <model cssClass="p-caption" predicate="parent::figure" behaviour="paragraph" useSourceRendition="true">
            <outputRendition>margin: 0.9em 0;</outputRendition>
          </model>
          <model cssClass="p-prose" behaviour="paragraph" useSourceRendition="true">
            <outputRendition>margin: 0.9em 0; :where(&amp;) { text-align: justify; } &amp;:has(+ &amp;:is(.r-et, .r-et2, .r-et3)) { margin-bottom: 0; } &amp; + &amp;:is(.r-et, .r-et2, .r-et3) { margin-top: 0; }</outputRendition>
          </model>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <p rendition="#c"><hi rendition="#smaller">Ende des ersten buchs der<lb/> Psalmen Davids.</hi></p>
            </egXML>
          </exemplum>
        </elementSpec>

        <!-- ===== entity reference ===== -->
        <!-- ===================================================================
             REGISTER: the entries the text's rs refer to, where a document carries them
             =================================================================== -->
        <elementSpec ident="standOff" module="linking" mode="change">
          <desc>The register of the persons and places the text names, from the project's registers:
            an entry for each <att>key</att> of an <gi>rs</gi>, and no other. It follows the text.</desc>
          <content>
            <alternate maxOccurs="unbounded">
              <elementRef key="listPerson"/><elementRef key="listPlace"/>
            </alternate>
          </content>
          <model behaviour="section">
            <outputRendition>margin-top: 2.5em; padding-top: 1em; border-top: 1px solid rgb(var(--c-line)); font-family: var(--f-ui); font-size: 0.85em;</outputRendition>
          </model>
          <!-- not in the search text -->
          <model output="plain" behaviour="omit"/>
        </elementSpec>
        <elementSpec ident="listPerson" module="namesdates" mode="change">
          <content>
            <sequence>
              <elementRef key="head" minOccurs="0"/>
              <elementRef key="person" maxOccurs="unbounded"/>
            </sequence>
          </content>
          <model behaviour="block"/>
        </elementSpec>
        <elementSpec ident="listPlace" module="namesdates" mode="change">
          <content>
            <sequence>
              <elementRef key="head" minOccurs="0"/>
              <elementRef key="place" maxOccurs="unbounded"/>
            </sequence>
          </content>
          <model behaviour="block"/>
        </elementSpec>
        <elementSpec ident="person" module="namesdates" mode="change">
          <desc>An entry of the register: its <att>xml:id</att> is the <att>key</att> an <gi>rs</gi>
            refers to it by; a page may open it as a card where the name stands.</desc>
          <content>
            <sequence>
              <elementRef key="persName"/>
              <elementRef key="birth" minOccurs="0"/>
              <elementRef key="death" minOccurs="0"/>
              <elementRef key="note" minOccurs="0"/>
              <elementRef key="idno" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
          </content>
          <model behaviour="block">
            <param name="data-card" value="'person'"/>
            <outputRendition>margin: 0.6em 0;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="place" module="namesdates" mode="change">
          <desc>An entry of the register, as <gi>person</gi> is.</desc>
          <content>
            <sequence>
              <elementRef key="placeName"/>
              <elementRef key="note" minOccurs="0"/>
              <elementRef key="idno" minOccurs="0" maxOccurs="unbounded"/>
            </sequence>
          </content>
          <model behaviour="block">
            <param name="data-card" value="'place'"/>
            <outputRendition>margin: 0.6em 0;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="placeName" module="namesdates" mode="change">
          <content><textNode/></content>
          <model behaviour="inline">
            <outputRendition>font-weight: 600;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="birth" module="namesdates" mode="change">
          <desc>The year of birth, in <att>when</att>.</desc>
          <content><empty/></content>
          <model behaviour="inline">
            <param name="content" value="concat('* ', @when)"/>
          </model>
        </elementSpec>
        <elementSpec ident="death" module="namesdates" mode="change">
          <desc>The year of death, in <att>when</att>.</desc>
          <content><empty/></content>
          <model behaviour="inline">
            <param name="content" value="concat('† ', @when)"/>
          </model>
        </elementSpec>

        <elementSpec ident="rs" module="core" mode="change">
          <desc>A referencing string identifying a named entity. <att>type</att> classifies the
            entity; <att>key</att> is the typed identifier of the entry in the project registers
            (its prefix should match <att>type</att>).</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="rs"/><elementRef key="choice"/>
              <elementRef key="unclear"/><elementRef key="supplied"/><elementRef key="note"/>
              <elementRef key="anchor"/><elementRef key="lb"/>
            </alternate>
          </content>
          <constraintSpec ident="rs-key" scheme="schematron">
            <desc>Each key names an entry of the register its <att>type</att> belongs to;
              <val>bibl</val> is in the works.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:rs">
                <sch:let name="register" value="if (@type = 'bibl') then 'work' else string(@type)"/>
                <sch:assert test="every $key in tokenize(normalize-space(@key), ' ') satisfies matches($key, concat('^', $register, '_\d+$'))">[S-RK]
                  "<sch:value-of select="@key"/>" is not a list of keys of the <sch:value-of
                  select="$register"/> register.</sch:assert>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <constraintSpec ident="rs-register" scheme="schematron">
            <desc>Where the document carries the register (<gi>standOff</gi>), each key has its entry
              there.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:rs[ancestor::tei:TEI/tei:standOff]">
                <sch:assert test="every $key in tokenize(normalize-space(@key), ' ') satisfies ancestor::tei:TEI/tei:standOff//*[@xml:id = $key]">[S-RR]
                  "<sch:value-of select="@key"/>" has no entry in the document's register.</sch:assert>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <attDef ident="type" mode="change" usage="req">
              <valList type="closed" mode="replace">
                <valItem ident="person"><desc>person</desc></valItem>
                <valItem ident="place"><desc>place</desc></valItem>
                <valItem ident="institution"><desc>institution</desc></valItem>
                <valItem ident="work"><desc>literary work</desc></valItem>
                <valItem ident="bibl"><desc>a Bible reference (never the research bibliography)</desc></valItem>
              </valList>
            </attDef>
            <attDef ident="key" mode="add" usage="req">
              <desc>The entry in the register of <att>type</att>, as <val>{register}_{number}</val>
                (e.g. <val>person_049</val>); a reference to several entries, such as
                <q>zween treffliche Musikanten</q>, lists them, separated by spaces
                (<val>person_012 person_310</val>); see <ident>rs-key</ident>.</desc>
              <datatype><dataRef key="teidata.text"/></datatype>
            </attDef>
          </attList>
          <!-- `data-key` names the register entries, which the page may open as a card; where the
               document carries the register, a person or place with one entry links to it -->
          <model cssClass="rs-linked" predicate="(@type='person' or @type='place') and ancestor::TEI/standOff and not(contains(normalize-space(@key), ' '))" behaviour="link">
            <param name="uri" value="concat('#', normalize-space(@key))"/>
            <param name="data-key" value="@key"/>
            <!-- a name reads as the text around it; only the entities view highlights it -->
            <outputRendition>color: inherit; text-decoration: none;</outputRendition>
          </model>
          <model behaviour="inline">
            <param name="data-key" value="@key"/>
          </model>
          <!-- entity highlighting, colour-coded by type -->
          <!-- a view adds its classes to a model of the same behaviour: the linked names first -->
          <model cssClass="entity-person" output="entities" predicate="@type='person' and ancestor::TEI/standOff and not(contains(normalize-space(@key), ' '))" behaviour="link">
            <desc>Entitäten</desc>
            <desc>Personen, Orte, Werke, Institutionen und Bibelstellen farbig.</desc>
            <desc xml:lang="en">Entities</desc>
            <desc xml:lang="en">Persons, places, works, institutions and Bible passages in colour.</desc>
            <param name="uri" value="concat('#', normalize-space(@key))"/>
          </model>
          <model cssClass="entity-place" output="entities" predicate="@type='place' and ancestor::TEI/standOff and not(contains(normalize-space(@key), ' '))" behaviour="link">
            <param name="uri" value="concat('#', normalize-space(@key))"/>
          </model>
          <model cssClass="entity-person" output="entities" predicate="@type='person'" behaviour="inline">
            <outputRendition>color: rgb(var(--c-person)); text-decoration: underline solid; text-underline-offset: 0.22em;</outputRendition>
          </model>
          <model cssClass="entity-place" output="entities" predicate="@type='place'" behaviour="inline">
            <outputRendition>color: rgb(var(--c-place)); text-decoration: underline solid; text-underline-offset: 0.22em;</outputRendition>
          </model>
          <model cssClass="entity-work" output="entities" predicate="@type='work'" behaviour="inline">
            <outputRendition>color: rgb(var(--c-work)); text-decoration: underline dashed; text-underline-offset: 0.22em;</outputRendition>
          </model>
          <model cssClass="entity-institution" output="entities" predicate="@type='institution'" behaviour="inline">
            <outputRendition>color: rgb(var(--c-institution)); text-decoration: underline dotted; text-underline-offset: 0.22em;</outputRendition>
          </model>
          <model cssClass="entity-bibl" output="entities" predicate="@type='bibl'" behaviour="inline">
            <outputRendition>color: rgb(var(--c-bibl)); text-decoration: underline dotted; text-underline-offset: 0.22em;</outputRendition>
          </model>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <l>Der <rs type="person" key="person_049">David</rs> setzt auf Gott sein hoffnung und vertrauen/</l>
            </egXML>
          </exemplum>
        </elementSpec>

        <!-- ===== editorial interventions: the print, or in the reading text the correction ===== -->
        <elementSpec ident="choice" module="core" mode="change">
          <desc>Groups a printing error (<gi>sic</gi>) and its correction (<gi>corr</gi>), the source
            first, as in the DTA base format.</desc>
          <content>
            <alternate minOccurs="1" maxOccurs="unbounded">
              <elementRef key="sic"/><elementRef key="corr"/>
            </alternate>
          </content>
          <constraintSpec ident="choice-order" scheme="schematron">
            <desc>The source reading comes first: <gi>sic</gi> before <gi>corr</gi>.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:choice">
                <sch:report role="warning" test="tei:corr[following-sibling::tei:sic]">[S-CHO]
                  In choice the source reading comes first: sic before corr.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <!-- the print, and in the reading text the editors' reading; the search finds both -->
          <model predicate="sic and corr" behaviour="alternate">
            <param name="default" value="sic"/>
            <param name="alternate" value="corr"/>
          </model>
          <model behaviour="inline"/>
          <model output="normalized" predicate="sic and corr" behaviour="alternate">
            <desc>Normalisiert</desc>
            <desc>Zeilenenden zusammenziehen, getrennte Wörter verbinden, Korrektur statt Vorlage.</desc>
            <desc xml:lang="en">Normalised</desc>
            <desc xml:lang="en">Line ends joined, divided words rejoined, the correction instead of the print.</desc>
            <param name="default" value="corr"/>
            <param name="alternate" value="sic"/>
          </model>
          <model output="plain" predicate="sic and corr" behaviour="inline">
            <param name="content" value="(sic, ' ', corr)"/>
          </model>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <l>Wiewol ich krankner mir gedult hab <choice><sic>fu&#x364;rgenommen</sic><corr>fürgenommen</corr></choice>/</l>
            </egXML>
          </exemplum>
        </elementSpec>
        <elementSpec ident="sic" module="core" mode="change">
          <desc>The reading actually present in the source, retained unchanged.</desc>
          <content><macroRef key="macro.simlerInline"/></content>
          <model behaviour="inline"/>
        </elementSpec>
        <elementSpec ident="corr" module="core" mode="change">
          <desc>The editorial correction of an obvious printing error.</desc>
          <content><macroRef key="macro.simlerInline"/></content>
          <!-- an editorial correction is marked as one: dotted, never silent -->
          <model behaviour="inline">
            <outputRendition>text-decoration: underline dotted rgb(var(--c-muted)); text-underline-offset: 0.22em;</outputRendition>
          </model>
        </elementSpec>

        <elementSpec ident="supplied" module="transcr" mode="change">
          <desc>Text supplied by the editors where the source is missing or illegible.
            <att>cert</att> may record the confidence of the supplement.</desc>
          <content><macroRef key="macro.simlerInline"/></content>
          <attList>
            <attDef ident="cert" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="high"/><valItem ident="low"/>
              </valList>
            </attDef>
          </attList>
          <!-- The brackets are the edition's text, not the search's. -->
          <modelSequence>
            <model cssClass="supplied-bracket" behaviour="inline">
              <param name="content" value="'['"/>
              <outputRendition>color: rgb(var(--c-muted));</outputRendition>
            </model>
            <model behaviour="inline"/>
            <model cssClass="supplied-bracket" behaviour="inline">
              <param name="content" value="']'"/>
              <outputRendition>color: rgb(var(--c-muted));</outputRendition>
            </model>
          </modelSequence>
          <modelSequence output="plain">
            <model behaviour="omit"/>
            <model behaviour="inline"/>
            <model behaviour="omit"/>
          </modelSequence>
        </elementSpec>

        <elementSpec ident="unclear" module="core" mode="change">
          <desc>A passage that cannot be read with certainty; <att>reason</att> records why.</desc>
          <content><macroRef key="macro.simlerInline"/></content>
          <attList>
            <attDef ident="reason" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="uncleanPrint"><desc>illegible because of poor / unclean printing</desc></valItem>
                <valItem ident="covered"><desc>covered or obscured on the page</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <model behaviour="inline">
            <outputRendition>text-decoration: underline wavy rgb(var(--c-muted) / 0.7); text-underline-offset: 0.22em;</outputRendition>
          </model>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <l rendition="#et">die <unclear reason="uncleanPrint">kind</unclear> und […]</l>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="abbr" module="core" mode="change">
          <desc>An abbreviation as it appears in the source.</desc>
          <content><macroRef key="macro.simlerInline"/></content>
          <model behaviour="inline"/>
        </elementSpec>
        <!-- ===================================================================
             NOTES, LISTS, FIGURES, QUOTATIONS
             =================================================================== -->
        <elementSpec ident="note" module="core" mode="change">
          <desc>A note. Editorial notes (<val>annotation</val>) comment on a range delimited by an
            <gi>anchor</gi> and <att>targetEnd</att>, or without one on the whole division; Bible
            references, speaker names and marginalia are printed in the source.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="p"/><elementRef key="hi"/><elementRef key="rs"/>
              <elementRef key="choice"/><elementRef key="unclear"/><elementRef key="supplied"/>
              <elementRef key="note"/><elementRef key="anchor"/><elementRef key="lb"/>
            </alternate>
          </content>
          <constraintSpec ident="note-range" scheme="schematron">
            <desc>A range comment runs from the <gi>anchor</gi> its <att>targetEnd</att> names, which
              precedes it, to the note.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:note[@targetEnd]">
                <sch:let name="id" value="replace(@targetEnd, '^#', '')"/>
                <sch:assert test="preceding::tei:anchor[@xml:id = $id]">[S-NR] targetEnd names no
                  preceding anchor.</sch:assert>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <constraintSpec ident="note-type" scheme="schematron">
            <desc>A note in the text says what it is: a range comment by <att>targetEnd</att>, any other by
              <att>type</att>.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:note[not(@targetEnd or ancestor::tei:standOff)]">
                <sch:assert role="warning" test="@type">[S-NT] A note without targetEnd needs a
                  type.</sch:assert>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="annotation"><desc>an editorial annotation</desc></valItem>
                <valItem ident="bibl"><desc>a marginal Bible reference printed in the source</desc></valItem>
                <valItem ident="speaker"><desc>a speaker designation in dialogue verse</desc></valItem>
                <valItem ident="marginalia"><desc>a marginal note printed in the source</desc></valItem>
                <valItem ident="remarkResponsibility"><desc>a note on editorial responsibility</desc></valItem>
              </valList>
            </attDef>
            <attDef ident="place" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="left"/><valItem ident="right"/><valItem ident="foot"/>
              </valList>
            </attDef>
          </attList>
          <!-- in the register, a note describes its entry -->
          <model cssClass="note-entry" predicate="parent::person or parent::place" behaviour="block"/>
          <model cssClass="note-speaker" predicate="@type='speaker'" behaviour="inline" useSourceRendition="true">
            <outputRendition>font-family: var(--f-ui); font-size: 0.72em; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(var(--c-muted));</outputRendition>
          </model>
          <!-- printed beside or below the text, a Bible reference or a marginal note: never in the
               apparatus. It stands in the page's margin, on the printed side (`data-margin`), where
               the window has room; otherwise it stays a small note in the line, its own lines run on.
               The token margin is the room the page leaves for it. -->
          <model cssClass="note-margin" predicate="@place='left' or @place='right' or @type='marginalia' or @type='bibl'" behaviour="inline" useSourceRendition="true">
            <param name="data-margin" value="if (@place='left') then 'left' else 'right'"/>
            <outputRendition>margin-inline: 0.3em; font-family: var(--f-ui); font-size: 0.85em; line-height: 1.3; color: rgb(var(--c-muted)); &amp; br { display: none; } @media (min-width: 58rem) { float: right; clear: right; width: calc(var(--margin) - 1.25rem); margin: 0.15em calc(-1 * var(--margin)) 0 1.25rem; text-align: left; text-indent: 0; &amp; br { display: inline; } &amp;[data-margin='left'] { float: left; clear: left; margin-inline: calc(-1 * var(--margin)) 1.25rem; text-align: right; } }</outputRendition>
          </model>
          <!-- a range comment: a numbered marker in the text, the note in the apparatus; the range
               runs from the anchor @targetEnd names to the marker -->
          <model cssClass="note-anchored" predicate="@targetEnd" behaviour="note" useSourceRendition="true">
            <param name="place" value="'end'"/>
            <param name="range" value="@targetEnd"/>
            <outputRendition>font-family: var(--f-ui); font-size: 0.62em; font-weight: 600; vertical-align: super; line-height: 0; padding: 0 0.12em; color: rgb(var(--c-accent)); text-decoration: none; scroll-margin-top: 6rem;</outputRendition>
          </model>
          <!-- a comment on the whole division: no marker, shown above the text; any other note is unmapped -->
          <model predicate="@type='annotation'" behaviour="note" useSourceRendition="true">
            <param name="place" value="'overview'"/>
            <param name="marker" value="false()"/>
          </model>
          <model output="plain" predicate="@targetEnd" behaviour="omit"/>
        </elementSpec>

        <elementSpec ident="ref" module="core" mode="change">
          <desc>A link, as in the commentary: to a dictionary, a record or another work
            (<val>#n129</val>). In a register it holds the page number, as in the DTABf;
            <att>target</att> may point to that page.</desc>
          <model predicate="@target" behaviour="link" useSourceRendition="true">
            <param name="uri" value="@target"/>
          </model>
          <model behaviour="inline" useSourceRendition="true"/>
        </elementSpec>

        <elementSpec ident="list" module="core" mode="change">
          <desc>A list.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <elementRef key="head"/><elementRef key="item"/><elementRef key="lb"/>
              <elementRef key="pb"/>
            </alternate>
          </content>
          <model behaviour="list">
            <outputRendition>list-style: none; margin: 0.9em 0; padding-left: 0;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="item" module="core" mode="change">
          <desc>A list item; in a register, <gi>ref</gi> holds the page number.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <macroRef key="macro.simlerInline"/><elementRef key="ref"/>
            </alternate>
          </content>
          <model behaviour="listItem" useSourceRendition="true"/>
        </elementSpec>

        <elementSpec ident="figure" module="figures" mode="change">
          <desc>A figure (woodcut, frontispiece engraving, decorative element) or notated music,
            optionally with a heading and descriptive paragraph.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <elementRef key="head"/><elementRef key="p"/><elementRef key="lb"/>
              <elementRef key="pb"/>
            </alternate>
          </content>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="notatedMusic"><desc>notated music; <att>corresp</att> points to its
                  encoding (MEI)</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <!-- notated music and an empty figure are placeholders: a box that shows where the print has one -->
          <model predicate="@type='notatedMusic'" behaviour="block" cssClass="figure-box figure-music">
            <param name="content" value="if (@corresp) then concat('Notensatz: ', @corresp) else 'Notensatz'"/>
            <outputRendition>margin: 1.35rem 0; padding: 1.1rem 1rem; border: 1px dashed rgb(var(--c-line)); border-radius: var(--r); text-align: center; font-family: var(--f-ui); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgb(var(--c-muted));</outputRendition>
          </model>
          <model predicate="not(normalize-space())" behaviour="block" cssClass="figure-box figure-empty">
            <param name="content" value="'Abbildung'"/>
          </model>
          <!-- centred, but verse in it keeps its lines flush left, the poem centred as a block -->
          <model cssClass="figure-plain" behaviour="block">
            <outputRendition>margin: 1.2em 0; text-align: center; &amp; .lg-outer { width: fit-content; margin-inline: auto; text-align: start; }</outputRendition>
          </model>
          <model output="plain" predicate="@type='notatedMusic' or not(normalize-space())" behaviour="omit"/>
        </elementSpec>

        <elementSpec ident="cit" module="core" mode="change">
          <model behaviour="cit"/>
        </elementSpec>
        <elementSpec ident="quote" module="core" mode="change">
          <model behaviour="block"/>
        </elementSpec>
        <elementSpec ident="epigraph" module="textstructure" mode="change">
          <model behaviour="block"/>
        </elementSpec>

        <!-- ===================================================================
             CLOSERS (subscriptions, datelines, signatures)
             =================================================================== -->
        <elementSpec ident="closer" module="textstructure" mode="change">
          <desc>The closing matter of a division (e.g. a dedication) or of a poem, inside its
            <gi>lg</gi> as in the DTA base format: salutation, dateline and signature.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="salute"/><elementRef key="dateline"/>
              <elementRef key="signed"/><elementRef key="rs"/><elementRef key="hi"/>
              <elementRef key="lb"/>
            </alternate>
          </content>
          <model behaviour="block" useSourceRendition="true">
            <outputRendition>margin-top: 1.6em;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="salute" module="textstructure" mode="change">
          <content><macroRef key="macro.simlerInline"/></content>
          <model behaviour="paragraph" useSourceRendition="true"/>
        </elementSpec>
        <elementSpec ident="dateline" module="textstructure" mode="change">
          <content><macroRef key="macro.simlerInline"/></content>
          <model behaviour="paragraph" useSourceRendition="true">
            <outputRendition>margin: 0.3em 0;</outputRendition>
          </model>
        </elementSpec>
        <elementSpec ident="signed" module="textstructure" mode="change">
          <content><macroRef key="macro.simlerInline"/></content>
          <model behaviour="paragraph" useSourceRendition="true">
            <outputRendition>margin: 0.3em 0;</outputRendition>
          </model>
        </elementSpec>

        <!-- ===================================================================
             MILESTONE / BREAK / FORME-WORK ELEMENTS
             =================================================================== -->
        <elementSpec ident="milestone" module="core" mode="change">
          <desc>An empty milestone marking a structural section boundary in the source.
            <att>unit</att> is required; the rule it prints is its <att>rendition</att>
            (<val>#hr</val>, as in the DTA base format).</desc>
          <content><empty/></content>
          <attList>
            <attDef ident="unit" mode="change" usage="req">
              <valList type="closed" mode="replace">
                <valItem ident="section"><desc>a section boundary within the text</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <model behaviour="block" useSourceRendition="true">
            <outputRendition>margin: 1.6em auto;</outputRendition>
          </model>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <milestone unit="section" rendition="#hr"/>
            </egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="cb" module="core" mode="change">
          <desc>A column break, as in the DTA base format's occasional columns: <att>type</att>=<val>start</val>
            where the page's columns begin, a plain <gi>cb</gi> where each further column begins,
            <att>type</att>=<val>end</val> where they end. The first column needs no <gi>cb</gi> of its
            own. A column set ends on its page: it closes before the page's foot and opens again
            after the next page's head.</desc>
          <content><empty/></content>
          <constraintSpec ident="cb-set" scheme="schematron">
            <desc>Columns stand within one set, and one set within one page.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:cb">
                <sch:let name="open" value="preceding::tei:cb[@type][1]/@type = 'start'"/>
                <sch:report test="@type = 'start' and not(following::tei:cb[@type][1]/@type = 'end')">[S-CBS]
                  A column set without its end (cb type="end").</sch:report>
                <sch:report test="not(@type = 'start') and not($open)">[S-CBS] A column break
                  outside a column set (cb type="start" … cb type="end").</sch:report>
                <sch:report role="warning" test="not(@type) and $open and not(preceding::text()[normalize-space()][1] &gt;&gt; preceding::tei:cb[@type][1])">[S-CBF]
                  The first column needs no cb of its own.</sch:report>
              </sch:rule>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:pb | tei:fw[@place = 'bottom']">
                <sch:report test="preceding::tei:cb[@type][1]/@type = 'start'">[S-CBP] A column set
                  ends on its page: cb type="end" before the page's foot, cb type="start" after the
                  next page's head.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="start"/><valItem ident="end"/>
              </valList>
            </attDef>
          </attList>
          <!-- `data-region` brackets the set: what stands between start and end moves into the
               start, which renders it in columns where they fit (12em each), else in one. Each
               column begins flush, so the columns start on one line, as printed. -->
          <model cssClass="columns" predicate="@type = 'start'" behaviour="break">
            <param name="type" value="'column'"/>
            <param name="label" value="''"/>
            <param name="data-region" value="'start'"/>
            <outputRendition>columns: 2 12em; column-gap: 2.5em; column-rule: 1px solid rgb(var(--c-line)); &amp; :is(:first-child, .column-break + *) { margin-top: 0; }</outputRendition>
          </model>
          <model predicate="@type = 'end'" behaviour="break">
            <param name="type" value="'column'"/>
            <param name="label" value="''"/>
            <param name="data-region" value="'end'"/>
          </model>
          <model cssClass="column-break" behaviour="break">
            <param name="type" value="'column'"/>
            <param name="label" value="''"/>
            <outputRendition>display: block; break-before: column;</outputRendition>
          </model>
          <model output="normalized" cssClass="columns-off" predicate="@type = 'start'" behaviour="break">
            <desc>The reading text runs in one column.</desc>
            <outputRendition>columns: auto; column-rule: none;</outputRendition>
          </model>
        </elementSpec>

        <elementSpec ident="anchor" module="linking" mode="change">
          <desc>An anchor point delimiting a commented range (paired with a <gi>note</gi> via
            <att>targetEnd</att>). The range is keyed either by <att>xml:id</att> or by <att>n</att>
            on a start/end pair.</desc>
          <content><empty/></content>
          <constraintSpec ident="anchor-note" scheme="schematron">
            <desc>An anchor with an <att>xml:id</att> starts the range of a following note.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:anchor[@xml:id]">
                <sch:let name="id" value="@xml:id"/>
                <sch:assert role="warning" test="following::tei:note[replace(@targetEnd, '^#', '') = $id]">[S-AN]
                  No note comments the range this anchor starts.</sch:assert>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <attDef ident="type" mode="delete"/>
          </attList>
          <model behaviour="anchor"/>
        </elementSpec>

        <elementSpec ident="gap" module="core" mode="change">
          <desc>Text left out of the transcription; <att>reason</att> says why, <att>unit</att> and
            <att>quantity</att> how much.</desc>
          <attList>
            <attDef ident="reason" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="lost"><desc>lost (damage)</desc></valItem>
                <valItem ident="illegible"><desc>illegible</desc></valItem>
                <valItem ident="fm"><desc>foreign-language material</desc></valItem>
                <valItem ident="insignificant"><desc>not transcribed</desc></valItem>
              </valList>
            </attDef>
            <attDef ident="unit" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="chars"/><valItem ident="words"/><valItem ident="lines"/><valItem ident="pages"/>
              </valList>
            </attDef>
          </attList>
          <model cssClass="gap" behaviour="inline">
            <param name="content" value="'[…]'"/>
            <outputRendition>color: rgb(var(--c-muted));</outputRendition>
          </model>
          <model output="plain" behaviour="omit"/>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">He<gap reason="lost" unit="chars" quantity="1"/>rde</egXML>
          </exemplum>
        </elementSpec>

        <elementSpec ident="fw" module="transcr" mode="change">
          <desc>Forme work — running material outside the text block (page numbers, signatures,
            catchwords, running headers). <att>type</att> classifies it, <att>place</att> locates
            it.</desc>
          <content>
            <alternate minOccurs="0" maxOccurs="unbounded">
              <textNode/><elementRef key="hi"/><elementRef key="num"/><elementRef key="choice"/>
              <elementRef key="unclear"/><elementRef key="supplied"/><elementRef key="note"/>
              <elementRef key="head"/><elementRef key="anchor"/><elementRef key="lb"/>
            </alternate>
          </content>
          <attList>
            <attDef ident="type" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="pageNum"><desc>a printed page number</desc></valItem>
                <valItem ident="catch"><desc>a catchword</desc></valItem>
                <valItem ident="sig"><desc>a printer's signature</desc></valItem>
                <valItem ident="header"><desc>a running header</desc></valItem>
              </valList>
            </attDef>
            <attDef ident="place" mode="change" usage="opt">
              <valList type="closed" mode="replace">
                <valItem ident="top"/><valItem ident="bottom"/>
              </valList>
            </attDef>
          </attList>
          <!-- set where the print sets it, and kept out of the search index and the reading text -->
          <modelGrp useSourceRendition="true">
            <outputRendition>font-size: 0.7em; color: rgb(var(--c-muted)); margin: 0.4em 0;</outputRendition>
            <!-- Forme work the print sets on one line is two fw in a row: the first floats, so the
                 second shares its line — a page number beside its running head at the top, a
                 signature beside its catchword at the bottom. An even page number (a verso)
                 stands at the left, the outer margin. -->
            <model cssClass="fw-paired" predicate="following-sibling::*[1][self::fw]" behaviour="block">
              <param name="--float" value="if (@place='bottom' or @type='pageNum' and matches(normalize-space(.), '[02468]\W*$')) then 'left' else 'right'"/>
              <outputRendition>float: var(--float); margin: 0;</outputRendition>
            </model>
            <model cssClass="fw-header" predicate="@type='header'" behaviour="block">
              <outputRendition>text-align: center;</outputRendition>
            </model>
            <model cssClass="fw-verso" predicate="@type='pageNum' and matches(normalize-space(.), '[02468]\W*$')" behaviour="block">
              <outputRendition>text-align: left;</outputRendition>
            </model>
            <model cssClass="fw-right" predicate="@type='catch' or @type='pageNum'" behaviour="block">
              <outputRendition>text-align: right;</outputRendition>
            </model>
            <model behaviour="block"/>
          </modelGrp>
          <model output="normalized" behaviour="omit"/>
          <model output="plain" behaviour="omit"/>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <fw type="pageNum" place="top">194</fw>
            </egXML>
          </exemplum>
        </elementSpec>

        <!-- ===== pb: page beginning ===== -->
        <elementSpec ident="pb" module="core" mode="change">
          <desc>Marks the beginning of a new printed page. <att>n</att> gives the printed page number
            (bracketed when editorially supplied); <att>facs</att> names the page image.</desc>
          <content><empty/></content>
          <attList>
            <attDef ident="n" mode="change" usage="opt"/>
            <attDef ident="facs" mode="change" usage="opt">
              <desc>The image identifier of the page, relative to the root of the IIIF manifest named by
                <gi>idno</gi> <att>type</att>=<val>URLIIIF</val> (e.g. <val>4017111</val>). Optional:
                absent for pages identified only by a printer's signature.</desc>
              <datatype><dataRef key="teidata.pointer"/></datatype>
            </attDef>
          </attList>
          <!-- a ruled marker across the column, `—— [16] ——`; inside a paragraph, a verse line or a
               heading it stays in the line. `data-page` opens the page in the facsimile; `data-image` names its image, under the manifest's root, so it needs no manifest. -->
          <modelGrp>
            <outputRendition>display: flex; align-items: center; gap: 0.7em; margin: 1.4em 0; font-family: var(--f-ui); font-size: 0.68em; font-weight: 500; letter-spacing: 0.04em; color: rgb(var(--c-muted)); user-select: none; scroll-margin-top: 5rem;</outputRendition>
            <model cssClass="pb-inline" predicate="ancestor::p or ancestor::l or ancestor::head" behaviour="break">
              <param name="type" value="'page'"/>
              <param name="data-page" value="@facs"/>
              <param name="data-image" value="if (@facs and //idno[@type='URLIIIF']) then concat(replace(normalize-space((//idno[@type='URLIIIF'])[1]), '[^/]+/manifest$', ''), @facs, '/full/!1000,1500/0/default.jpg') else ''"/>
              <param name="label" value="concat('[', translate((@n, '·')[1], '[]', ''), ']')"/>
              <outputRendition>display: inline; margin: 0 0.3em;</outputRendition>
            </model>
            <model cssClass="pb-rule" behaviour="break">
              <param name="type" value="'page'"/>
              <param name="data-page" value="@facs"/>
              <param name="data-image" value="if (@facs and //idno[@type='URLIIIF']) then concat(replace(normalize-space((//idno[@type='URLIIIF'])[1]), '[^/]+/manifest$', ''), @facs, '/full/!1000,1500/0/default.jpg') else ''"/>
              <param name="label" value="concat('[', translate((@n, '·')[1], '[]', ''), ']')"/>
              <outputRendition scope="before">content: ''; flex: 1; border-top: 1px dotted rgb(var(--c-line));</outputRendition>
              <outputRendition scope="after">content: ''; flex: 1; border-top: 1px dotted rgb(var(--c-line));</outputRendition>
            </model>
          </modelGrp>
          <model output="plain" behaviour="omit"/>
          <exemplum>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <pb n="194" facs="4049203"/>
            </egXML>
          </exemplum>
        </elementSpec>

        <!-- ===== lb: line break (DTABf semantics) ===== -->
        <elementSpec ident="lb" module="core" mode="change">
          <desc>Marks the <emph>end</emph> of a printed line (Zeilenschluss), following the DTA base
            format convention (<ref target="https://www.deutschestextarchiv.de/doku/basisformat/lbAllg.html"
            >lbAllg</ref>). Placement rules:
            <list>
              <item><gi>lb</gi> is never implicit: every line end is marked explicitly, including the
                end of the first line of a block.</item>
              <item>when a line end coincides with the end of one or more elements, the <gi>lb</gi>
                follows the element that <emph>holds</emph> the line (<gi>l</gi>, <gi>p</gi>,
                <gi>head</gi>, <gi>closer</gi>, <gi>fw</gi>, …) and stays <emph>inside</emph> every
                further ancestor: the line belongs to its unit, so its end does too. The line end of a
                stanza's last verse follows that stanza's <gi>lg</gi>, never its last <gi>l</gi>; in
                nested groups it stays inside the enclosing <gi>lg</gi>, and it never follows a
                closing <gi>div</gi>. A <gi>note</gi> set on its verse's line does not move it; a
                <gi>note</gi> printed on a line of its own ends with its own <gi>lb</gi>.</item>
              <item>only <gi>pb</gi> and <gi>cb</gi> stand without a following
                <gi>lb</gi>; and no <gi>lb</gi> is set immediately before
                <gi>front</gi>/<gi>body</gi>/<gi>back</gi>/<gi>titlePage</gi> closes.</item>
              <item>for a word hyphenated across the line, the visible hyphen is kept in the
                transcription and <att>break</att>=<val>no</val> is set on the <gi>lb</gi> at that
                line end, and no whitespace stands beside it ([S-LBW]). A hyphen that ends a word (an ellipsis,
                as in <mentioned>buß- und gnadbegierig</mentioned>) takes a plain <gi>lb</gi>. No
                whitespace stands next to a joined line end in the text; where the XML line breaks
                with the printed one, the break stands inside the tag
                (<code>er-&lt;lb</code>⏎<code>break="no"/>weißt</code>).</item>
            </list>
            The Schematron constraint <ident>lb-line-end-placement</ident> checks this placement.</desc>
          <content><empty/></content>
          <constraintSpec ident="lb-line-end-placement" scheme="schematron">
            <desc>The line end of the last line of an element follows the element that holds the
              line and stays inside every further ancestor: a stanza's last verse is followed by
              <code>&lt;/lg>&lt;lb/></code>; nested groups and divisions close after that
              <gi>lb</gi>. A joined line end (<att>break</att>=<val>no</val>) stands where its word
              breaks and is not concerned. A line followed by a new <gi>div</gi> or <gi>lg</gi>
              must have its line end marked at all ([S-LBM]).</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:lb[not(@break='no')]">
                <sch:let name="last" value="not(following-sibling::node()[self::* or self::text()[normalize-space()]])"/>
                <sch:let name="prev" value="preceding-sibling::node()[self::* or self::text()[normalize-space()]][1]"/>
                <sch:report role="warning"
                  test="$last and not($prev[self::tei:lg]) and (parent::tei:l or parent::tei:head
                      or parent::tei:p or parent::tei:list or parent::tei:item or parent::tei:hi
                      or parent::tei:closer or parent::tei:salute or parent::tei:signed
                      or parent::tei:dateline or parent::tei:titlePart or parent::tei:figure
                      or parent::tei:fw or parent::tei:body or parent::tei:front)">[S-LB]
                  A line break (lb) marks a line END and follows the element that holds the line;
                  here it is the last child of &lt;<sch:value-of select="local-name(parent::*)"/>&gt;.
                  Move it to immediately after &lt;/<sch:value-of select="local-name(parent::*)"/>&gt;.</sch:report>
                <sch:report role="warning"
                  test="$last and parent::tei:lg and preceding-sibling::node()[self::* or self::text()[normalize-space()]][not(self::tei:note)][1][self::tei:l]">[S-LBV]
                  The line end of a stanza's last verse follows the stanza: move this lb to
                  immediately after &lt;/lg&gt;.</sch:report>
                <sch:report role="warning" test="$prev[not(self::tei:lb)]/descendant::node()[self::* or self::text()[normalize-space()]][last()][self::tei:lb[not(@break='no')]]">[S-LB2]
                  The line before this lb already ends with an lb inside the preceding
                  &lt;<sch:value-of select="local-name($prev)"/>&gt;: nothing is printed between the
                  two, so this one is a doubling (or an empty line, which is not encoded).</sch:report>
                <sch:report role="warning" test="$prev[self::tei:div]">[S-LBD]
                  The line end of a unit's last line belongs to the unit: move this lb before
                  &lt;/div&gt;.</sch:report>
                <sch:report role="warning"
                  test="$prev[self::tei:lg][node()[self::* or self::text()[normalize-space()]][not(self::tei:note[preceding-sibling::node()[self::* or self::text()[normalize-space()]][1][self::tei:l]])][last()][not(self::tei:l or self::tei:lb)]]">[S-LBG]
                  This lb ends the last line of the preceding &lt;lg&gt;, a line held by its last
                  child &lt;<sch:value-of select="local-name($prev/*[last()])"/>&gt;: move the lb inside, directly after
                  &lt;/<sch:value-of select="local-name($prev/*[last()])"/>&gt;.</sch:report>
              </sch:rule>
              <!-- A line end that is missing altogether: the line is followed by a new unit or
                   group, so it certainly ends. Elements whose last line already ends inside them,
                   and those with no printed text (an editorial marker such as $D.18$), are not
                   concerned; before pb, fw, milestone or cb the line end may follow the page
                   furniture, so those are not checked. -->
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                context="(tei:l | tei:p | tei:head | tei:closer)[not(ancestor::tei:note)]">
                <sch:let name="next" value="following::node()[self::* or self::text()[normalize-space()]][1]"/>
                <sch:let name="end" value="(descendant::node()[self::* or self::text()[normalize-space()]])[last()]"/>
                <sch:report role="warning"
                  test="$next[self::tei:div or self::tei:lg] and not($end[self::tei:lb])
                      and replace(replace(string(.), '\$[^$]*\$', ''), '[\s\p{Z}]', '') ne ''">[S-LBM]
                  The line of this &lt;<sch:value-of select="local-name()"/>&gt; ends before a new
                  &lt;<sch:value-of select="local-name($next)"/>&gt;, but its line end is not marked:
                  add an lb after it (after the stanza's &lt;/lg&gt; for a verse).</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <constraintSpec ident="lb-joined" scheme="schematron">
            <desc>A joined line end continues a word of its own line, so it does not open its
              element; the line of a catchword ends with a plain <gi>lb</gi>, as in the DTA base
              format. A hyphen at a plain line end is an ellipsis (before <mentioned>und</mentioned>
              or <mentioned>oder</mentioned>), a catchword's, or a turnover's (<att>next</att>);
              any other is a joined line end not marked as one.</desc>
            <constraint>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:lb[@break='no']">
                <sch:report role="warning" test="not(preceding-sibling::node()[normalize-space() or self::*])">[S-LBJ]
                  A joined line end opens its element.</sch:report>
                <sch:report role="warning" test="preceding-sibling::*[1][self::tei:fw[@type='catch']]">[S-LBC]
                  The line of a catchword ends with a plain lb.</sch:report>
                <sch:report role="warning" test="(preceding-sibling::node()[1][self::text()][matches(., '\s$')] or following-sibling::node()[1][self::text()][matches(., '^\s')]) and (not(parent::tei:lg or parent::tei:div or parent::tei:body or parent::tei:front or parent::tei:back) or preceding-sibling::node()[1][self::text()[normalize-space()]] or following-sibling::node()[1][self::text()[normalize-space()]]) and preceding-sibling::node()[not(self::text()[not(normalize-space())])][1][self::text() or self::tei:hi or self::tei:supplied or self::tei:choice or self::tei:sic or self::tei:corr or self::tei:abbr or self::tei:unclear or self::tei:rs or self::tei:num] and following-sibling::node()[not(self::text()[not(normalize-space())])][1][self::text() or self::tei:hi or self::tei:supplied or self::tei:choice or self::tei:sic or self::tei:corr or self::tei:abbr or self::tei:unclear or self::tei:rs or self::tei:num]">[S-LBW]
                  Whitespace next to a joined line end splits the word in plain text: write
                  er-&lt;lb break="no"/&gt;weißt (a line break may stand inside the tag:
                  &lt;lb⏎ break="no"/&gt;). If the two words are separate, the line end is a
                  plain lb instead. Next to page furniture, an anchor or another verse this is not
                  checked.</sch:report>
                <sch:report role="warning" test="matches(string-join(following-sibling::node()[position() le 2] ! string(), ''), '^\s*und([\s/.,:;!?]|$)', 'i')">[S-LBU]
                  The next word is "und": the hyphen ends a word (Geburt- und Sterb-Getichte), so the
                  line end is a plain lb.</sch:report>
              </sch:rule>
              <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron" context="tei:lb[not(@break)]">
                <sch:let name="end" value="(preceding-sibling::node()[normalize-space()][1]/descendant-or-self::text()[normalize-space()])[last()]"/>
                <sch:report role="warning" test="matches($end, '(^|[^-])[-¬⸗&#xAD;&#x2010;&#x2011;]\s*$')
                    and not($end/ancestor::tei:fw or $end/ancestor::*[@next])
                    and not(matches(following-sibling::node()[normalize-space()][1], '^\s*(und|oder)([\s/.,:;!?]|$)', 'i'))">[S-LBH]
                  A hyphen ends the line, but the line end is not joined: if the word continues,
                  write lb break="no"; if the hyphen ends a word, nothing is to be done.</sch:report>
              </sch:rule>
            </constraint>
          </constraintSpec>
          <attList>
            <!-- not in the DTA base format, which deletes att.breaking -->
            <attDef ident="break" mode="add" usage="opt">
              <datatype><dataRef key="teidata.enumerated"/></datatype>
              <valList type="closed">
                <valItem ident="no"><desc>the line break falls inside a word (hyphenation): the
                  following line continues the broken word</desc></valItem>
              </valList>
            </attDef>
          </attList>
          <!-- A line break is dropped where the output already starts a line (after a block). At a
               hyphenated line end the print shows the hyphen — the source's own, where the
               transcription kept it, or a supplied one, in grey — and the break. The reading text
               joins every line but the title page's, and keeps the space between the words; the
               search text joins the hyphenated word and needs no space. `join` says the line joins
               the next, and which last characters of its text go, as the model sets its own hyphen. -->
          <model cssClass="lb-hyphen" predicate="@break='no' and matches(preceding-sibling::node()[normalize-space()][1], '[-¬⸗&#xAD;&#x2010;&#x2011;]\s*$')" behaviour="break">
            <param name="type" value="'line'"/>
            <param name="label" value="'-'"/>
            <param name="join" value="'-¬⸗&#xAD;&#x2010;&#x2011;'"/>
          </model>
          <model cssClass="lb-hyphen-supplied" predicate="@break='no'" behaviour="break">
            <param name="type" value="'line'"/>
            <param name="label" value="'-'"/>
            <param name="join" value="'-¬⸗&#xAD;&#x2010;&#x2011;'"/>
            <outputRendition>color: rgb(var(--c-muted));</outputRendition>
          </model>
          <modelSequence>
            <model behaviour="break">
              <param name="type" value="'line'"/>
            </model>
            <!-- the line end is a word boundary, except a forme work line's: the text's own line
                 end before it already is one, and a word joined across the page goes on after it -->
            <model behaviour="text" predicate="not(preceding-sibling::node()[normalize-space() or self::*][1][self::fw])">
              <param name="content" value="' '"/>
            </model>
          </modelSequence>
          <model output="normalized" predicate="@break='no' or not(ancestor::titlePage)" behaviour="omit"/>
          <model output="plain" predicate="@break='no'" behaviour="omit">
            <param name="join" value="'-¬⸗&#xAD;&#x2010;&#x2011;'"/>
          </model>
          <model output="plain" behaviour="break">
            <param name="type" value="'line'"/>
          </model>
          <exemplum>
            <p>The line end of a stanza's last verse follows its <gi>lg</gi>; the enclosing
              <gi>lg</gi> and <gi>div</gi> close after it:</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <div n="2">
                <lg type="poem">
                  <lg n="1">
                    <l>Die gwaltigen umsonst sich wider Christum lehnen:</l>
                    <lb/>
                    <l rendition="#et">dann Gottes rahtschluß muß fortgehen immerzu/</l>
                  </lg>
                  <lb/>
                </lg>
              </div>
            </egXML>
          </exemplum>
          <exemplum>
            <p>A prose unit: the line end follows <gi>p</gi>, inside the <gi>div</gi>:</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <div>
                <p rendition="#c #smaller">Ende des erſten Buchs der <lb/> Pſalmen.</p>
                <lb/>
              </div>
            </egXML>
          </exemplum>
          <exemplum>
            <p>Incorrect: the line end inside the stanza, after the last <gi>l</gi> ([S-LBV]):</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <lg type="poem">
                <l>dann Gottes rahtschluß muß fortgehen immerzu/</l>
                <lb/>
              </lg>
            </egXML>
          </exemplum>
          <exemplum>
            <p>Incorrect: the line end after the enclosing group ([S-LBG]):</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <lg type="poem">
                <lg n="1">
                  <l>dann Gottes rahtschluß muß fortgehen immerzu/</l>
                </lg>
              </lg>
              <lb/>
            </egXML>
          </exemplum>
          <exemplum>
            <p>Incorrect: the line end after the <gi>div</gi> ([S-LBD]):</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <div>
                <p rendition="#c #smaller">Ende des erſten Buchs der <lb/> Pſalmen.</p>
              </div>
              <lb/>
            </egXML>
          </exemplum>
          <exemplum>
            <p>Hyphenation: the hyphen is retained and <att>break</att>=<val>no</val> marks the
              continuation:</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <l>und Gottes wort be<lb break="no"/>trachtet/</l>
            </egXML>
          </exemplum>
        </elementSpec>

      </schemaSpec>
    </body>
  </text>
</TEI>
