<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <title>ISO Schematron rules</title>
   <!-- This file generated 2021-02-25T15:11:40Z by 'extract-isosch.xsl'. -->

   <!-- ********************* -->
   <!-- namespaces, declared: -->
   <!-- ********************* -->
   <ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
   <ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema"/>
   <ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
   <ns prefix="s" uri="http://www.ascc.net/xml/schematron"/>
   <ns prefix="sch" uri="http://purl.oclc.org/dsdl/schematron"/>
   <ns prefix="sch" uri="http://purl.oclc.org/dsdl/schematron"/>
   <ns prefix="teix" uri="http://www.tei-c.org/ns/Examples"/>

   <!-- ********************* -->
   <!-- namespaces, implicit: -->
   <!-- ********************* -->
   <ns prefix="dcr" uri="http://www.isocat.org/ns/dcr"/>

   <!-- ************ -->
   <!-- constraints: -->
   <!-- ************ -->
   <pattern id="schematron-constraint-tei_odds-att.datable.w3c-att-datable-w3c-when-1">
      <rule context="tei:*[@when]">
        <report test="@notBefore|@notAfter|@from|@to" role="nonfatal">The @when attribute cannot be used with any other att.datable.w3c attributes.</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-att.datable.w3c-att-datable-w3c-from-2">
      <rule context="tei:*[@from]">
        <report test="@notBefore" role="nonfatal">The @from and @notBefore attributes cannot be used together.</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-att.datable.w3c-att-datable-w3c-to-3">
      <rule context="tei:*[@to]">
        <report test="@notAfter" role="nonfatal">The @to and @notAfter attributes cannot be used together.</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-att.datable-calendar-calendar-4">
          <rule context="tei:*[@calendar]">
            <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
              <name/> element has no textual content.</assert>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-att.measurement-att-measurement-unitRef-5">
      <rule context="tei:*[@unitRef]">
        <report test="@unit" role="info">The @unit attribute may be unnecessary when @unitRef is present.</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-att.typed-subtypeTyped-6">
      <rule context="tei:*[@subtype]">
        <assert test="@type">The <name/> element should not be categorized in detail with @subtype unless also categorized in general with @type</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-att.pointing-targetLang-targetLang-7">
          <rule context="tei:*[not(self::tei:schemaSpec)][@targetLang]">
            <assert test="@target">@targetLang should only be used on <name/> if @target is specified.</assert>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-att.spanning-spanTo-spanTo-2-8">
          <rule context="tei:*[@spanTo]">
            <assert test="id(substring(@spanTo,2)) and following::*[@xml:id=substring(current()/@spanTo,2)]">
The element indicated by @spanTo (<value-of select="@spanTo"/>) must follow the current element <name/>
                  </assert>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-att.styleDef-schemeVersion-schemeVersionRequiresScheme-9">
          <rule context="tei:*[@schemeVersion]">
            <assert test="@scheme and not(@scheme = 'free')">
              @schemeVersion can only be used if @scheme is specified.
            </assert>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-p-abstractModel-structure-p-10">
      <rule context="tei:p">
         <report test="not(ancestor::tei:floatingText) and (ancestor::tei:p or ancestor::tei:ab)          and not(parent::tei:exemplum                |parent::tei:item                |parent::tei:note                |parent::tei:q                |parent::tei:quote                |parent::tei:remarks                |parent::tei:said                |parent::tei:sp                |parent::tei:stage                |parent::tei:cell                |parent::tei:figure                )">
        Abstract model violation: Paragraphs may not occur inside other paragraphs or ab elements.
      </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-p-abstractModel-structure-l-11">
      <rule context="tei:p">
         <report test="ancestor::tei:l[not(.//tei:note//tei:p[. = current()])]">
        Abstract model violation: Lines may not contain higher-level structural elements such as div, p, or ab.
      </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-desc-deprecationInfo-only-in-deprecated-12">
      <rule context="tei:desc[ @type eq 'deprecationInfo']">
        <assert test="../@validUntil">Information about a
        deprecation should only be present in a specification element
        that is being deprecated: that is, only an element that has a
        @validUntil attribute should have a child &lt;desc
        type="deprecationInfo"&gt;.</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-rt-target-rt-target-not-span-13">
      <rule context="tei:rt/@target">
          <report test="../@from | ../@to">When target= is
            present, neither from= nor to= should be.</report>
        </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-rt-from-rt-from-14">
      <rule context="tei:rt/@from">
          <assert test="../@to">When from= is present, the to=
            attribute of <name/> is required.</assert>
        </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-rt-to-rt-to-15">
      <rule context="tei:rt/@to">
          <assert test="../@from">When to= is present, the from=
            attribute of <name/> is required.</assert>
        </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-ptr-ptrAtts-16">
      <rule context="tei:ptr">
         <report test="@target and @cRef">Only one of the
attributes @target and @cRef may be supplied on <name/>.</report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-ref-refAtts-17">
      <rule context="tei:ref">
         <report test="@target and @cRef">Only one of the
	attributes @target' and @cRef' may be supplied on <name/>
         </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-list-gloss-list-must-have-labels-18">
      <rule context="tei:list[@type='gloss']">
	        <assert test="tei:label">The content of a "gloss" list should include a sequence of one or more pairs of a label element followed by an item element</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-relatedItem-targetorcontent1-19">
      <rule context="tei:relatedItem">
         <report test="@target and count( child::* ) &gt; 0">
If the @target attribute on <name/> is used, the
relatedItem element must be empty</report>
         <assert test="@target or child::*">A relatedItem element should have either a 'target' attribute
        or a child element to indicate the related bibliographic item</assert>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-l-abstractModel-structure-l-20">
      <rule context="tei:l">
         <report test="ancestor::tei:l[not(.//tei:note//tei:l[. = current()])]">
        Abstract model violation: Lines may not contain lines or lg elements.
      </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-lg-atleast1oflggapl-21">
      <rule context="tei:lg">
         <assert test="count(descendant::tei:lg|descendant::tei:l|descendant::tei:gap) &gt; 0">An lg element
        must contain at least one child l, lg, or gap element.</assert>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-lg-abstractModel-structure-l-22">
      <rule context="tei:lg">
         <report test="ancestor::tei:l[not(.//tei:note//tei:lg[. = current()])]">
        Abstract model violation: Lines may not contain line groups.
      </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-quotation-quotationContents-23">
      <rule context="tei:quotation">
         <report test="not(@marks) and not (tei:p)">
On <name/>, either the @marks attribute should be used, or a paragraph of description provided</report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-citeStructure-delim-citestructure-inner-delim-24">
          <rule context="tei:citeStructure[parent::tei:citeStructure]">
            <assert test="@delim">A <name/> with a parent <name/> must have a @delim attribute.</assert>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-citeStructure-match-citestructure-outer-match-25">
          <rule context="tei:citeStructure[not(parent::tei:citeStructure)]">
            <assert test="starts-with(@match,'/')">An XPath in @match on the outer <name/> must start with '/'.</assert>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-citeStructure-match-citestructure-inner-match-26">
          <rule context="tei:citeStructure[parent::tei:citeStructure]">
            <assert test="not(starts-with(@match,'/'))">An XPath in @match must not start with '/' except on the outer <name/>.</assert>
          </rule>
        </pattern>
      
      
    
      
    <pattern id="schematron-constraint-tei_odds-div-abstractModel-structure-l-29">
      <rule context="tei:div">
         <report test="ancestor::tei:l">
        Abstract model violation: Lines may not contain higher-level structural elements such as div.
      </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-div-abstractModel-structure-p-30">
      <rule context="tei:div">
         <report test="ancestor::tei:p or ancestor::tei:ab and not(ancestor::tei:floatingText)">
        Abstract model violation: p and ab may not contain higher-level structural elements such as div.
      </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-att.repeatable-MINandMAXoccurs-31">
      <rule context="*[ @minOccurs  and  @maxOccurs ]">
        <let name="min" value="@minOccurs cast as xs:integer"/>
        <let name="max"
              value="if ( normalize-space( @maxOccurs ) eq 'unbounded')                         then -1                         else @maxOccurs cast as xs:integer"/>
        <assert test="$max eq -1  or  $max ge $min">@maxOccurs should be greater than or equal to @minOccurs</assert>
      </rule>
      <rule context="*[ @minOccurs  and  not( @maxOccurs ) ]">
        <assert test="@minOccurs cast as xs:integer lt 2">When @maxOccurs is not specified, @minOccurs must be 0 or 1</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-att.identified-spec-in-module-32">
      <rule context="tei:elementSpec[@module]|tei:classSpec[@module]|tei:macroSpec[@module]">
        <assert test="         (not(ancestor::tei:schemaSpec | ancestor::tei:TEI | ancestor::tei:teiCorpus)) or         (not(@module) or          (not(//tei:moduleSpec) and not(//tei:moduleRef))  or         (//tei:moduleSpec[@ident = current()/@module]) or          (//tei:moduleRef[@key = current()/@module]))         ">
        Specification <value-of select="@ident"/>: the value of the module attribute ("<value-of select="@module"/>") 
should correspond to an existing module, via a moduleSpec or
      moduleRef</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-att.deprecated-validUntil-deprecation-two-month-warning-33">
          <rule context="tei:*[@validUntil]">
            <let name="advance_warning_period"
              value="current-date() + xs:dayTimeDuration('P60D')"/>
            <let name="me_phrase"
              value="if (@ident)                                                then concat('The ', @ident )                                                else concat('This ',                                                            local-name(.),                                                            ' of ',                                                            ancestor::tei:*[@ident][1]/@ident )"/>
            <assert test="@validUntil cast as xs:date  ge  current-date()">
              <value-of select="                  concat( $me_phrase,                          ' construct is outdated (as of ',                          @validUntil,                          '); ODD processors may ignore it, and its use is no longer supported'                        )"/>
         </assert>
              <assert role="nonfatal"
                 test="@validUntil cast as xs:date  ge  $advance_warning_period">
                <value-of select="concat( $me_phrase, ' construct becomes outdated on ', @validUntil )"/>
              </assert>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-att.deprecated-validUntil-deprecation-should-be-explained-34">
          <rule context="tei:*[@validUntil][ not( self::valDesc | self::valList | self::defaultVal )]">
            <assert test="child::tei:desc[ @type eq 'deprecationInfo']">
              A deprecated construct should include, whenever possible, an explanation, but this <value-of select="name(.)"/> does not have a child &lt;desc type="deprecationInfo"&gt;</assert>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-moduleRef-modref-35">
      <rule context="tei:moduleRef">
        <report test="* and @key">
Child elements of <name/> are only allowed when an external module is being loaded
        </report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-moduleRef-prefix-not-same-prefix-36">
          <rule context="tei:moduleRef">
            <report test="//*[ not( generate-id(.) eq generate-id(      current() ) ) ]/@prefix = @prefix">The prefix attribute
	    of <name/> should not match that of any other
	    element (it would defeat the purpose)</report>
          </rule>
        </pattern>
   <pattern id="schematron-constraint-tei_odds-schemaSpec-deprecate_schemaSpec_in_bizarre_places-37">
      <rule context="tei:schemaSpec|teix:schemaSpec">
	        <assert test="             parent::teix:egXML      | parent::tei:encodingDesc  | parent::teix:encodingDesc      | parent::tei:front         | parent::teix:front      | parent::tei:back          | parent::teix:back      | parent::tei:body          | parent::teix:body      | parent::tei:div           | parent::teix:div      | parent::tei:div1          | parent::teix:div1      | parent::tei:div2          | parent::teix:div2      | parent::tei:div3          | parent::teix:div3      | parent::tei:div4          | parent::teix:div4      | parent::tei:div5          | parent::teix:div5      | parent::tei:div6          | parent::teix:div6      | parent::tei:div7          | parent::teix:div7"
                 role="nonfatal">WARNING: use of deprecated construct — the “schemaSpec” element will no longer be a valid child of “<value-of select="name(..)"/>” as of 2021-10-23; instead, it should be a child of “front”, “body”, “back”, “encodingDesc”, or a division element.</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-model-no_dup_default_models-38">
      <rule context="tei:model[ not( parent::tei:modelSequence ) ][ not( @predicate ) ]">
        <let name="output" value="normalize-space( @output )"/>
        <report test="following-sibling::tei:model                             [ not( @predicate )]                             [ normalize-space( @output ) eq $output ]">
          There are 2 (or more) 'model' elements in this '<value-of select="local-name(..)"/>'
          that have no predicate, but are targeted to the same output
          ("<value-of select="( $output, parent::modelGrp/@output, 'all')[1]"/>")</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-model-no_dup_models-39">
      <rule context="tei:model[ not( parent::tei:modelSequence ) ][ @predicate ]">
        <let name="predicate" value="normalize-space( @predicate )"/>
        <let name="output" value="normalize-space( @output )"/>
        <report test="following-sibling::tei:model                             [ normalize-space( @predicate ) eq $predicate ]                             [ normalize-space( @output ) eq $output ]">
          There are 2 (or more) 'model' elements in this
          '<value-of select="local-name(..)"/>' that have
          the same predicate, and are targeted to the same output
          ("<value-of select="( $output, parent::modelGrp/@output, 'all')[1]"/>")</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-modelSequence-no_outputs_nor_predicates_4_my_kids-40">
      <rule context="tei:modelSequence">
         <report test="tei:model[@output]" role="warning">The 'model' children
      of a 'modelSequence' element inherit the @output attribute of the
      parent 'modelSequence', and thus should not have their own</report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-sequence-sequencechilden-41">
      <rule context="tei:sequence">
         <assert test="count(*)&gt;1">The sequence element must have at least two child elements</assert>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-alternate-alternatechilden-42">
      <rule context="tei:alternate">
         <assert test="count(*)&gt;1">The alternate element must have at least two child elements</assert>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-constraintSpec-sch_no_more-43">
      <rule context="tei:constraintSpec">
      
         <report test="tei:constraint/s:*  and  @scheme = ('isoschematron','schematron')">Rules
        in the Schematron 1.* language must be inside a constraintSpec
        with a value other than 'schematron' or 'isoschematron' on the
        scheme attribute</report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-constraintSpec-isosch-44">
      <rule context="tei:constraintSpec">
      
         <report test="tei:constraint/sch:*  and  not( @scheme eq 'schematron')">Rules
        in the ISO Schematron language must be inside a constraintSpec
        with the value 'schematron' on the scheme attribute</report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-constraintSpec-needrules-45">
      
      <rule context="tei:macroSpec/tei:constraintSpec[@scheme eq 'schematron']/tei:constraint">
        <report test="sch:assert|sch:report">An ISO Schematron constraint specification for a macro should not
        have an 'assert' or 'report' element without a parent 'rule' element</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-attDef-attDefContents-46">
      <rule context="tei:attDef">
      
         <assert test="ancestor::teix:egXML[@valid='feasible'] or @mode eq 'change' or @mode eq 'delete' or tei:datatype or tei:valList[@type='closed']">Attribute: the definition of the @<value-of select="@ident"/> attribute in the <value-of select="ancestor::*[@ident][1]/@ident"/>
            <value-of select="' '"/>
            <value-of select="local-name(ancestor::*[@ident][1])"/> should have a closed valList or a datatype</assert>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-attDef-noDefault4Required-47">
      <rule context="tei:attDef[@usage eq 'req']">
	        <report test="tei:defaultVal">Since the @<value-of select="@ident"/> attribute is required, it will always be specified. Thus the default value (of "<value-of select="normalize-space(tei:defaultVal)"/>") will never be used. Either change the definition of the attribute so it is not required ("rec" or "opt"), or remove the defaultVal element.</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-attDef-defaultIsInClosedList-twoOrMore-48">
      <rule context="tei:attDef[   tei:defaultVal   and   tei:valList[@type eq 'closed']   and   tei:datatype[    @maxOccurs &gt; 1    or    @minOccurs &gt; 1    or    @maxOccurs = 'unbounded'    ]   ]">
        <assert test="     tokenize(normalize-space(tei:defaultVal),' ')     =     tei:valList/tei:valItem/@ident">In the <value-of select="local-name(ancestor::*[@ident][1])"/> defining
        <value-of select="ancestor::*[@ident][1]/@ident"/> the default value of the
        @<value-of select="@ident"/> attribute is not among the closed list of possible
        values</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-attDef-defaultIsInClosedList-one-49">
      <rule context="tei:attDef[   tei:defaultVal   and   tei:valList[@type eq 'closed']   and   tei:datatype[    not(@maxOccurs)    or (    if ( @maxOccurs castable as xs:integer )     then ( @maxOccurs cast as xs:integer eq 1 )     else false()    )]   ]">
        <assert test="string(tei:defaultVal)      =      tei:valList/tei:valItem/@ident">In the <value-of select="local-name(ancestor::*[@ident][1])"/> defining
        <value-of select="ancestor::*[@ident][1]/@ident"/> the default value of the
        @<value-of select="@ident"/> attribute is not among the closed list of possible
        values</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-dataRef-restrictDataFacet-50">
      <rule context="tei:dataRef[tei:dataFacet]">
        <assert test="@name" role="nonfatal">Data facets can only be specified for references to datatypes specified by
          XML Schemas: Part 2: Datatypes</assert>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-dataRef-restrictAttRestriction-51">
      <rule context="tei:dataRef[tei:dataFacet]">
        <report test="@restriction" role="nonfatal">The attribute restriction cannot be used when dataFacet elements are present.</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-dataRef-restrictAttResctrictionName-52">
      <rule context="tei:dataRef">
        <report test="@restriction and not(@name)" role="fatal">The attribute restriction can only be used with a name attribute.</report>
      </rule>
    </pattern>
   <pattern id="schematron-constraint-tei_odds-link-linkTargets3-53">
      <rule context="tei:link">
         <assert test="contains(normalize-space(@target),' ')">You must supply at least two values for @target or  on <name/>
         </assert>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-ab-abstractModel-structure-ab-54">
      <rule context="tei:ab">
         <report test="not(ancestor::tei:floatingText) and (ancestor::tei:p or ancestor::tei:ab)          and not(parent::tei:exemplum         |parent::tei:item         |parent::tei:note         |parent::tei:q         |parent::tei:quote         |parent::tei:remarks         |parent::tei:said         |parent::tei:sp         |parent::tei:stage         |parent::tei:cell         |parent::tei:figure)">
        Abstract model violation: ab may not occur inside paragraphs or other ab elements.
      </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-ab-abstractModel-structure-l-55">
      <rule context="tei:ab">
         <report test="ancestor::tei:l or ancestor::tei:lg">
        Abstract model violation: Lines may not contain higher-level divisions such as p or ab.
      </report>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-join-joinTargets3-56">
      <rule context="tei:join">
         <assert test="contains(@target,' ')">
You must supply at least two values for @target on <name/>
         </assert>
      </rule>
   </pattern>
   <pattern id="schematron-constraint-tei_odds-standOff-nested_standOff_should_be_typed-57">
      <rule context="tei:standOff">
         <assert test="@type or not(ancestor::tei:standOff)">This
      <name/> element must have a @type attribute, since it is
      nested inside a <name/>
         </assert>
      </rule>
   </pattern>

   <!-- *********** -->
   <!-- deprecated: -->
   <!-- *********** -->
   <pattern>
      <rule context="tei:value">
         <report test="true()" role="nonfatal">
                  WARNING: use of deprecated element — The <name/> element will be removed from the TEI on 2022-02-15. 
                </report>
      </rule>
   </pattern>
   <pattern>
      <rule context="tei:unicodeName">
         <report test="true()" role="nonfatal">
                  WARNING: use of deprecated element — The <name/> element will be removed from the TEI on 2022-02-15. 
                </report>
      </rule>
   </pattern>
   <pattern>
      <rule context="tei:localName">
         <report test="true()" role="nonfatal">
                  WARNING: use of deprecated element — The <name/> element will be removed from the TEI on 2022-02-15. 
                </report>
      </rule>
   </pattern>
   <pattern>
      <rule context="tei:glyphName">
         <report test="true()" role="nonfatal">
                  WARNING: use of deprecated element — The <name/> element will be removed from the TEI on 2022-02-15. 
                </report>
      </rule>
   </pattern>
   <pattern>
      <rule context="tei:charProp">
         <report test="true()" role="nonfatal">
                  WARNING: use of deprecated element — The <name/> element will be removed from the TEI on 2022-02-15. 
                </report>
      </rule>
   </pattern>
   <pattern>
      <rule context="tei:charName">
         <report test="true()" role="nonfatal">
                  WARNING: use of deprecated element — The <name/> element will be removed from the TEI on 2022-02-15. 
                </report>
      </rule>
   </pattern>

   <!-- **************** -->
   <!-- parameter lists: -->
   <!-- **************** -->
   <pattern id="teipm-model-paramList-1">
      <rule context="tei:param[parent::tei:model/@behaviour='alternate']">
         <assert role="error" test="@name='default'   or  @name='alternate'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: default, alternate</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-2">
      <rule context="tei:param[parent::tei:model/@behaviour='anchor']">
         <assert role="error" test="@name='id'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: id</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-3">
      <rule context="tei:param[parent::tei:model/@behaviour='block']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-4">
      <rule context="tei:param[parent::tei:model/@behaviour='body']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-5">
      <rule context="tei:param[parent::tei:model/@behaviour='break']">
         <assert role="error" test="@name='type'   or  @name='label'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: type, label</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-6">
      <rule context="tei:param[parent::tei:model/@behaviour='cell']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-7">
      <rule context="tei:param[parent::tei:model/@behaviour='cit']">
         <assert role="error" test="@name='content'   or  @name='source'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content, source</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-8">
      <rule context="tei:param[parent::tei:model/@behaviour='document']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-9">
      <rule context="tei:param[parent::tei:model/@behaviour='figure']">
         <assert role="error" test="@name='title'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: title</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-10">
      <rule context="tei:param[parent::tei:model/@behaviour='glyph']">
         <assert role="error" test="@name='uri'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: uri</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-11">
      <rule context="tei:param[parent::tei:model/@behaviour='graphic']">
         <assert role="error"
                 test="@name='url'   or  @name='width'   or  @name='height'   or  @name='scale'   or  @name='title'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: url, width, height, scale, title</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-12">
      <rule context="tei:param[parent::tei:model/@behaviour='heading']">
         <assert role="error" test="@name='content'   or  @name='level'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content, level</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-13">
      <rule context="tei:param[parent::tei:model/@behaviour='index']">
         <assert role="error" test="@name='type'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: type</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-14">
      <rule context="tei:param[parent::tei:model/@behaviour='inline']">
         <assert role="error" test="@name='content'   or  @name='label'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content, label</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-15">
      <rule context="tei:param[parent::tei:model/@behaviour='link']">
         <assert role="error" test="@name='content'   or  @name='uri'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content, uri</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-16">
      <rule context="tei:param[parent::tei:model/@behaviour='list']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-17">
      <rule context="tei:param[parent::tei:model/@behaviour='listItem']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-18">
      <rule context="tei:param[parent::tei:model/@behaviour='metadata']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-19">
      <rule context="tei:param[parent::tei:model/@behaviour='note']">
         <assert role="error"
                 test="@name='content'   or  @name='place'   or  @name='label'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content, place, label</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-20">
      <rule context="tei:param[parent::tei:model/@behaviour='paragraph']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-21">
      <rule context="tei:param[parent::tei:model/@behaviour='row']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-22">
      <rule context="tei:param[parent::tei:model/@behaviour='section']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-23">
      <rule context="tei:param[parent::tei:model/@behaviour='table']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-24">
      <rule context="tei:param[parent::tei:model/@behaviour='text']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
   <pattern id="teipm-model-paramList-25">
      <rule context="tei:param[parent::tei:model/@behaviour='title']">
         <assert role="error" test="@name='content'">
          Parameter name '<value-of select="@name"/>'  (on <value-of select="ancestor::tei:elementSpec/@ident"/>) not allowed.
          Must  be  drawn from the list: content</assert>
      </rule>
   </pattern>
</schema>
