Defining Elements in an XML Schema
Creating an Element
To create a new element:
1. Click the schema where the element is to be created, then click the
create element 
button in the toolbar.
The Add element dialog box opens.

Content of this dialog box varies according to the mode selected. To obtain all the properties of an element, you must select "XML Expertise Level", accessible from the
Tools menu of the schema editor.
2. Enter the name of the element, specify the characteristics and click Create.
Result
Diagram | Diagram | XML Document |
| | <Document> |
Characteristics of an Element
When creating an element, several fields should be completed:
Multiplicity
The multiplicity of an element determines the number of times the corresponding tag appears. All the usual values can be used for the multiplicity, including:
0: the element does not appear (useful for eliminating an inherited definition),
1: the element must appear, but only once,
*: the element is optional and can be repeated multiple times,
1...*: the element must appear at least once, and may appear more than once.
To specify the multiplicity:

Select the multiplicity using the arrow.
Element Type
In this box, you can define the element type (or element definition).. By default, the name of the type is the same as that of the element.
Basic type (optional)
This is the type inherited by the element type.
Inheritance (optional)
Corresponds to the inheritance type: restriction or extension.
Local
Local determines if the tag definition is created locally, that is at the level of the tag definition containing the element.
If you do not select this box, the tag definition is created globally, that is at the level of the namespace. It can therefore be reused.
Access by reference
If you select this check box, the element becomes a reference. See
"References".
The element is created under the schema in the navigator:
Ordering Contained Elements
To specify the order in which contained elements are generated:
1. Right-click the element to be ordered and select Type properties in its pop-up menu.

You must be in "XML Expertise Level" for this command to appear.
Its dialog box appears.
2. In the Generation tab, select the XSD sub-tab and select a value for the XDD Order list box using the arrow.
• "All": type elements appear zero or one times and in any order. "All" groups are only authorized at the highest level of a type and must appear alone. In addition, they can only contain elements.
• "Sequence": the tags should appear in order, and the number of times specified by the multiplicity of the element.
• "Choice": only one of the sub-tags can appear. The number of times is specified by the multiplicity.
UML modeling

Open the
Properties dialog box of the class for which you wish to order the component classes and proceed as described above.