<?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 2014-01-20T21:41:14.455Z 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"/>

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

   <!-- ************ -->
<!-- constraints: -->
<!-- ************ -->
<pattern id="tei_lite-att.datable-calendar-constraint-calendar">
          <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_lite-att.typed-constraint-subtypeTyped">
      <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_lite-att.pointing-targetLang-constraint-targetLang">
          <rule context="tei:*[not(self::tei:schemaSpec)][@targetLang]">
            <assert test="count(@target)">@targetLang can only be used if @target is specified.</assert>
          </rule>
        </pattern>
   <pattern id="tei_lite-att.spanning-spanTo-constraint-spanTo-2">
          <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="tei_lite-ptr-constraint-ptrAtts">
      <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_lite-ref-constraint-refAtts">
      <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_lite-relatedItem-constraint-targetorcontent1">
      <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="tei_lite-lg-constraint-atleast1oflggapl">
      <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_lite-s-constraint-noNestedS">
      <rule context="tei:s">
         <report test="tei:s">You may not nest one s element within
      another: use seg instead</report>
      </rule>
   </pattern>

   <!-- *********** -->
<!-- deprecated: -->
<!-- *********** -->
<pattern>
      <rule context="tei:biblScope">
         <report test="@type" role="nonfatal">WARNING: use of deprecated attribute — @type of the biblScope element will be removed from the TEI on 2014-12-17.
                </report>
      </rule>
   </pattern>
</schema>
