HOPEX UML : HOPEX XML Schemas : More UML Features : Inheritance : Using Inherited Classes
   
Using Inherited Classes
The concept of inheritance is used to define instances corresponding to instances of the inherited class, but with more details.
This being so, if class B inherits A, instances of B can be considered special instances of A.
In consequence, in an XML document, tags A can be substituted by tags B. To view inheritance in the schema editor:
*Click the Display Inherited Classes button and unfold the parent class to view the classes it inherits
The inherited classes are represented by the icon .
*At the time of inheritance, all sub-elements in the namespace are generated. To prevent their generation, you need simply declare the element as abstract. See "Creating Abstract Classes".
Substitution (XSD)
In XSD, it is possible to specify directly which elements are to be substituted.
Example:
Take for example the "Enterprise" element. To indicate that it is substituted by the "Factory" element:
1. Select the "Enterprise" element in the navigator.
2. In its properties dialog box, select the Complements tab.
3. Select "Overloading role" and click the Connect button.
4. In the Choose selector dialog box, find the overloading role and click OK.
5. Then right-click the "Enterprise" element and select Explore.
6. Click "Overloading role" and in the IsSubstituableTo column, select "yes".