See information about the latest product version
Message Sets: Setting value constraints
You can set the value constraints associated with a simple type.
Before you start:
You must have completed the following tasks:
- Message Sets: Creating a message set
- Message Sets: Creating a message definition file
- Message Sets: Opening an existing message definition file
- Message Sets: Adding a simple type or Message Sets: Adding a simple type to an element or attribute (You must have added one or more global or local simple types to your message model)
Value constraints are usually associated with a simple type; they refine a simple type by defining limits on the values which the simple type can represent. To set the value constraints associated with a simple type:
Setting an enumeration
An enumeration restricts which values can be set for the value constraint. For example, "ABC" and "123". Use this section to create a list of fixed values that the associated type must match.
To set an enumeration:
- Click Add to the right of the Enumerations field. This adds an enumeration that has a default enumeration (for example enumeration1).
- Type the data that you want to set for this value constraint.
- Press Enter on your keyboard.
- Repeat the above steps for each enumeration that you are adding.
Setting a pattern
Set a pattern to indicate that the value constraint defines a string used as a regular expression that must be matched by the data in the associated type. The regular expression syntax supported is XML Schema regular expressions.
See Message Sets: Regular expression syntax for a list of supported regular expression syntax elements.
To set a pattern:
- Select Add to the right of the Patterns field. This adds a pattern that has a default pattern (for example pattern1) and is in update mode.
- Type the data that you want to set for this value constraint.
- Press Enter on your keyboard.
- Repeat the above steps for each pattern that you are adding.