
Chapter 2 Building an XML model
Key general properties
The General page of a key property sheet displays the following properties:
Property | Description |
Name | Name of the key constraint. It must be a |
| Glossary) |
Code | Code of the key constraint. It must be a |
Comment | Descriptive label of the key constraint |
Stereotype | |
| without changing its structure. It can be predefined or user- |
| defined |
ID | ID of the key constraint. Its value must be of type ID and |
| unique within the model containing the key constraint |
Selector (XPath) | An XML Path Language expression that selects a set of |
| elements across which the values specified in the Fields page |
| must be unique. There must be one and only one selector |
|
|
For more information on Selector or XPath, see section Defining an identity constraint selector.
Key fields properties
The Fields page of a key property sheet displays a list of XPath expressions.
If there is more than one field (or XPath expression), the combination of fields must be unique.
For more information on XPath expressions, see section Defining an identity constraint selector.
Defining a keyRef constraint
A keyRef constraint specifies that an element or attribute value (or set of values) corresponds to the value of a specified key or unique constraint.
A keyRef is a reference to a key or a unique constraint.
XSM User's Guide | 67 |