<?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 2013-01-17T19:45:23Z
Edition: 2.3.0. Last updated on 17th January 2013.
This material is dual-licensed.

	  [http://creativecommons.org/licenses/by/3.0/] 
	    Distributed under a Creative Commons Attribution 3.0 Unported License.
	  
	  [http://www.opensource.org/licenses/BSD-2-Clause] 
	    Copyright 2013 TEI Consortium.
	    All rights reserved.
	    
	    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
	    
	      Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
	      Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.



This software is provided by the copyright holders and contributors
"as is" and any express or implied warranties, including, but not
limited to, the implied warranties of merchantability and fitness for
a particular purpose are disclaimed. In no event shall the copyright
holder or contributors be liable for any direct, indirect, incidental,
special, exemplary, or consequential damages (including, but not
limited to, procurement of substitute goods or services; loss of use,
data, or profits; or business interruption) however caused and on any
theory of liability, whether in contract, strict liability, or tort
(including negligence or otherwise) arising in any way out of the use
of this software, even if advised of the possibility of such
damage.

	  TEI  material can be licensed differently depending on the use you intend to 
make of it. Hence it is made available under both the CC+BY and BSD-2 
licences.  The CC+BY licence is generally appropriate for usages which 
treat TEI content as data or documentation. The BSD-2 licence is 
generally appropriate for usage of TEI content in a software 
environment. For further information or clarification, please contact 
the TEI Consortium.
	  
	 Documentation of TEI modules--><!--Definitions from module tagdocs--><!--Set global predeclared macros--><!--Set predeclared macros--><!--0. predeclared macros--><!--1. classes--><define name="att.combinable.attributes">
      <ref name="att.combinable.attribute.mode"/>
   </define>
   <define name="att.combinable.attribute.mode">
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="mode"
                    a:defaultValue="add">
            <a:documentation>specifies the effect of this declaration on its parent
    object.</a:documentation>
            <choice>
               <value>add</value>
               <a:documentation>this declaration is added to the current definitions</a:documentation>
               <value>delete</value>
               <a:documentation>if present already, the whole of the declaration 
	  for this object is  removed from the current setup</a:documentation>
               <value>change</value>
               <a:documentation>this declaration changes the declaration of the same
    name in the current definition</a:documentation>
               <value>replace</value>
               <a:documentation>this declaration replaces the declaration of the same
    name in the current definition</a:documentation>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.identified.attributes">
      <ref name="att.combinable.attributes"/>
      <ref name="att.identified.attribute.ident"/>
      <ref name="att.identified.attribute.predeclare"/>
      <ref name="att.identified.attribute.module"/>
      <ref name="att.identified.attribute.status"/>
   </define>
   <define name="att.identified.attribute.ident">
      <attribute name="ident">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies the identifier by which this element may be referenced.</a:documentation>
         <ref name="data.name"/>
      </attribute>
   </define>
   <define name="att.identified.attribute.predeclare">
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="predeclare"
                    a:defaultValue="false">
            <a:documentation>says whether this object should be predeclared in the
      tei infrastructure module.</a:documentation>
            <ref name="data.truthValue"/>
         </attribute>
      </optional>
   </define>
   <define name="att.identified.attribute.module">
      <optional>
         <attribute name="module">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies a name for the module in which this object is to
      be declared.</a:documentation>
            <data type="NCName"/>
         </attribute>
      </optional>
   </define>
   <define name="att.identified.attribute.status">
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="status"
                    a:defaultValue="stable">
            <a:documentation>indicates the current status of the object identified with
respect to the current version of the TEI Guidelines.</a:documentation>
            <choice>
               <value>deprecated</value>
               <a:documentation>the item is not recommended for use,
and may be withdrawn at a future release.</a:documentation>
               <value>unstable</value>
               <a:documentation>the item is new and still under
review.</a:documentation>
               <value>changed</value>
               <a:documentation>the item has changed significantly since the
preceding version.</a:documentation>
               <value>stable</value>
               <a:documentation>the item has not recently changed and is
not expected to do so except for correction of any errors.</a:documentation>
            </choice>
         </attribute>
      </optional>
   </define>
   <define name="att.namespaceable.attributes">
      <ref name="att.namespaceable.attribute.ns"/>
   </define>
   <define name="att.namespaceable.attribute.ns">
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="ns"
                    a:defaultValue="http://www.tei-c.org/ns/1.0">
            <a:documentation>(namespace) specifies the namespace to which this element belongs</a:documentation>
            <ref name="data.namespace"/>
         </attribute>
      </optional>
   </define>
   <!--2. elements--><define name="altIdent">
      <element name="altIdent">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(alternate identifier) supplies the recommended XML name for an element, class,
  attribute, etc. in some language.</a:documentation>
         <ref name="altIdent.content"/>
         <ref name="altIdent.localattributes"/>
      </element>
   </define>
   <define name="altIdent.content">
      <text/>
   </define>
   <define name="altIdent.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.typed.attributes"/>
      <empty/>
   </define>
   <define name="att">
      <element name="att">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(attribute) contains the name of an attribute appearing within running text. []</a:documentation>
         <ref name="att.content"/>
         <ref name="att.localattributes"/>
      </element>
   </define>
   <define name="att.content">
      <ref name="data.name"/>
   </define>
   <define name="att.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="scheme"
                    a:defaultValue="TEI">
            <a:documentation>supplies an identifier for the scheme in which this name is defined.
Sample values include: 1] TEI(text encoding initiative) ; 2] DBK(docbook) ; 3] XX(unknown) </a:documentation>
            <ref name="data.enumerated"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="attDef">
      <element name="attDef">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(attribute definition) contains the definition of a single attribute. []</a:documentation>
         <ref name="attDef.content"/>
         <ref name="attDef.localattributes"/>
      </element>
   </define>
   <define name="attDef.content">
      <group>
         <zeroOrMore>
            <choice>
               <ref name="model.glossLike"/>
               <ref name="model.descLike"/>
            </choice>
         </zeroOrMore>
         <optional>
            <ref name="datatype"/>
         </optional>
         <zeroOrMore>
            <ref name="constraintSpec"/>
         </zeroOrMore>
         <optional>
            <ref name="defaultVal"/>
         </optional>
         <optional>
            <choice>
               <ref name="valList"/>
               <oneOrMore>
                  <ref name="valDesc"/>
               </oneOrMore>
            </choice>
         </optional>
         <zeroOrMore>
            <ref name="exemplum"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="remarks"/>
         </zeroOrMore>
      </group>
    
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               id="attDef-constraint-attDefContents">
         <rule context="tei:attDef">
            <assert xmlns:s="http://www.ascc.net/xml/schematron"
                    xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                    xmlns:rng="http://relaxng.org/ns/structure/1.0"
                    test="   @mode eq 'change'       or @mode eq 'delete'       or tei:datatype       or tei:valList[@type='closed']       ">Attribute: the definition of the @<value-of select="@ident"/> attribute in the <value-of select="ancestor::*[@ident][1]/@ident"/>
               <value-of select="' '"/>
               <value-of select="local-name(ancestor::*[@ident][1])"/> should have a closed valList or a datatype</assert>
         </rule>
      </pattern>
    
  </define>
   <define name="attDef.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.identified.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="usage"
                    a:defaultValue="opt">
            <a:documentation>specifies the optionality of the attribute.</a:documentation>
            <choice>
               <value>req</value>
               <a:documentation>(required) </a:documentation>
               <value>mwa</value>
               <a:documentation>(mandatory when applicable ) </a:documentation>
               <value>rec</value>
               <a:documentation>(recommended ) </a:documentation>
               <value>rwa</value>
               <a:documentation>(recommended when applicable ) </a:documentation>
               <value>opt</value>
               <a:documentation>(optional ) </a:documentation>
            </choice>
         </attribute>
      </optional>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="ns"
                    a:defaultValue="http://www.tei-c.org/ns/1.0">
            <a:documentation>(namespace) specifies the namespace to which this attribute belongs</a:documentation>
            <ref name="data.namespace"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="attList">
      <element name="attList">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains documentation for all the attributes associated with this element, as a series of
      attDef elements. [ ]</a:documentation>
         <ref name="attList.content"/>
         <ref name="attList.localattributes"/>
      </element>
   </define>
   <define name="attList.content">
      <oneOrMore>
         <choice>
            <ref name="attRef"/>
            <ref name="attDef"/>
            <ref name="attList"/>
         </choice>
      </oneOrMore>
   </define>
   <define name="attList.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="org"
                    a:defaultValue="group">
            <a:documentation>(organization) specifies whether all the attributes in the list are available (org="group") or only one
        of them (org="choice")</a:documentation>
            <choice>
               <value>group</value>
               <a:documentation>grouped</a:documentation>
               <value>choice</value>
               <a:documentation>alternated</a:documentation>
            </choice>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="attRef">
      <element name="attRef">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(attribute pointer) points to the definition of an attribute or group of attributes.</a:documentation>
         <ref name="attRef.content"/>
         <ref name="attRef.localattributes"/>
      </element>
   </define>
   <define name="attRef.content">
      <empty/>
   </define>
   <define name="attRef.localattributes">
      <ref name="att.global.attributes"/>
      <attribute name="name">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the name of the pattern defining the attribute(s)</a:documentation>
         <ref name="data.word"/>
      </attribute>
      <empty/>
   </define>
   <define name="classRef">
      <element name="classRef">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">points to the specification for an attribute or model class which is to be included in a schema</a:documentation>
         <ref name="classRef.content"/>
         <ref name="classRef.localattributes"/>
      </element>
   </define>
   <define name="classRef.content">
      <empty/>
   </define>
   <define name="classRef.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.readFrom.attributes"/>
      <attribute name="key">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the identifier used for the required class within the
	source indicated.</a:documentation>
         <data type="NCName"/>
      </attribute>
      <empty/>
   </define>
   <define name="classSpec">
      <element name="classSpec">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(class specification) contains reference information for a TEI element class; 
that is a group of 
  elements which appear together in  content models, or 
  which share some common attribute, or both.</a:documentation>
         <ref name="classSpec.content"/>
         <ref name="classSpec.localattributes"/>
      </element>
   </define>
   <define name="classSpec.content">
      <group>
         <zeroOrMore>
            <choice>
               <ref name="model.glossLike"/>
               <ref name="model.descLike"/>
            </choice>
         </zeroOrMore>
         <optional>
            <ref name="classes"/>
         </optional>
         <zeroOrMore>
            <ref name="constraintSpec"/>
         </zeroOrMore>
         <optional>
            <ref name="attList"/>
         </optional>
         <zeroOrMore>
            <ref name="exemplum"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="remarks"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="listRef"/>
         </zeroOrMore>
      </group>
    
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               id="classSpec-constraint-classspec-in-module">
         <rule context="tei:classSpec">
            <assert xmlns:s="http://www.ascc.net/xml/schematron"
                    xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                    xmlns:rng="http://relaxng.org/ns/structure/1.0"
                    test="not( @module )               or               //tei:moduleSpec[ @ident = current()/@module ]               or               //tei:moduleRef[ @key = current()/@module ]">Class
      <value-of select="@ident"/>: the value of the module attribute ("<value-of select="@module"/>") 
should correspond to an existing module, via a moduleSpec or moduleRef</assert>
         </rule>
      </pattern>
    
  </define>
   <define name="classSpec.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.identified.attributes"/>
      <attribute name="type">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates whether this is a model class or an attribute class</a:documentation>
         <choice>
            <value>model</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(content model) members of this class appear in the same  content models</a:documentation>
            <value>atts</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(attributes) members of this class share common attributes</a:documentation>
         </choice>
      </attribute>
      <optional>
         <attribute name="generate">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates which alternation and sequence instantiations
	of a model class may be referenced. By default, all variations
	are permitted.</a:documentation>
            <list>
               <choice>
                  <value>alternation</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are alternatives</a:documentation>
                  <value>sequence</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are to be provided in sequence</a:documentation>
                  <value>sequenceOptional</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided, in sequence,
	    but are optional</a:documentation>
                  <value>sequenceOptionalRepeatable</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more
	    times, in sequence, but are optional. </a:documentation>
                  <value>sequenceRepeatable</value>
                  <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more times, in sequence</a:documentation>
               </choice>
               <optional>
                  <choice>
                     <value>alternation</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are alternatives</a:documentation>
                     <value>sequence</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are to be provided in sequence</a:documentation>
                     <value>sequenceOptional</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided, in sequence,
	    but are optional</a:documentation>
                     <value>sequenceOptionalRepeatable</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more
	    times, in sequence, but are optional. </a:documentation>
                     <value>sequenceRepeatable</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more times, in sequence</a:documentation>
                  </choice>
               </optional>
               <optional>
                  <choice>
                     <value>alternation</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are alternatives</a:documentation>
                     <value>sequence</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are to be provided in sequence</a:documentation>
                     <value>sequenceOptional</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided, in sequence,
	    but are optional</a:documentation>
                     <value>sequenceOptionalRepeatable</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more
	    times, in sequence, but are optional. </a:documentation>
                     <value>sequenceRepeatable</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more times, in sequence</a:documentation>
                  </choice>
               </optional>
               <optional>
                  <choice>
                     <value>alternation</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are alternatives</a:documentation>
                     <value>sequence</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are to be provided in sequence</a:documentation>
                     <value>sequenceOptional</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided, in sequence,
	    but are optional</a:documentation>
                     <value>sequenceOptionalRepeatable</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more
	    times, in sequence, but are optional. </a:documentation>
                     <value>sequenceRepeatable</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more times, in sequence</a:documentation>
                  </choice>
               </optional>
               <optional>
                  <choice>
                     <value>alternation</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are alternatives</a:documentation>
                     <value>sequence</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class are to be provided in sequence</a:documentation>
                     <value>sequenceOptional</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided, in sequence,
	    but are optional</a:documentation>
                     <value>sequenceOptionalRepeatable</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more
	    times, in sequence, but are optional. </a:documentation>
                     <value>sequenceRepeatable</value>
                     <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">members of the class may be provided one or more times, in sequence</a:documentation>
                  </choice>
               </optional>
            </list>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="classes">
      <element name="classes">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies all the classes of which the documented element or
class is a member or subclass. [ ]</a:documentation>
         <ref name="classes.content"/>
         <ref name="classes.localattributes"/>
      </element>
   </define>
   <define name="classes.content">
      <zeroOrMore>
         <ref name="memberOf"/>
      </zeroOrMore>
   </define>
   <define name="classes.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="mode"
                    a:defaultValue="replace">
            <a:documentation>specifies the effect of this declaration on its parent
    module.</a:documentation>
            <choice>
               <value>change</value>
               <a:documentation>this declaration changes the declaration of the same
    name in the current definition</a:documentation>
               <value>replace</value>
               <a:documentation>this declaration replaces the declaration of the same
    name in the current definition</a:documentation>
            </choice>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="code">
      <element name="code">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains literal code from some formal language such as a
programming language.</a:documentation>
         <ref name="code.content"/>
         <ref name="code.localattributes"/>
      </element>
   </define>
   <define name="code.content">
      <text/>
   </define>
   <define name="code.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute name="lang">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(formal language) a name identifying the formal language in which  the
	code is expressed</a:documentation>
            <ref name="data.word"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="constraint">
      <element name="constraint">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"> (constraint rules) the formal rules of a constraint</a:documentation>
         <ref name="constraint.content"/>
         <ref name="constraint.localattributes"/>
      </element>
   </define>
   <define name="constraint.content">
      <choice>
         <text/>
         <ref name="macro.anyXML"/>
      </choice>
   </define>
   <define name="constraint.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <define name="constraintSpec">
      <element name="constraintSpec">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"> (constraint on schema) contains  a constraint, expressed in some formal syntax,
  which cannot be expressed in the structural content model []</a:documentation>
         <ref name="constraintSpec.content"/>
         <ref name="constraintSpec.localattributes"/>
      </element>
   </define>
   <define name="constraintSpec.content">
      <zeroOrMore>
         <ref name="model.descLike"/>
      </zeroOrMore>
      <zeroOrMore>
         <ref name="model.glossLike"/>
      </zeroOrMore>
      <optional>
         <ref name="constraint"/>
      </optional>
    
    
      <ns xmlns="http://purl.oclc.org/dsdl/schematron" prefix="s"
          uri="http://www.ascc.net/xml/schematron"/>
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron" id="constraintSpec-constraint-sch">
         <rule context="tei:constraintSpec">
            <sch:report xmlns:s="http://www.ascc.net/xml/schematron"
                        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="tei:constraint/s:* and    not(@scheme='schematron')">
	Rules in the Schematron 1.* language must be inside
	a constraint with a value of 'schematron' on the scheme attribute
      </sch:report>
         </rule>
      </pattern>
    
  
    
      <ns xmlns="http://purl.oclc.org/dsdl/schematron" prefix="sch"
          uri="http://purl.oclc.org/dsdl/schematron"/>
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               id="constraintSpec-constraint-isosch">
         <rule context="tei:constraintSpec">
            <sch:report xmlns:s="http://www.ascc.net/xml/schematron"
                        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="tei:constraint/sch:* and    not(@scheme='isoschematron')">
	Rules in the ISO Schematron language must be inside
	a constraint with a value of 'isoschematron' on the scheme attribute
      </sch:report>
         </rule>
      </pattern>
    
  </define>
   <define name="constraintSpec.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.identified.attributes"/>
      <ref name="att.typed.attributes"/>
      <attribute name="scheme">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies the name of the language in which the constraints
      are defined</a:documentation>
         <choice>
            <value>schematron</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"> (Schematron) </a:documentation>
            <value>isoschematron</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"> (ISO Schematron) </a:documentation>
            <value>xsl</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"> (XSLT) </a:documentation>
            <value>private</value>
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"> (private constraint language) </a:documentation>
         </choice>
      </attribute>
      <empty/>
   </define>
   <define name="content">
      <element name="content">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(content model) contains the text of a declaration for the schema
documented. []</a:documentation>
         <ref name="content.content"/>
         <ref name="content.localattributes"/>
      </element>
   </define>
   <define name="content.content">
      <zeroOrMore>
         <group>
            <ref name="macro.schemaPattern"/>
         </group>
      </zeroOrMore>
   </define>
   <define name="content.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="autoPrefix"
                    a:defaultValue="true">
            <a:documentation>controls whether or not pattern names generated in the
corresponding RELAXNG schema source are automatically prefixed to
avoid potential nameclashes. </a:documentation>
            <choice>
               <value>true</value>
               <a:documentation>Each name referenced in e.g. a rng:ref
	  element within a content model is automatically prefixed by
	  the value of the prefix attribute on the current
	  schemaSpec
               </a:documentation>
               <value>false</value>
               <a:documentation>No prefixes are added: 
 any prefix required by the value of the prefix attribute on the current
	  schemaSpec must therefore be supplied explicitly, as appropriate. </a:documentation>
            </choice>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="datatype">
      <element name="datatype">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies the declared value for an attribute, by referring to
  any datatype defined by the chosen schema language. [ ]</a:documentation>
         <ref name="datatype.content"/>
         <ref name="datatype.localattributes"/>
      </element>
   </define>
   <define name="datatype.content">
      <zeroOrMore>
         <group>
            <ref name="macro.schemaPattern"/>
         </group>
      </zeroOrMore>
   </define>
   <define name="datatype.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="minOccurs"
                    a:defaultValue="1">
            <a:documentation>(minimum number of occurences) indicates the minimum number of times this datatype may
      occur in the specification of the attribute being defined</a:documentation>
            <ref name="data.count"/>
         </attribute>
      </optional>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="maxOccurs"
                    a:defaultValue="1">
            <a:documentation>(maximum number of occurences) indicates the maximum number of times this datatype may
      occur in the specification of the attribute being defined</a:documentation>
            <choice>
               <ref name="data.count"/>
               <value>unbounded</value>
            </choice>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="defaultVal">
      <element name="defaultVal">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(default value) specifies the default declared value for an attribute. []</a:documentation>
         <ref name="defaultVal.content"/>
         <ref name="defaultVal.localattributes"/>
      </element>
   </define>
   <define name="defaultVal.content">
      <text/>
   </define>
   <define name="defaultVal.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <define name="eg">
      <element name="eg">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(example) contains any kind of illustrative example.  [ ]</a:documentation>
         <ref name="eg.content"/>
         <ref name="eg.localattributes"/>
      </element>
   </define>
   <define name="eg.content">
      <text/>
   </define>
   <define name="eg.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <define name="egXML">
      <element name="egXML" ns="http://www.tei-c.org/ns/Examples">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(example of XML) contains a single well-formed XML fragment demonstrating the use of some XML element or
    attribute, in which the egXML element itself functions as the root element.  []</a:documentation>
         <ref name="egXML.content"/>
         <ref name="egXML.localattributes"/>
      </element>
   </define>
   <define name="egXML.content">
      <zeroOrMore>
         <group>
            <choice>
               <text/>
               <ref name="macro.anyXML"/>
            </choice>
         </group>
      </zeroOrMore>
   </define>
   <define name="egXML.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.source.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="valid"
                    a:defaultValue="true">
            <a:documentation>indicates the intended validity of the example with respect to
a schema.</a:documentation>
            <choice>
               <value>true</value>
               <a:documentation>the example is intended to be fully valid,
assuming that its root element, or a provided root element, 
could have been used as a possible root element in the schema concerned.</a:documentation>
               <value>feasible</value>
               <a:documentation>the example could be transformed into
a valid document by inserting any number of valid attributes and child
elements anywhere within it; or it is valid against a version of the
schema concerned in which the provision of character data, list, element, or attribute
values has been made optional.</a:documentation>
               <value>false</value>
               <a:documentation>the example is not intended to be valid,
and contains deliberate errors.</a:documentation>
            </choice>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="elementRef">
      <element name="elementRef">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">points to the specification for some element which is to be included in a schema</a:documentation>
         <ref name="elementRef.content"/>
         <ref name="elementRef.localattributes"/>
      </element>
   </define>
   <define name="elementRef.content">
      <empty/>
   </define>
   <define name="elementRef.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.readFrom.attributes"/>
      <attribute name="key">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the identifier used for the required element within the
	source indicated.</a:documentation>
         <data type="NCName"/>
      </attribute>
      <empty/>
   </define>
   <define name="elementSpec">
      <element name="elementSpec">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(element specification) documents the structure, content, and purpose of a single element type. [ ]</a:documentation>
         <ref name="elementSpec.content"/>
         <ref name="elementSpec.localattributes"/>
      </element>
   </define>
   <define name="elementSpec.content">
      <group>
         <zeroOrMore>
            <choice>
               <ref name="model.glossLike"/>
               <ref name="model.descLike"/>
            </choice>
         </zeroOrMore>
         <optional>
            <ref name="classes"/>
         </optional>
         <optional>
            <ref name="content"/>
         </optional>
         <optional>
            <ref name="valList"/>
         </optional>
         <zeroOrMore>
            <ref name="constraintSpec"/>
         </zeroOrMore>
         <optional>
            <ref name="attList"/>
         </optional>
         <zeroOrMore>
            <ref name="exemplum"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="remarks"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="listRef"/>
         </zeroOrMore>
      </group>
    
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               id="elementSpec-constraint-elementspec-in-module">
         <rule context="tei:elementSpec">
            <assert xmlns:s="http://www.ascc.net/xml/schematron"
                    xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                    xmlns:rng="http://relaxng.org/ns/structure/1.0"
                    test="not( @module )                or                //tei:moduleSpec[ @ident = current()/@module ]                or                //tei:moduleRef[ @key = current()/@module ]">
On element <name/> the value of the module attribute ("<value-of select="@module"/>")
should correspond to an existing module, via a moduleSpec or moduleRef</assert>
         </rule>
      </pattern>
    
  </define>
   <define name="elementSpec.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.identified.attributes"/>
      <ref name="att.namespaceable.attributes"/>
      <optional>
         <attribute name="prefix">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies a default prefix which will be prepended to all patterns
      relating to the element, unless otherwise stated. 
      </a:documentation>
            <choice>
               <value/>
               <ref name="data.name"/>
            </choice>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="equiv">
      <element name="equiv">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(equivalent) specifies a component which is considered equivalent to the parent element, either by
    co-reference, or by external link. [   ]</a:documentation>
         <ref name="equiv.content"/>
         <ref name="equiv.localattributes"/>
      </element>
   </define>
   <define name="equiv.content">
      <empty/>
   </define>
   <define name="equiv.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.internetMedia.attributes"/>
      <optional>
         <attribute name="name">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">a single word which follows the rules defining a
        legal XML name (see ), naming the underlying concept of which the parent is a representation.</a:documentation>
            <ref name="data.name"/>
         </attribute>
      </optional>
      <optional>
         <attribute name="uri">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(uniform resource identifier) references the underlying concept of which the parent is a representation by means of
        some external identifier</a:documentation>
            <ref name="data.pointer"/>
         </attribute>
      </optional>
      <optional>
         <attribute name="filter">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">references an external script which contains a method to transform instances of this
        element to canonical TEI </a:documentation>
            <ref name="data.pointer"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="exemplum">
      <element name="exemplum">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">groups an example demonstrating the use of an element along with optional paragraphs of
    commentary. []</a:documentation>
         <ref name="exemplum.content"/>
         <ref name="exemplum.localattributes"/>
      </element>
   </define>
   <define name="exemplum.content">
      <group>
         <zeroOrMore>
            <ref name="model.pLike"/>
         </zeroOrMore>
         <choice>
            <ref name="egXML"/>
            <ref name="eg"/>
         </choice>
         <zeroOrMore>
            <ref name="model.pLike"/>
         </zeroOrMore>
      </group>
   </define>
   <define name="exemplum.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.typed.attributes"/>
      <ref name="att.translatable.attributes"/>
      <empty/>
   </define>
   <define name="gi">
      <element name="gi">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(element name) contains the name (generic identifier) of an element. [ ]</a:documentation>
         <ref name="gi.content"/>
         <ref name="gi.localattributes"/>
      </element>
   </define>
   <define name="gi.content">
      <ref name="data.name"/>
   </define>
   <define name="gi.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="scheme"
                    a:defaultValue="TEI">
            <a:documentation>supplies the name of the scheme in which this name is defined.
Sample values include: 1] TEI(text encoding initiative) ; 2] DBK(docbook) ; 3] XX(unknown) ; 4] Schematron; 5] HTML</a:documentation>
            <ref name="data.enumerated"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="ident">
      <element name="ident">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(identifier) contains an identifier or name for an object of some kind in a formal language. ident is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages. []</a:documentation>
         <ref name="ident.content"/>
         <ref name="ident.localattributes"/>
      </element>
   </define>
   <define name="ident.content">
      <text/>
   </define>
   <define name="ident.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.typed.attributes"/>
      <empty/>
   </define>
   <define name="listRef">
      <element name="listRef">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(list of references) supplies a list of significant references to places where this element is discussed, in the
    current document or elsewhere.</a:documentation>
         <ref name="listRef.content"/>
         <ref name="listRef.localattributes"/>
      </element>
   </define>
   <define name="listRef.content">
      <oneOrMore>
         <ref name="ptr"/>
      </oneOrMore>
   </define>
   <define name="listRef.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <define name="macroRef">
      <element name="macroRef">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">points to the specification for some pattern which is to be included in a schema</a:documentation>
         <ref name="macroRef.content"/>
         <ref name="macroRef.localattributes"/>
      </element>
   </define>
   <define name="macroRef.content">
      <empty/>
   </define>
   <define name="macroRef.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.readFrom.attributes"/>
      <attribute name="key">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the identifier used for the required pattern within the
	source indicated.</a:documentation>
         <data type="NCName"/>
      </attribute>
      <empty/>
   </define>
   <define name="macroSpec">
      <element name="macroSpec">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(macro specification) documents the function and implementation of a pattern. </a:documentation>
         <ref name="macroSpec.content"/>
         <ref name="macroSpec.localattributes"/>
      </element>
   </define>
   <define name="macroSpec.content">
      <group>
         <zeroOrMore>
            <choice>
               <ref name="model.glossLike"/>
               <ref name="model.descLike"/>
            </choice>
         </zeroOrMore>
         <zeroOrMore>
            <choice>
               <ref name="content"/>
               <ref name="valList"/>
            </choice>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="constraintSpec"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="exemplum"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="remarks"/>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="listRef"/>
         </zeroOrMore>
      </group>
    
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               id="macroSpec-constraint-macrospec-in-module">
         <rule context="tei:macroSpec">
            <assert xmlns:s="http://www.ascc.net/xml/schematron"
                    xmlns:sch="http://purl.oclc.org/dsdl/schematron"
                    xmlns:rng="http://relaxng.org/ns/structure/1.0"
                    test="not( @module )               or               //tei:moduleSpec[ @ident = current()/@module ]               or               //tei:moduleRef[ @key = current()/@module ]">Macro <value-of select="@ident"/>: the value of the module attribute  ("<value-of select="@module"/>")
should correspond to an existing module, via a moduleSpec or moduleRef</assert>
         </rule>
      </pattern>
    
  </define>
   <define name="macroSpec.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.identified.attributes"/>
      <optional>
         <attribute name="type">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates which type of entity should be generated, when an ODD
	processor is generating a module using XML DTD syntax.</a:documentation>
            <choice>
               <value>pe</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(parameter entity) </a:documentation>
               <value>dt</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(datatype entity) </a:documentation>
            </choice>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="memberOf">
      <element name="memberOf">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies class membership of the documented element or class.</a:documentation>
         <ref name="memberOf.content"/>
         <ref name="memberOf.localattributes"/>
      </element>
   </define>
   <define name="memberOf.content">
      <ref name="macro.xtext"/>
   </define>
   <define name="memberOf.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute name="key">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies the identifier for a class of which the documented element or class is a
        member or subclass</a:documentation>
            <ref name="data.name"/>
         </attribute>
      </optional>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="mode"
                    a:defaultValue="add">
            <a:documentation>specifies the effect of this declaration on its parent module.</a:documentation>
            <choice>
               <value>add</value>
               <a:documentation>this declaration is added to the current definitions</a:documentation>
               <value>delete</value>
               <a:documentation>this declaration and all of its children are removed from the current setup</a:documentation>
            </choice>
         </attribute>
      </optional>
      <optional>
         <attribute name="max">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies the maximum number of times the element can occur in elements which use this model class in their content model</a:documentation>
            <ref name="data.numeric"/>
         </attribute>
      </optional>
      <optional>
         <attribute name="min">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies the minumum number of times the element must occur in elements which use this model class in their content model</a:documentation>
            <ref name="data.numeric"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="moduleRef">
      <element name="moduleRef">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(module reference) references a module which is to be incorporated into a schema.</a:documentation>
         <ref name="moduleRef.content"/>
         <ref name="moduleRef.localattributes"/>
      </element>
   </define>
   <define name="moduleRef.content">
      <optional>
         <ref name="content"/>
      </optional>
    
      <pattern xmlns="http://purl.oclc.org/dsdl/schematron" id="moduleRef-constraint-modref">
         <rule xmlns:s="http://www.ascc.net/xml/schematron"
               xmlns:sch="http://purl.oclc.org/dsdl/schematron"
               xmlns:rng="http://relaxng.org/ns/structure/1.0"
               context="tei:moduleRef">
            <report test="* and @key">
Child elements of <name/> are only allowed when an external module is being loaded
        </report>
         </rule>
      </pattern>
    
  </define>
   <define name="moduleRef.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.readFrom.attributes"/>
      <optional>
         <attribute name="prefix">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies a default prefix which will be
      prepended to all patterns from the imported module</a:documentation>
            <data type="NCName"/>
         </attribute>
      </optional>
        
          <pattern xmlns="http://purl.oclc.org/dsdl/schematron"
               id="prefix-constraint-not-same-prefix">
         <rule xmlns:s="http://www.ascc.net/xml/schematron"
               xmlns:sch="http://purl.oclc.org/dsdl/schematron"
               xmlns:rng="http://relaxng.org/ns/structure/1.0"
               context="tei:moduleRef">
	           <report test="//*[ not( generate-id(.) eq generate-id(      current() ) ) ]/@prefix = @prefix">The prefix attribute
	    of <name/> should not match that of any other
	    element (it would defeat the purpose)</report>
          </rule>
      </pattern>
        
      <choice>
         <optional>
            <attribute name="include">
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies a list of the elements which are to be copied from the
specified module into the schema being defined.</a:documentation>
               <list>
                  <zeroOrMore>
                     <data type="NCName"/>
                  </zeroOrMore>
               </list>
            </attribute>
         </optional>
         <optional>
            <attribute name="except">
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">supplies a list of the elements which are not to be copied from the
specified module into the schema being defined.</a:documentation>
               <list>
                  <zeroOrMore>
                     <data type="NCName"/>
                  </zeroOrMore>
               </list>
            </attribute>
         </optional>
      </choice>
      <choice>
         <optional>
            <attribute name="key">
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">the name of a TEI module</a:documentation>
               <data type="NCName"/>
            </attribute>
         </optional>
         <optional>
            <attribute name="url">
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(uniform resource locator) refers to a non-TEI module of RELAX NG code by external location </a:documentation>
               <ref name="data.pointer"/>
            </attribute>
         </optional>
      </choice>
      <empty/>
   </define>
   <define name="moduleSpec">
      <element name="moduleSpec">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(module specification) documents the structure, content, and purpose of a single
module, i.e. a named and externally visible group of declarations.</a:documentation>
         <ref name="moduleSpec.content"/>
         <ref name="moduleSpec.localattributes"/>
      </element>
   </define>
   <define name="moduleSpec.content">
      <group>
         <zeroOrMore>
            <ref name="model.glossLike"/>
         </zeroOrMore>
         <oneOrMore>
            <ref name="model.descLike"/>
         </oneOrMore>
         <zeroOrMore>
            <ref name="exemplum"/>
         </zeroOrMore>
         <optional>
            <ref name="remarks"/>
         </optional>
         <zeroOrMore>
            <ref name="listRef"/>
         </zeroOrMore>
      </group>
   </define>
   <define name="moduleSpec.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.identified.attributes"/>
      <ref name="att.typed.attributes"/>
      <empty/>
   </define>
   <define name="remarks">
      <element name="remarks">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains any commentary or discussion about the usage of an element, attribute, class, or
    entity not otherwise documented within the containing element. [   ]</a:documentation>
         <ref name="remarks.content"/>
         <ref name="remarks.localattributes"/>
      </element>
   </define>
   <define name="remarks.content">
      <oneOrMore>
         <ref name="model.pLike"/>
      </oneOrMore>
   </define>
   <define name="remarks.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.translatable.attributes"/>
      <empty/>
   </define>
   <define name="schemaSpec">
      <element name="schemaSpec">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(schema specification) generates a TEI-conformant schema and documentation for it.</a:documentation>
         <ref name="schemaSpec.content"/>
         <ref name="schemaSpec.localattributes"/>
      </element>
   </define>
   <define name="schemaSpec.content">
      <group>
         <zeroOrMore>
            <choice>
               <ref name="model.glossLike"/>
               <ref name="model.descLike"/>
            </choice>
         </zeroOrMore>
         <zeroOrMore>
            <choice>
               <ref name="model.oddRef"/>
               <ref name="model.oddDecl"/>
            </choice>
         </zeroOrMore>
         <zeroOrMore>
            <ref name="constraintSpec"/>
         </zeroOrMore>
      </group>
   </define>
   <define name="schemaSpec.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.identified.attributes"/>
      <ref name="att.namespaceable.attributes"/>
      <ref name="att.readFrom.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="start"
                    a:defaultValue="TEI">
            <a:documentation>specifies entry points to the schema, i.e. which elements
      may be used as the root of documents conforming to
      it. </a:documentation>
            <list>
               <oneOrMore>
                  <ref name="data.name"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
      <optional>
         <attribute name="prefix">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies a default prefix which will be prepended to all
      patterns relating to TEI elements, unless otherwise stated.</a:documentation>
            <choice>
               <value/>
               <ref name="data.name"/>
            </choice>
         </attribute>
      </optional>
      <optional>
         <attribute name="targetLang">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(target language) specifies which language to use when creating
      the objects in a schema if names for elements or attributes are available in more
      than one language</a:documentation>
            <ref name="data.language"/>
         </attribute>
      </optional>
      <optional>
         <attribute name="docLang">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(documentation language) specifies which languages to
      use when creating documentation if  the description for an element, attribute, class or macro
      is available in more than one language</a:documentation>
            <list>
               <oneOrMore>
                  <ref name="data.language"/>
               </oneOrMore>
            </list>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="specDesc">
      <element name="specDesc">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(specification description) indicates that a description of the specified element or class should be included at this
    point within a document.</a:documentation>
         <ref name="specDesc.content"/>
         <ref name="specDesc.localattributes"/>
      </element>
   </define>
   <define name="specDesc.content">
      <empty/>
   </define>
   <define name="specDesc.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute name="key">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(identifier) supplies the identifier of the documentary element or class for which a description is
        to be obtained.</a:documentation>
            <ref name="data.name"/>
         </attribute>
      </optional>
      <optional>
         <attribute name="atts">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(attributes) supplies attribute names for which descriptions should additionally be obtained.</a:documentation>
            <list>
               <zeroOrMore>
                  <ref name="data.name"/>
               </zeroOrMore>
            </list>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="specGrp">
      <element name="specGrp">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(specification group) contains any convenient grouping of specifications for use within
  the current module.</a:documentation>
         <ref name="specGrp.content"/>
         <ref name="specGrp.localattributes"/>
      </element>
   </define>
   <define name="specGrp.content">
      <zeroOrMore>
         <choice>
            <ref name="model.oddDecl"/>
            <ref name="model.oddRef"/>
            <ref name="model.divPart"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="specGrp.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <define name="specGrpRef">
      <element name="specGrpRef">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(reference to a specification group) indicates that the declarations contained by the specGrp referenced should be
    inserted at this point.</a:documentation>
         <ref name="specGrpRef.content"/>
         <ref name="specGrpRef.localattributes"/>
      </element>
   </define>
   <define name="specGrpRef.content">
      <empty/>
   </define>
   <define name="specGrpRef.localattributes">
      <ref name="att.global.attributes"/>
      <attribute name="target">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">points at the specification group which logically belongs here.</a:documentation>
         <ref name="data.pointer"/>
      </attribute>
      <empty/>
   </define>
   <define name="specList">
      <element name="specList">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(specification list) marks where a list of descriptions is to be inserted into the prose documentation.</a:documentation>
         <ref name="specList.content"/>
         <ref name="specList.localattributes"/>
      </element>
   </define>
   <define name="specList.content">
      <oneOrMore>
         <ref name="specDesc"/>
      </oneOrMore>
   </define>
   <define name="specList.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <define name="tag">
      <element name="tag">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">contains text of a complete start- or end-tag, possibly including attribute specifications,
    but excluding the opening and closing markup delimiter characters. []</a:documentation>
         <ref name="tag.content"/>
         <ref name="tag.localattributes"/>
      </element>
   </define>
   <define name="tag.content">
      <text/>
   </define>
   <define name="tag.localattributes">
      <ref name="att.global.attributes"/>
      <optional>
         <attribute name="type">
            <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">indicates the type of XML tag intended</a:documentation>
            <choice>
               <value>start</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">a start-tag, with delimiters &lt; and &gt; is intended</a:documentation>
               <value>end</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">an end-tag, with delimiters &lt;/ and &gt; is intended</a:documentation>
               <value>empty</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">a empty tag, with delimiters &lt; and /&gt; is intended</a:documentation>
               <value>pi</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">a pi (processing instruction), with delimiters &lt;? and ?&gt; is intended</a:documentation>
               <value>comment</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">a comment, with delimiters &lt;!-- and --&gt; is intended</a:documentation>
               <value>ms</value>
               <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">a marked-section, with delimiters &lt;[CDATA[ and ]]&gt; is intended</a:documentation>
            </choice>
         </attribute>
      </optional>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="scheme"
                    a:defaultValue="TEI">
            <a:documentation>supplies the name of the schema in which this tag is defined.
Sample values include: 1] TEI(text encoding initiative) ; 2] DBK(docbook) ; 3] XX(unknown) ; 4] Schematron; 5] HTML</a:documentation>
            <ref name="data.enumerated"/>
         </attribute>
      </optional>
      <empty/>
   </define>
   <define name="val">
      <element name="val">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(value) contains a single attribute value. [ ]</a:documentation>
         <ref name="val.content"/>
         <ref name="val.localattributes"/>
      </element>
   </define>
   <define name="val.content">
      <text/>
   </define>
   <define name="val.localattributes">
      <ref name="att.global.attributes"/>
      <empty/>
   </define>
   <define name="valDesc">
      <element name="valDesc">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(value description) specifies any semantic or syntactic constraint on the value that
an attribute may take, additional to the information carried by the
datatype element. []</a:documentation>
         <ref name="valDesc.content"/>
         <ref name="valDesc.localattributes"/>
      </element>
   </define>
   <define name="valDesc.content">
      <ref name="macro.phraseSeq.limited"/>
   </define>
   <define name="valDesc.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.translatable.attributes"/>
      <ref name="att.combinable.attributes"/>
      <empty/>
   </define>
   <define name="valItem">
      <element name="valItem">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">documents a single value in a predefined list of values. []</a:documentation>
         <ref name="valItem.content"/>
         <ref name="valItem.localattributes"/>
      </element>
   </define>
   <define name="valItem.content">
      <zeroOrMore>
         <choice>
            <ref name="model.descLike"/>
            <ref name="model.glossLike"/>
         </choice>
      </zeroOrMore>
   </define>
   <define name="valItem.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.combinable.attributes"/>
      <attribute name="ident">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">specifies the value concerned.</a:documentation>
         <text/>
      </attribute>
      <empty/>
   </define>
   <define name="valList">
      <element name="valList">
         <a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(value list) contains one or more valItem elements defining
  possible values. []</a:documentation>
         <ref name="valList.content"/>
         <ref name="valList.localattributes"/>
      </element>
   </define>
   <define name="valList.content">
      <zeroOrMore>
         <ref name="valItem"/>
      </zeroOrMore>
   </define>
   <define name="valList.localattributes">
      <ref name="att.global.attributes"/>
      <ref name="att.combinable.attributes"/>
      <optional>
         <attribute xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" name="type"
                    a:defaultValue="open">
            <a:documentation>specifies the extensibility of the list of values specified. </a:documentation>
            <choice>
               <value>closed</value>
               <a:documentation>only the values specified are permitted.</a:documentation>
               <value>semi</value>
               <a:documentation>(semi-open) all the values specified should be supported, but other values are legal and
            software should have appropriate fallback processing for them. </a:documentation>
               <value>open</value>
               <a:documentation>the values specified are sample values only.</a:documentation>
            </choice>
         </attribute>
      </optional>
      <empty/>
   </define>
   <!--3. macros--><define name="macro.anyXML">
      <element>
         <anyName>
            <except>
               <nsName ns="http://www.tei-c.org/ns/1.0"/>
               <name ns="http://www.tei-c.org/ns/Examples">egXML</name>
            </except>
         </anyName>
         <zeroOrMore>
            <attribute>
               <anyName/>
            </attribute>
         </zeroOrMore>
         <zeroOrMore>
            <choice>
               <text/>
               <ref name="macro.anyXML"/>
            </choice>
         </zeroOrMore>
      </element>
   </define>
   <define name="macro.schemaPattern">
      <group>
         <ref name="macro.anyXML"/>
      </group>
   </define>
</grammar>