The metaclass SimpleType represents a user-defined datatype that contains only
text, i.e., it cannot contain any other XSD elements or attributes. The metaclass
Com-
plexType
represents a user-defined datatype that can contain other XSD elements
and/or attribute definitions. This metaclass has a single meta-attribute called
orderIndi-
cator
, which defines the ordering of the child XSD elements. Three different ordering
indicators are defined, viz.,
all, choice and sequence. The all ordering indicator specifies
that the child elements can appear in any order, and that each child element must
occur only once. The
choice ordering indicator specifies that only one of the contained
child elements can appear. The
sequence ordering indicator specifies that child ele-
ments must appear in a specific (sequence) order.
The metaclass
Attribute represents an XSD attribute. Attributes are used to provide
additional information about an element. This metaclass has three meta-attributes
called
name, which provides the attribute identification, defaultValue, which can be
used to specify a default value for the attribute, and
fixedValue, which can be used to
specify a fixed value to the attribute. The meta-attributes
defaultValue and fixedValue are
optional and cannot be both present at the same time.
4 Transformation Specification
In the QVT specification [6], there is no clear distinction between the concepts of
mapping and transformation. A transformation is defined in terms of mapping speci-
fications, which can be specified using different languages defined in a two level
declarative architecture, viz., relations, operational mappings and core. However,
some authors distinguish between mapping and transformation (see, e.g., [4, 5]).
According to [4], a mapping can be seen as a correspondence between the elements of
two metamodels, while a transformation can be defined as the activity of transforming
a source model into a target model according to a number of transformation defini-
tions. The benefit of this approach is that it allows a mapping to be defined independ-
ently of the transformation specification.
In the context of this work, we adopt the approach mentioned in [4], in which
mappings and transformations are explicitly separated. Therefore, we developed our
transformation specification between the CWS and the XSD metamodel in two con-
secutive steps: 1) the definition of the mappings for each context-aware information
element onto one or more XML schema elements, using the metamodel for mappings
proposed in [4], and 2) the specification of the transformation itself, i.e., the specifi-
cation of the mappings defined in the first step using the QVT notation [6].
In order to map context-aware information elements onto XML schema language
elements, we have to first consider the different alternative schema definitions and
make proper choices. In order to obtain these alternative schema definitions, we first
instantiated some context-aware information from our CWS metamodel, then created
an alternative schema definition for this sample information, and finally created one
or more XML documents for each alternative schema definition.
67