<?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 2015-10-15T19:58:35Z by 'extract-isosch.xsl'. -->

   <!-- ********************* -->
   <!-- namespaces, declared: -->
   <!-- ********************* -->


   <!-- ********************* -->
   <!-- namespaces, implicit: -->
   <!-- ********************* -->
   <ns prefix="eip-d2e28392" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28407" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28422" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28437" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28453" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28468" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28483" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28503" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28513" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="eip-d2e28523" uri="http://www.tei-c.org/ns/tite/1.0"/>
   <ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>

   <!-- ************ -->
   <!-- constraints: -->
   <!-- ************ -->
   <pattern id="tei_tite-att.datable-calendar-constraint-calendar-1">
          <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="tei_tite-att.typed-constraint-subtypeTyped-2">
      <rule context="*[@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="tei_tite-att.pointing-targetLang-constraint-targetLang-3">
          <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="tei_tite-p-constraint-abstractModel-p-4">
      <rule context="tei:p">
         <report test="(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 contain other paragraphs or ab elements.
      </report>
      </rule>
   </pattern>
   <pattern id="tei_tite-p-constraint-abstractModel-structure-l-5">
      <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="tei_tite-ptr-constraint-ptrAtts-6">
      <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="tei_tite-ref-constraint-refAtts-7">
      <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="tei_tite-list-constraint-gloss-list-must-have-labels-8">
      <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="tei_tite-l-constraint-abstractModel-structure-l-9">
      <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="tei_tite-lg-constraint-atleast1oflggapl-10">
      <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="tei_tite-lg-constraint-abstractModel-structure-l-11">
      <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="tei_tite-ab-constraint-abstractModel-structure-p-12">
      <rule context="tei:ab">
         <report test="(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 contain paragraphs or other ab elements.
      </report>
      </rule>
   </pattern>
   <pattern id="tei_tite-ab-constraint-abstractModel-structure-l-13">
      <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>
</schema>
