XMLスキーマフィールド要素
❮完全なXMLスキーマリファレンス
定義と使用法
field要素は、ID制約の定義に使用される値を指定するXPath式を指定します。
要素情報
- 親要素: key、keyref、unique
構文
<field
id=ID
xpath=XPath expression
any attributes
>
(annotation?)
</field>
(?記号は、要素がフィールド要素内で0回または1回発生する可能性があることを宣言します)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
xpath | Required. Identifies a single element or attribute whose content or value is used for the constraint |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
例1
次の例は、ID制約に使用するフィールドとして「userID」属性を指定するfield要素を示しています。
<xs:field xpath="@userID"/>
❮完全なXMLスキーマリファレンス