Adding a Global complexType Component to an XML Schema File
See Also
You use a complexType to define a complex type. A complexType component can contain other components and/or attributes. The following schema components can be the parent of a global complexType: schema and redefine.
To add a global complexType component:
- In the IDE, open the schema file where you want to add a complexType component.
- Do one of the following:
- In the Schema view, right-click the root node of the schema and choose Add > Complex Type from the pop-up menu.
- In the Schema view, right-click the Complex Types node and choose Add Complex Type from the pop-up menu.
- In the Schema view, right-click the redefine node where you want to add a global complexType component and choose Add > Complex Type from the pop-up menu.
The Complex Type dialog box opens.
- In the Name field, type the name of the complexType.
- Continue with one of the following:
To create an inline complexType definition:
- Under Type Definition, select the Inline Definition radio button.
- Under Compositor, select one of the radio buttons: Sequence, Choice, All, or Empty.
- Click OK.
The IDE adds a node for the new complex type. The label of the node is the name you entered in the Name field.
To create a complexType definition that extends an existing definition:
- Under Type, select the Use Existing Definition radio button.
The lower part of the dialog box changes to provide you with options to define the reference.
- Select the Extension radio button, and in the list of types, make a selection.
- If you are extending a complexType definition, from the Inline Compositor drop-down list next to the Extension radio button, select a compositor for the definition.
- Click OK.
The IDE adds a node for the new complex type. The label of the node is the name you entered in the Name field.
To create a complexType definition that restricts an existing definition:
- Select the Restriction radio button.
- In the list of types, make a selection.
- Click OK.
The IDE adds a node for the new complex type. The label of the node is the name you entered in the Name field.
To use a group reference for the new complexType definition:
- Select the Group radio button.
- In the list of groups, make a selection.
- Click OK.
The IDE adds a node for the new complex type. The label of the node is the name you entered in the Name field.
- See Also
- Complex Type Dialog Box
- Adding a Local complexType Component to an XML Schema File
- About XML Schema Tools
Legal Notices