<schemaSpec>

<schemaSpec> (schema specification) generates a TEI-conformant schema and documentation for it. [2.3 The Encoding Description 22.2 Modules and Schemas 23.5.1 Making a Unified ODD]
Moduletagdocs — Documentation Elements
Attributesatt.global (@xml:id, @n, @xml:lang, @xml:base, @xml:space) (att.global.rendition (@rend, @style, @rendition)) (att.global.linking (@corresp, @synch, @sameAs, @copyOf, @next, @prev, @exclude, @select)) (att.global.analytic (@ana)) (att.global.facs (@facs)) (att.global.change (@change)) (att.global.responsibility (@cert, @resp)) (att.global.source (@source)) att.identified (@ident, @predeclare, @module) (att.combinable (@mode) (att.deprecated (@validUntil)) ) att.namespaceable (@ns) att.docStatus (@status)
startspecifies entry points to the schema, i.e. which patterns may be used as the root of documents conforming to it.
Status Optional
Datatype 1–∞ occurrences of teidata.name separated by whitespace
Default TEI
prefixspecifies a default prefix which will be prepended to all patterns relating to TEI elements, unless otherwise stated.
Status Optional
Datatype 0–1 occurrences of teidata.xmlName separated by whitespace
Note

Use of this attribute allows an external schema which has an element with the same local name as a TEI element to be mixed in.

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 teidata.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 teidata.language separated by whitespace
defaultExceptions(default namespace exclusions) provides a list of namespaces and/or prefixed element names to be excluded by default from anyName in RelaxNG schemas
Status Recommended
Datatype 1–∞ occurrences of teidata.namespaceOrName separated by whitespace
Default http://www.tei-c.org/ns/1.0 teix:egXML
Note

Specifies defaults for the except attribute of anyElement. RelaxNG validation (unless DTD Compatibility Mode is turned off) requires that any elements which may take an xml:id be excluded from the content of anyName name classes. For normal TEI purposes, this includes anything in the TEI namespace and the egXML element. The defaultExceptions attribute sets the global defaults for these exclusions. Element prefixes must be declared using a namespace declaration on the parent or an ancestor element.

Member of
Contained by
May contain
Note

A schemaSpec combines references to modules, individual element or macro declarations, and specification groups together to form a unified schema. The processing of the schemaSpec element must resolve any conflicts amongst the declarations it contains or references. Different ODD processors may generate schemas and documentation using different concrete syntaxes.

The source may be specified in the form of a private URI, for which the form recommended is tei:x.y.z, where x.y.z indicates the version number, e.g. tei:1.5.1 for 1.5.1 release of TEI P5 or (as a special case) tei:current for whatever is the latest release. The context indicated must provide a set of TEI-conformant specifications in a form directly usable by an ODD processor. By default, this will be the location of the current release of the TEI Guidelines.

Example
<schemaSpec prefix="TEI_ident="testsvg"
 start="TEI svg">

 <moduleRef source="tei:current"
  key="header"/>

 <moduleRef key="core"/>
 <moduleRef key="drama"/>
 <moduleRef url="svg11.rng"/>
</schemaSpec>

This schema combines elements from the current versions of the drama and core modules, the current release version of the header module, and elements from an existing RELAX NG schema available from the URL indicated.

Content model
<content>
 <sequence>
  <alternate minOccurs="0"
   maxOccurs="unbounded">

   <classRef key="model.glossLike"/>
   <classRef key="model.descLike"/>
  </alternate>
  <alternate minOccurs="0"
   maxOccurs="unbounded">

   <classRef key="model.oddRef"/>
   <classRef key="model.oddDecl"/>
  </alternate>
 </sequence>
</content>
Schema Declaration
<rng:element name="schemaSpec">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.global.rendition.attributes"/>
 <rng:ref name="att.global.linking.attributes"/>
 <rng:ref name="att.global.analytic.attributes"/>
 <rng:ref name="att.global.facs.attributes"/>
 <rng:ref name="att.global.change.attributes"/>
 <rng:ref name="att.global.responsibility.attributes"/>
 <rng:ref name="att.global.source.attributes"/>
 <rng:ref name="att.identified.attributes"/>
 <rng:ref name="att.combinable.attributes"/>
 <rng:ref name="att.deprecated.attributes"/>
 <rng:ref name="att.namespaceable.attributes"/>
 <rng:ref name="att.docStatus.attributes"/>
 <rng:optional>
  <rng:attribute name="start"
   a:defaultValue="TEI">

   <rng:list>
    <rng:oneOrMore>
     <rng:ref name="teidata.name"/>
    </rng:oneOrMore>
   </rng:list>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="prefix">
   <rng:ref name="teidata.xmlName"/>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="targetLang">
   <rng:ref name="teidata.language"/>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="docLang">
   <rng:list>
    <rng:oneOrMore>
     <rng:ref name="teidata.language"/>
    </rng:oneOrMore>
   </rng:list>
  </rng:attribute>
 </rng:optional>
 <rng:optional>
  <rng:attribute name="defaultExceptions"
   a:defaultValue="http://www.tei-c.org/ns/1.0 teix:egXML">

   <rng:list>
    <rng:oneOrMore>
     <rng:ref name="teidata.namespaceOrName"/>
    </rng:oneOrMore>
   </rng:list>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:zeroOrMore>
   <rng:choice>
    <rng:ref name="model.glossLike"/>
    <rng:ref name="model.descLike"/>
   </rng:choice>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:choice>
    <rng:ref name="model.oddRef"/>
    <rng:ref name="model.oddDecl"/>
   </rng:choice>
  </rng:zeroOrMore>
 </rng:group>
</rng:element>
element schemaSpec
{
   att.global.attributes,
   att.global.rendition.attributes,
   att.global.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   att.global.responsibility.attributes,
   att.global.source.attributes,
   att.identified.attributes,
   att.combinable.attributes,
   att.deprecated.attributes,
   att.namespaceable.attributes,
   att.docStatus.attributes,
   attribute start { list { teidata.name+ } }?,
   attribute prefix { teidata.xmlName }?,
   attribute targetLang { teidata.language }?,
   attribute docLang { list { teidata.language+ } }?,
   attribute defaultExceptions { list { teidata.namespaceOrName+ } }?,
   ( ( model.glossLike | model.descLike )*, ( model.oddRef | model.oddDecl )* )
}