HOPEX UML : HOPEX XML Schemas : Creating an XML Schema : Creating a Schema Class
   
Creating a Schema Class
 
Result
*Before creating an XML schema, you must first define a namespace. See "Defining a Namespace".
To create an XML schema:
1. Click the icon for create schema class button in the XML schema editor toolbar.
2. In the dialog box that appears, enter the name of the schema and click OK.
The new schema appears in the navigator:
 
Result
 
 
Diagram
Diagram
UML modeling
To create a new XML schema:
1. Click the Class button and name the class in the dialog box that appears.
The new class appears in the diagram.
2. Open the properties dialog box for the class (right-click the class and select Properties).
3. In the Characteristics tab, click on the arrow in the Stereotype list box and select "XML Document Definition Root".
This class represents the schema.
*Each XML schema is represented in HOPEX by a class of the XML Document Definition Root stereotype. When you create a new XML schema in the XML schema editor (not in the diagram), HOPEX automatically creates a class of the XML Document Definition Root stereotype to represent the schema.
*If the class was not created in an XML Document Definition package, the package that owns the class is automatically modified to be a package of stereotype XML Document Definition.
You can also select New > Schema from the pop-up menu for a package. In this case, the stereotype is automatically assigned to the class and the package (if the package does not already have an ancestor of the XML Document Definition stereotype).
*if you create the class in the diagram and set the stereotype manually, the owner package is not modified to have the "XML Document Definition" stereotype. We therefore recommend using one of the two procedures described above.