Introduction
Rational Software Architect for WebSphere Software (henceforth "RSA") provides the capability to generate XSDs from UML
models, using its UML-to-XSD transform. See Transforming UML models into XSD files, in RSA Help, for full details. See UML-to-XSD transformations for
essential information regarding:
-
Guidelines for modeling XML schemas using UML
-
How the transformation transforms UML into XSDs
-
Transform sources and targets
-
"Raw" UML elements (elements without XSD-specific adornment) that transform into XSD.
Configuring a Model for Custom XSD Modeling
The transform is capable of creating XSDs from model content that is not adorned with XSD-specific markup.
However, XSD output can be tuned by using XSD-specific stereotypes. See XSD transformation profile to understand the meanings of
each of the stereotypes. Activate custom XSD profile tooling using Enabling XSD modeling capabilities, and apply the XSD
profile to your model using Applying
the transformation profile. You can add custom XSD data types to your model by following the
instructions provided in Importing the
XSD data types model library.
It can be particularly beneficial to use the custom XSD modeling features, described above, if you need to craft
complex data types.
Simple XSD Types and Facets
Create a simple XSD type either by applying the <<simpleType>> stereotype to an existing classifier or by
using the "Add XSD..." context menu to create a new simple type element in the Project Explorer. As is described
in Simple types and applicable facets of
UML-to-XSD transformations, simple XSD types can be constrained using one or more standard facets. The
facets are available as stereotype properties of the simple type element. Set them as follows:
-
Select the element in either Project Explorer or on a diagram
-
Select the Properties View
-
Select the Stereotypes tab of that view
-
Beneath the list of applied stereotypes, find the list of stereotype properties. Set the properties (which
are the facets) appropriately.
Configuring UML-to-XSD Transforms
See Configuring UML-to-XSD
transformations for details on how to create and configure a UML-to-XSD transform. In particular, note that
the entire source model does not need to be selected. If you choose to generate (just) XSDs from a service model,
select the implementation packages in the model as the source, rather than the entire
model.
Running the Transform
See Running and rerunning
UML-to-XSD transformations for information regarding approaches for running a UML-to-XSD transform.
|