The UML to XML Schema transformation helps create an equivalent XML schema model from a given UML model. Basically, this transformation creates a copy of a source UML model, then applies the necessary stereotypes according to the XML schema modeling rules.

Type mapping

This type map stores mapping between primitive UML data types and primitive XML Schema data types.

UML to XML schema type map.
UML to XML schema type map (Continued).

Transformation results

After the UML models have been transformed to XML schema models, you will see the following results.

ConditionResult
The class is derived from another class, stereotyped as «XSDcomplexType».The «XSDcomplexContent» stereotype is applied on this class with «XSDextension» on the corresponding generalization relationship.
The class is derived from another class, stereotyped as «XSDsimpleType».The «XSDrestriction» stereotype is applied on the corresponding generalization relationship.
The class is not derived from anything, and has attributes with the XSDelement tag.The «XSDcomplexContent» stereotype is applied on this class.
The class is not derived from anything, and has no attributes with the XSDelement tag.No «XXXXContent» stereotype is applied on this class - the class has an empty content.
The UML datatypes in the transformation source set are transformed into the classes with the «XSDsimpleType» stereotype (unless after the type map this class appears to be derived from a class with the «XSDcomplexType» stereotype).The «XSDcomplexType» stereotype is used.
Each attribute of the class is not of the simple XML type (that is, one of the basic types, or type, stereotyped with the «XSDsimpleType») or has a multiplicity more than 1.The «XSDelement» stereotype is applied.


Model transformation wizard for UML to XML schema transformation with Specify transformation details.


Option nameTypeDescription

Default Compositor

Combo box

Possible choices: XSDall, XSDchoice, XSDsequence

Determines element grouping in complex types of XML Schema.

Default: XSDall

Default Attribute Kind

Combo box

Determines which attribute kind (XSDelement or XSDattribute UML) the attribute will be mapped to.

Default: XSDelement