
Chapter 3 Building an XML model
Creating a restriction on a simple type
You derive a simple type by restriction when you want to restrict the values of its base type.
To create a restriction on a simple type:
- Double-click the name or the icon of a simple type in the Browser tree view.
or
Double-click the symbol of a simple type in the diagram.
The simple type property sheet appears.
- Select Restriction in the dropdown listbox of the Derivation box.
- Click Apply.
- Click the Properties tool beside the Derivation box.
The restriction property sheet appears.
- Type an ID and a base type for the simple type restriction.
If you select Embedded type, the base type disappears and a simple type is created in the schema within the current simple type. Click Apply, and then the Properties tool beside the Embedded type box, to define a derivation and a base type for the embedded simple type.
- Click the Detail tab to display the Detail page.
- Type a value in a facet box.
- Click Apply.
- Click the Properties tool beside the facet box.
The facet property sheet appears (the length property sheet in the example).
- Type an ID and select the Fixed box, if needed.
- Click OK.
Enumeration and Pattern facets
For Enumeration and Pattern facets, click their corresponding tabs in the restriction property sheet and double-click the arrow left of an enumeration or a pattern value to display its property sheet.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|