XML Schema language contains
several built-in simple types and facets. Simple types represent common
data types such as strings, numbers, date, and time values. Import
the XSDDataTypes model library into your source model to access the
built-in simple types of the XML Schema language. After you import
the library, you can derive new simple types and specify constraints
on existing simple types.
Before you begin
In UML, simple types are modeled
as classes for the UML-to-XSD transformation. The XSDDataTypes model
library contains these classes. To use these classes, you must import
the XSD model library into your source UML model. Use the facets of
the model library to specify a valid range of values, constrain the
length and precision of values, enumerate a list of valid values,
or specify a regular expression that valid values must match. Derive
new simple types from built-in types or other simple types by setting
the facets to particular values.
You must be in the Modeling perspective.
About this task
To import the XSD data types model library:
Procedure
- In the Project Explorer view, right-click
a model; then click Import Model Library.
- In the Import Model Library window,
from the Deployed Library list, select XSDDataTypes.
- Click OK.
Results
The list of data types in the model library is available after
you import the model library. When you specify the type of a model
element, you can select a built-in simple type from the model library.