Skip to content

Commit

Permalink
Add multiplier attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee committed May 1, 2024
1 parent 7006cc8 commit 96fcaf8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion generator/mavschema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<xs:attribute name="enum" type="xs:string"/> <!-- used in field,param elements -->
<xs:attribute name="display" type="xs:string"/> <!-- used in field elements -->
<xs:attribute name="units" type="SI_Unit"/> <!-- this will get changed on the fly to xs:string if no strict-units command line option is used -->
<xs:attribute name="multiplier" type="factor"/>
<xs:attribute name="instance" type="xs:boolean"/>
<xs:attribute name="invalid" type="xs:string"/> <!-- used in message field elements -->
<xs:attribute name="value"> <!-- used in entry elements -->
Expand Down Expand Up @@ -171,7 +172,11 @@
<!-- volume -->
<xs:enumeration value="cm^3"/> <!-- cubic centimetres -->
<xs:enumeration value="l"/> <!-- litres -->
<!-- unitless scaled values -->
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="factor">
<xs:restriction base="xs:string">
<xs:enumeration value="1E2"/> <!-- value scaled up by 100 -->
</xs:restriction>
</xs:simpleType>
Expand All @@ -196,6 +201,7 @@
<xs:attribute ref="index" use="required"/>
<xs:attribute ref="label"/>
<xs:attribute ref="units"/>
<xs:attribute ref="multiplier"/>
<xs:attribute ref="instance"/>
<xs:attribute ref="enum" />
<xs:attribute ref="decimalPlaces"/>
Expand Down Expand Up @@ -240,6 +246,7 @@
<xs:attribute ref="increment"/>
<xs:attribute ref="minValue"/>
<xs:attribute ref="maxValue"/>
<xs:attribute ref="multiplier"/>
<xs:attribute ref="default" />
<xs:attribute ref="instance" />
<xs:attribute ref="invalid" />
Expand Down

0 comments on commit 96fcaf8

Please sign in to comment.