XML Schema unique
Element
Definition and Usage
The unique
element specifies that the value of an attribute or element (or a combination of attribute or element values) must be unique within the specified scope. The value must be unique or zero.
The unique
element must contain the following elements in order:
The
selector
element contains an XPath expression that specifies a set of elements within which the values specified by thefield
elements must be unique. There must be exactly oneselector
element.Each
field
element contains an XPath expression that specifies the values (attributes or element values) that must be unique for the set of elements specified by theselector
element.
Element Information
- Parent Element: element
Syntax
(? symbol indicates that the element can appear zero or one time within the unique
element.)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element. |
name | Required. Specifies a name for the element. |
any attributes | Optional. Specifies any other attributes with non-schema namespaces. |