Adding an enumeration Constraint for a simpleType Component in an XML Schema File
See Also
When you define a simpleType schema component, you can restrict the values of the component to specific values in the instance document by using an enumeration constraint.
To add an enumeration constraint:
- In the IDE, open the schema file where you want to add the enumeration component.
- In the Schema view, right-click the node of the simpleType schema component where you want to add the enumeration component and choose Add > Enumeration from the pop-up menu.
The IDE adds an enumeration node. The label of this node shows that no value has been defined for the enumeration: ""(Enumeration).
- Select the new ""(Enumeration) node, right-click and choose Properties from the pop-up menu.
- In the Properties dialog box, type a value in the text box for the Value property.
You can also click the ellipsis (...) button to use enter or change the value.
- Click OK.
The ""(Enumeration) node has been changed to show the value you entered: "value-entered"(Enumeration)
- See Also
- Adding a Global simpleType Component to an XML Schema File
- Adding a Local simpleType Component to an XML Schema File
- About XML Schema Tools
Legal Notices