HOPEX UML : HOPEX XML Schemas : XSD Reverse Generation : Modeling the XSD Schema tags : XSD reverse generation: SimpleType
   
XSD reverse generation: SimpleType
The "SimpleType" tag defines a tag definition or XML attribute definition. In other words, it defines the structure of a tag or attribute. This structure can then be reused by multiple tags or attributes. The structure is simple, meaning that it cannot contain any attributes or sub-tags. However, it can represent a list, a union of types, or impose restrictions on already existing simple types.
The "SimpleType" tag is modeled by a UML class.
Attributes of "SimpleType"
Final: modeled by three generation parameters representing whether certain inheritance types are allowed:
XSD Final Restriction with the tabulated value "yes" or "no"
XSD Final List with the tabulated value "yes" or "no"
XSD Final Union with the tabulated value "yes" or "no"
Id: modeled by the XSD Id generation parameter.
Name: modeled by the name of the class. To generate a name different from the name of the class, enter the new name in the XSD Name parameter.
Type: this is for modeling which type is reverse generated: This attribute is modeled by the XSD Type parameter, which takes the values "simple type" or "complex type". In the present case, it is set to "simple type". It is optional.
Restriction
The primitive type or the internal type for the restriction is modeled by the "UML expression primitive type" link between the simple type and the primitive type. In addition, the simple type is of the "Expression" stereotype. If the type is local, a nested class is created in the simple type.
The facets are modeled by constraints of the "XSD Facet" stereotype on the class (except for an Enumeration).
For an "enumeration" facet, the simple type is of the "Enumeration" stereotype. The values of the enumeration are stored as literal values.
List
A list is modeled as follows:
The primitive type or internal type of the list is modeled by a "UML expression primitive type" link between the simple type and the primitive type. In addition, the simple type is of the "Expression" stereotype. If the type is local, a nested class is created in the simple type.
The list is modeled by the XSD List parameter, which is set to "yes" if it is a list or "no" if it is not.
Union
A union is modeled as follows:
The types can be defined in a list of memberTypes delimited by spaces, and/or locally. They are modeled as attributes of the class associated with the simple type. The name of the attribute is the name of the type. If there are local types, nested classes are created in the simple type.
Union typing is modeled by initializing the XSD Union parameter to "yes" ("no" in the other cases). In addition, the simple type must be of the "Structure" stereotype.