Latest web development tutorials

XML Schema field element

XML Schema Reference Complete XML Schema Reference

Definition and Usage

field element specifies XPath expression, the value (or a value) to specify the expression used to define the identity constraint (unique, key and keyref elements).

Element Information

  • Parent element: key, keyref, unique

grammar

<field
id=ID
xpath=XPath expression
any attributes
>

(annotation?)

</field>

(? Sign declares in the field element, which can occur zero or one time.)

属性 描述
id 可选。规定该元素的唯一的 ID。
xpath 必需。标识其内容或值用于约束的单个元素或属性。如果该表达式标识一个元素,则该元素必须是简单类型。
xml:lang 可选。规定内容中使用的语言。

Example 1

The following example shows a field element that the "userID" attribute is defined as a field for identifying constraints:

<xs:field xpath="@userID"/>


XML Schema Reference Complete XML Schema Reference