Skip to content

<schemaSpec>

schema specification

generates a TEI-conformant schema and documentation for it.

Attributes

@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
@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
@targetLangspecifies 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
@docLangspecifies 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
@defaultExceptionsprovides a list of namespaces and/or prefixed element names to be excluded by default from anyName in RELAX NG schemas.
Status
Recommended
Datatype
1–∞ occurrences of teidata.namespaceOrName separated by whitespace

Classes and content

Member of
May contain
Contained by

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 either contains or refers to. Different ODD processors may generate schemas and documentation using different concrete syntaxes.

The source may be specified (on the @source attribute) in the form of a private URI, for which the recommended format 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 source 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

<teix:schemaSpec prefix="TEI_" ident="testsvg" start="TEI svg">
  <teix:moduleRef source="tei:current" key="header"/>
  <teix:moduleRef key="core"/>
  <teix:moduleRef key="drama"/>
  <teix:moduleRef url="svg11.rng"/>
</teix: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.identEquiv"/>
        <classRef key="model.descLike"/>
      </alternate>
      <alternate minOccurs="0" maxOccurs="unbounded">
        <elementRef key="constraintDecl"/>
        <classRef key="model.oddRef"/>
        <classRef key="model.oddDecl"/>
        <elementRef key="listRef"/>
      </alternate>      
    </sequence>
  </content>