Skip to content

Commit

Permalink
mavschema.xsd: add superseded tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee authored May 4, 2023
1 parent 5f5e6af commit 2af1e2e
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions generator/mavschema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="since"> <!-- used in deprecated elements -->
<xs:attribute name="since"> <!-- used in elements: wip, superseded, deprecated -->
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="(20)\d{2}-(0[1-9]|1[012])"/> <!-- restrict dates to 20YY-MM format -->
<xs:pattern value="(20)\d{2}-(0[1-9]|1[012])"/> <!-- restrict dates to 20YY-MM format -->
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="replaced_by" type="xs:string"/> <!-- used in deprecated elements -->
<xs:attribute name="replaced_by" type="xs:string"/> <!-- used in elements: superseded, deprecated -->

<!-- mavlink message IDs are unsigned 24-bit values. -->
<xs:simpleType name="mavlinkMsgId" id="mavlinkMsgId">
Expand Down Expand Up @@ -202,7 +202,16 @@
</xs:complexType>
</xs:element>

<xs:element name="deprecated">
<xs:element name="wip">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="description" minOccurs="0"/>
</xs:sequence>
<xs:attribute ref="since" />
</xs:complexType>
</xs:element>

<xs:element name="superseded">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="description" minOccurs="0"/>
Expand All @@ -212,12 +221,13 @@
</xs:complexType>
</xs:element>

<xs:element name="wip">
<xs:element name="deprecated">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="description" minOccurs="0"/>
</xs:sequence>
<xs:attribute ref="since" />
<xs:attribute ref="since" use="required"/>
<xs:attribute ref="replaced_by" use="required"/>
</xs:complexType>
</xs:element>

Expand Down Expand Up @@ -245,8 +255,9 @@
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element ref="deprecated"/>
<xs:element ref="wip"/>
<xs:element ref="superseded"/>
<xs:element ref="deprecated"/>
</xs:choice>
<xs:element ref="description" minOccurs="0"/>
<xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
Expand All @@ -265,8 +276,9 @@
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element ref="deprecated"/>
<xs:element ref="wip"/>
<xs:element ref="superseded"/>
<xs:element ref="deprecated"/>
</xs:choice>
<xs:element ref="description" minOccurs="0"/>
<xs:element ref="entry" maxOccurs="unbounded"/>
Expand All @@ -281,8 +293,9 @@
<xs:sequence>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element ref="deprecated"/>
<xs:element ref="wip"/>
<xs:element ref="wip"/>
<xs:element ref="superseded"/>
<xs:element ref="deprecated"/>
</xs:choice>
<xs:element ref="description" minOccurs="1" maxOccurs="1"/>
<xs:element ref="field" minOccurs="1" maxOccurs="unbounded"/>
Expand Down

0 comments on commit 2af1e2e

Please sign in to comment.