<?xml version="1.0" encoding="utf-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
         xmlns:tei="http://www.tei-c.org/ns/1.0"
         xmlns:teix="http://www.tei-c.org/ns/Examples"
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"><!--Schema generated 2025-08-28T16:49:00Z
Edition: P5 Version 4.10.1. Last updated on
        28th August 2025, revision 3cd82e7a3
This material is dual-licensed.
[http://creativecommons.org/licenses/by/3.0/] Distributed under a Creative Commons Attribution 3.0 Unported License.  [http://www.opensource.org/licenses/BSD-2-Clause] Copyright 2025 TEI Consortium. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. TEI material can be licensed differently depending on the use you intend to make of it. Hence it is made available under both the CC+BY and BSD-2 licences. The CC+BY licence is generally appropriate for usages which treat TEI content as data or documentation. The BSD-2 licence is generally appropriate for usage of TEI content in a software environment. For further information or clarification, please contact the  TEI
          Consortium . Simple analytic mechanisms--><!--Definitions from module analysis--><!--Set global predeclared macros--><!--Set predeclared macros--><!--0. predeclared macros--><!--1. classes-->
   <define name="att.lexicographic.normalized.attributes">
      <ref name="att.lexicographic.normalized.attribute.norm"/>
      <ref name="att.lexicographic.normalized.attribute.orig"/>
   </define>
   <define name="att.lexicographic.normalized.attribute.norm">
      <optional>
         <attribute name="norm">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(normalized) provides the normalized/standardized form of information present in the source text in a non-normalized form.</a:documentation>
            <data type="string"/>
         </attribute>
      </optional>
   </define>
   <define name="att.lexicographic.normalized.attribute.orig">
      <optional>
         <attribute name="orig">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(original) gives the original string or is the empty string when the element does not appear in the source text.</a:documentation>
            <data type="string"/>
         </attribute>
      </optional>
   </define>
   <define name="att.linguistic.attributes">
      <ref name="att.lexicographic.normalized.attributes"/>
      <ref name="att.linguistic.attribute.lemma"/>
      <ref name="att.linguistic.attribute.lemmaRef"/>
      <ref name="att.linguistic.attribute.pos"/>
      <ref name="att.linguistic.attribute.msd"/>
      <ref name="att.linguistic.attribute.join"/>
   </define>
   <define name="att.linguistic.attribute.lemma">
      <optional>
         <attribute name="lemma">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">provides a lemma (base form) for the word, typically uninflected and serving both as an identifier (e.g. in dictionary contexts, as a headword), and as a basis for potential inflections.</a:documentation>
            <data type="string"/>
         </attribute>
      </optional>
   </define>
   <define name="att.linguistic.attribute.lemmaRef">
      <optional>
         <attribute name="lemmaRef">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">provides a pointer to a definition of the lemma for the word, for example in an online lexicon.</a:documentation>
            <data type="anyURI">
               <param name="pattern">\S+</param>
            </data>
         </attribute>
      </optional>
   </define>
   <define name="att.linguistic.attribute.pos">
      <optional>
         <attribute name="pos">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(part of speech) indicates the part of speech assigned to a token (i.e. information on whether it is a noun, adjective, or verb), usually according to some official reference vocabulary (e.g. for German: STTS, for English: CLAWS, for Polish: NKJP, etc.).</a:documentation>
            <data type="string"/>
         </attribute>
      </optional>
   </define>
   <define name="att.linguistic.attribute.msd">
      <optional>
         <attribute name="msd">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(morphosyntactic description) supplies morphosyntactic information for a token, usually according to some official reference vocabulary (e.g. for German: <a xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:rng="http://relaxng.org/ns/structure/1.0"
                  href="http://www.ims.uni-stuttgart.de/forschung/ressourcen/lexika/TagSets/stts-1999.pdf">STTS-large tagset</a>; for a feature description system designed as (pragmatically) universal, see <a xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:rng="http://relaxng.org/ns/structure/1.0"
                  href="http://universaldependencies.org/u/feat/index.html">Universal Features</a>).</a:documentation>
            <data type="string"/>
         </attribute>
      </optional>
   </define>
   <define name="att.linguistic.attribute.join">
      <optional>
         <attribute name="join">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">when present, provides information on whether the token in question is adjacent to another, and if so, on which side.</a:documentation>
            <choice>
               <value>no</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the token is not adjacent to another</a:documentation>
               <value>left</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">there is no whitespace on the left side of the token</a:documentation>
               <value>right</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">there is no whitespace on the right side of the token</a:documentation>
               <value>both</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">there is no whitespace on either side of the token</a:documentation>
               <value>overlap</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the token overlaps with another; other devices (specifying the extent and the area of overlap) are needed to more precisely locate this token in the character stream</a:documentation>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.global.analytic.attributes">
      <ref name="att.global.analytic.attribute.ana"/>
   </define>
   <define name="att.global.analytic.attribute.ana">
      <optional>
         <attribute name="ana">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(analysis) indicates one or more elements containing interpretations of the element on which the <code xmlns="http://www.w3.org/1999/xhtml"
                     xmlns:rng="http://relaxng.org/ns/structure/1.0">@ana</code> attribute appears.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI">
                     <param name="pattern">\S+</param>
                  </data>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <!--2. elements-->
   <define name="c">
      <element name="c">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(character) represents a character. []</a:documentation>
         <ref name="c.content"/>
         <ref name="c.localattributes"/>
      </element>
   </define>
   <define name="c.content">
      <ref name="macro.xtext"/>
   </define>
   <define name="c.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.notated.attributes"/>
      <ref name="att.segLike.attributes"/>
      <ref name="att.typed.attributes"/>
      <empty/>
   </define>
   <define name="cl">
      <element name="cl">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(clause) represents a grammatical clause. []</a:documentation>
         <ref name="cl.content"/>
         <ref name="cl.localattributes"/>
      </element>
   </define>
   <define name="cl.content">
      <ref name="macro.phraseSeq"/>
   </define>
   <define name="cl.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.notated.attributes"/>
      <ref name="att.segLike.attributes"/>
      <ref name="att.typed.attributes"/>
      <empty/>
   </define>
   <define name="interp">
      <element name="interp">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(interpretation) summarizes a specific interpretative annotation which can be linked to a span of text. []</a:documentation>
         <ref name="interp.content"/>
         <ref name="interp.localattributes"/>
      </element>
   </define>
   <define name="interp.content">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.gLike"/>
            <ref name="model.descLike"/>
            <ref name="model.certLike"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="interp.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.interpLike.attributes"/>
      <empty/>
   </define>
   <define name="interpGrp">
      <element name="interpGrp">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(interpretation group) collects together a set of related interpretations which share responsibility or type. []</a:documentation>
         <ref name="interpGrp.content"/>
         <ref name="interpGrp.localattributes"/>
      </element>
   </define>
   <define name="interpGrp.content">
      <group>
         <zeroOrMore>
            <ref name="model.descLike"/>
         </zeroOrMore>
         <oneOrMore>
            <ref name="interp"/>
         </oneOrMore>
      </group>
   </define>
   <define name="interpGrp.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.interpLike.attributes"/>
      <empty/>
   </define>
   <define name="m">
      <element name="m">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(morpheme) represents a grammatical morpheme. []</a:documentation>
         <ref name="m.content"/>
         <ref name="m.localattributes"/>
      </element>
   </define>
   <define name="m.content">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.gLike"/>
            <ref name="model.hiLike"/>
            <ref name="seg"/>
            <ref name="m"/>
            <ref name="c"/>
            <ref name="model.global"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="m.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.notated.attributes"/>
      <ref name="att.segLike.attributes"/>
      <ref name="att.typed.attributes"/>
      <optional>
         <attribute name="baseForm">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies the morpheme's base form.</a:documentation>
            <data type="token">
               <param name="pattern">[^\p{C}\p{Z}]+</param>
            </data>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="pc">
      <element name="pc">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(punctuation character) contains a character or string of characters regarded as constituting a single punctuation mark. [ ]</a:documentation>
         <ref name="pc.content"/>
         <ref name="pc.localattributes"/>
      </element>
   </define>
   <define name="pc.content">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.gLike"/>
            <ref name="c"/>
            <ref name="model.pPart.edit"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="pc.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.linguistic.attributes"/>
      <ref name="att.segLike.attributes"/>
      <ref name="att.typed.attributes"/>
      <optional>
         <attribute name="force">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the extent to which this punctuation mark conventionally separates words or phrases.</a:documentation>
            <choice>
               <value>strong</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the punctuation mark is a word separator</a:documentation>
               <value>weak</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the punctuation mark is not a word separator</a:documentation>
               <value>inter</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the punctuation mark may or may not be a word separator</a:documentation>
            </choice>
         </attribute>
      </optional>
      <optional>
         <attribute name="unit">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">provides a name for the kind of unit delimited by this punctuation mark.</a:documentation>
            <data type="token">
               <param name="pattern">[^\p{C}\p{Z}]+</param>
            </data>
         </attribute>
      </optional>
      <optional>
         <attribute name="pre">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates whether this punctuation mark precedes or follows the unit it delimits.</a:documentation>
            <data type="boolean"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="phr">
      <element name="phr">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(phrase) represents a grammatical phrase. []</a:documentation>
         <ref name="phr.content"/>
         <ref name="phr.localattributes"/>
      </element>
   </define>
   <define name="phr.content">
      <ref name="macro.phraseSeq"/>
   </define>
   <define name="phr.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.notated.attributes"/>
      <ref name="att.segLike.attributes"/>
      <ref name="att.typed.attributes"/>
      <empty/>
   </define>
   <define name="s">
      <element name="s">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(s-unit) contains a sentence-like division of a text. [ ]</a:documentation>
         <ref name="s.content"/>
         <ref name="s.localattributes"/>
      </element>
   </define>
   <define name="s.content">
      <ref name="macro.phraseSeq"/>
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               xmlns:rng="http://relaxng.org/ns/structure/1.0"
               id="s-noNestedS-constraint-rule-55">
         <sch:rule xmlns="http://www.tei-c.org/ns/1.0"
                   xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                   context="tei:s">
            <sch:report test="tei:s">You may not nest one s element within another: use seg instead</sch:report>
         </sch:rule>
      </pattern>
   </define>
   <define name="s.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.notated.attributes"/>
      <ref name="att.segLike.attributes"/>
      <ref name="att.typed.attributes"/>
      <empty/>
   </define>
   <define name="span">
      <element name="span">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">associates an interpretative annotation directly with a span of text. []</a:documentation>
         <ref name="span.content"/>
         <ref name="span.localattributes"/>
      </element>
   </define>
   <define name="span.content">
      <ref name="macro.phraseSeq.limited"/>
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               xmlns:rng="http://relaxng.org/ns/structure/1.0"
               id="span-target-from-constraint-rule-56">
         <sch:rule xmlns="http://www.tei-c.org/ns/1.0"
                   xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                   context="tei:span">
            <sch:report test="@from and @target">
          Only one of the attributes @target and @from may be supplied on <sch:name/>
            </sch:report>
         </sch:rule>
      </pattern>
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               xmlns:rng="http://relaxng.org/ns/structure/1.0"
               id="span-targetto-constraint-rule-57">
         <sch:rule xmlns="http://www.tei-c.org/ns/1.0"
                   xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                   context="tei:span">
            <sch:report test="@to and @target">
          Only one of the attributes @target and @to may be supplied on <sch:name/>
            </sch:report>
         </sch:rule>
      </pattern>
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               xmlns:rng="http://relaxng.org/ns/structure/1.0"
               id="span-tonotfrom-constraint-rule-58">
         <sch:rule xmlns="http://www.tei-c.org/ns/1.0"
                   xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                   context="tei:span">
            <sch:report test="@to and not(@from)">
          If @to is supplied on <sch:name/>, @from must be supplied as well
        </sch:report>
         </sch:rule>
      </pattern>
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               xmlns:rng="http://relaxng.org/ns/structure/1.0"
               id="span-tofrom-constraint-rule-59">
         <sch:rule xmlns="http://www.tei-c.org/ns/1.0"
                   xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                   context="tei:span">
            <sch:report test="contains(normalize-space(@to),' ') or contains(normalize-space(@from),' ')">
          The attributes @to and @from on <sch:name/> may each contain only a single value
        </sch:report>
         </sch:rule>
      </pattern>
   </define>
   <define name="span.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.interpLike.attributes"/>
      <ref name="att.pointing.attributes"/>
      <optional>
         <attribute name="from">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">gives the identifier of the node which is the starting point of the span of text being annotated; if not accompanied by a <code xmlns="http://www.w3.org/1999/xhtml"
                     xmlns:rng="http://relaxng.org/ns/structure/1.0">@to</code> attribute, gives the identifier of the node of the entire span of text being annotated.</a:documentation>
            <data type="anyURI">
               <param name="pattern">\S+</param>
            </data>
         </attribute>
      </optional>
      <optional>
         <attribute name="to">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">gives the identifier of the node which is the end-point of the span of text being annotated.</a:documentation>
            <data type="anyURI">
               <param name="pattern">\S+</param>
            </data>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="spanGrp">
      <element name="spanGrp">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(span group) collects together span tags. []</a:documentation>
         <ref name="spanGrp.content"/>
         <ref name="spanGrp.localattributes"/>
      </element>
   </define>
   <define name="spanGrp.content">
      <group>
         <zeroOrMore>
            <ref name="model.descLike"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="span"/>
         </zeroOrMore>
      </group>
   </define>
   <define name="spanGrp.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.interpLike.attributes"/>
      <empty/>
   </define>
   <define name="w">
      <element name="w">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(word) represents a grammatical (not necessarily orthographic) word. [ ]</a:documentation>
         <ref name="w.content"/>
         <ref name="w.localattributes"/>
      </element>
   </define>
   <define name="w.content">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.gLike"/>
            <ref name="seg"/>
            <ref name="w"/>
            <ref name="m"/>
            <ref name="c"/>
            <ref name="pc"/>
            <ref name="model.global"/>
            <ref name="model.lPart"/>
            <ref name="model.hiLike"/>
            <ref name="model.pPart.edit"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="w.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.cmc.attributes"/>
      <ref name="att.linguistic.attributes"/>
      <ref name="att.notated.attributes"/>
      <ref name="att.segLike.attributes"/>
      <ref name="att.typed.attributes"/>
      <empty/>
   </define>
   <!--3. macros-->
</grammar>
