XML Schema 参考手册 完整 XML Schema 参考手册 The field element specifies an XPath expression that specifies the value (or one of the values) used to define identity constraints (unique, key, and keyref elements). 父元素: Key, keyref, unique (? The symbol is declared within a field element, which can occur zero or once. ) Attribute Description Id Optional. Specifies the unique ID of the element. Xpath Necessary. Identifies a single element or attribute whose contents or values are used to constrain. If the expression identifies an element, the element must be a simple type. Xml:lang Optional. Specifies the language used in the content. The following example shows a field element that defines the “userID” attribute as the field used to identify the constraint:Definition and usage ¶
Element Information ¶
Grammar ¶
<field
id=ID
xpath=XPath expression
*any attributes*
>
(annotation?)
</field>
Example 1 ¶
<xs:field xpath="@userID"/>