Home >Online Product Documentation >Table of Contents >Defining Elements That Contain Subelements in XML Schemas
An element that contains subelements is a complexType. Consequently, you can define an element that contains subelements in either of the following ways:
xsd:schema node. In the complexType definition, define the subelements. Elsewhere in the schema, define an element that uses the complexType you defined. xsd:schema node or a Model Group node. In the element definition, define a complexType that contains your subelements. To define a complexType that contains elements, see Defining complexTypes That Contain Elements and Attributes - Diagram View or Defining complexTypes That Contain Elements and Attributes - Tree View.
schema node
Alternatives: This operation is also available from the XMLSchema > Diagram > Add > Element menu and from the Add button
.
The new element is added to the XML Schema. It is displayed in the diagram and in the text pane (if you have it open). The properties for the new element are displayed in the Properties window.
Stylus Studio updates the element definition to include a complexType with the sequence, choice, all, or any element you selected in the previous step.
At this point, the procedure for defining a complexType in the definition of an element is the same as defining a complexType as a child of the Schema node. See Defining complexTypes That Contain Elements and Attributes - Tree View.