<?xml version="1.0" encoding="utf-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"><!--Schema generated 2010-11-05T15:13:52Z
Edition: 1.8.0. Last updated on November 5th 2010.

	  
Copyright 2010 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.
	  
A copy of the GNU General Public
	    License is stored on the TEI web site
	    along with this file; you can also contact the Free
	    Software Foundation, Inc., 59 Temple Place, Suite 330,
	    Boston, MA 02111-1307, USA, for a copy.


		
For information about the TEI, including contact
		details, consult the TEI web
	      site at http://www.tei-c.org/. 
		

	 Critical Apparatus--><!--Definitions from module textcrit--><!--Set global predeclared macros--><!--Set predeclared macros--><!--0. predeclared macros--><!--1. classes--><define name="model.rdgLike">
      <choice>
         <ref name="rdg"/>
      </choice>
   </define>
   <define name="model.rdgLike_alternation">
      <choice>
         <ref name="rdg"/>
      </choice>
   </define>
   <define name="model.rdgLike_sequence">
      <ref name="rdg"/>
   </define>
   <define name="model.rdgLike_sequenceOptional">
      <optional>
         <ref name="rdg"/>
      </optional>
   </define>
   <define name="model.rdgLike_sequenceOptionalRepeatable">
      <zeroOrMore>
         <ref name="rdg"/>
      </zeroOrMore>
   </define>
   <define name="model.rdgLike_sequenceRepeatable">
      <oneOrMore>
         <ref name="rdg"/>
      </oneOrMore>
   </define>
   <define name="model.rdgPart">
      <choice>
         <ref name="wit"/>
         <ref name="witStart"/>
         <ref name="witEnd"/>
         <ref name="lacunaStart"/>
         <ref name="lacunaEnd"/>
      </choice>
   </define>
   <define name="model.rdgPart_alternation">
      <choice>
         <ref name="wit"/>
         <ref name="witStart"/>
         <ref name="witEnd"/>
         <ref name="lacunaStart"/>
         <ref name="lacunaEnd"/>
      </choice>
   </define>
   <define name="model.rdgPart_sequence">
      <ref name="wit"/>
      <ref name="witStart"/>
      <ref name="witEnd"/>
      <ref name="lacunaStart"/>
      <ref name="lacunaEnd"/>
   </define>
   <define name="model.rdgPart_sequenceOptional">
      <optional>
         <ref name="wit"/>
      </optional>
      <optional>
         <ref name="witStart"/>
      </optional>
      <optional>
         <ref name="witEnd"/>
      </optional>
      <optional>
         <ref name="lacunaStart"/>
      </optional>
      <optional>
         <ref name="lacunaEnd"/>
      </optional>
   </define>
   <define name="model.rdgPart_sequenceOptionalRepeatable">
      <zeroOrMore>
         <ref name="wit"/>
      </zeroOrMore>
      <zeroOrMore>
         <ref name="witStart"/>
      </zeroOrMore>
      <zeroOrMore>
         <ref name="witEnd"/>
      </zeroOrMore>
      <zeroOrMore>
         <ref name="lacunaStart"/>
      </zeroOrMore>
      <zeroOrMore>
         <ref name="lacunaEnd"/>
      </zeroOrMore>
   </define>
   <define name="model.rdgPart_sequenceRepeatable">
      <oneOrMore>
         <ref name="wit"/>
      </oneOrMore>
      <oneOrMore>
         <ref name="witStart"/>
      </oneOrMore>
      <oneOrMore>
         <ref name="witEnd"/>
      </oneOrMore>
      <oneOrMore>
         <ref name="lacunaStart"/>
      </oneOrMore>
      <oneOrMore>
         <ref name="lacunaEnd"/>
      </oneOrMore>
   </define>
   <define name="att.rdgPart.attributes">
      <ref name="att.rdgPart.attribute.wit"/>
   </define>
   <define name="att.rdgPart.attribute.wit">
      <optional>
         <attribute name="wit">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(witness or witnesses) contains a list of one or more sigla indicating the witnesses
which begin or end at this point.</a:documentation>
            <list>
               <ref name="data.pointer"/>
               <zeroOrMore>
                  <ref name="data.pointer"/>
               </zeroOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define name="att.textCritical.attributes">
      <ref name="att.responsibility.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.hand"/>
   </define>
   <define name="att.textCritical.attribute.wit">
      <optional>
         <attribute name="wit">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(witness or witnesses) contains a list of one or more pointers indicating the witnesses
which attest to a given reading.</a:documentation>
            <list>
               <ref name="data.pointer"/>
               <zeroOrMore>
                  <ref name="data.pointer"/>
               </zeroOrMore>
            </list>
         </attribute>
      </optional>
   </define>
   <define 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.
Sample values include: 1] substantive; 2] orthographic</a:documentation>
            <ref name="data.enumerated"/>
         </attribute>
      </optional>
   </define>
   <define 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.
Sample values include: 1] homeoteleuton; 2] homeoarchy; 3] paleographicConfusion; 4] haplography; 5] dittography; 6] falseEmendation</a:documentation>
            <ref name="data.enumerated"/>
         </attribute>
      </optional>
   </define>
   <define name="att.textCritical.attribute.varSeq">
      <optional>
         <attribute name="varSeq">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(variant sequence) 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>
            <ref name="data.count"/>
         </attribute>
      </optional>
   </define>
   <define 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 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.localattributes"/>
      </element>
   </define>
   <define name="app.content">
      <rng:group xmlns:rng="http://relaxng.org/ns/structure/1.0"
                 xmlns="http://www.tei-c.org/ns/1.0">
         <rng:zeroOrMore>
            <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.global"/>
         </rng:zeroOrMore>
         <optional xmlns="http://relaxng.org/ns/structure/1.0">
            <ref name="lem"/>
            <rng:zeroOrMore xmlns="http://www.tei-c.org/ns/1.0">
               <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.global"/>
            </rng:zeroOrMore>
            <optional>
               <ref name="wit"/>
               <rng:zeroOrMore xmlns="http://www.tei-c.org/ns/1.0">
                  <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.global"/>
               </rng:zeroOrMore>
            </optional>
         </optional>
         <rng:zeroOrMore>
            <rng:choice>
               <rng:group>
                  <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.rdgLike"/>
                  <rng:zeroOrMore>
                     <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.global"/>
                  </rng:zeroOrMore>
                  <optional xmlns="http://relaxng.org/ns/structure/1.0">
                     <ref name="wit"/>
                     <rng:zeroOrMore xmlns="http://www.tei-c.org/ns/1.0">
                        <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.global"/>
                     </rng:zeroOrMore>
                  </optional>
               </rng:group>
               <rng:group>
                  <ref xmlns="http://relaxng.org/ns/structure/1.0" name="rdgGrp"/>
                  <rng:zeroOrMore>
                     <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.global"/>
                  </rng:zeroOrMore>
                  <optional xmlns="http://relaxng.org/ns/structure/1.0">
                     <ref name="wit"/>
                     <rng:zeroOrMore xmlns="http://www.tei-c.org/ns/1.0">
                        <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.global"/>
                     </rng:zeroOrMore>
                  </optional>
               </rng:group>
            </rng:choice>
         </rng:zeroOrMore>
      </rng:group>
    
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron" id="app-constraint-only1lem">
         <rule context="tei:app">
            <sch:assert xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                        xmlns="http://www.tei-c.org/ns/1.0"
                        xmlns:rng="http://relaxng.org/ns/structure/1.0"
                        test="count( descendant::tei:lem[ generate-id(       current() ) = generate-id( ancestor::tei:app[1] ) ]) &lt;       2">Only one &lt;lem&gt; element may appear within a single
      apparatus entry, whether it appears outside a &lt;rdgGrp&gt;
      element or within it.</sch:assert>
         </rule>
      </pattern>
    
  </define>
   <define name="app.localattributes">
      <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">(location) indicates the location of the variation, when the
location-referenced method of apparatus markup is used.</a:documentation>
            <list>
               <ref name="data.word"/>
               <zeroOrMore>
                  <ref name="data.word"/>
               </zeroOrMore>
            </list>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define 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.localattributes"/>
      </element>
   </define>
   <define name="lacunaEnd.content">
      <empty/>
   </define>
   <define name="lacunaEnd.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.rdgPart.attributes"/>
      <empty/>
   </define>
   <define 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.localattributes"/>
      </element>
   </define>
   <define name="lacunaStart.content">
      <empty/>
   </define>
   <define name="lacunaStart.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.rdgPart.attributes"/>
      <empty/>
   </define>
   <define 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.localattributes"/>
      </element>
   </define>
   <define name="lem.content">
      <rng:zeroOrMore xmlns:rng="http://relaxng.org/ns/structure/1.0"
                      xmlns="http://www.tei-c.org/ns/1.0">
         <rng:choice>
            <text xmlns="http://relaxng.org/ns/structure/1.0"/>
            <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.gLike"/>
            <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.phrase"/>
            <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.inter"/>
            <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.global"/>
            <ref xmlns="http://relaxng.org/ns/structure/1.0" name="model.rdgPart"/>
         </rng:choice>
      </rng:zeroOrMore>
   </define>
   <define name="lem.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.textCritical.attributes"/>
      <empty/>
   </define>
   <define name="listWit">
      <element name="listWit">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(witness list) lists definitions for all the witnesses referred to by a critical
  apparatus, optionally grouped hierarchically.</a:documentation>
         <ref name="listWit.content"/>
         <ref name="listWit.localattributes"/>
      </element>
   </define>
   <define name="listWit.content">
      <rng:group xmlns:rng="http://relaxng.org/ns/structure/1.0"
                 xmlns="http://www.tei-c.org/ns/1.0">
         <optional xmlns="http://relaxng.org/ns/structure/1.0">
            <ref name="model.headLike"/>
         </optional>
         <oneOrMore xmlns="http://relaxng.org/ns/structure/1.0">
            <rng:choice xmlns="http://www.tei-c.org/ns/1.0">
               <ref xmlns="http://relaxng.org/ns/structure/1.0" name="witness"/>
               <ref xmlns="http://relaxng.org/ns/structure/1.0" name="listWit"/>
            </rng:choice>
         </oneOrMore>
      </rng:group>
   </define>
   <define name="listWit.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <define 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.localattributes"/>
      </element>
   </define>
   <define name="rdg.content">
      <zeroOrMore xmlns:rng="http://relaxng.org/ns/structure/1.0">
         <choice>
            <text/>
            <ref name="model.gLike"/>
            <ref name="model.phrase"/>
            <ref name="model.inter"/>
            <ref name="model.global"/>
            <ref name="model.rdgPart"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="rdg.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.textCritical.attributes"/>
      <empty/>
   </define>
   <define 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.localattributes"/>
      </element>
   </define>
   <define name="rdgGrp.content">
      <group xmlns:rng="http://relaxng.org/ns/structure/1.0">
         <oneOrMore>
            <choice>
               <group>
                  <ref name="rdgGrp"/>
                  <optional>
                     <ref name="wit"/>
                  </optional>
               </group>
               <zeroOrMore>
                  <group>
                     <optional>
                        <group>
                           <ref name="lem"/>
                           <optional>
                              <ref name="wit"/>
                           </optional>
                        </group>
                     </optional>
                     <group>
                        <ref name="model.rdgLike"/>
                        <optional>
                           <ref name="wit"/>
                        </optional>
                     </group>
                  </group>
               </zeroOrMore>
            </choice>
         </oneOrMore>
      </group>
   </define>
   <define name="rdgGrp.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.textCritical.attributes"/>
      <empty/>
   </define>
   <define name="variantEncoding">
      <element name="variantEncoding">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">declares the method used to encode text-critical variants.</a:documentation>
         <ref name="variantEncoding.content"/>
         <ref name="variantEncoding.localattributes"/>
      </element>
   </define>
   <define name="variantEncoding.content">
      <empty/>
   </define>
   <define name="variantEncoding.localattributes">
      <ref name="att.global.attributes"/>
      <attribute name="method">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates which method is used to encode the apparatus of
variants.</a:documentation>
         <choice>
            <value>location-referenced</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">apparatus uses line numbers or other canonical reference scheme
referenced in a base text.</a:documentation>
            <value>double-end-point</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">apparatus indicates the precise locations of the beginning and
ending of each lemma relative to a base text.</a:documentation>
            <value>parallel-segmentation</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">alternate readings of a passage are given in parallel in the
text; no notion of a base text is necessary.</a:documentation>
         </choice>
      </attribute>
      <attribute name="location">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates whether the apparatus appears within the running text
or external to it.</a:documentation>
         <choice>
            <value>internal</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">apparatus appears within the running text.</a:documentation>
            <value>external</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">apparatus appears outside the base text.</a:documentation>
         </choice>
      </attribute>
      <empty/>
   </define>
   <define 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.localattributes"/>
      </element>
   </define>
   <define name="wit.content">
      <ref name="macro.phraseSeq"/>
   </define>
   <define name="wit.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.rdgPart.attributes"/>
      <empty/>
   </define>
   <define name="witDetail">
      <element name="witDetail">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(witness detail) gives further information about a particular witness, or
witnesses, to a particular reading.</a:documentation>
         <ref name="witDetail.content"/>
         <ref name="witDetail.localattributes"/>
      </element>
   </define>
   <define name="witDetail.content">
      <ref name="macro.phraseSeq"/>
   </define>
   <define name="witDetail.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.placement.attributes"/>
      <ref name="att.responsibility.attributes"/>
      <ref name="att.pointing.attributes"/>
      <attribute name="wit">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(witnesses) indicates the sigil or sigla for the witnesses to which the
detail refers.</a:documentation>
         <list>
            <ref name="data.pointer"/>
            <zeroOrMore>
               <ref name="data.pointer"/>
            </zeroOrMore>
         </list>
      </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.enumerated"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="witEnd">
      <element name="witEnd">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(fragmented witness end) indicates the end, or suspension, of the text of a fragmentary
witness.</a:documentation>
         <ref name="witEnd.content"/>
         <ref name="witEnd.localattributes"/>
      </element>
   </define>
   <define name="witEnd.content">
      <empty/>
   </define>
   <define name="witEnd.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.rdgPart.attributes"/>
      <empty/>
   </define>
   <define name="witStart">
      <element name="witStart">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(fragmented witness start) indicates the beginning, or resumption, of the text of a
fragmentary witness.</a:documentation>
         <ref name="witStart.content"/>
         <ref name="witStart.localattributes"/>
      </element>
   </define>
   <define name="witStart.content">
      <empty/>
   </define>
   <define name="witStart.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.rdgPart.attributes"/>
      <empty/>
   </define>
   <define 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.localattributes"/>
      </element>
   </define>
   <define name="witness.content">
      <ref name="macro.limitedContent"/>
   </define>
   <define name="witness.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <!--3. macros--></grammar>