TEI: TEIガイドライン

P5 Version 4.10.2. Last updated on 4th September 2025, revision bcfa98f42

<dataRef>

<dataRef> 外部で定義されたデータ型ライブラリ内の項目を参照するか、もしくはTEIにより定義されたデータ仕様を指し示すことで、属性値のデータ型を識別する [23.5.3.1 Datatypes]
モジュール tagdocs — Documentation Elements
属性
key key⚓︎ このデータ型仕様に使われる識別子
状態 任意
データ型 teidata.xmlName
name name⚓︎ XML Schemas: Part 2: Datatypesで提供されているリスト内のデータ型の名前
状態 任意
データ型 teidata.xmlName
ref ref⚓︎ あるデータ型ライブラリ内で定義されたデータ型へのポインタ
状態 任意
データ型 teidata.pointer
restriction restriction⚓︎ このデータ型の値を表すために使用される文字列に追加の制約を加える正規表現を表す文字列を提供する
状態 任意
データ型 teidata.pattern
クラブのメンバー
model.contentPart model.oddRef
下位
tagdocs: dataFacet
解説

key, name, refの内どれか一つの属性のみを使用することができる

<schemaSpec ident="myTEI"
source="http://www.tei-c.org/Vault/P5/current/xml/tei/odd/p5subset.xml">

<!-- ... -->
<dataRef key="teidata.enumerated"/>
<!-- ... -->
</schemaSpec>
<schemaSpec ident="myTEI"
source="http://www.tei-c.org/Vault/P5/current/xml/tei/odd/p5subset.xml">

<!-- ... -->
<dataRef name="float"/>
<!-- ... -->
</schemaSpec>
<dataSpec ident="data.integerExample">
<desc>datatype used for attributes taking an integer value between 0 and 99</desc>
<content>
<dataRef name="nonNegativeInteger"
restriction="[0-9][0-9]?"/>

</content>
</dataSpec>
Schematron

<sch:rule context="tei:dataRef[tei:dataFacet]">
<sch:assert test="@name" role="nonfatal">Data facets can only be specified for references to datatypes specified by
XML Schema Part 2: Datatypes Second Edition — that is, for there to be a 'dataFacet' child there must be a @name attribute.</sch:assert>
<sch:report test="@restriction"
role="nonfatal">
Data facets and restrictions cannot both be expressed on the same data reference — that is, the @restriction attribute cannot be used when a 'dataFacet' element is present.</sch:report>
</sch:rule>
Schematron

<sch:rule context="tei:dataRef[@restriction]">
<sch:assert test="@name" role="nonfatal">Restrictions can only be specified for references to datatypes specified by
XML Schema Part 2: Datatypes Second Edition — that is, for there to be a @restriction attribute there must be a @name attribute, too.</sch:assert>
</sch:rule>
Content model
<content>
<elementRef minOccurs="0"
maxOccurs="unbounded" key="dataFacet"/>

</content>
宣言
<rng:element name="dataRef">
<rng:ref name="att.global.attributes"/>
<rng:ref name="att.global.analytic.attributes"/>
<rng:ref name="att.global.change.attributes"/>
<rng:ref name="att.global.facs.attributes"/>
<rng:ref name="att.global.linking.attributes"/>
<rng:ref name="att.global.rendition.attributes"/>
<rng:ref name="att.global.responsibility.attributes"/>
<rng:ref name="att.global.source.attributes"/>
<rng:choice>
<rng:optional>
<rng:attribute name="key">
<rng:ref name="teidata.xmlName"/>
</rng:attribute>
</rng:optional>
<rng:optional>
<rng:attribute name="name">
<rng:ref name="teidata.xmlName"/>
</rng:attribute>
</rng:optional>
<rng:optional>
<rng:attribute name="ref">
<rng:ref name="teidata.pointer"/>
</rng:attribute>
</rng:optional>
</rng:choice>
<rng:optional>
<rng:attribute name="restriction">
<rng:ref name="teidata.pattern"/>
</rng:attribute>
</rng:optional>
<rng:zeroOrMore>
<rng:ref name="dataFacet"/>
</rng:zeroOrMore>
</rng:element>
element dataRef
{
 att.global.attributes,
 att.global.analytic.attributes,
 att.global.change.attributes,
 att.global.facs.attributes,
 att.global.linking.attributes,
 att.global.rendition.attributes,
 att.global.responsibility.attributes,
 att.global.source.attributes,
 (
 attribute key { teidata.xmlName }?
 | attribute name { teidata.xmlName }?
 | attribute ref { teidata.pointer }?
 ),
 attribute restriction { teidata.pattern }?,
 dataFacet*
}

[English] [Deutsch] [Español] [Italiano] [Français] [日本語] [한국어] [中文]



TEI Guidelines P5 Version 4.10.2. Last updated on 4th September 2025, revision bcfa98f42. This page generated on 2025年09月04日T16:29:35Z.

AltStyle によって変換されたページ (->オリジナル) /