<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="tag:textalign.net,2015:ns" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:local="tag:textalign.net,2015:ns" xmlns="http://relaxng.org/ns/structure/1.0">
  <start>
    <element name="TAN-T">
      <a:documentation>specifies that the TAN file contains a transcription. Root element.</a:documentation>
      <ref name="TAN-root"/>
    </element>
  </start>
  <include href="incl/TAN-class-1.rng">
    <define name="other-body-attributes">
      <ref name="lang-of-content"/>
    </define>
    <define name="item">
      <ref name="text-div"/>
    </define>
  </include>
  <define name="text-div">
    <element name="div">
      <a:documentation>marks a textual unit. Contains other &lt;div&gt;s or text, but not both (no mixed content).</a:documentation>
      <a:documentation>TAN's &lt;div&gt; differs from the TEI's, in that the latter is intended for the first level or levels of subdivision in the front, body, or back of a text, but not for paragraphs or anonymous blocks. The TAN &lt;div&gt; better resembles the one defined by HTML, and can be applied to any kind of division whatsoever., even down to the letter or character level.</a:documentation>
      <optional>
        <ref name="ed-stamp"/>
      </optional>
      <choice>
        <ref name="inclusion"/>
        <group>
          <ref name="type"/>
          <ref name="n"/>
          <optional>
            <ref name="lang-of-content"/>
          </optional>
          <choice>
            <oneOrMore>
              <ref name="text-div"/>
            </oneOrMore>
            <text/>
          </choice>
        </group>
      </choice>
    </element>
  </define>
</grammar>
