A complex type allows elements in its content and can carry attributes. Complex types can be used to help determine the appropriate content for any instance documents generated from or associated with your XML schema.
You can add as many complex types as you want to an XML schema.
The following instructions were written for the Resource perspective, but they will also work in many other perspectives.
To add a complex type to an XML schema, follow these steps:
to select a base type for your complex type.
You can either set a base type for your complex type, or you can add
a content model to it (which represents any data that can be contained inside
an element), but you cannot do both. For more information about content models,
refer to the related tasks.