<elementSpec>

<elementSpec> 紀錄單一元素類型的結構、內容、以及用途。 22.4.4 Element Specifications 22 Documentation Elements
組件tagdocs — 22 Documentation Elements
屬性 att.identified (@ident, @predeclare, @module, @mode)
ns (名稱空間) 指明該元素所屬的名稱空間。
狀態 非必備的
資料類型

<rng:ref name="data.namespace"/>
data.namespace
usage指明屬性或元素的必備性。
狀態 非必備的
合法的值是:
req
(required)
mwa
(mandatory when applicable)
rec
(recommended)
rwa
(recommended when applicable)
opt
(optional) [預設值]
屬於
可包含
宣告

<rng:element name="elementSpec">
<rng:ref name="att.global.attributes"/>
<rng:ref name="att.identified.attributes"/>
<rng:optional>
 <rng:attribute name="ns"
   a:defaultValue="http://www.tei-c.org/ns/1.0">

  <rng:ref name="data.namespace"/>
 </rng:attribute>
</rng:optional>
<rng:optional>
 <rng:attribute name="usagea:defaultValue="opt">
  <rng:choice>
   <rng:value>req</rng:value>
   <rng:value>mwa</rng:value>
   <rng:value>rec</rng:value>
   <rng:value>rwa</rng:value>
   <rng:value>opt</rng:value>
  </rng:choice>
 </rng:attribute>
</rng:optional>
<rng:group>
 <rng:zeroOrMore>
  <rng:ref name="model.glossLike"/>
 </rng:zeroOrMore>
<!-- <rng:ref name="macro.glossSeq"/>-->
 <rng:optional>
  <rng:ref name="classes"/>
 </rng:optional>
 <rng:optional>
  <rng:ref name="content"/>
 </rng:optional>
 <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 elementSpec
{
   att.global.attributes,
   att.identified.attributes,
   attribute ns { data.namespace }?,
   attribute usage { "req" | "mwa" | "rec" | "rwa" | "opt" }?,
   (
      model.glossLike*,
      classes?,
      content?,
      attList?,
      exemplum*,
      remarks*,
      listRef*
   )
}
例子
<elementSpec
  module="tagdocs"
  xml:id="Code"
  usage="mwa"
  ident="code">

 <equiv/>
 <gloss/>
 <desc>contains literal code</desc>
 <classes>
  <memberOf key="model.emphLike"/>
 </classes>
 <content>
  <rng:text/>
 </content>
 <attList>
  <attDef ident="typeusage="opt">
   <equiv/>
   <desc>the language of the code</desc>
   <datatype>
    <rng:ref name="data.enumerated"/>
   </datatype>
  </attDef>
 </attList>
</elementSpec>