@@ -8,6 +8,11 @@ This schema describes the format of the XML files, that describe the ZCL specifi
8
8
(c) Copyright 2012, 2021, Silicon Laboratories Inc.
9
9
</xs : documentation >
10
10
</xs : annotation >
11
+ <xs : simpleType name =" integerWithHex" >
12
+ <xs : restriction base =" xs:string" >
13
+ <xs : pattern value =" [-+]?(0x[0-9A-Fa-f]+|[0-9]+)" />
14
+ </xs : restriction >
15
+ </xs : simpleType >
11
16
<xs : complexType name =" access" >
12
17
<xs : attribute name =" op" type =" xs:string" />
13
18
<xs : attribute name =" role" type =" xs:string" />
@@ -18,14 +23,20 @@ This schema describes the format of the XML files, that describe the ZCL specifi
18
23
<xs : attribute name =" id" use =" required" type =" xs:string" />
19
24
<xs : attribute name =" name" use =" required" type =" xs:string" />
20
25
<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" />
26
+ <xs : attribute name =" array" type =" xs:boolean" />
27
+ <xs : attribute name =" isNullable" type =" xs:boolean" />
28
+ <xs : attribute name =" optional" type =" xs:boolean" default =" false" />
29
+ <xs : attribute name =" min" type =" integerWithHex" />
30
+ <xs : attribute name =" max" type =" integerWithHex" />
23
31
</xs : complexType >
24
32
<xs : complexType name =" tag" >
25
33
<xs : attribute name =" name" use =" required" type =" xs:string" />
26
34
<xs : attribute name =" description" use =" required" type =" xs:string" />
27
35
</xs : complexType >
28
36
<xs : complexType name =" arg" >
37
+ <xs : attribute name =" id" type =" integerWithHex" />
38
+ <xs : attribute name =" min" type =" integerWithHex" />
39
+ <xs : attribute name =" max" type =" integerWithHex" />
29
40
<xs : attribute name =" arrayLength" type =" xs:boolean" />
30
41
<xs : attribute name =" array" type =" xs:boolean" />
31
42
<xs : attribute name =" default" type =" xs:string" />
@@ -36,9 +47,9 @@ This schema describes the format of the XML files, that describe the ZCL specifi
36
47
<xs : attribute name =" type" use =" required" />
37
48
<xs : attribute name =" length" type =" xs:int" />
38
49
<xs : attribute name =" presentIf" type =" xs:string" />
39
- <xs : attribute name =" optional" type =" xs:integer " />
40
- <xs : attribute name =" fieldId" type =" xs:integer " />
41
- <xs : attribute name =" countArg" type =" xs:string" use = " optional " />
50
+ <xs : attribute name =" optional" type =" xs:boolean " />
51
+ <xs : attribute name =" fieldId" type =" integerWithHex " />
52
+ <xs : attribute name =" countArg" type =" xs:string" />
42
53
<xs : attribute name =" isNullable" type =" xs:boolean" />
43
54
</xs : complexType >
44
55
<xs : complexType name =" clusterRef" >
@@ -51,12 +62,17 @@ This schema describes the format of the XML files, that describe the ZCL specifi
51
62
<xs : attribute name =" value" type =" xs:string" />
52
63
<xs : attribute name =" array" type =" xs:boolean" />
53
64
<xs : attribute name =" enum" type =" xs:boolean" />
54
- <xs : attribute name =" fieldId" type =" xs:integer" />
65
+ <xs : attribute name =" fieldId" type =" integerWithHex" />
66
+ <xs : attribute name =" min" type =" integerWithHex" />
67
+ <xs : attribute name =" max" type =" integerWithHex" />
68
+ <xs : attribute name =" length" type =" integerWithHex" />
69
+ <xs : attribute name =" default" type =" xs:string" />
55
70
<xs : attribute name =" isNullable" type =" xs:boolean" />
71
+ <xs : attribute name =" optional" type =" xs:boolean" default =" false" />
56
72
</xs : complexType >
57
73
<xs : complexType name =" featureBit" mixed =" true" >
58
74
<xs : attribute name =" tag" use =" required" type =" xs:string" />
59
- <xs : attribute name =" bit" use =" required" type =" xs:integer " />
75
+ <xs : attribute name =" bit" use =" required" type =" integerWithHex " />
60
76
</xs : complexType >
61
77
<xs : element name =" cli" >
62
78
<xs : complexType >
@@ -134,6 +150,11 @@ This schema describes the format of the XML files, that describe the ZCL specifi
134
150
</xs : choice >
135
151
</xs : sequence >
136
152
</xs : complexType >
153
+
154
+ <xs : unique name =" structNameKey" >
155
+ <xs : selector xpath =" ./struct|enum" />
156
+ <xs : field xpath =" @name" />
157
+ </xs : unique >
137
158
</xs : element >
138
159
<xs : element name =" deviceType" >
139
160
<xs : complexType >
@@ -231,7 +252,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
231
252
<xs : attribute name =" id" use =" required" type =" xs:string" />
232
253
<xs : attribute name =" name" use =" required" type =" xs:string" />
233
254
<xs : attribute name =" description" use =" required" type =" xs:string" />
234
- <xs : attribute name =" size" type =" xs:integer " />
255
+ <xs : attribute name =" size" type =" integerWithHex " />
235
256
<xs : attribute name =" discrete" type =" xs:boolean" />
236
257
<xs : attribute name =" signed" type =" xs:boolean" />
237
258
<xs : attribute name =" string" type =" xs:boolean" />
@@ -244,8 +265,12 @@ This schema describes the format of the XML files, that describe the ZCL specifi
244
265
<xs : element name =" bitmap" >
245
266
<xs : complexType >
246
267
<xs : sequence >
247
- <xs : element minOccurs =" 0" maxOccurs =" unbounded" name =" cluster" />
248
- <xs : element minOccurs =" 1" maxOccurs =" unbounded" ref =" field" />
268
+ <xs : element minOccurs =" 0" maxOccurs =" unbounded" name =" cluster" >
269
+ <xs : complexType >
270
+ <xs : attribute name =" code" type =" integerWithHex" />
271
+ </xs : complexType >
272
+ </xs : element >
273
+ <xs : element maxOccurs =" unbounded" ref =" field" />
249
274
</xs : sequence >
250
275
<xs : attribute name =" name" use =" required" type =" xs:string" />
251
276
<xs : attribute name =" type" use =" required" type =" xs:string" />
@@ -256,7 +281,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
256
281
<xs : attribute name =" mask" use =" required" type =" xs:string" />
257
282
<xs : attribute name =" name" use =" required" type =" xs:string" />
258
283
<xs : attribute name =" introducedIn" type =" zclSpecVersion" />
259
- <xs : attribute name =" fieldId" type =" xs:integer " />
284
+ <xs : attribute name =" fieldId" type =" integerWithHex " />
260
285
</xs : complexType >
261
286
</xs : element >
262
287
<xs : element name =" globalAttribute" >
@@ -269,9 +294,16 @@ This schema describes the format of the XML files, that describe the ZCL specifi
269
294
<xs : attribute name =" value" use =" required" type =" xs:string" />
270
295
</xs : complexType >
271
296
</xs : element >
297
+ <xs : element name =" optionalConform" >
298
+ <xs : complexType >
299
+ <xs : attribute name =" choice" type =" xs:string" />
300
+ <xs : attribute name =" more" type =" xs:boolean" />
301
+ <xs : attribute name =" min" type =" integerWithHex" />
302
+ </xs : complexType >
303
+ </xs : element >
272
304
<xs : element name =" cluster" >
273
305
<xs : complexType >
274
- <xs : sequence >
306
+ <xs : choice maxOccurs = " unbounded " >
275
307
<xs : element ref =" name" />
276
308
<xs : element ref =" domain" />
277
309
<xs : element ref =" description" />
@@ -285,10 +317,28 @@ This schema describes the format of the XML files, that describe the ZCL specifi
285
317
<xs : element minOccurs =" 0" maxOccurs =" unbounded" ref =" attribute" />
286
318
<xs : element minOccurs =" 0" maxOccurs =" unbounded" ref =" command" />
287
319
<xs : element minOccurs =" 0" maxOccurs =" unbounded" ref =" event" />
288
- </xs : sequence >
320
+ <xs : element minOccurs =" 0" name =" features" >
321
+ <xs : complexType >
322
+ <xs : sequence >
323
+ <xs : element maxOccurs =" unbounded" name =" feature" >
324
+ <xs : complexType >
325
+ <xs : choice >
326
+ <xs : element ref =" optionalConform" />
327
+ </xs : choice >
328
+ <xs : attribute name =" bit" use =" required" type =" integerWithHex" />
329
+ <xs : attribute name =" code" use =" required" type =" xs:string" />
330
+ <xs : attribute name =" name" type =" xs:string" />
331
+ <xs : attribute name =" summary" type =" xs:string" />
332
+ </xs : complexType >
333
+ </xs : element >
334
+ </xs : sequence >
335
+ </xs : complexType >
336
+ </xs : element >
337
+ </xs : choice >
289
338
<xs : attribute name =" introducedIn" type =" xs:string" />
290
339
<xs : attribute name =" manufacturerCode" type =" zclCode" />
291
340
<xs : attribute name =" singleton" type =" xs:boolean" />
341
+ <xs : attribute name =" apiMaturity" type = " zclApiMaturity" />
292
342
</xs : complexType >
293
343
</xs : element >
294
344
<xs : element name =" code" type =" zclCode" />
@@ -342,8 +392,9 @@ This schema describes the format of the XML files, that describe the ZCL specifi
342
392
<xs : element minOccurs =" 0" maxOccurs =" unbounded" name =" cluster" type =" clusterRef" />
343
393
<xs : element minOccurs =" 0" maxOccurs =" unbounded" name =" item" type =" item" />
344
394
</xs : sequence >
345
- <xs : attribute name =" length" type =" xs:integer " />
395
+ <xs : attribute name =" length" type =" integerWithHex " />
346
396
<xs : attribute name =" name" use =" required" type =" xs:string" />
397
+ <xs : attribute name =" apiMaturity" type = " zclApiMaturity" />
347
398
</xs : complexType >
348
399
</xs : element >
349
400
<xs : element name =" callback" >
@@ -377,34 +428,41 @@ This schema describes the format of the XML files, that describe the ZCL specifi
377
428
<xs : element name =" name" type =" xs:string" />
378
429
<xs : element name =" tag" type =" tag" />
379
430
<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" />
431
+ <xs : complexType >
432
+ <!-- TODO: Remove the string extension once all XML files properly use
433
+ name attribute instead of putting the name in the content -->
434
+ <xs : complexContent >
435
+ <xs : extension base =" xs:string" >
436
+ <xs : sequence >
437
+ <xs : element minOccurs =" 0" ref =" older" />
438
+ </xs : sequence >
439
+ <xs : attribute name =" dependsOn" type =" zclSpecVersion" />
440
+ <xs : attribute name =" name" type =" xs:string" />
441
+ <xs : attribute name =" spec" type =" zclSpecVersion" />
442
+ <xs : attribute name =" certifiable" type =" xs:boolean" />
443
+ </xs : extension >
444
+ </xs : complexContent >
388
445
</xs : complexType >
389
446
</xs : element >
390
447
<xs : element name =" older" >
391
448
<xs : complexType >
392
- <xs : attribute name =" dependsOn" use = " optional " type =" xs:string" />
449
+ <xs : attribute name =" dependsOn" type =" xs:string" />
393
450
<xs : attribute name =" spec" use =" required" type =" xs:string" />
394
451
<xs : attribute name =" certifiable" type =" xs:boolean" />
395
452
</xs : complexType >
396
453
</xs : element >
397
454
<xs : element name =" event" >
398
455
<xs : complexType >
399
- <xs : sequence >
400
- <xs : element ref =" description" />
456
+ <xs : choice maxOccurs = " unbounded " >
457
+ <xs : element ref =" description" />
401
458
<xs : element minOccurs =" 0" maxOccurs =" unbounded" name =" access" type =" access" />
402
459
<xs : element minOccurs =" 0" maxOccurs =" unbounded" name =" field" type =" eventField" />
403
- </xs : sequence >
460
+ </xs : choice >
404
461
<xs : attribute name =" code" type =" xs:string" />
405
462
<xs : attribute name =" name" type =" xs:string" />
406
463
<xs : attribute name =" side" use =" required" type =" zclSide" />
407
464
<xs : attribute name =" priority" type =" xs:string" />
465
+ <xs : attribute name =" optional" type =" xs:boolean" default =" false" />
408
466
</xs : complexType >
409
467
</xs : element >
410
468
<xs : element name =" command" >
@@ -440,21 +498,22 @@ This schema describes the format of the XML files, that describe the ZCL specifi
440
498
<xs : attribute name =" default" />
441
499
<xs : attribute name =" define" use =" required" type =" zclAttributeDefine" />
442
500
<xs : attribute name =" introducedIn" type =" zclSpecVersion" />
443
- <xs : attribute name =" length" type =" xs:integer " />
501
+ <xs : attribute name =" length" type =" integerWithHex " />
444
502
<xs : attribute name =" manufacturerCode" type =" zclCode" />
445
503
<xs : attribute name =" max" type =" xs:anySimpleType" />
446
504
<xs : attribute name =" min" type =" xs:anySimpleType" />
447
505
<xs : attribute name =" reportMaxInterval" type =" xs:anySimpleType" />
448
506
<xs : attribute name =" reportMinInterval" type =" xs:anySimpleType" />
449
507
<xs : attribute name =" reportableChange" type =" xs:anySimpleType" />
450
- <xs : attribute name =" optional" use = " required " type =" xs:boolean" />
508
+ <xs : attribute name =" optional" type =" xs:boolean" default = " false " />
451
509
<xs : attribute name =" side" use =" required" type =" zclSide" />
452
510
<xs : attribute name =" type" use =" required" type =" xs:string" />
453
511
<xs : attribute name =" readable" type =" xs:boolean" />
454
512
<xs : attribute name =" writable" type =" xs:boolean" />
455
513
<xs : attribute name =" reportable" type =" xs:boolean" />
456
514
<xs : attribute name =" array" type =" xs:boolean" />
457
515
<xs : attribute name =" isNullable" type =" xs:boolean" />
516
+ <xs : attribute name =" entryType" type =" xs:string" />
458
517
</xs : complexType >
459
518
</xs : element >
460
519
<xs : element name =" description" >
@@ -489,6 +548,14 @@ This schema describes the format of the XML files, that describe the ZCL specifi
489
548
<xs : enumeration value =" either" />
490
549
</xs : restriction >
491
550
</xs : simpleType >
551
+ <xs : simpleType name =" zclApiMaturity" >
552
+ <xs : restriction base =" xs:string" >
553
+ <xs : enumeration value =" stable" />
554
+ <xs : enumeration value =" provisional" />
555
+ <xs : enumeration value =" internal" />
556
+ <xs : enumeration value =" deprecated" />
557
+ </xs : restriction >
558
+ </xs : simpleType >
492
559
<xs : element name =" mapping" >
493
560
<xs : complexType >
494
561
<xs : attribute name =" code" type =" xs:string" />
0 commit comments