base: define generic config XSD types globally

The new base/xsd/config.inc defines generic XSD types such as 'Boolean' or
'Session_label'. It can be included in config XSD files by using:

! <xs:include schemaLocation="file://${GENODE_CONFIG_INC}"/>

The string ${GENODE_CONFIG_INC} is replaced by the run tool with the
above mentionened file path.

Issue #2897
This commit is contained in:
Martin Stein
2018-07-04 14:08:16 +02:00
committed by Christian Helmuth
parent efad33c3c5
commit d2a36c5958
11 changed files with 141 additions and 220 deletions

View File

@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="Mac_address">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9a-fA-F]{2}.[0-9a-fA-F]{2}.[0-9a-fA-F]{2}.[0-9a-fA-F]{2}.[0-9a-fA-F]{2}.[0-9a-fA-F]{2}"/>
</xs:restriction>
</xs:simpleType><!-- Mac_address -->
<xs:simpleType name="Ipv4_address">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}"/>
</xs:restriction>
</xs:simpleType><!-- Ipv4_address -->
<xs:simpleType name="Ipv4_address_prefix">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/[0-9]{1,2}"/>
</xs:restriction>
</xs:simpleType><!-- Ipv4_address_prefix -->
<xs:simpleType name="Port">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="65535"/>
</xs:restriction>
</xs:simpleType><!-- Port -->
</xs:schema>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="Seconds">
<xs:restriction base="xs:integer">
<xs:minInclusive value="1"/>
<xs:maxInclusive value="3600"/>
</xs:restriction>
</xs:simpleType><!-- Seconds -->
</xs:schema>