Skip to content

Commit f4dff4a

Browse files
committed
Apply review suggestions from project-chip#35775
1 parent 2276650 commit f4dff4a

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

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

+12-7
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,19 @@ This schema describes the format of the XML files, that describe the ZCL specifi
1313
<xs:pattern value="[-+]?(0x[0-9A-Fa-f]+|[0-9]+)"/>
1414
</xs:restriction>
1515
</xs:simpleType>
16+
<xs:simpleType name="uIntegerWithHex">
17+
<xs:restriction base="xs:string">
18+
<xs:pattern value="(0x[0-9A-Fa-f]+|[0-9]+)"/>
19+
</xs:restriction>
20+
</xs:simpleType>
1621
<xs:complexType name="access">
1722
<xs:attribute name="op" type="xs:string"/>
1823
<xs:attribute name="role" type="xs:string"/>
1924
<xs:attribute name="privilege" type="xs:string"/>
2025
<xs:attribute name="modifier" type="xs:string"/>
2126
</xs:complexType>
2227
<xs:complexType name="eventField">
23-
<xs:attribute name="id" use="required" type="xs:string"/>
28+
<xs:attribute name="id" use="required" type="uIntegerWithHex"/>
2429
<xs:attribute name="name" use="required" type="xs:string"/>
2530
<xs:attribute name="type" use="required" type="xs:string"/>
2631
<xs:attribute name="array" type="xs:boolean"/>
@@ -34,7 +39,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
3439
<xs:attribute name="description" use="required" type="xs:string"/>
3540
</xs:complexType>
3641
<xs:complexType name="arg">
37-
<xs:attribute name="id" type="integerWithHex" />
42+
<xs:attribute name="id" type="uIntegerWithHex" />
3843
<xs:attribute name="min" type="integerWithHex"/>
3944
<xs:attribute name="max" type="integerWithHex"/>
4045
<xs:attribute name="arrayLength" type="xs:boolean"/>
@@ -123,7 +128,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
123128
<xs:sequence>
124129
<xs:element ref="description"/>
125130
</xs:sequence>
126-
<xs:attribute name="id" use="required" type="xs:string"/>
131+
<xs:attribute name="id" use="required" type="uIntegerWithHex"/>
127132
<xs:attribute name="name" use="required"/>
128133
</xs:complexType>
129134
</xs:element>
@@ -249,7 +254,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
249254
</xs:element>
250255
<xs:element name="type">
251256
<xs:complexType>
252-
<xs:attribute name="id" use="required" type="xs:string"/>
257+
<xs:attribute name="id" use="required" type="uIntegerWithHex"/>
253258
<xs:attribute name="name" use="required" type="xs:string"/>
254259
<xs:attribute name="description" use="required" type="xs:string"/>
255260
<xs:attribute name="size" type="integerWithHex"/>
@@ -338,7 +343,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
338343
<xs:attribute name="introducedIn" type="xs:string"/>
339344
<xs:attribute name="manufacturerCode" type="zclCode"/>
340345
<xs:attribute name="singleton" type="xs:boolean"/>
341-
<xs:attribute name="apiMaturity" type = "zclApiMaturity" />
346+
<xs:attribute name="apiMaturity" type="zclApiMaturity" />
342347
</xs:complexType>
343348
</xs:element>
344349
<xs:element name="code" type="zclCode"/>
@@ -394,7 +399,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
394399
</xs:sequence>
395400
<xs:attribute name="length" type="integerWithHex"/>
396401
<xs:attribute name="name" use="required" type="xs:string"/>
397-
<xs:attribute name="apiMaturity" type = "zclApiMaturity" />
402+
<xs:attribute name="apiMaturity" type="zclApiMaturity" />
398403
</xs:complexType>
399404
</xs:element>
400405
<xs:element name="callback">
@@ -416,7 +421,7 @@ This schema describes the format of the XML files, that describe the ZCL specifi
416421
<xs:attribute name="category" type="xs:string"/>
417422
<xs:attribute name="cluster"/>
418423
<xs:attribute name="consumed" type="xs:boolean"/>
419-
<xs:attribute name="id" use="required" type="xs:string"/>
424+
<xs:attribute name="id" use="required" type="uIntegerWithHex"/>
420425
<xs:attribute name="name" use="required"/>
421426
<xs:attribute name="platformType" type="xs:string"/>
422427
<xs:attribute name="returnType" use="required" type="xs:string"/>

0 commit comments

Comments
 (0)