![](/images/new-backgrounds/1214202/214202345x1.webp)
Chapter 3 Working with an XML model
Undefined selector
You must define an XPath expression for a keyRef selector attribute.
Manual correction | Automatic correction |
In the keyRef property sheet, define an | — |
XPath expression for the selector |
|
attribute. For example: |
|
s:company/s:employee |
|
|
|
For more information on XPath expressions, see section Defining an identity constraint selector in chapter Building an XML model.
Unique check
During a unique constraint check, the following object controls are made.
Unique name and code uniqueness
An element cannot contain two unique constraints with identical names and/or codes.
Manual correction | Automatic correction |
Rename one of the unique constraints | Renames the unique constraint by |
| appending a number to its name or |
| code |
|
|
Existence of fields
A unique constraint must contain at least one field.
Manual correction | Automatic correction |
Add at least one field to the unique | Deletes unassigned unique constraint |
constraint or delete the unique constraint. |
|
For example: @numEmployee |
|
|
|
For more information on fields, see section Defining an identity constraint field in chapter Building an XML model.
XSM User's Guide | 161 |