Skip to content

Commit 9611a95

Browse files
committed
Add missing schema definitions referenced in existing XML files & elements referenced in python_testing
1 parent 6022db1 commit 9611a95

File tree

1 file changed

+52
-13
lines changed

1 file changed

+52
-13
lines changed

src/app/zap-templates/zcl/zcl.xsd

+52-13
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ This schema describes the format of the XML files, that describe the ZCL specifi
1818
<xs:attribute name="id" use="required" type="xs:string"/>
1919
<xs:attribute name="name" use="required" type="xs:string"/>
2020
<xs:attribute name="type" use="required" type="xs:string"/>
21-
<xs:attribute name="array" use="optional" type="xs:boolean"/>
22-
<xs:attribute name="isNullable" use="optional" type="xs:boolean"/>
21+
<xs:attribute name="array" type="xs:boolean"/>
22+
<xs:attribute name="isNullable" type="xs:boolean"/>
2323
</xs:complexType>
2424
<xs:complexType name="tag">
2525
<xs:attribute name="name" use="required" type="xs:string"/>
@@ -38,7 +38,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
3838
<xs:attribute name="presentIf" type="xs:string"/>
3939
<xs:attribute name="optional" type="xs:integer"/>
4040
<xs:attribute name="fieldId" type="xs:integer"/>
41-
<xs:attribute name="countArg" type="xs:string" use="optional"/>
41+
<xs:attribute name="countArg" type="xs:string" />
4242
<xs:attribute name="isNullable" type="xs:boolean"/>
4343
</xs:complexType>
4444
<xs:complexType name="clusterRef">
@@ -245,7 +245,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
245245
<xs:complexType>
246246
<xs:sequence>
247247
<xs:element minOccurs="0" maxOccurs="unbounded" name="cluster"/>
248-
<xs:element minOccurs="1" maxOccurs="unbounded" ref="field"/>
248+
<xs:element maxOccurs="unbounded" ref="field"/>
249249
</xs:sequence>
250250
<xs:attribute name="name" use="required" type="xs:string"/>
251251
<xs:attribute name="type" use="required" type="xs:string"/>
@@ -269,6 +269,12 @@ This schema describes the format of the XML files, that describe the ZCL specifi
269269
<xs:attribute name="value" use="required" type="xs:string"/>
270270
</xs:complexType>
271271
</xs:element>
272+
<xs:element name="optionalConform">
273+
<xs:complexType>
274+
<xs:attribute name="choice" type="xs:string"/>
275+
<xs:attribute name="more" type="xs:boolean"/>
276+
</xs:complexType>
277+
</xs:element>
272278
<xs:element name="cluster">
273279
<xs:complexType>
274280
<xs:sequence>
@@ -285,10 +291,28 @@ This schema describes the format of the XML files, that describe the ZCL specifi
285291
<xs:element minOccurs="0" maxOccurs="unbounded" ref="attribute"/>
286292
<xs:element minOccurs="0" maxOccurs="unbounded" ref="command"/>
287293
<xs:element minOccurs="0" maxOccurs="unbounded" ref="event"/>
294+
<xs:element minOccurs="0" name="features">
295+
<xs:complexType>
296+
<xs:sequence>
297+
<xs:element maxOccurs="unbounded" name="feature">
298+
<xs:complexType>
299+
<xs:choice>
300+
<xs:element ref="optionalConform"/>
301+
</xs:choice>
302+
<xs:attribute name="bit" use="required" type="xs:integer" />
303+
<xs:attribute name="code" use="required" type="xs:string" />
304+
<xs:attribute name="name" type="xs:string" />
305+
<xs:attribute name="summary" type="xs:string" />
306+
</xs:complexType>
307+
</xs:element>
308+
</xs:sequence>
309+
</xs:complexType>
310+
</xs:element>
288311
</xs:sequence>
289312
<xs:attribute name="introducedIn" type="xs:string"/>
290313
<xs:attribute name="manufacturerCode" type="zclCode"/>
291314
<xs:attribute name="singleton" type="xs:boolean"/>
315+
<xs:attribute name="apiMaturity" type = "zclApiMaturity" />
292316
</xs:complexType>
293317
</xs:element>
294318
<xs:element name="code" type="zclCode"/>
@@ -344,6 +368,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
344368
</xs:sequence>
345369
<xs:attribute name="length" type="xs:integer"/>
346370
<xs:attribute name="name" use="required" type="xs:string"/>
371+
<xs:attribute name="apiMaturity" type = "zclApiMaturity" />
347372
</xs:complexType>
348373
</xs:element>
349374
<xs:element name="callback">
@@ -377,19 +402,25 @@ This schema describes the format of the XML files, that describe the ZCL specifi
377402
<xs:element name="name" type="xs:string"/>
378403
<xs:element name="tag" type="tag"/>
379404
<xs:element name="domain">
380-
<xs:complexType mixed="true">
381-
<xs:sequence>
382-
<xs:element minOccurs="0" maxOccurs="unbounded" ref="older"/>
383-
</xs:sequence>
384-
<xs:attribute name="dependsOn" type="zclSpecVersion"/>
385-
<xs:attribute name="name"/>
386-
<xs:attribute name="spec" type="zclSpecVersion"/>
387-
<xs:attribute name="certifiable" type="xs:boolean"/>
405+
<xs:complexType>
406+
<!-- TODO: Remove the mixed once all XML files properly use name instead
407+
of putting the name in the content -->
408+
<xs:complexContent>
409+
<xs:extension base="xs:string" >
410+
<xs:sequence>
411+
<xs:element minOccurs="0" ref="older"/>
412+
</xs:sequence>
413+
<xs:attribute name="dependsOn" type="zclSpecVersion"/>
414+
<xs:attribute name="name" type="xs:string" />
415+
<xs:attribute name="spec" type="zclSpecVersion"/>
416+
<xs:attribute name="certifiable" type="xs:boolean"/>
417+
</xs:extension>
418+
</xs:complexContent>
388419
</xs:complexType>
389420
</xs:element>
390421
<xs:element name="older">
391422
<xs:complexType>
392-
<xs:attribute name="dependsOn" use="optional" type="xs:string"/>
423+
<xs:attribute name="dependsOn" type="xs:string"/>
393424
<xs:attribute name="spec" use="required" type="xs:string"/>
394425
<xs:attribute name="certifiable" type="xs:boolean"/>
395426
</xs:complexType>
@@ -489,6 +520,14 @@ This schema describes the format of the XML files, that describe the ZCL specifi
489520
<xs:enumeration value="either"/>
490521
</xs:restriction>
491522
</xs:simpleType>
523+
<xs:simpleType name="zclApiMaturity">
524+
<xs:restriction base="xs:string">
525+
<xs:enumeration value="stable"/>
526+
<xs:enumeration value="provisional"/>
527+
<xs:enumeration value="internal"/>
528+
<xs:enumeration value="deprecated"/>
529+
</xs:restriction>
530+
</xs:simpleType>
492531
<xs:element name="mapping">
493532
<xs:complexType>
494533
<xs:attribute name="code" type="xs:string"/>

0 commit comments

Comments
 (0)