XML Schema field
Element
Definition and Usage
The field
element specifies an XPath expression that identifies the value (or one of the values) used to define the identity constraint (unique, key, and keyref elements).
Element Information
-Parent elements: key, keyref, unique
Syntax
(? symbol declaration within the field
element, which can appear zero or one time.)
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. If the expression identifies an element, it must be of simple type. |
xml:lang | Optional. Specifies the language used in the content. |
Example 1
The following example shows a field
element that defines the "userID" attribute as the field used for the identity constraint: