Mapping of the VEC Model to XML schema definition (XSD)
Note: There is a newer version of this specification see VEC 2.1.0
The mapping of the VEC model to an XML schema definition (XSD) described in the following defines a standardized syntax for the exchange of harness design data across process steps and supporting tools.
The dedicated namespace prefix of the schema definition is “vec”, the namespace is "http://www.prostep.org/ecad-if/2011/vec".
Each VEC model class that does not contain the stereotype <<enumeration>> is mapped to an XSD complex type with the same name as the VEC model class name. If the VEC model class is a derived subclass the corresponding XSD complex type uses the XSD extension base construct. Not inherited VEC model class attributes are mapped to a sequence of XSD elements with the same names as the names of the corresponding VEC model class attributes. The cardinality and data type definitions are defined equivalent to the VEC model. The base data types are:
- xs:string (corresponding to the VEC model data type definition String)
- xs:dateTime (corresponding to the VEC model data type definition Date)
- xs:integer (corresponding to the VEC model data type definition Integer)
- xs:double (corresponding to the VEC model data type definition Double)
- xs:boolean (corresponding to the VEC model data type definition Boolean)
Compositions in the VEC model are handled in the same way as if the aggregated class would have been modelled as a class attribute of the owning class. The name definition corresponds to the target role name.
As all associations in the VEC model are directed they are mapped to an attribute which is owned by the XSD complex type that relates to the VEC model class that is source of the association. The name is equal to the name of the association target role name. The type is xs:IDREF respectively xs:IDREFS depending on the association target cardinality.
As associations are mapped to xs:IDREF respectively xs:IDREFS, each XSD complex type that is not a refinement of another XSD complex type (by usage of the XSD extension base construct) defines an additional required attribute with the name “id” and the type xs:ID. This attribute is introduced as reference point for links. The values for the “id”-attributes are normally not defined by a user. Exporters are expected to generate valid values for the “id”-attributes so that in the end
- Links (as instances of associations) are expressed correctly
- The resulting XML file is XSD compliant.
Note: The values for the “id”-attributes have temporary character. By this recommendation exporters are not required to remember values they have once used during an export. Exporters are explicitly allowed to assign different values for the “id”-attributes during every export process.
The XSD defines a VecContent element as xs:element. This is the declared root element for VEC compliant XML-documents. A VEC compliant XML-document is limited to one instance of a VecContent.