domain.xsd 7.23 KB
Newer Older
1
<?xml version="1.0" encoding="UTF-8"?>
2 3
<xs:schema targetNamespace="http://homegatewayinitiative.org/xml/dal/2.0" 
	   xmlns="http://homegatewayinitiative.org/xml/dal/2.0" 
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
	   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
	  
 elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
  <xs:group name="Imports">
    <xs:sequence>
      <xs:element minOccurs="0" ref="Imports"/>
    </xs:sequence>
  </xs:group>
  <xs:element name="Imports">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="Domain"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Domain">
    <xs:complexType>
      <xs:sequence>
        <xs:group ref="Imports"/>
        <xs:element minOccurs="0" name="Modules">
          <xs:complexType>
            <xs:sequence>
              <xs:element minOccurs="0" maxOccurs="unbounded" ref="ModuleClass"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element minOccurs="0" ref="RootDevices"/>
      </xs:sequence>
      <xs:attribute ref="xml:base"/>
      <xs:attribute name="id" use="required" type="xs:ID"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="ModuleClass" type="ModuleDef"/>
  <xs:element name="RootDevices">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="RootDevice"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="RootDevice">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="DeviceInfo"/>
        <xs:group ref="Doc"/>
        <xs:element minOccurs="0" ref="Modules"/>
        <xs:element minOccurs="0" ref="Devices"/>
      </xs:sequence>
      <xs:attribute name="id" use="required" type="xs:Name"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="Devices">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="Device"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Device" type="DeviceDef"/>
  <xs:complexType name="DeviceDef">
    <xs:sequence>
      <xs:element ref="DeviceInfo"/>
      <xs:group ref="Doc"/>
      <xs:element minOccurs="0" ref="Modules"/>
    </xs:sequence>
    <xs:attribute name="id" use="required" type="xs:Name"/>
  </xs:complexType>
  <xs:element name="DeviceInfo">
    <xs:complexType>
      <xs:all>
        <xs:element ref="Name"/>
        <xs:element ref="Vendor"/>
        <xs:element minOccurs="0" ref="FirmwareVersion"/>
        <xs:element minOccurs="0" ref="SerialNumber"/>
        <xs:element minOccurs="0" ref="VendorURL"/>
      </xs:all>
    </xs:complexType>
  </xs:element>
  <xs:element name="Name" type="xs:string"/>
  <xs:element name="Vendor" type="xs:string"/>
  <xs:element name="FirmwareVersion" type="xs:string"/>
  <xs:element name="SerialNumber" type="xs:string"/>
  <xs:element name="VendorURL" type="xs:anyURI"/>
  <xs:simpleType name="DataType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="integer"/>
      <xs:enumeration value="boolean"/>
      <xs:enumeration value="string"/>
      <xs:enumeration value="byte"/>
      <xs:enumeration value="float"/>
      <xs:enumeration value="array"/>
      <xs:enumeration value="enum"/>
      <xs:enumeration value="date"/>
      <xs:enumeration value="time"/>
      <xs:enumeration value="datetime"/>
      <xs:enumeration value="blob"/>
Andreas Kraft's avatar
Andreas Kraft committed
101
      <xs:enumeration value="uri"/>
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
    </xs:restriction>
  </xs:simpleType>
  <xs:group name="DocText">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="em"/>
        <xs:element ref="b"/>
        <xs:element ref="tt"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>
  <xs:element name="em" type="xs:string"/>
  <xs:element name="b" type="xs:string"/>
  <xs:element name="tt" type="xs:string"/>
  <xs:group name="Doc">
    <xs:sequence>
      <xs:element minOccurs="0" ref="Doc"/>
    </xs:sequence>
  </xs:group>
  <xs:element name="Doc">
    <xs:complexType mixed="true">
      <xs:choice>
        <xs:group ref="DocText"/>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element ref="p"/>
          <xs:element ref="img"/>
        </xs:choice>
      </xs:choice>
    </xs:complexType>
  </xs:element>
  <xs:element name="p">
    <xs:complexType mixed="true">
      <xs:group ref="DocText"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="img">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="caption"/>
      </xs:sequence>
      <xs:attribute name="src" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="caption" type="xs:string"/>
  <xs:complexType name="ModuleDef">
    <xs:sequence>
      <xs:element minOccurs="0" ref="extends"/>
      <xs:group ref="Doc"/>
      <xs:element minOccurs="0" ref="Actions"/>
      <xs:element minOccurs="0" ref="Data"/>
      <xs:element minOccurs="0" ref="Events"/>
    </xs:sequence>
    <xs:attribute name="name" use="required"/>
  </xs:complexType>
  <xs:element name="extends">
    <xs:complexType>
      <xs:attribute name="domain" use="required" type="xs:IDREF"/>
      <xs:attribute name="class" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="Modules">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="Module"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Module" type="ModuleDef"/>
  <xs:element name="Actions">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="Action"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Action">
    <xs:complexType>
      <xs:sequence>
        <xs:group ref="Doc"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="Arg"/>
      </xs:sequence>
      <xs:attribute name="name" use="required"/>
      <xs:attribute name="type" type="DataType"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="Arg">
    <xs:complexType>
      <xs:group ref="Doc"/>
      <xs:attribute name="name" use="required"/>
      <xs:attribute name="type" use="required" type="DataType"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="Data">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="DataPoint"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="DataPoint">
    <xs:complexType>
      <xs:group ref="Doc"/>
      <xs:attribute name="name" use="required"/>
205
      <xs:attribute name="type" use="required" type="DataType"/>
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
      <xs:attribute name="writable" type="xs:boolean"/>
      <xs:attribute name="readable" type="xs:boolean"/>
      <xs:attribute name="eventable" type="xs:boolean"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="Events">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="Event"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Event">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Data"/>
        <xs:group ref="Doc"/>
      </xs:sequence>
      <xs:attribute name="name" use="required"/>
    </xs:complexType>
  </xs:element>
</xs:schema>