Adding a Local simpleType Component to an XML Schema File

See Also

You use a simpleType to define a simple type. A simpleType component specifies information and constraints about the values of attributes or text-only components. The following schema components can be the parent of a local simpleType: attribute, element, list within a global simpleType, and restriction within a global simpleType.

To add a local simpleType component to an attribute component:

  1. In the IDE, open the schema file where you want to add the local simpleType component.
  2. To add the local simpleType component to a new attribute, do the following:
    1. In the Schema view, right-click the root node of the schema and choose Add > Attribute from the pop-up menu.
      -or-
      In the Schema view, select and right-click the Attributes node and choose Add Attribute from the pop-up menu.
      -or-
      In the Schema view, select and right-click the node of the component where you want to add the attribute component and choose Add Attribute from the pop-up menu.
      The Attribute dialog box opens.
    2. In the Name field, type the name of the attribute.
  3. To add the local simpleType component to an existing attribute, do the following:
  4. Under Type, select the Inline Simple Type radio button.
  5. Click OK.
    The IDE creates a local simpleType within the attribute. The label of the local simpleType node is simpleType.

To add a local simpleType component to an element component:

  1. In the IDE, open the schema file where you want to add the local simpleType component.
  2. To add the local simpleType component to a new element, do the following:
    1. In the Schema view, right-click the root node of the schema and choose Add > Element from the pop-up menu.
      -or-
      In the Schema view, select and right-click the Elements node and choose Add Element from the pop-up menu.
      -or-
      In the Schema view, select and right-click the node of the component where you want to add the element component and choose Add Element from the pop-up menu.
      The Element dialog box opens.
    2. In the Name field, type the name of the element.
  3. To add the local simpleType component to an existing element, do the following:
  4. Under Type, select the Inline Simple Type radio button.
  5. Click OK.
    The IDE creates a local simpleType within the element. The label of the local simpleType node is simpleType.

To add a local simpleType component to a global simpleType component:

  1. In the IDE, open the schema file where you want to add the local simpleType component.
  2. To add the local simpleType component to a new global simpleType, do the following:
    1. In the Schema view, right-click the root node of the schema and choose Add > Simple Type from the pop-up menu.
      -or-
      In the Schema view, right-click the Simple Types node and choose Add Simple Type from the pop-up menu.
      The Simple Type dialog box opens.
    2. In the Name field, type the name of the global simpleType.
  3. To add the local simpleType component to an existing global simpleType, do the following:
  4. Under Derivation Method, select the Restriction or List radio button.
  5. Under Base Type, select the Inline Definition radio button.
  6. Click OK.
    The IDE creates a local simpleType within the global simpleType. The label of the local simpleType node is simpleType.
See Also
Adding a Global simpleType Component to an XML Schema File
Simple Type Dialog Box
About XML Schema Tools

Legal Notices