Skip to content

Commit

Permalink
Validate that name attribute may not contain whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee authored and tridge committed May 16, 2022
1 parent ae252c9 commit 7a4a300
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions generator/mavschema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

<!-- definition of attributes -->
<xs:attribute name="name"> <!-- used in enum,entry,message,field elements -->
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[\w_]+"/> <!-- Force only word characters in names (a-zA-Z0-9_ and many unicode). No whitespace -->
</xs:restriction>
</xs:simpleType>

</xs:attribute>
<xs:attribute name="id" type="mavlinkMsgId"/> <!-- used in message elements -->
<xs:attribute name="print_format" type="xs:string"/> <!-- used in field elements -->
Expand Down

0 comments on commit 7a4a300

Please sign in to comment.