<schemaSpec>

<schemaSpec> (schema specification) generates a TEI-conformant schema and documentation for it.
Module tagdocs — 22 Documentation Elements
In addition to global attributes att.identified (@ident, @predeclare, @module, @mode)
start specifies entry points to the schema, i.e. which elements are allowed to be used as the root of documents conforming to it.
Status Optional
Datatype 1–∞ occurrences of 

<rng:ref name="data.name"/>
data.name
separated by whitespace
ns (namespace) specifies the default namespace (if any) applicable to components of the schema.
Status Optional
Datatype

<rng:ref name="data.namespace"/>
data.namespace
prefix specifies a prefix which will be appended to all patterns relating to TEI elements. This allows for external schemas to be mixed in which have elements of the same names as the TEI.
Status Optional
Datatype

<rng:choice>
 <rng:value/>
 <rng:ref name="data.name"/>
</rng:choice>
"" | data.name
Note
Colons, although permitted inside the value, will cause an invalid schema to be generated.
targetLang (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, .
Status Optional
Datatype

<rng:ref name="data.language"/>
data.language
docLang (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, .
Status Optional
Datatype 1–∞ occurrences of 

<rng:ref name="data.language"/>
data.language
separated by whitespace
Used by
May contain
Declaration

<rng:element name="schemaSpec">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.identified.attributes"/>
 <rng:optional>
  <rng:attribute name="start" a:defaultValue="TEI">
   <rng:list>
    <rng:oneOrMore>
     <rng:ref name="data.name"/>
    </rng:oneOrMore>
   </rng:list>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="ns"
    a:defaultValue="http://www.tei-c.org/ns/1.0">

   <rng:ref name="data.namespace"/>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="prefix">
   <rng:choice>
    <rng:value/>
    <rng:ref name="data.name"/>
   </rng:choice>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="targetLang">
   <rng:ref name="data.language"/>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="docLang">
   <rng:list>
    <rng:oneOrMore>
     <rng:ref name="data.language"/>
    </rng:oneOrMore>
   </rng:list>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:zeroOrMore>
   <rng:ref name="model.glossLike"/>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:choice>
    <rng:ref name="moduleRef"/>
    <rng:ref name="specGrpRef"/>
    <rng:ref name="model.oddDecl"/>
   </rng:choice>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:ref name="constraintSpec"/>
  </rng:zeroOrMore>
 </rng:group>
</rng:element>
element schemaSpec
{
   att.global.attributes,
   att.identified.attributes,
   attribute start { list { data.name+ } }?,
   attribute ns { data.namespace }?,
   attribute prefix { "" | data.name }?,
   attribute targetLang { data.language }?,
   attribute docLang { list { data.language+ } }?,
   (
      model.glossLike*,
      ( moduleRef | specGrpRef | model.oddDecl )*,
      constraintSpec*
   )
}
Example
<schemaSpec prefix="TEI_" ident="testsvg" start="TEI svg">
 <moduleRef key="header"/>
 <moduleRef key="core"/>
 <moduleRef key="tei"/>
 <moduleRef key="textstructure"/>
 <moduleRef url="svg11.rng"/>
</schemaSpec>
Note
A schema combines references to modules or specification groups with other atomic declarations. The processing of a schema element must resolve any conflicts amongst the declarations it contains or references. Different ODD processors may generate schemas and documentation using different concrete syntaxes.