Complex Type

An «XSDcomplexType» stereotype is applied to a generic UML Class, to tailor the generation of a complexType definition in the Schema. You can create an «XSDcomplexType» stereotyped Class by dragging the Complex Type icon from the XML Schema Toolbox and dropping it directly onto a diagram.

Toolbox Icon

complexType_icon

Access     Drag icon onto diagram, or
Project Browser | Double-click on «XSDcomplexType» stereotyped element, or
Diagram | right-click on «XSDcomplexType» stereotyped element | Properties

Define Properties

Field/Button

Action

See also

Name

If you do not want to use the default name of the complexType Class, overtype it with another name.

 

 

Model Group

Click on the down-arrow and select the option that defines how the child elements of this complexType should occur in the Schema.

sequence - the child elements must occur in the specified order
choice - only one of the child elements can occur
all - the child elements can occur in any order

 

 

MinOccurs

(Optional) Type the minimum number of times this element must occur in the Class.

Type 0 to indicate that the element is optional.

The default value is 1.

 

 

MaxOccurs

(Optional) Type the maximum number of times this element can occur in the Class.

Type unbounded to indicate that there is no limit to the number of times the element can occur.

The default value is 1.

 

 

Annotation

(Optional) Type any notes you need for this element.

 

 

Abstract

(Optional) Select this checkbox to use this complexType in an instance XML file.

 

 

Mixed

(Optional) Select this checkbox to allow character data to display among the child elements.

 

 

OK

Click on this button to save the complexType data entered and close the XSD complexType Properties dialog.

 

 

Cancel

Click on this button to discard the complexType data entered and close the XSD complexType Properties dialog.

 

 

Help

Click on this button to display this Help topic.

 

 

UML

This button is displayed when you are editing existing XSD complexType information.

Click on the button to open the UML element Properties dialog for the complexType Class.

 

Properties

Notes

A complexType can:
Contain both XSDelement and XSDattribute stereotyped UML attributes
Contain other complexTypes as child elements
Be a child of a Global Element
Be the source of Association connectors to other complexTypes, Simple Types, Attribute Groups, Groups and Model Groups
Be the source of a maximum of one Generalization connector to either another complexType or a Simple Type Class

Learn more