Page tree
Skip to end of metadata
Go to start of metadata

XSD generation pattern

AIXM objects are encoded as GML objects. For the most part, the XML schema entities are created in the same way as for Features, following the object-property model. However it is important to remember that AIXM objects do not exist outside of a feature and are therefore part of the feature timeslice. TimeSlice types and elements are not created for objects. 
For each AIXM Object the following XML schema entities are created: 

  • ObjectPropertyGroup
  • Object
  • ObjectType
  • ObjectPropertyType
  • AbstractObjectExtension


ObjectType is complex type which extends AbstracAIXMObjectType. 

ObjectType
<complexType name="NavaidEquipmentDistanceType">
<complexContent>
<extension base="aixm:AbstractAIXMObjectType">
<sequence>
<group ref="aixm:NavaidEquipmentDistancePropertyGroup"/>
<element name="extension" minOccurs="0" maxOccurs="unbounded">
<complexType>
<sequence>
<element ref="aixm:AbstractNavaidEquipmentDistanceExtension"/>
</sequence>
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
</complexType>
</element>
</sequence>
</extension>
</complexContent>
</complexType> 


ObjectPropertyType type is a complex type which extends aixm:AbstractAIXMPropertyType. 

ObjectPropertType
<complexType name="NavaidEquipmentDistancePropertyType">
<complexContent>
<extension base="aixm:AbstractAIXMPropertyType">
<sequence>
<element ref="aixm:NavaidEquipmentDistance"/>
</sequence>
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
</extension>
</complexContent>
</complexType> 

Example

The example will use the City object illustrated below. The object represents the town that is served by an AirportHeliport. 

AbstractCityExtension

An abstract XML element acts as the root for all extension to the City object. Object extensions are defined in the same way as Feature extensions. 
 

<element name="AbstractCityExtension" type="aixm:AbstractExtensionType" abstract="true" substitutionGroup="aixm:AbstractExtension"/>

CityPropertyGroup

An XSD group containing the properties of the City object is created, again similar to Features. 
 
<group name="CityPropertyGroup">
<sequence>
<element name="name" type="aixm:TextNameType" nillable="true" minOccurs="0">
<annotation>
<appinfo>AIXM 4.5</appinfo>
<appinfo><gml:description>The full free text name of the city or town the aerodrome/heliport is serving.
</gml:description></appinfo>
</annotation>
</element>
<element name="annotation" type="aixm:NotePropertyType" nillable="true" minOccurs="0" maxOccurs="unbounded">
</element>
</sequence>
</group>

CityType

The CityType definition uses the CityPropertyGroup and the extension. It extends AbstractAIXMObjectType 
 
<complexType name="CityType">
<complexContent>
<extension base="aixm:AbstractAIXMObjectType">
<sequence>
<group ref="aixm:CityPropertyGroup"/>
<element name="extension" minOccurs="0" maxOccurs="unbounded">
<complexType>
<sequence>
<element ref="aixm:AbstractCityExtension"/>
</sequence>
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
</complexType>
</element>
</sequence>
</extension>
</complexContent>
</complexType>

City

The City object is then defined as an XSD element of type CityType.
 
<element name="City" type="aixm:CityType">
<annotation>
<appinfo><gml:description>A city or location that may be served by an airport/heliport.</gml:description></appinfo>
</annotation>
</element>

CityPropertyType

An XSD complex type representing a GML property type is created. A Feature uses this element to include the City object rather than reference it (using xlink:href) because object does not exist without the parent. 
 
<complexType name="CityPropertyType">
<complexContent>
<extension base="aixm:AbstractAIXMObjectType">
<sequence>
<element ref="aixm:City"/>
</sequence>
<attributeGroup ref="gml:OwnershipAttributeGroup"/>
</extension>
</complexContent>
</complexType>

  • No labels