<?xml version="1.0"?>
<rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<!--Schema generated 2006-01-30T20:23:55Z
Copyright 2005 TEI Consortium.
This is free software; you can redistribute it and/or
	    modify it under the terms of the GNU General Public
	    License as published by the Free Software Foundation;
	    either version 2 of the License, or (at your option) any
	    later version.
This material is distributed in the hope that it will be
	    useful, but WITHOUT ANY WARRANTY; without even the implied
	    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
	    PURPOSE. See the GNU General Public License for more
	    details.
You should have received a copy of the GNU General Public
	    License along with this file; if not, write to the Free
	    Software Foundation, Inc., 59 Temple Place, Suite 330,
	    Boston, MA 02111-1307, USA.
To contact the TEI Consortium use the following addresses.
	    For general (non-technical) enquiries: 
		  target="mailto:info@tei-c.org"/>info@tei-c.orgFor membership enquiries: membership@tei-c.orgFor technical enquiries, particularly about the
		Guidelines, DTDs, schemas, or software available from
		the TEI-C: editors@tei-c.orgFor up to date information, consult the TEI web site at http://www.tei-c.org/P5-->
<!--Definitions from module textcrit-->
<!--Set predeclared macros-->
<!--0. predeclared macros-->
<!--1. classes-->
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.rdgPart">
    <notAllowed/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.rdgPart.attributes">
    <ref name="att.rdgPart.attribute.wit"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.rdgPart.attribute.wit">
    <optional>
      <attribute name="wit">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains a list of one or more sigla indicating the witnesses
which begin or end at this point.</a:documentation>
        <ref name="data.pointers"/>
      </attribute>
    </optional>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.textCritical.attributes">
    <ref name="att.textCritical.attribute.wit"/>
    <ref name="att.textCritical.attribute.type"/>
    <ref name="att.textCritical.attribute.cause"/>
    <ref name="att.textCritical.attribute.varSeq"/>
    <ref name="att.textCritical.attribute.resp"/>
    <ref name="att.textCritical.attribute.hand"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.textCritical.attribute.wit">
    <optional>
      <attribute name="wit">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains a list of one or more pointers indicating the witnesses
which attest to a given reading.</a:documentation>
        <ref name="data.pointers"/>
      </attribute>
    </optional>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.textCritical.attribute.type">
    <optional>
      <attribute name="type">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">classifies the reading according to some useful typology.</a:documentation>
        <ref name="data.enumerated"/>
      </attribute>
    </optional>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.textCritical.attribute.cause">
    <optional>
      <attribute name="cause">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">classifies the cause for the variant reading, according to
any appropriate typology of possible origins.</a:documentation>
        <ref name="data.enumerated"/>
      </attribute>
    </optional>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.textCritical.attribute.varSeq">
    <optional>
      <attribute name="varSeq">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">provides a number indicating the position of this reading in a
sequence, when there is reason to presume a sequence to the variants
on any one lemma.</a:documentation>
        <data type="nonNegativeInteger"/>
      </attribute>
    </optional>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.textCritical.attribute.resp">
    <optional>
      <attribute name="resp">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">identifies the editor responsible for asserting a
	particular reading in the witness.</a:documentation>
        <ref name="data.pointer"/>
      </attribute>
    </optional>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="att.textCritical.attribute.hand">
    <optional>
      <attribute name="hand">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">signifies the hand responsible for a particular reading in the
witness.</a:documentation>
        <ref name="data.pointer"/>
      </attribute>
    </optional>
  </define>
<!--2. elements-->
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="app">
    <element name="app">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(apparatus entry) contains one entry in a critical apparatus, with an optional
lemma and at least one reading.</a:documentation>
      <ref name="app.content"/>
      <ref name="app.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="app.content">
    <group xmlns:rng="http://relaxng.org/ns/structure/1.0">
      <rng:zeroOrMore>
        <rng:ref name="model.global"/>
      </rng:zeroOrMore>
      <rng:optional>
        <rng:ref name="lem"/>
        <rng:zeroOrMore>
          <rng:ref name="model.global"/>
        </rng:zeroOrMore>
        <rng:optional>
          <rng:ref name="wit"/>
          <rng:zeroOrMore>
            <rng:ref name="model.global"/>
          </rng:zeroOrMore>
        </rng:optional>
      </rng:optional>
      <rng:oneOrMore>
        <rng:choice>
          <rng:group>
            <rng:ref name="rdg"/>
            <rng:zeroOrMore>
              <rng:ref name="model.global"/>
            </rng:zeroOrMore>
            <rng:optional>
              <rng:ref name="wit"/>
              <rng:zeroOrMore>
                <rng:ref name="model.global"/>
              </rng:zeroOrMore>
            </rng:optional>
          </rng:group>
          <rng:group>
            <rng:ref name="rdgGrp"/>
            <rng:zeroOrMore>
              <rng:ref name="model.global"/>
            </rng:zeroOrMore>
            <rng:optional>
              <rng:ref name="wit"/>
              <rng:zeroOrMore>
                <rng:ref name="model.global"/>
              </rng:zeroOrMore>
            </rng:optional>
          </rng:group>
        </rng:choice>
      </rng:oneOrMore>
    </group>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="app.attributes">
    <ref name="att.global.attributes"/>
    <optional>
      <attribute name="type">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">classifies the variation contained in this element according to
some convenient typology.</a:documentation>
        <ref name="data.enumerated"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="from">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">identifies the beginning of the lemma in the base text, if
necessary.</a:documentation>
        <ref name="data.pointer"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="to">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">identifies the endpoint of the lemma in the base text, if
necessary.</a:documentation>
        <ref name="data.pointer"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="loc">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the location of the variation, when the
location-referenced method of apparatus markup is used.</a:documentation>
        <ref name="data.words"/>
      </attribute>
    </optional>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.pPart.edit" combine="choice">
    <ref name="app"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lacunaEnd">
    <element name="lacunaEnd">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the end of a lacuna in a mostly complete textual
witness.</a:documentation>
      <ref name="lacunaEnd.content"/>
      <ref name="lacunaEnd.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lacunaEnd.content">
    <empty xmlns:rng="http://relaxng.org/ns/structure/1.0"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lacunaEnd.attributes">
    <ref name="att.global.attributes"/>
    <ref name="att.rdgPart.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.rdgPart" combine="choice">
    <ref name="lacunaEnd"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lacunaStart">
    <element name="lacunaStart">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the beginning of a lacuna in the text of a mostly
complete textual witness.</a:documentation>
      <ref name="lacunaStart.content"/>
      <ref name="lacunaStart.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lacunaStart.content">
    <empty xmlns:rng="http://relaxng.org/ns/structure/1.0"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lacunaStart.attributes">
    <ref name="att.global.attributes"/>
    <ref name="att.rdgPart.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.rdgPart" combine="choice">
    <ref name="lacunaStart"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lem">
    <element name="lem">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(lemma) contains the lemma, or base text, of a textual variation.</a:documentation>
      <ref name="lem.content"/>
      <ref name="lem.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lem.content">
    <zeroOrMore xmlns:rng="http://relaxng.org/ns/structure/1.0">
      <rng:choice>
        <rng:text/>
        <rng:ref name="model.gLike"/>
        <rng:ref name="model.phrase"/>
        <rng:ref name="model.inter"/>
        <rng:ref name="model.global"/>
        <rng:ref name="model.rdgPart"/>
      </rng:choice>
    </zeroOrMore>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="lem.attributes">
    <ref name="att.global.attributes"/>
    <ref name="att.textCritical.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="rdg">
    <element name="rdg">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(reading) contains a single reading within a textual variation.</a:documentation>
      <ref name="rdg.content"/>
      <ref name="rdg.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="rdg.content">
    <zeroOrMore xmlns:rng="http://relaxng.org/ns/structure/1.0">
      <rng:choice>
        <rng:text/>
        <rng:ref name="model.gLike"/>
        <rng:ref name="model.phrase"/>
        <rng:ref name="model.inter"/>
        <rng:ref name="model.global"/>
        <rng:ref name="model.rdgPart"/>
      </rng:choice>
    </zeroOrMore>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="rdg.attributes">
    <ref name="att.global.attributes"/>
    <ref name="att.textCritical.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="rdgGrp">
    <element name="rdgGrp">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(reading group) within a textual variation,
groups two or more readings perceived to have a genetic
relationship or other affinity.</a:documentation>
      <ref name="rdgGrp.content"/>
      <ref name="rdgGrp.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="rdgGrp.content">
    <group xmlns:rng="http://relaxng.org/ns/structure/1.0">
      <rng:oneOrMore>
        <rng:choice>
          <rng:group>
            <rng:ref name="rdgGrp"/>
            <rng:optional>
              <rng:ref name="wit"/>
            </rng:optional>
          </rng:group>
          <rng:zeroOrMore>
            <rng:group>
              <rng:optional>
                <rng:group>
                  <rng:ref name="lem"/>
                  <rng:optional>
                    <rng:ref name="wit"/>
                  </rng:optional>
                </rng:group>
              </rng:optional>
              <rng:group>
                <rng:ref name="rdg"/>
                <rng:optional>
                  <rng:ref name="wit"/>
                </rng:optional>
              </rng:group>
            </rng:group>
          </rng:zeroOrMore>
        </rng:choice>
      </rng:oneOrMore>
    </group>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="rdgGrp.attributes">
    <ref name="att.global.attributes"/>
    <ref name="att.textCritical.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="wit">
    <element name="wit">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains a list of one or more sigla of witnesses attesting a
given reading, in a textual variation.</a:documentation>
      <ref name="wit.content"/>
      <ref name="wit.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="wit.content">
    <ref xmlns:rng="http://relaxng.org/ns/structure/1.0" name="macro.paraContent"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="wit.attributes">
    <ref name="att.global.attributes"/>
    <ref name="att.rdgPart.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.rdgPart" combine="choice">
    <ref name="wit"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witDetail">
    <element name="witDetail">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">gives further information about a particular witness, or
witnesses, to a particular reading.</a:documentation>
      <ref name="witDetail.content"/>
      <ref name="witDetail.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witDetail.content">
    <ref xmlns:rng="http://relaxng.org/ns/structure/1.0" name="macro.paraContent"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witDetail.attributes">
    <ref name="att.global.attributes"/>
    <attribute name="target">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the identifier for the reading, or readings, to which
the witness detail refers.</a:documentation>
      <ref name="data.pointers"/>
    </attribute>
    <optional>
      <attribute name="resp">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">identifies the individual responsible for  identifying the
witness</a:documentation>
        <ref name="data.pointer"/>
      </attribute>
    </optional>
    <attribute name="wit">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the sigil or sigla for the witnesses to which the
detail refers.</a:documentation>
      <ref name="data.code"/>
    </attribute>
    <optional>
      <attribute name="type">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">describes the type of information given about the witness.</a:documentation>
        <ref name="data.pointers"/>
      </attribute>
    </optional>
    <optional>
      <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" name="place" a:defaultValue="apparatus">
        <a:documentation>indicates where the note appears in the source text.</a:documentation>
        <ref name="data.enumerated"/>
      </attribute>
    </optional>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.noteLike" combine="choice">
    <ref name="witDetail"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witEnd">
    <element name="witEnd">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the end, or suspension, of the text of a fragmentary
witness.</a:documentation>
      <ref name="witEnd.content"/>
      <ref name="witEnd.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witEnd.content">
    <empty xmlns:rng="http://relaxng.org/ns/structure/1.0"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witEnd.attributes">
    <ref name="att.global.attributes"/>
    <ref name="att.rdgPart.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.rdgPart" combine="choice">
    <ref name="witEnd"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witList">
    <element name="witList">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(witness list) contains a list of all the witnesses referred to in
wit elements or wit attributes
within the critical apparatus.</a:documentation>
      <ref name="witList.content"/>
      <ref name="witList.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witList.content">
    <group xmlns:rng="http://relaxng.org/ns/structure/1.0">
      <rng:zeroOrMore>
        <rng:ref name="model.global"/>
      </rng:zeroOrMore>
      <rng:oneOrMore>
        <rng:ref name="witness"/>
        <rng:zeroOrMore>
          <rng:ref name="model.global"/>
        </rng:zeroOrMore>
      </rng:oneOrMore>
    </group>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witList.attributes">
    <ref name="att.global.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.divPart" combine="choice">
    <ref name="witList"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witStart">
    <element name="witStart">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the beginning, or resumption, of the text of a
fragmentary witness.</a:documentation>
      <ref name="witStart.content"/>
      <ref name="witStart.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witStart.content">
    <empty xmlns:rng="http://relaxng.org/ns/structure/1.0"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witStart.attributes">
    <ref name="att.global.attributes"/>
    <ref name="att.rdgPart.attributes"/>
    <empty/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="model.rdgPart" combine="choice">
    <ref name="witStart"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witness">
    <element name="witness">
      <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains either a description of a single witness referred to
within the critical apparatus, or a list of witnesses which is to be
referred to by a single sigil.</a:documentation>
      <ref name="witness.content"/>
      <ref name="witness.attributes"/>
    </element>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witness.content">
    <ref xmlns:rng="http://relaxng.org/ns/structure/1.0" name="macro.paraContent"/>
  </define>
  <define xmlns="http://relaxng.org/ns/structure/1.0" name="witness.attributes">
    <ref name="att.global.attributes"/>
    <optional>
      <attribute name="included">
        <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates which other witnesses are included in a witness group.</a:documentation>
        <ref name="data.pointers"/>
      </attribute>
    </optional>
    <empty/>
  </define>
<!--3. macros-->
</rng:grammar>
