Constraints: Keys, Uniques, and KeyRefs (XSM)

Constraints indicate that element values must be unique within their specified scope. In a schema, a constraint is declared with the <unique>, <key>, or <keyRef> tag. Constraints are only available in a model targeted with XSD.

There are three kinds of identity constraints, each with a selector and field: