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.

Steps To create a restriction on a simple type:

  1. 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.
  2. Select Restriction in the dropdown listbox of the Derivation box.
  3. Click Apply.
  4. Click the Properties tool beside the Derivation box.

    The restriction property sheet appears.
  5. 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.
  6. Click the Detail tab to display the Detail page.
  7. Type a value in a facet box.
  8. Click Apply.
  9. Click the Properties tool beside the facet box.

    The facet property sheet appears (the length property sheet in the example).
  10. Type an ID and select the Fixed box, if needed.
  11. Click OK.

Note   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.