mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 09:46:20 +00:00
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:
parent
efad33c3c5
commit
d2a36c5958
35
repos/base/xsd/base_types.xsd
Normal file
35
repos/base/xsd/base_types.xsd
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:simpleType name="Boolean">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="true" />
|
||||
<xs:enumeration value="yes" />
|
||||
<xs:enumeration value="on" />
|
||||
<xs:enumeration value="false" />
|
||||
<xs:enumeration value="no" />
|
||||
<xs:enumeration value="off" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Boolean -->
|
||||
|
||||
<xs:simpleType name="Thread_name">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="40"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Thread_name -->
|
||||
|
||||
<xs:simpleType name="Number_of_bytes">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Number_of_bytes -->
|
||||
|
||||
<xs:simpleType name="Session_label">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="160"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Session_label -->
|
||||
|
||||
</xs:schema>
|
@ -1,23 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:simpleType name="Boolean">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="true" />
|
||||
<xs:enumeration value="yes" />
|
||||
<xs:enumeration value="on" />
|
||||
<xs:enumeration value="false" />
|
||||
<xs:enumeration value="no" />
|
||||
<xs:enumeration value="off" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Boolean -->
|
||||
|
||||
<xs:simpleType name="Port">
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="0"/>
|
||||
<xs:maxInclusive value="65535"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Port -->
|
||||
<xs:include schemaLocation="base_types.xsd"/>
|
||||
<xs:include schemaLocation="net_types.xsd"/>
|
||||
<xs:include schemaLocation="timeout_types.xsd"/>
|
||||
|
||||
<xs:simpleType name="Protocol">
|
||||
<xs:restriction base="xs:string">
|
||||
@ -26,25 +12,6 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Protocol -->
|
||||
|
||||
<xs:simpleType name="Seconds">
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="3600"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Seconds -->
|
||||
|
||||
<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:element name="config">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="verbose" type="Boolean" />
|
||||
|
@ -1,36 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:simpleType name="Boolean">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="true" />
|
||||
<xs:enumeration value="yes" />
|
||||
<xs:enumeration value="on" />
|
||||
<xs:enumeration value="false" />
|
||||
<xs:enumeration value="no" />
|
||||
<xs:enumeration value="off" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Boolean -->
|
||||
|
||||
<xs:simpleType name="Seconds">
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="3600"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Seconds -->
|
||||
|
||||
<xs:simpleType name="Number_of_bytes">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Thread_name -->
|
||||
|
||||
<xs:simpleType name="Thread_name">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="40"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Thread_name -->
|
||||
<xs:include schemaLocation="base_types.xsd"/>
|
||||
<xs:include schemaLocation="timeout_types.xsd"/>
|
||||
|
||||
<xs:simpleType name="Trace_policy_name">
|
||||
<xs:restriction base="xs:string">
|
||||
@ -39,13 +11,6 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Trace_policy_name -->
|
||||
|
||||
<xs:simpleType name="Session_label">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="160"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Session_label -->
|
||||
|
||||
<xs:element name="config">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
|
@ -1,28 +1,30 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:include schemaLocation="base_types.xsd"/>
|
||||
|
||||
<xs:complexType name="template_service">
|
||||
<xs:choice minOccurs="1" maxOccurs="3">
|
||||
<xs:element name="parent"/>
|
||||
<xs:element name="any-child"/>
|
||||
<xs:element name="child">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="label" type="xs:string" />
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="label" type="Session_label" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="label" type="xs:string" />
|
||||
<xs:attribute name="label_prefix" type="xs:string" />
|
||||
<xs:attribute name="label_suffix" type="xs:string" />
|
||||
<xs:attribute name="label_last" type="xs:string" />
|
||||
<xs:attribute name="unscoped_label" type="xs:string" />
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="label" type="Session_label" />
|
||||
<xs:attribute name="label_prefix" type="Session_label" />
|
||||
<xs:attribute name="label_suffix" type="Session_label" />
|
||||
<xs:attribute name="label_last" type="Session_label" />
|
||||
<xs:attribute name="unscoped_label" type="Session_label" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="template_route">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="service" type="template_service"/>
|
||||
<xs:element name="service" type="template_service"/>
|
||||
<xs:element name="any-service" type="template_service"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
@ -33,7 +35,7 @@
|
||||
|
||||
<xs:element name="affinity-space">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="width" type="xs:int" />
|
||||
<xs:attribute name="width" type="xs:int" />
|
||||
<xs:attribute name="height" type="xs:int" />
|
||||
</xs:complexType>
|
||||
</xs:element> <!-- "affinity-space" -->
|
||||
@ -52,7 +54,7 @@
|
||||
|
||||
<xs:element name="alias">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="child" type="xs:string" />
|
||||
</xs:complexType>
|
||||
</xs:element> <!-- "alias" -->
|
||||
@ -67,22 +69,22 @@
|
||||
|
||||
<xs:element name="report">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="ids" type="xs:string" />
|
||||
<xs:attribute name="requested" type="xs:string" />
|
||||
<xs:attribute name="provided" type="xs:string" />
|
||||
<xs:attribute name="session_args" type="xs:string" />
|
||||
<xs:attribute name="child_caps" type="xs:string" />
|
||||
<xs:attribute name="child_ram" type="xs:string" />
|
||||
<xs:attribute name="init_caps" type="xs:string" />
|
||||
<xs:attribute name="init_ram" type="xs:string" />
|
||||
<xs:attribute name="delay_ms" type="xs:int" />
|
||||
<xs:attribute name="ids" type="Boolean" />
|
||||
<xs:attribute name="requested" type="Boolean" />
|
||||
<xs:attribute name="provided" type="Boolean" />
|
||||
<xs:attribute name="session_args" type="Boolean" />
|
||||
<xs:attribute name="child_caps" type="Boolean" />
|
||||
<xs:attribute name="child_ram" type="Boolean" />
|
||||
<xs:attribute name="init_caps" type="Boolean" />
|
||||
<xs:attribute name="init_ram" type="Boolean" />
|
||||
<xs:attribute name="delay_ms" type="xs:int" />
|
||||
</xs:complexType>
|
||||
</xs:element> <!-- "report" -->
|
||||
|
||||
<xs:element name="resource">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="preserve" type="xs:string" />
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="preserve" type="Number_of_bytes" />
|
||||
</xs:complexType>
|
||||
</xs:element> <!-- "resource" -->
|
||||
|
||||
@ -98,18 +100,18 @@
|
||||
|
||||
<xs:element name="affinity">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="xpos" type="xs:int" />
|
||||
<xs:attribute name="ypos" type="xs:int" />
|
||||
<xs:attribute name="width" type="xs:int" />
|
||||
<xs:attribute name="xpos" type="xs:int" />
|
||||
<xs:attribute name="ypos" type="xs:int" />
|
||||
<xs:attribute name="width" type="xs:int" />
|
||||
<xs:attribute name="height" type="xs:int" />
|
||||
</xs:complexType>
|
||||
</xs:element> <!-- "affinity" -->
|
||||
|
||||
<xs:element name="resource">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="quantum" type="xs:string" />
|
||||
<xs:attribute name="constrain_phys" type="xs:string" />
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="quantum" type="Number_of_bytes" />
|
||||
<xs:attribute name="constrain_phys" type="Boolean" />
|
||||
</xs:complexType>
|
||||
</xs:element> <!-- "resource" -->
|
||||
|
||||
@ -143,17 +145,17 @@
|
||||
</xs:element> <!-- "config" -->
|
||||
|
||||
</xs:choice>
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="ld" type="xs:string" />
|
||||
<xs:attribute name="caps" type="xs:int" />
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
<xs:attribute name="ld" type="Boolean" />
|
||||
<xs:attribute name="caps" type="xs:int" />
|
||||
<xs:attribute name="priority" type="xs:int" />
|
||||
</xs:complexType>
|
||||
</xs:element> <!-- "start" -->
|
||||
|
||||
</xs:choice>
|
||||
<xs:attribute name="prio_levels" type="xs:int" />
|
||||
<xs:attribute name="verbose" type="xs:string" />
|
||||
<xs:attribute name="ld_verbose" type="xs:string" />
|
||||
<xs:attribute name="verbose" type="Boolean" />
|
||||
<xs:attribute name="ld_verbose" type="Boolean" />
|
||||
</xs:complexType>
|
||||
</xs:element> <!-- "config" -->
|
||||
</xs:schema>
|
||||
|
@ -1,35 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:simpleType name="Boolean">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="true" />
|
||||
<xs:enumeration value="yes" />
|
||||
<xs:enumeration value="on" />
|
||||
<xs:enumeration value="false" />
|
||||
<xs:enumeration value="no" />
|
||||
<xs:enumeration value="off" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Boolean -->
|
||||
|
||||
<xs:simpleType name="Session_label">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="160"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Session_label -->
|
||||
|
||||
<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="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:include schemaLocation="base_types.xsd"/>
|
||||
<xs:include schemaLocation="net_types.xsd"/>
|
||||
|
||||
<xs:element name="config">
|
||||
<xs:complexType>
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:include schemaLocation="base_types.xsd"/>
|
||||
|
||||
<xs:simpleType name="Interface_label">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
@ -8,17 +10,6 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Interface_label -->
|
||||
|
||||
<xs:simpleType name="Boolean">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="true" />
|
||||
<xs:enumeration value="yes" />
|
||||
<xs:enumeration value="on" />
|
||||
<xs:enumeration value="false" />
|
||||
<xs:enumeration value="no" />
|
||||
<xs:enumeration value="off" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Boolean -->
|
||||
|
||||
<xs:simpleType name="Log_style">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="no" />
|
||||
|
@ -1,37 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:simpleType name="Boolean">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="true" />
|
||||
<xs:enumeration value="yes" />
|
||||
<xs:enumeration value="on" />
|
||||
<xs:enumeration value="false" />
|
||||
<xs:enumeration value="no" />
|
||||
<xs:enumeration value="off" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Boolean -->
|
||||
|
||||
<xs:simpleType name="Seconds">
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="3600"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Seconds -->
|
||||
|
||||
<xs:simpleType name="Port">
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="0"/>
|
||||
<xs:maxInclusive value="65535"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Port -->
|
||||
|
||||
<xs:simpleType name="Nr_of_ports">
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="65536"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Nr_of_ports -->
|
||||
<xs:include schemaLocation="base_types.xsd"/>
|
||||
<xs:include schemaLocation="net_types.xsd"/>
|
||||
<xs:include schemaLocation="timeout_types.xsd"/>
|
||||
|
||||
<xs:simpleType name="Domain_name">
|
||||
<xs:restriction base="xs:string">
|
||||
@ -40,24 +12,12 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Domain_name -->
|
||||
|
||||
<xs:simpleType name="Session_label">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:minLength value="1"/>
|
||||
<xs:maxLength value="160"/>
|
||||
<xs:simpleType name="Nr_of_ports">
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="1"/>
|
||||
<xs:maxInclusive value="65536"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Session_label -->
|
||||
|
||||
<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><!-- Nr_of_ports -->
|
||||
|
||||
<xs:complexType name="L2_rule">
|
||||
<xs:attribute name="dst" type="Ipv4_address_prefix" />
|
||||
|
@ -1,16 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:simpleType name="Boolean">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="true" />
|
||||
<xs:enumeration value="yes" />
|
||||
<xs:enumeration value="on" />
|
||||
<xs:enumeration value="false" />
|
||||
<xs:enumeration value="no" />
|
||||
<xs:enumeration value="off" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Boolean -->
|
||||
<xs:include schemaLocation="base_types.xsd"/>
|
||||
<xs:include schemaLocation="net_types.xsd"/>
|
||||
|
||||
<xs:simpleType name="Protocol">
|
||||
<xs:restriction base="xs:string">
|
||||
@ -20,18 +12,6 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType><!-- Protocol -->
|
||||
|
||||
<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:element name="config">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="verbose" type="Boolean" />
|
||||
|
29
repos/os/xsd/net_types.xsd
Normal file
29
repos/os/xsd/net_types.xsd
Normal 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>
|
11
repos/os/xsd/timeout_types.xsd
Normal file
11
repos/os/xsd/timeout_types.xsd
Normal 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>
|
16
tool/run/run
16
tool/run/run
@ -115,7 +115,7 @@ proc check_xml_syntax {xml_file} {
|
||||
# configurations of children of the component
|
||||
# \param nesting_level level of recursive calls of this procedure
|
||||
#
|
||||
proc check_config {bin xml_file xsd_file label avail_xsd_files nesting_level} {
|
||||
proc check_config {bin xml_file xsd_file label avail_xsd_files xsd_inc nesting_level} {
|
||||
|
||||
# check prerequisites if this is not a recursive call
|
||||
if {$nesting_level == 0} {
|
||||
@ -130,7 +130,7 @@ proc check_config {bin xml_file xsd_file label avail_xsd_files nesting_level} {
|
||||
|
||||
# check the given component configuration itself
|
||||
puts " CHECK $label"
|
||||
if {[catch {exec xmllint --noout -schema $xsd_file $xml_file} result]} {
|
||||
if {[catch {exec xmllint --noout --path $xsd_inc -schema $xsd_file $xml_file} result]} {
|
||||
|
||||
if {$result != "$xml_file validates"} {
|
||||
|
||||
@ -199,7 +199,8 @@ proc check_config {bin xml_file xsd_file label avail_xsd_files nesting_level} {
|
||||
# call this procedure again on the child config file
|
||||
set child_label "$label -> $child_name"
|
||||
check_config $child_bin $child_xml_file $child_xsd_file \
|
||||
$child_label $avail_xsd_files [expr $nesting_level+1]
|
||||
$child_label $avail_xsd_files $xsd_inc \
|
||||
[expr $nesting_level+1]
|
||||
|
||||
# clean up
|
||||
exec rm -f $child_xml_file
|
||||
@ -246,9 +247,16 @@ proc build_boot_image {binaries} {
|
||||
set init_xsd_file $xsd_file
|
||||
}
|
||||
}
|
||||
# determine include directories that can be used by the XSD files
|
||||
global repositories;
|
||||
set xsd_inc ""
|
||||
foreach repo $repositories {
|
||||
if {[file exists $repo/xsd]} {
|
||||
append xsd_inc "$repo/xsd " }
|
||||
}
|
||||
# check configurations of init and its children
|
||||
puts "checking configuration syntax"
|
||||
check_config init [run_dir]/genode/config $init_xsd_file init $xsd_files 0
|
||||
check_config init [run_dir]/genode/config $init_xsd_file init $xsd_files $xsd_inc 0
|
||||
|
||||
run_boot_dir $binaries
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user