Keywords in UML-to-XSD transformations

Keywords are an alternative to the stereotypes of the Extensible Markup language (XML) Schema Definition (XSD) profile. The transformation uses the keywords that you apply to elements of the source model to determine how to generate XSD elements.
The following table lists the keywords that transformation recognizes.
Keyword Applies to this element Transformation result
annotation Comment appinfo or documentation annotation
attribute Property of a class Attribute in a complex type if the multiplicity of the property is [0..1]
attributeGroup Class Attribute group
complexType Class Complex type
complexType DataType Complex type
complexType Signal Complex type
element Property Element of a complex type
enumeration Class XSD enumeration if the class has a generalization relationship to a class that represents a simple type
global Class
Note: Must have only one property
Top-level element

Top-level attribute, if the property has the «attribute» stereotype or the attribute keyword

The name and type of the property is assigned to the generated element or attribute

listOf Dependency between two classes that represent two simple types XSD list from the client of the dependency

Item type is the supplier of the dependency

There can only be one such dependency between two classes that represent a simple type
modelGroup Class Named model group that is global and reusable. By default, the transformation creates a sequence model.

References to this class are transformed into a model group reference

redefine Generalization New schema that contains the redefined components and the unchanged components from the original schema
schema Package XSD schema that has the same name as the package
Note: You must specify the target namespace and the target namespace prefix properties in the transformation configuration.
simpleType Class Simple type if the class has a generalization to an XSD built-in data type or another simple type
simpleType DataType Simple type
simpleType Signal Simple type
unionOf Dependency between two classes that represent two simple types XSD union is generated from the client of the dependency with the supplier of the dependency as a member

A class that represents more than one simple type can have more than one such dependency to different classes that represent simple types

wildcard Property Element wildcard

If the property has the attribute keyword or the «attribute» stereotype, an attribute wildcard is also generated