<datatype>

<datatype> specifies the declared value for an attribute, by referring to any datatype defined by the chosen schema language. 1.4.2 Datatype Macros 22.4.5 Attribute List Specification
組件tagdocs — 22 Documentation Elements
屬性
minOccurs (minimum number of occurences) indicates the minimum number of times this datatype may occur in the specification of the attribute being defined
狀態 非必備的
資料類型
data.count
maxOccurs (maximum number of occurences) indicates the maximum number of times this datatype may occur in the specification of the attribute being defined
狀態 非必備的
資料類型
data.count | "unbounded"
屬於attDef
可包含空白元素
宣告
element datatype
{
   att.global.attributes,
   attribute minOccurs { data.count }?,
   attribute maxOccurs { data.count | "unbounded" }?,
   macro.schemaPattern*
}
例子
<datatype>
 <rng:data type="token"/>
</datatype>
例子
<datatype>
 <rng:ref name="data.enumerated"/>
</datatype>
例子

The encoding in the following example requires that the attribute being defined contain at least two URIs in its value, as is the case for the targets attribute of <join>.

<datatype minOccurs="2maxOccurs="unbounded">
 <rng:ref name="data.pointer"/>
</datatype>
In the TEI scheme, most datatypes are expressed using pre-defined TEI macros, which map a name in the form data.xxxx to a RelaxNG or WSD defined datatype.