<attDef>

<attDef> (屬性定義) 包含單一屬性的定義。 [22.4.5 Attribute List Specification]
組件tagdocs — Documentation Elements
屬性att.global (@xml:id, @n, @xml:lang, @rend, @style, @rendition, @xml:base, @xml:space) (att.global.linking (@corresp, @synch, @sameAs, @copyOf, @next, @prev, @exclude, @select)) (att.global.analytic (@ana)) (att.global.facs (@facs)) (att.global.change (@change)) att.identified (@ident, @predeclare, @module, @status) (att.combinable (@mode) (att.deprecated (@validUntil)) )
usage說明屬性或元素的必備性。
狀態 非必備的
資料類型

<rng:ref name="data.enumerated"/>
data.enumerated
合法的值是:
req
(必備的)
mwa
(mandatory when applicable )
rec
(推薦的)
rwa
(可應用時必備的)
opt
(非必備的) [預設值]
ns (名稱空間) 指明該屬性所屬的名稱空間。
狀態 非必備的
資料類型

<rng:ref name="data.namespace"/>
data.namespace
預設值 http://www.tei-c.org/ns/1.0
俱乐部会员
可包含在於
tagdocs: attList
可包含
宣告

<rng:element name="attDef">
 <rng:ref name="att.global.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.identified.attributes"/>
 <rng:ref name="att.combinable.attributes"/>
 <rng:ref name="att.deprecated.attributes"/>
 <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: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:group>
  <rng:zeroOrMore>
   <rng:choice>
    <rng:ref name="model.glossLike"/>
    <rng:ref name="model.descLike"/>
   </rng:choice>
  </rng:zeroOrMore>
  <rng:optional>
   <rng:ref name="datatype"/>
  </rng:optional>
  <rng:zeroOrMore>
   <rng:ref name="constraintSpec"/>
  </rng:zeroOrMore>
  <rng:optional>
   <rng:ref name="defaultVal"/>
  </rng:optional>
  <rng:optional>
   <rng:choice>
    <rng:ref name="valList"/>
    <rng:oneOrMore>
     <rng:ref name="valDesc"/>
    </rng:oneOrMore>
   </rng:choice>
  </rng:optional>
  <rng:zeroOrMore>
   <rng:ref name="exemplum"/>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:ref name="remarks"/>
  </rng:zeroOrMore>
 </rng:group>
</rng:element>
element attDef
{
   att.global.attributes,
   att.global.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   att.identified.attributes,
   att.combinable.attributes,
   att.deprecated.attributes,
   attribute usage { "req" | "mwa" | "rec" | "rwa" | "opt" }?,
   attribute ns { data.namespace }?,
   (
      ( model.glossLike | model.descLike )*,
      datatype?,
      constraintSpec*,
      defaultVal?,
      ( valList | valDesc+ )?,
      exemplum*,
      remarks*
   )
}
Schematron

<s:assert
 test=" @mode eq 'change' or @mode eq 'delete' or tei:datatype or tei:valList[@type='closed'] ">
Attribute: the definition of the @<s:value-of select="@ident"/> attribute in the <s:value-of select="ancestor::*[@ident][1]/@ident"/>
<s:value-of select="' '"/>
<s:value-of select="local-name(ancestor::*[@ident][1])"/> should have a closed valList or a datatype</s:assert>
例子
<attDef usage="recident="type">
 <desc>具體指定慣例上使用的分部名稱,例如:
 <val></val>, <val></val>, <val></val>, <val></val>, <val>篇章</val>,
   等。</desc>
 <datatype>
  <rng:text/>
 </datatype>
</attDef>