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