XML Schema field 元素
❮ 完整的 XML Schema 參考
定義和用法
The field element specifies an XPath expression that specifies the value used to define an identity constraint.
元素資訊
- Parent elements: key, keyref, unique
語法
<field
id=ID
xpath=XPath expression
任何屬性
>
(annotation?)
</field>
(The ? sign declares that the element can occur zero or one time inside the field element)
Attribute | 描述 |
---|---|
id | 可選。指定元素的唯一 ID |
xpath | Required. Identifies a single element or attribute whose content or value is used for the constraint |
任何屬性 | 可選。指定任何其他非 schema 名稱空間的屬性 |
示例 1
The following example shows a field element that specifies the "userID" attribute as the field to use for the identity constraint
<xs:field xpath="@userID"/>
❮ 完整的 XML Schema 參考