Skip to content
Schema_Okopenko.rng 330 KiB
Newer Older
csteindl's avatar
csteindl committed
<?xml version="1.0" encoding="utf-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         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"
         ns="http://www.tei-c.org/ns/1.0"><!--
csteindl's avatar
csteindl committed
Schema generated from ODD source 2019-07-19T09:07:02Z. .
TEI Edition: Version 3.6.0. Last updated on
	16th July 2019, revision daa3cc0b9
TEI Edition Location: http://www.tei-c.org/Vault/P5/Version 3.6.0/
csteindl's avatar
csteindl committed
  
--><!--[https://creativecommons.org/licenses/by-sa/4.0/] Distributed under the Creative Commons Attribution-ShareAlike 4.0 International license (CC BY-SA 4.0)-->
   <define name="macro.paraContent">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.gLike"/>
            <ref name="model.phrase"/>
            <ref name="model.inter"/>
            <ref name="model.global"/>
            <ref name="lg"/>
            <ref name="model.lLike"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="macro.limitedContent">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.limitedPhrase"/>
            <ref name="model.inter"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="macro.phraseSeq">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.gLike"/>
csteindl's avatar
csteindl committed
            <ref name="model.qLike"/>
csteindl's avatar
csteindl committed
            <ref name="model.phrase"/>
            <ref name="model.global"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="macro.phraseSeq.limited">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.limitedPhrase"/>
            <ref name="model.global"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="macro.specialPara">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.gLike"/>
            <ref name="model.phrase"/>
            <ref name="model.inter"/>
            <ref name="model.divPart"/>
            <ref name="model.global"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="macro.xtext">
      <zeroOrMore>
         <choice>
            <text/>
            <ref name="model.gLike"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="att.canonical.attributes">
      <ref name="att.canonical.attribute.key"/>
      <ref name="att.canonical.attribute.ref"/>
   </define>
   <define name="att.canonical.attribute.key">
      <optional>
         <attribute name="key">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">provides an externally-defined means of identifying the entity (or entities) being named, using a coded value of some kind.</a:documentation>
            <data type="string"/>
         </attribute>
      </optional>
   </define>
   <define name="att.canonical.attribute.ref">
      <optional>
         <attribute name="ref">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(reference) provides an explicit means of locating a full definition or identity for the entity being named by means of one or more URIs.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.ranging.attribute.atLeast">
      <optional>
         <attribute name="atLeast">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">gives a minimum estimated value for the approximate measurement.</a:documentation>
            <choice>
               <data type="double"/>
               <data type="token">
                  <param name="pattern">(\-?[\d]+/\-?[\d]+)</param>
               </data>
               <data type="decimal"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.ranging.attribute.atMost">
      <optional>
         <attribute name="atMost">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">gives a maximum estimated value for the approximate measurement.</a:documentation>
            <choice>
               <data type="double"/>
               <data type="token">
                  <param name="pattern">(\-?[\d]+/\-?[\d]+)</param>
               </data>
               <data type="decimal"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.ranging.attribute.min">
      <optional>
         <attribute name="min">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">where the measurement summarizes more than one observation or a range, supplies the minimum value observed.</a:documentation>
            <choice>
               <data type="double"/>
               <data type="token">
                  <param name="pattern">(\-?[\d]+/\-?[\d]+)</param>
               </data>
               <data type="decimal"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.ranging.attribute.max">
      <optional>
         <attribute name="max">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">where the measurement summarizes more than one observation or a range, supplies the maximum value observed.</a:documentation>
            <choice>
               <data type="double"/>
               <data type="token">
                  <param name="pattern">(\-?[\d]+/\-?[\d]+)</param>
               </data>
               <data type="decimal"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.ranging.attribute.confidence">
      <optional>
         <attribute name="confidence">
csteindl's avatar
csteindl committed
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies the degree of statistical confidence (between zero and one) that a value falls within the range specified by <code xmlns="http://www.w3.org/1999/xhtml">@min</code> and <code xmlns="http://www.w3.org/1999/xhtml">@max</code>, or the proportion of observed values that fall within that range.</a:documentation>
csteindl's avatar
csteindl committed
            <data type="double"/>
         </attribute>
      </optional>
   </define>
   <define name="att.written.attribute.hand">
      <optional>
         <attribute name="hand">
csteindl's avatar
csteindl committed
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">points to a <code xmlns="http://www.w3.org/1999/xhtml">&lt;handNote&gt;</code> element describing the hand considered responsible for the content of the element concerned.</a:documentation>
csteindl's avatar
csteindl committed
            <data type="anyURI"/>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.datable.w3c.attributes">
      <ref name="att.datable.w3c.attribute.when"/>
      <ref name="att.datable.w3c.attribute.notBefore"/>
      <ref name="att.datable.w3c.attribute.notAfter"/>
      <ref name="att.datable.w3c.attribute.from"/>
      <ref name="att.datable.w3c.attribute.to"/>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.datable.w3c.attribute.when">
      <optional>
         <attribute name="when">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies the value of the date or time in a standard form, e.g. yyyy-mm-dd.</a:documentation>
            <choice>
               <data type="date"/>
               <data type="gYear"/>
               <data type="gMonth"/>
               <data type="gDay"/>
               <data type="gYearMonth"/>
               <data type="gMonthDay"/>
               <data type="time"/>
               <data type="dateTime"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.datable.w3c.attribute.notBefore">
      <optional>
         <attribute name="notBefore">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies the earliest possible date for the event in standard form, e.g. yyyy-mm-dd.</a:documentation>
            <choice>
               <data type="date"/>
               <data type="gYear"/>
               <data type="gMonth"/>
               <data type="gDay"/>
               <data type="gYearMonth"/>
               <data type="gMonthDay"/>
               <data type="time"/>
               <data type="dateTime"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.datable.w3c.attribute.notAfter">
      <optional>
         <attribute name="notAfter">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies the latest possible date for the event in standard form, e.g. yyyy-mm-dd.</a:documentation>
            <choice>
               <data type="date"/>
               <data type="gYear"/>
               <data type="gMonth"/>
               <data type="gDay"/>
               <data type="gYearMonth"/>
               <data type="gMonthDay"/>
               <data type="time"/>
               <data type="dateTime"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.datable.w3c.attribute.from">
      <optional>
         <attribute name="from">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the starting point of the period in standard form, e.g. yyyy-mm-dd.</a:documentation>
            <choice>
               <data type="date"/>
               <data type="gYear"/>
               <data type="gMonth"/>
               <data type="gDay"/>
               <data type="gYearMonth"/>
               <data type="gMonthDay"/>
               <data type="time"/>
               <data type="dateTime"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.datable.w3c.attribute.to">
      <optional>
         <attribute name="to">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the ending point of the period in standard form, e.g. yyyy-mm-dd.</a:documentation>
            <choice>
               <data type="date"/>
               <data type="gYear"/>
               <data type="gMonth"/>
               <data type="gDay"/>
               <data type="gYearMonth"/>
               <data type="gMonthDay"/>
               <data type="time"/>
               <data type="dateTime"/>
            </choice>
         </attribute>
      </optional>
   </define>
   <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
            id="Schema_Okopenko_5-att.datable.w3c-att-datable-w3c-when-constraint-rule-1">
      <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                xmlns="http://www.tei-c.org/ns/1.0"
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
                context="tei:*[@when]">
        <sch:report role="nonfatal" test="@notBefore|@notAfter|@from|@to">The @when attribute cannot be used with any other att.datable.w3c attributes.</sch:report>
      </sch:rule>
   </pattern>
   <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
            id="Schema_Okopenko_5-att.datable.w3c-att-datable-w3c-from-constraint-rule-2">
      <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                xmlns="http://www.tei-c.org/ns/1.0"
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
                context="tei:*[@from]">
        <sch:report role="nonfatal" test="@notBefore">The @from and @notBefore attributes cannot be used together.</sch:report>
      </sch:rule>
   </pattern>
   <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
            id="Schema_Okopenko_5-att.datable.w3c-att-datable-w3c-to-constraint-rule-3">
      <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                xmlns="http://www.tei-c.org/ns/1.0"
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
                context="tei:*[@to]">
        <sch:report role="nonfatal" test="@notAfter">The @to and @notAfter attributes cannot be used together.</sch:report>
      </sch:rule>
   </pattern>
csteindl's avatar
csteindl committed
   <define name="att.datable.attributes">
      <ref name="att.datable.w3c.attributes"/>
      <ref name="att.datable.iso.attributes"/>
      <ref name="att.datable.custom.attributes"/>
      <ref name="att.datable.attribute.calendar"/>
      <ref name="att.datable.attribute.period"/>
   </define>
   <define name="att.datable.attribute.calendar">
      <optional>
         <attribute name="calendar">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the system or calendar to which the date represented by the content of this element belongs.</a:documentation>
            <data type="anyURI"/>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
            id="Schema_Okopenko_5-att.datable-calendar-calendar-constraint-rule-4">
      <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                xmlns="http://www.tei-c.org/ns/1.0"
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
                context="tei:*[@calendar]">
csteindl's avatar
csteindl committed
            <sch:assert test="string-length(.) gt 0"> @calendar indicates the system or calendar to
              which the date represented by the content of this element belongs, but this
              <sch:name/> element has no textual content.</sch:assert>
csteindl's avatar
csteindl committed
          </sch:rule>
   </pattern>
csteindl's avatar
csteindl committed
   <define name="att.datable.attribute.period">
      <optional>
         <attribute name="period">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies a pointer to some location defining a named period of time within which the datable item is understood to have occurred.</a:documentation>
            <data type="anyURI"/>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.datcat.attribute.datcat">
      <optional>
         <attribute name="datcat" ns="http://www.isocat.org/ns/dcr">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains a PID (persistent identifier) that aligns the given element with the appropriate Data Category (or categories) in ISOcat.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.datcat.attribute.valueDatcat">
      <optional>
         <attribute name="valueDatcat" ns="http://www.isocat.org/ns/dcr">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains a PID (persistent identifier) that aligns the content of the given element or the value of the given attribute with the appropriate simple Data Category (or categories) in ISOcat.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.declarable.attributes">
      <ref name="att.declarable.attribute.default"/>
   </define>
   <define name="att.declarable.attribute.default">
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
                    name="default"
                    a:defaultValue="false">
            <a:documentation>indicates whether or not this element is selected by default when its parent is selected.</a:documentation>
            <choice>
               <value>true</value>
               <a:documentation>This element is selected if its parent is selected</a:documentation>
               <value>false</value>
               <a:documentation>This element can only be selected explicitly, unless it is the only one of its kind, in which case it is selected if its parent is selected.</a:documentation>
            </choice>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.declaring.attributes">
      <ref name="att.declaring.attribute.decls"/>
   </define>
   <define name="att.declaring.attribute.decls">
      <optional>
         <attribute name="decls">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">identifies one or more declarable elements within the header, which are understood to apply to the element bearing this attribute and its content.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.fragmentable.attribute.part">
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
                    name="part"
                    a:defaultValue="N">
            <a:documentation>specifies whether or not its parent element is fragmented in some way, typically by some other overlapping structure: for example a speech which is divided between two or more verse stanzas, a paragraph which is split across a page division, a verse line which is divided between two speakers.</a:documentation>
            <choice>
               <value>Y</value>
               <a:documentation>(yes) the element is fragmented in some (unspecified) respect</a:documentation>
               <value>N</value>
               <a:documentation>(no) the element is not fragmented, or no claim is made as to its completeness</a:documentation>
               <value>I</value>
               <a:documentation>(initial) this is the initial part of a fragmented element</a:documentation>
               <value>M</value>
               <a:documentation>(medial) this is a medial part of a fragmented element</a:documentation>
               <value>F</value>
               <a:documentation>(final) this is the final part of a fragmented element</a:documentation>
            </choice>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.docStatus.attributes">
      <ref name="att.docStatus.attribute.status"/>
   </define>
   <define name="att.docStatus.attribute.status">
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
                    name="status"
                    a:defaultValue="draft">
            <a:documentation>describes the status of a document either currently or, when associated with a dated element, at the time indicated.
Sample values include: 1] approved; 2] candidate; 3] cleared; 4] deprecated; 5] draft; 6] embargoed; 7] expired; 8] frozen; 9] galley; 10] proposed; 11] published; 12] recommendation; 13] submitted; 14] unfinished; 15] withdrawn</a:documentation>
            <data type="token">
               <param name="pattern">(\p{L}|\p{N}|\p{P}|\p{S})+</param>
            </data>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.global.responsibility.attributes">
      <ref name="att.global.responsibility.attribute.cert"/>
      <ref name="att.global.responsibility.attribute.resp"/>
   </define>
   <define name="att.global.responsibility.attribute.cert">
      <optional>
         <attribute name="cert">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(certainty) signifies the degree of certainty associated with the intervention or interpretation.</a:documentation>
            <choice>
               <data type="double"/>
               <choice>
                  <value>high</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
                  <value>medium</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
                  <value>low</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
                  <value>unknown</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
               </choice>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.global.responsibility.attribute.resp">
      <optional>
         <attribute name="resp">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(responsible party) indicates the agency responsible for the intervention or interpretation, for example an editor or transcriber.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.editLike.attributes">
      <ref name="att.editLike.attribute.evidence"/>
      <ref name="att.editLike.attribute.instant"/>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.editLike.attribute.evidence">
      <optional>
         <attribute name="evidence">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the nature of the evidence supporting the reliability or accuracy of the intervention or interpretation.
Suggested values include: 1] internal; 2] external; 3] conjecture</a:documentation>
            <list>
               <oneOrMore>
                  <choice>
                     <value>internal</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">there is internal evidence to support the intervention.</a:documentation>
                     <value>external</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">there is external evidence to support the intervention.</a:documentation>
                     <value>conjecture</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the intervention or interpretation has been made by the editor, cataloguer, or scholar on the basis of their expertise.</a:documentation>
                     <data type="token">
                        <param name="pattern">(\p{L}|\p{N}|\p{P}|\p{S})+</param>
                     </data>
                  </choice>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.editLike.attribute.instant">
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
                    name="instant"
                    a:defaultValue="false">
            <a:documentation>indicates whether this is an instant revision or not.</a:documentation>
            <choice>
               <data type="boolean"/>
               <choice>
                  <value>unknown</value>
                  <a:documentation/>
                  <value>inapplicable</value>
                  <a:documentation/>
               </choice>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.global.rendition.attributes">
      <ref name="att.global.rendition.attribute.rend"/>
      <ref name="att.global.rendition.attribute.style"/>
      <ref name="att.global.rendition.attribute.rendition"/>
   </define>
   <define name="att.global.rendition.attribute.rend">
      <optional>
         <attribute name="rend">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(rendition) indicates how the element in question was rendered or presented in the source text.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="token">
                     <param name="pattern">(\p{L}|\p{N}|\p{P}|\p{S})+</param>
                  </data>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.global.rendition.attribute.style">
      <optional>
         <attribute name="style">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains an expression in some formal style definition language which defines the rendering or presentation used for this element in the source text</a:documentation>
            <data type="string"/>
         </attribute>
      </optional>
   </define>
   <define name="att.global.rendition.attribute.rendition">
      <optional>
         <attribute name="rendition">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">points to a description of the rendering or presentation used for this element in the source text.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.global.source.attributes">
      <ref name="att.global.source.attribute.source"/>
   </define>
   <define name="att.global.source.attribute.source">
      <optional>
         <attribute name="source">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies the source from which some aspect of this element is drawn.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.global.attributes">
      <ref name="att.global.rendition.attributes"/>
      <ref name="att.global.linking.attributes"/>
      <ref name="att.global.facs.attributes"/>
      <ref name="att.global.change.attributes"/>
      <ref name="att.global.responsibility.attributes"/>
      <ref name="att.global.source.attributes"/>
      <ref name="att.global.attribute.xmlid"/>
      <ref name="att.global.attribute.n"/>
      <ref name="att.global.attribute.xmllang"/>
      <ref name="att.global.attribute.xmlbase"/>
      <ref name="att.global.attribute.xmlspace"/>
   </define>
   <define name="att.global.attribute.xmlid">
      <optional>
         <attribute name="xml:id">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(identifier) provides a unique identifier for the element bearing the attribute.</a:documentation>
            <data type="ID"/>
         </attribute>
      </optional>
   </define>
   <define name="att.global.attribute.n">
      <optional>
         <attribute name="n">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(number) gives a number (or other label) for an element, which is not necessarily unique within the document.</a:documentation>
            <data type="string"/>
         </attribute>
      </optional>
   </define>
   <define name="att.global.attribute.xmllang">
      <optional>
         <attribute name="xml:lang">
csteindl's avatar
csteindl committed
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(language) indicates the language of the element content using a tag generated according to <a xmlns="http://www.w3.org/1999/xhtml"
                  href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">BCP 47</a>.</a:documentation>
csteindl's avatar
csteindl committed
            <choice>
               <data type="language"/>
               <choice>
                  <value/>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
               </choice>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.global.attribute.xmlbase">
      <optional>
         <attribute name="xml:base">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">provides a base URI reference with which applications can resolve relative URI references into absolute URI references.</a:documentation>
            <data type="anyURI"/>
         </attribute>
      </optional>
   </define>
   <define name="att.global.attribute.xmlspace">
      <optional>
         <attribute name="xml:space">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">signals an intention about how white space should be managed by applications.</a:documentation>
            <choice>
               <value>default</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">signals that the application's default white-space processing modes are acceptable</a:documentation>
               <value>preserve</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the intent that applications preserve all white space</a:documentation>
            </choice>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.measurement.attribute.unitRef">
      <optional>
         <attribute name="unitRef">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">points to a unique identifier stored in the <code xmlns="http://www.w3.org/1999/xhtml">@xml:id</code> of a <code xmlns="http://www.w3.org/1999/xhtml">&lt;unitDef&gt;</code> element that defines a unit of measure.</a:documentation>
            <data type="anyURI"/>
         </attribute>
      </optional>
   </define>
   <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
            id="Schema_Okopenko_5-att.measurement-att-measurement-unitRef-constraint-rule-5">
      <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                xmlns="http://www.tei-c.org/ns/1.0"
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
                context="tei:*[@unitRef]">
        <sch:report role="info" test="@unit">The @unit attribute may be unnecessary when @unitRef is present.</sch:report>
      </sch:rule>
   </pattern>
   <define name="att.naming.attributes">
      <ref name="att.canonical.attributes"/>
      <ref name="att.naming.attribute.role"/>
      <ref name="att.naming.attribute.nymRef"/>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.naming.attribute.role">
      <optional>
         <attribute name="role">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">may be used to specify further information about the entity referenced by this name in the form of a set of whitespace-separated values, for example the occupation of a person, or the status of a place.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="token">
                     <param name="pattern">(\p{L}|\p{N}|\p{P}|\p{S})+</param>
                  </data>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.naming.attribute.nymRef">
      <optional>
         <attribute name="nymRef">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(reference to the canonical name) provides a means of locating the canonical form (nym) of the names associated with the object named by the element bearing it.</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.typed.attributes">
      <ref name="att.typed.attribute.type"/>
      <ref name="att.typed.attribute.subtype"/>
   </define>
   <define name="att.typed.attribute.type">
      <optional>
         <attribute name="type">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">characterizes the element in some sense, using any convenient classification scheme or typology.</a:documentation>
            <data type="token">
               <param name="pattern">(\p{L}|\p{N}|\p{P}|\p{S})+</param>
            </data>
         </attribute>
      </optional>
   </define>
   <define name="att.typed.attribute.subtype">
      <optional>
         <attribute name="subtype">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">provides a sub-categorization of the element, if needed</a:documentation>
            <data type="token">
               <param name="pattern">(\p{L}|\p{N}|\p{P}|\p{S})+</param>
            </data>
         </attribute>
      </optional>
   </define>
   <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
csteindl's avatar
csteindl committed
            id="Schema_Okopenko_5-att.typed-subtypeTyped-constraint-rule-6">
csteindl's avatar
csteindl committed
      <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                xmlns="http://www.tei-c.org/ns/1.0"
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
                context="tei:*[@subtype]">
        <sch:assert test="@type">The <sch:name/> element should not be categorized in detail with @subtype unless also categorized in general with @type</sch:assert>
      </sch:rule>
   </pattern>
   <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
csteindl's avatar
csteindl committed
            id="Schema_Okopenko_5-att.pointing-targetLang-targetLang-constraint-rule-7">
csteindl's avatar
csteindl committed
      <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                xmlns="http://www.tei-c.org/ns/1.0"
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
                context="tei:*[not(self::tei:schemaSpec)][@targetLang]">
            <sch:assert test="@target">@targetLang should only be used on <sch:name/> if @target is specified.</sch:assert>
          </sch:rule>
   </pattern>
   <define name="att.pointing.attribute.target">
      <optional>
         <attribute name="target">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies the destination of the reference by supplying one or more URI References</a:documentation>
            <list>
               <oneOrMore>
                  <data type="anyURI"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <define name="att.sortable.attributes">
      <ref name="att.sortable.attribute.sortKey"/>
   </define>
   <define name="att.sortable.attribute.sortKey">
      <optional>
         <attribute name="sortKey">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies the sort key for this element in an index, list or group which contains it.</a:documentation>
            <data type="token">
               <param name="pattern">(\p{L}|\p{N}|\p{P}|\p{S})+</param>
            </data>
         </attribute>
      </optional>
   </define>
csteindl's avatar
csteindl committed
   <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
csteindl's avatar
csteindl committed
            id="Schema_Okopenko_5-att.spanning-spanTo-spanTo-2-constraint-rule-8">
csteindl's avatar
csteindl committed
      <sch:rule xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                xmlns="http://www.tei-c.org/ns/1.0"
                xmlns:rng="http://relaxng.org/ns/structure/1.0"
                context="tei:*[@spanTo]">
            <sch:assert test="id(substring(@spanTo,2)) and following::*[@xml:id=substring(current()/@spanTo,2)]">
The element indicated by @spanTo (<sch:value-of select="@spanTo"/>) must follow the current element <sch:name/>
                  </sch:assert>
          </sch:rule>
   </pattern>
   <define name="model.nameLike.agent">
      <choice>
         <ref name="name"/>
         <ref name="orgName"/>
         <ref name="persName"/>
      </choice>
   </define>
   <define name="model.nameLike.agent_alternation">
      <choice>
         <ref name="name"/>
         <ref name="orgName"/>
         <ref name="persName"/>
      </choice>
   </define>
   <define name="model.nameLike.agent_sequence">
      <ref name="name"/>
      <ref name="orgName"/>
      <ref name="persName"/>
   </define>
   <define name="model.nameLike.agent_sequenceOptional">
      <optional>
         <ref name="name"/>
      </optional>
      <optional>
         <ref name="orgName"/>
      </optional>
      <optional>
         <ref name="persName"/>
      </optional>
   </define>
   <define name="model.nameLike.agent_sequenceOptionalRepeatable">
      <zeroOrMore>
         <ref name="name"/>
      </zeroOrMore>
      <zeroOrMore>
         <ref name="orgName"/>
      </zeroOrMore>
      <zeroOrMore>
         <ref name="persName"/>
      </zeroOrMore>
   </define>
   <define name="model.nameLike.agent_sequenceRepeatable">
      <oneOrMore>
         <ref name="name"/>
      </oneOrMore>
      <oneOrMore>
         <ref name="orgName"/>
      </oneOrMore>
      <oneOrMore>
         <ref name="persName"/>
      </oneOrMore>
   </define>
   <define name="model.segLike">
      <choice>
         <ref name="seg"/>
      </choice>
   </define>
   <define name="model.hiLike">
      <choice>
         <ref name="hi"/>
      </choice>
   </define>
   <define name="model.hiLike_alternation">
      <choice>
         <ref name="hi"/>
      </choice>
   </define>
   <define name="model.hiLike_sequence">
      <ref name="hi"/>
   </define>
   <define name="model.hiLike_sequenceOptional">
      <optional>
         <ref name="hi"/>
      </optional>
   </define>
   <define name="model.hiLike_sequenceOptionalRepeatable">
      <zeroOrMore>
         <ref name="hi"/>
      </zeroOrMore>
   </define>
   <define name="model.hiLike_sequenceRepeatable">
      <oneOrMore>
         <ref name="hi"/>
      </oneOrMore>
   </define>
   <define name="model.emphLike">
      <choice>
         <ref name="title"/>
      </choice>
   </define>
   <define name="model.emphLike_alternation">
      <choice>
         <ref name="title"/>
      </choice>
   </define>
   <define name="model.emphLike_sequence">
      <ref name="title"/>
   </define>
   <define name="model.emphLike_sequenceOptional">
      <optional>
         <ref name="title"/>
      </optional>
   </define>
   <define name="model.emphLike_sequenceOptionalRepeatable">
      <zeroOrMore>
         <ref name="title"/>
      </zeroOrMore>
   </define>
   <define name="model.emphLike_sequenceRepeatable">
      <oneOrMore>
         <ref name="title"/>
      </oneOrMore>
   </define>
   <define name="model.highlighted">
      <choice>
         <ref name="model.hiLike"/>
         <ref name="model.emphLike"/>
      </choice>
   </define>
   <define name="model.dateLike">
      <choice>
         <ref name="date"/>
      </choice>
   </define>
   <define name="model.dateLike_alternation">
      <choice>
         <ref name="date"/>
      </choice>
   </define>
   <define name="model.dateLike_sequence">
      <ref name="date"/>
   </define>
   <define name="model.dateLike_sequenceOptional">
      <optional>
         <ref name="date"/>
      </optional>
   </define>
   <define name="model.dateLike_sequenceOptionalRepeatable">
      <zeroOrMore>
         <ref name="date"/>
      </zeroOrMore>
   </define>
   <define name="model.dateLike_sequenceRepeatable">
      <oneOrMore>
         <ref name="date"/>
      </oneOrMore>
   </define>
   <define name="model.measureLike">
      <choice>
         <ref name="measure"/>
         <ref name="geo"/>
      </choice>
   </define>
   <define name="model.measureLike_alternation">
      <choice>
         <ref name="measure"/>
         <ref name="geo"/>
      </choice>
   </define>
   <define name="model.measureLike_sequence">
      <ref name="measure"/>
      <ref name="geo"/>
   </define>
   <define name="model.measureLike_sequenceOptional">
      <optional>
         <ref name="measure"/>
      </optional>
      <optional>
         <ref name="geo"/>
      </optional>
   </define>
   <define name="model.measureLike_sequenceOptionalRepeatable">
      <zeroOrMore>
         <ref name="measure"/>
      </zeroOrMore>
      <zeroOrMore>
         <ref name="geo"/>
      </zeroOrMore>
   </define>
   <define name="model.measureLike_sequenceRepeatable">
      <oneOrMore>
         <ref name="measure"/>
      </oneOrMore>
      <oneOrMore>
         <ref name="geo"/>
      </oneOrMore>
   </define>
   <define name="model.egLike">
      <notAllowed/>
   </define>
   <define name="model.egLike_alternation">
      <notAllowed/>
   </define>
   <define name="model.egLike_sequence">
      <empty/>
   </define>
   <define name="model.egLike_sequenceOptional">
      <empty/>
   </define>
   <define name="model.egLike_sequenceOptionalRepeatable">
      <empty/>
   </define>
   <define name="model.egLike_sequenceRepeatable">
      <notAllowed/>
   </define>
   <define name="model.graphicLike">
      <notAllowed/>
   </define>
   <define name="model.offsetLike">
      <notAllowed/>
   </define>
   <define name="model.offsetLike_alternation">
      <notAllowed/>
   </define>
   <define name="model.offsetLike_sequence">
      <empty/>
   </define>
   <define name="model.offsetLike_sequenceOptional">
      <empty/>
   </define>
   <define name="model.offsetLike_sequenceOptionalRepeatable">
      <empty/>
   </define>
   <define name="model.offsetLike_sequenceRepeatable">
      <notAllowed/>
   </define>
   <define name="model.pPart.msdesc">
      <choice>
         <ref name="material"/>
      </choice>
   </define>
   <define name="model.pPart.editorial">
      <choice>
         <ref name="choice"/>
         <ref name="abbr"/>
         <ref name="expan"/>
         <ref name="subst"/>
      </choice>
   </define>
   <define name="model.pPart.editorial_alternation">
      <choice>
         <ref name="choice"/>
         <ref name="abbr"/>
         <ref name="expan"/>
         <ref name="subst"/>
      </choice>
   </define>
   <define name="model.pPart.editorial_sequence">
      <ref name="choice"/>
      <ref name="abbr"/>
      <ref name="expan"/>
      <ref name="subst"/>
   </define>
   <define name="model.pPart.editorial_sequenceOptional">
      <optional>
         <ref name="choice"/>