Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML Schema field Element

XML Schema field Element


XML Schema Reference Manual 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

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.)

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

The following example shows a field element that defines the "userID" attribute as the field used for the identity constraint:


XML Schema Reference Manual Complete XML Schema Reference Manual