<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified">

    <xs:element name="Flight">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="Aircraft" />
                <xs:element ref="Obstacle" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="Aircraft">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="Altitude" />
            </xs:sequence>
            <xs:attribute name="type" type="xs:string" />
        </xs:complexType>
    </xs:element>

    <xs:element name="Obstacle">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="Height" />
            </xs:sequence>
            <xs:attribute name="type" type="xs:string" />
        </xs:complexType>
    </xs:element>

    <xs:element name="Altitude" type="units" />
    <xs:element name="Height" type="units"/>

    <xs:complexType name="units">
        <xs:simpleContent>
            <xs:extension base="xs:integer">
                <xs:attribute name="units" type="xs:string" />
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>
</xs:schema>

