<schemaSpec>

<schemaSpec> (schema specification) TEI準拠のスキーマや文書を示す. [2.3 The Encoding Description 22.2 Modules and Schemas 23.5.1 Making a Unified ODD]
モジュールtagdocs — Documentation Elements
属性att.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)
start当該スキーマの開始点を示す.すなわち,TEI準拠文書の根要素となる 要素を示す.
状態 任意
データ型 1–∞ occurrences of teidata.name 空白文字で区切られる
初期値 TEI
prefixTEI要素の全パタンに対応する接頭辞を示す.これにより,TEIと同じ名 前を持つ外部スキーマを混在させることができる.
状態 任意
データ型 0–1 occurrences of teidata.xmlName 空白文字で区切られる
解説

コロンは,値としては認められるが,スキーマ中では使用できない.

targetLang(target language) 要素や属性の名前が複数言語である場合には,スキーマ中の対象を作成 する際に使用される言語を特定する.
状態 任意
データ型 teidata.language
docLang(documentation language) 要素,属性,クラス,マクロの解説が複数言語で可能な場合,解説の言 語を特定する.
状態 任意
データ型 1–∞ occurrences of teidata.language 空白文字で区切られる
defaultExceptions(default namespace exclusions) provides a list of namespaces and/or prefixed element names to be excluded by default from anyName in RELAX NG schemas
状態 推薦される
データ型 1–∞ occurrences of teidata.namespaceOrName 空白文字で区切られる
初期値 http://www.tei-c.org/ns/1.0 teix:egXML
クラブのメンバー
上位
下位
解説

スキーマは,モジュールまたは規定集への参照と,他の原子的宣言とを関 連づける.スキーマ要素は,関連する宣言間の齟齬を調整しなければなら ない.ODDソフトウェアは,その種類によって,異なるスキーマや文書を 生成するかもしれない.

<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.

<schemaSpec ident="Bare-plus"
 source="tei_bare.compiled.oddstart="TEI">

 <moduleRef key="tei"/>
 <moduleRef key="header"/>
 <elementRef key="qsource="tei:3.0.0"/>
 <moduleRef key="textstructure"/>
</schemaSpec>

This schema starts with a pre-existing customization of the TEI called TEI Bare (a customization with a minimal selection of elements). The q element is not available in TEI Bare, but it can be brought back. In this case, we will get the version defined in TEI P5 release 3.0.0

Schematronenforces the deprecation of schemaSpec as a child of anything other than front, body, back, encodingDesc, div, or any of the numbered division elements.

<sch:rule context="tei:schemaSpec|teix:schemaSpec">
<sch:assert test=" parent::teix:egXML | parent::tei:encodingDesc | parent::teix:encodingDesc | parent::tei:front | parent::teix:front | parent::tei:back | parent::teix:back | parent::tei:body | parent::teix:body | parent::tei:div | parent::teix:div | parent::tei:div1 | parent::teix:div1 | parent::tei:div2 | parent::teix:div2 | parent::tei:div3 | parent::teix:div3 | parent::tei:div4 | parent::teix:div4 | parent::tei:div5 | parent::teix:div5 | parent::tei:div6 | parent::teix:div6 | parent::tei:div7 | parent::teix:div7"
 role="nonfatal">
WARNING: use of deprecated construct — the “schemaSpec” element will no longer be a valid child of “<sch:value-of select="name(..)"/>” as of 2021-10-23; instead, it should be a child of “front”, “body”, “back”, “encodingDesc”, or a division element.</sch:assert>
</sch:rule>
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>
宣言
<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 )* )
}