XSD generation pattern

For each AIXM Feature in the UML, the following XML schema entities are created:
The direction in which the different types and elements are used in the schema definition
(e.g. Feature uses FeatureType)FeaturePropertyType

  • Feature
  • FeatureType
  • FeatureTimeSlicePropertyType
  • FeatureTimeSlice.
  • FeatureTimeSliceType
  • FeaturePropertyGroup
  • AbstractFeatureExtension


The Runway feature (shown below) will be used to illustrate the mapping. The example will concentrate on the properties (shown as attributes). 


An XML Schema (XSD) group is generated for each feature containing all of the properties (attributes and relationships) of the feature. 
The order in which the chilled elements of the group are declared is the following: 

  1. (if applicable) in the case of derived classes only, the property group of the super class is inserted first;
  2. then, all the elements that correspond to class attributes, in the order that they appear in the UML class diagram
  3. then, all the elements that correspond to association role names, in random order;
  4. last the "annotation" property – note that for derived classes this property is only defined in the super class, therefore it will appear in the property group of the super class.

Below is an example of the RunwayPropertyGroup in graphic form and as an extract from the XSD. It shows clearly how the attributes are mapped from the UML to the XSD and how the relationship 'associatedAirportHeliport' is created. 

<group name="RunwayPropertyGroup">
<element name="designator" type="aixm:TextDesignatorType" nillable="true" minOccurs="0"/>
<element name="type" type="aixm:CodeRunwayType" nillable="true" minOccurs="0"/>
<element name="nominalLength" type="aixm:ValDistanceType" nillable="true" minOccurs="0"/>
<element name="lengthAccuracy" type="aixm:ValDistanceType" nillable="true" minOccurs="0"/>
<element name="associatedAirportHeliport" type="aixm:AirportHeliportPropertyType" nillable="true" minOccurs="0"/>
<element name="areaContaminant" type="aixm: RunwayContaminationPropertyType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
<element name="annotation" type="aixm:NotePropertyType" nillable="true" minOccurs="0" maxOccurs="unbounded"/>


The properties of a feature or the target of any feature relationship can change within the lifetime of the feature. This temporality can be expressed in GML by using dynamic features and feature collections. The TimeSlice property of a dynamic feature contains one or more Feature TimeSlices that capture the evolution of the feature over time. A gml:TimeSlice object contains the dynamic properties of the feature. 
For each feature a TimeSlice property is created that contains an array of feature TimeSlice objects. This example shows the RunwayTimeSliceType encapsulating all of the Runway properties (RunwayPropertyGroup created above) that change over time.

<complexType name="RunwayTimeSliceType">
<extension base="aixm:AbstractAIXMTimeSliceType">
<group ref="aixm:RunwayPropertyGroup"/>
<element name="extension" minOccurs="0" maxOccurs="unbounded">
<element ref="aixm:AbstractRunwayExtension"/>
<attributeGroup ref="gml:OwnershipAttributeGroup"/>


The FeatureTimeSlice object is of type FeatureTimeSliceType. Continuing the example, the RunwayTimeSlice element is of type RunwayTimeSliceType. 

FeatureTimeSlice element
<element name="RunwayTimeSlice" type="aixm:RunwayTimeSliceType" substitutionGroup="gml:AbstractTimeSlice"/> 


A GML property type containing a FeatureTimeSlice objects is created.

<complexType name="RunwayTimeSlicePropertyType">
<element ref="aixm:RunwayTimeSlice"/>
<attributeGroup ref="gml:OwnershipAttributeGroup"/>


Continuing with the object-property model, the Runway feature type is created extending the AbstractAIXMFeatureType with the RunwayTimeSlice object created above. 

<complexType name="RunwayType">
<extension base="aixm:AbstractAIXMFeatureType">
<element name="timeSlice" type="aixm:RunwayTimeSlicePropertyType" maxOccurs="unbounded"/>


The Runway feature is then defined by the RunwayType. 

Feature element
<element name="Runway" type="aixm:RunwayType" substitutionGroup="aixm:AbstractAIXMFeature">
 defined rectangular area on a land aerodrome/heliport prepared for the 
landing and take-off of aircraft. Note: this includes the concept of 
Final Approach and Take-Off Area (FATO) for 


When a property of a feature is a relationship, the relationship must be associated to another feature or object. This is done through the creation of the FeaturePropertyType, in this case, the RunwayPropertyType. 
In AIXM, when the relationship or association points to another feature, the feature is referenced using the xlink:href attribute (it's always a "remote" encoding). When the relationship points to an object, the object is included inside the parent. (Objects cannot exist without the parent.) Since a Runway is a feature the RunwayPropertyType is created with the attribute xlink:href . 

<complexType name="RunwayPropertyType">
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
<attributeGroup ref="gml:AssociationAttributeGroup"/>


All Features and Objects can be extended. A relationship is created with an abstract XML element that acts as the root for all extensions. Below is an example of the extension for the Runway feature. The AbstractRunwayExtension element uses the AbstractExtensionType as shown below. 

FeatureExtension (placeholder)
<element name="AbstractRunwayExtension" type="aixm:AbstractExtensionType" abstract="true" substitutionGroup="aixm:AbstractExtension"/> 
  • No labels