ISO 10303-214:2010(E)
This section describes the general concepts for the derivation of the XML Schema from the corresponding ARM EXPRESS Schema specified in Annex J. These concepts where used to create the XML Schema Definition (section K.2) from that EXPRESS Schema using the configuration directives of ISO 10303-28.
NOTE Only the mapping of those EXPRESS language elements is described that are used in ARM EXPRESS Schema specified in Annex J.
A XML name derived from an ARM EXPRESS identifier is the ARM EXPRESS identifier except that the first character of the XML name will be in upper case and all other characters shall be in lower case.
For each EXPRESS entity data type declaration the XML Schema contain the definition of a new complex type corresponding to that EXPRESS entity data type.
For each entity data type that does not inherit from another entity data type a new ComplexType will be declared. For each EXPRESS attribute appearing in the entity declaration, the ComplexType shall contain one corresponding element.
In addition to the declaration of simple entity data types EXPRESS allows the specification of entity data types as subtypes of other entity data types. This establishes an inheritance relationship (subtype/supertype) and through successive subtype/supertype relationships an inheritance graph in which every instance of a subtype is also an instance of its supertype(s). An entity declared by using inheritance relationships with supertypes is said to be a complex entity data type. A complex entity data type inherits not only the EXPRESS attributes and rules appearing in the EXPRESS entity declarations of all of its supertypes, but also all the EXPRESS attributes and rules they inherit. So subtype entities are specialisations of any of their supertypes, where a specialisation means a more constrained form of the original declaration. The mapping of complex entity data types use the technique of derivation by extension for those entity data types that do not inherit from multiple supertypes. When a complex type is derived by extension, its effective content model is the content model of the base type plus the content model specified in the type derivation.
EXPRESS allows the declaration of entities that are not intended to be directly instantiated. For each EXPRESS entity data type declared to be ABSTRACT, the Schema shall contain an XML element declaration corresponding to the EXPRESS entity data type. The XML element shall be declared to be abstract so it cannot be used in a XML instance document.
For each defined EXPRESS data type with a final underlying type of STRING, INTEGER, REAL, NUMBER or BOOLEAN the XML schema contain a new simpleType derived by the corresponding built-in types.
A SELECT data type has a select list where each item shall be an entity data type or a defined data type. SELECT data types do not have corresponding XML types.
NOTE This approach will only handle such SELECT data types where the select list contains EXPRESS entity data types only.
For each EXPRESS explicit attribute of an EXPRESS entity data type declaration the corresponding ComplexType in the XML Schema Definition shall contain an element description. The name of the XML element shall be the name of the EXPRESS attribute except that the first character of the XML name shall be in upper case and all other characters shall be in lower case. If the EXPRESS attribute is declared to be OPTIONAL, then the minOccurs pattern of the XML element shall be declared to be "0". The type of the XML element shall be declared according to the data type of the EXPRESS attribute.
For each inverse attribute of an EXPRESS entity data type declaration the associated complexType shall contain an XML element declaration corresponding to the EXPRESS attribute. The name of the XML element shall be the name of the data type of the EXPRESS inverse attribute. The type of the XML element shall be declared according to the data type of the EXPRESS inverse attribute.
The redeclaration of EXPRESS attributes shall have no effect on the XML schema declaration.
The XML element corresponding to an EXPRESS attribute whose data type is an EXPRESS entity data type shall be declared to have type IDREF in the XML Schema Definition. The IDREF element shall reference the id attribute of an XML ComplexType corresponding to the EXPRESS entity data type of the attribute.
The XML attribute corresponding to an EXPRESS attribute whose data type is a SELECT data type shall be declared to have type IDREF in the XML schema declaration.
The XML element corresponding to an EXPRESS attribute whose data type is a defined data type with a final underlying type of STRING, INTEGER, REAL, NUMBER, or BOOLEAN shall be declared to have the XML type corresponding to the underlying type of the defined data type in the EXPRESS type declaration:
ISO EXPRESS attribute type | ISO XML element type |
NUMBER , REAL | xs:double |
INTEGER | xs:integer |
STRING | xs:string |
BOOLEAN | xs:boolean |
EXPRESS provides four kinds of aggregation data types: ARRAY, LIST, BAG and SET. These data types have as their domains collections of values of a given base data type where the base data type can be a simple type, a named type or another aggregation type.
The XML element corresponding to an aggregate valued EXPRESS attribute shall be declared to be of type "xs:IDREF" if the EXPRESS base data type is
The XML element shall have the type "xs:IDREFS" if the EXPRESS base data type is
If the base data type is an entity data type the values of the xs:IDREFS element shall be the values of id attributes of elements corresponding to the entity data type. If the base data type is a SELECT type the values of the xs:IDREFS element shall be the values of id attributes of elements corresponding to the entity data types in the select list. If the base data type is an aggregate data type the values of the xs:IDREFS element shall be the values of id attributes of elements of "Entity_aggregate" type. The "Aggregate" elements of these have to refer to other "Entity_aggregate" elements.
The mapping approach allows the optimizations to change references to containments. The entity definitions of entities with one or more entity-valued attributes may be changed by the following rules:
© ISO 2010 — All rights reserved