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:
- In the IDE, open the schema file where you want to add the local simpleType component.
- To add the local simpleType component to a new attribute, do the following:
- 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.
- In the Name field, type the name of the attribute.
- To add the local simpleType component to an existing attribute, do the following:
- In the Schema view, select and right-click the node of the attribute component where you want to add the simpleType component and choose Customize from the pop-up menu.
The Attribute dialog box opens. Depending on the type of element you selected, the title of dialog box may be Local Attribute Customizer or Global Attribute Customizer.
- Under Type, select the Inline Simple Type radio button.
- 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:
- In the IDE, open the schema file where you want to add the local simpleType component.
- To add the local simpleType component to a new element, do the following:
- 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.
- In the Name field, type the name of the element.
- To add the local simpleType component to an existing element, do the following:
- In the Schema view, select and right-click the node of the element component where you want to add the simpleType component and choose Customize from the pop-up menu.
The Element dialog box opens. Depending on the type of element you selected, the title of dialog box may be Local Element Customizer or Global Element Customizer.
- Under Type, select the Inline Simple Type radio button.
- 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:
- In the IDE, open the schema file where you want to add the local simpleType component.
- To add the local simpleType component to a new global simpleType, do the following:
- 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.
- In the Name field, type the name of the global simpleType.
- To add the local simpleType component to an existing global simpleType, do the following:
- In the Schema view, select and right-click the node of the global simpleType component where you want to add the local simpleType component and choose Customize from the pop-up menu.
The Simple Type dialog box opens. Depending on the type of element you selected, the title of dialog box may be Local Simple Type Customizer or Global Simple Type Customizer.
- Under Derivation Method, select the Restriction or List radio button.
- Under Base Type, select the Inline Definition radio button.
- 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