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 参考