<elementSpec>

<elementSpec> 紀錄單一元素類型的結構、內容、以及用途。 [23.5 Element Specifications 23 Documentation Elements]
組件 tagdocs — Documentation Elements
屬性
prefix⚓︎ specifies a default prefix which will be prepended to all patterns relating to the element, unless otherwise stated.
狀態 非必備的
資料類型 0–1 次可出現: teidata.xmlName 以空白鍵隔開
俱乐部会员
可包含在於
可包含
例子
<elementSpec module="tagdocsident="code">
 <gloss/>
 <desc>包含文字規則</desc>
 <classes>
  <memberOf key="model.emphLike"/>
 </classes>
 <content>
  <textNode/>
 </content>
 <attList>
  <attDef ident="typeusage="opt">
   <desc>規則的表達方式</desc>
   <datatype>
    <dataRef key="teidata.enumerated"/>
   </datatype>
  </attDef>
 </attList>
</elementSpec>
Schematron

<sch:rule context="tei:elementSpec[ @mode eq 'delete' ]">
<sch:report test="child::*">This elementSpec element has a mode= of "delete" even though it has child elements. Change the mode= to "add", "change", or "replace", or remove the child elements.</sch:report>
</sch:rule>
<sch:rule context="tei:elementSpec[ @mode = ('add','change','replace') ]">
<sch:assert test="child::* | (@* except (@mode, @ident))">This elementSpec element has a mode= of "<sch:value-of select="@mode"/>", but does not have any child elements or schema-changing attributes. Specify child elements, use validUntil=, predeclare=, ns=, or prefix=, or change the mode= to "delete".</sch:assert>
</sch:rule>
Content model
<content>
 <sequence>
  <alternate minOccurs="0"
   maxOccurs="unbounded">

   <classRef key="model.identSynonyms"/>
   <classRef key="model.descLike"/>
  </alternate>
  <elementRef key="classesminOccurs="0"/>
  <elementRef key="contentminOccurs="0"/>
  <elementRef key="valListminOccurs="0"/>
  <elementRef key="constraintSpec"
   minOccurs="0maxOccurs="unbounded"/>

  <elementRef key="attListminOccurs="0"/>
  <alternate maxOccurs="unbounded"
   minOccurs="0">

   <elementRef key="model"/>
   <elementRef key="modelGrp"/>
   <elementRef key="modelSequence"/>
  </alternate>
  <elementRef key="exemplumminOccurs="0"
   maxOccurs="unbounded"/>

  <elementRef key="remarksminOccurs="0"
   maxOccurs="unbounded"/>

  <elementRef key="listRefminOccurs="0"
   maxOccurs="unbounded"/>

 </sequence>
</content>
宣告
<rng:element name="elementSpec">
 <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:optional>
  <rng:attribute name="prefix">
   <rng:optional>
    <rng:ref name="teidata.xmlName"/>
   </rng:optional>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:zeroOrMore>
   <rng:choice>
    <rng:ref name="model.identSynonyms"/>
    <rng:ref name="model.descLike"/>
   </rng:choice>
  </rng:zeroOrMore>
  <rng:optional>
   <rng:ref name="classes"/>
  </rng:optional>
  <rng:optional>
   <rng:ref name="content"/>
  </rng:optional>
  <rng:optional>
   <rng:ref name="valList"/>
  </rng:optional>
  <rng:zeroOrMore>
   <rng:ref name="constraintSpec"/>
  </rng:zeroOrMore>
  <rng:optional>
   <rng:ref name="attList"/>
  </rng:optional>
  <rng:zeroOrMore>
   <rng:choice>
    <rng:ref name="model"/>
    <rng:ref name="modelGrp"/>
    <rng:ref name="modelSequence"/>
   </rng:choice>
  </rng:zeroOrMore>
  <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 elementSpec
{
   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,
   attribute prefix { teidata.xmlName? }?,
   (
      ( model.identSynonyms | model.descLike )*,
      classes?,
      content?,
      valList?,
      constraintSpec*,
      attList?,
      ( model | modelGrp | modelSequence )*,
      exemplum*,
      remarks*,
      listRef*
   )
}