<classSpec>

<classSpec> 包含一個TEI元素集的參照資訊;元素集是一群在內容模組中同時出現、或共用某些屬性、或兩者皆包括的元素。
組件 tagdocs — 22 Documentation Elements
除全域屬性以外 att.identified (@ident, @predeclare, @module) (att.combinable (@mode))
type 指出這是結構元素集或是屬性元素集。
狀態 必備的
合法的值是:
model
(content model) 該元素集的元素出現在相同的內容模組中
atts
(attributes) 該元素集的元素有共用的屬性
generate 說明應該建立結構元素集的哪些替換及順序作業實例。在預設的情形下,會提供所有的變數。
狀態 非必備的
資料類型 1–5 次可出現: 

<rng:ref name="data.enumerated"/>
data.enumerated
以空白鍵隔開
合法的值是:
alternation
該元素集的元素是替換元素
sequence
該元素集的元素會依序呈現
sequenceOptional
該元素集的元素可依序呈現,但非必須
sequenceOptionalRepeatable
該元素集的元素可一次或多次依序呈現,但非必須
sequenceRepeatable
該元素集的元素可一次或多次依序呈現
屬於
可包含
宣告

<rng:element name="classSpec">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.identified.attributes"/>
 <rng:ref name="att.combinable.attributes"/>
 <rng:attribute name="type">
  <rng:choice>
   <rng:value>model</rng:value>
   <rng:value>atts</rng:value>
  </rng:choice>
 </rng:attribute>
 <rng:optional>
  <rng:attribute name="generate">
   <rng:list>
    <rng:choice>
     <rng:value>alternation</rng:value>
     <rng:value>sequence</rng:value>
     <rng:value>sequenceOptional</rng:value>
     <rng:value>sequenceOptionalRepeatable</rng:value>
     <rng:value>sequenceRepeatable</rng:value>
    </rng:choice>
    <rng:optional>
     <rng:choice>
      <rng:value>alternation</rng:value>
      <rng:value>sequence</rng:value>
      <rng:value>sequenceOptional</rng:value>
      <rng:value>sequenceOptionalRepeatable</rng:value>
      <rng:value>sequenceRepeatable</rng:value>
     </rng:choice>
    </rng:optional>
    <rng:optional>
     <rng:choice>
      <rng:value>alternation</rng:value>
      <rng:value>sequence</rng:value>
      <rng:value>sequenceOptional</rng:value>
      <rng:value>sequenceOptionalRepeatable</rng:value>
      <rng:value>sequenceRepeatable</rng:value>
     </rng:choice>
    </rng:optional>
    <rng:optional>
     <rng:choice>
      <rng:value>alternation</rng:value>
      <rng:value>sequence</rng:value>
      <rng:value>sequenceOptional</rng:value>
      <rng:value>sequenceOptionalRepeatable</rng:value>
      <rng:value>sequenceRepeatable</rng:value>
     </rng:choice>
    </rng:optional>
    <rng:optional>
     <rng:choice>
      <rng:value>alternation</rng:value>
      <rng:value>sequence</rng:value>
      <rng:value>sequenceOptional</rng:value>
      <rng:value>sequenceOptionalRepeatable</rng:value>
      <rng:value>sequenceRepeatable</rng:value>
     </rng:choice>
    </rng:optional>
   </rng:list>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:zeroOrMore>
   <rng:ref name="model.glossLike"/>
  </rng:zeroOrMore>
  <rng:optional>
   <rng:ref name="classes"/>
  </rng:optional>
  <rng:zeroOrMore>
   <rng:ref name="constraintSpec"/>
  </rng:zeroOrMore>
  <rng:optional>
   <rng:ref name="attList"/>
  </rng:optional>
  <rng:zeroOrMore>
   <rng:ref name="exemplum"/>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:ref name="remarks"/>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:ref name="listRef"/>
  </rng:zeroOrMore>
 </rng:group>
</rng:element>
element classSpec
{
   att.global.attributes,
   att.identified.attributes,
   att.combinable.attributes,
   attribute type { "model" | "atts" },
   attribute generate
   {
      list
      {
         (
            "alternation"
          | "sequence"
          | "sequenceOptional"
          | "sequenceOptionalRepeatable"
          | "sequenceRepeatable"
         ),
         (
            "alternation"
          | "sequence"
          | "sequenceOptional"
          | "sequenceOptionalRepeatable"
          | "sequenceRepeatable"
         )?,
         (
            "alternation"
          | "sequence"
          | "sequenceOptional"
          | "sequenceOptionalRepeatable"
          | "sequenceRepeatable"
         )?,
         (
            "alternation"
          | "sequence"
          | "sequenceOptional"
          | "sequenceOptionalRepeatable"
          | "sequenceRepeatable"
         )?,
         (
            "alternation"
          | "sequence"
          | "sequenceOptional"
          | "sequenceOptionalRepeatable"
          | "sequenceRepeatable"
         )?
      }
   }?,
   (
      model.glossLike*,
      classes?,
      constraintSpec*,
      attList?,
      exemplum*,
      remarks*,
      listRef*
   )
}
例子
<classSpec module="tei" type="model" ident="model.segLike">
 <desc>匯集用於隨機分割的元素</desc>
 <classes>
  <memberOf key="model.phrase"/>
 </classes>
 <remarks>
  <p>The principles on which segmentation is carried out, and any special codes or attribute
     values used, should be defined explicitly in the <gi>segmentation</gi> element of the
  <gi>encodingDesc</gi> within the associated TEI header.</p>
 </remarks>
</classSpec>