|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 | 2 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
|
3 | 3 |
|
4 |
| - <xs:element name="ruleset" type="rulesetType" /> |
5 |
| - |
6 |
| - <xs:complexType name="rulesetType"> |
7 |
| - <xs:sequence> |
8 |
| - <xs:element name="description" type="descriptionType" maxOccurs="1" minOccurs="0"></xs:element> |
9 |
| - <xs:element name="config" type="configType" maxOccurs="1" minOccurs="0"></xs:element> |
10 |
| - <xs:element name="file" type="fileType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
11 |
| - <xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
12 |
| - <xs:element name="arg" type="argType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
13 |
| - <xs:element name="ini" type="iniType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
14 |
| - <xs:element name="rule" type="ruleType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
15 |
| - </xs:sequence> |
16 |
| - <xs:attribute name="name" type="xs:string"></xs:attribute> |
17 |
| - </xs:complexType> |
18 |
| - |
19 |
| - <xs:complexType name="patternType"> |
20 |
| - <xs:simpleContent> |
21 |
| - <xs:extension base="xs:string"> |
22 |
| - <xs:attribute name="type"> |
23 |
| - <xs:simpleType> |
24 |
| - <xs:restriction base="xs:string"> |
25 |
| - <xs:enumeration value="relative"></xs:enumeration> |
26 |
| - </xs:restriction> |
27 |
| - </xs:simpleType> |
28 |
| - </xs:attribute> |
29 |
| - </xs:extension> |
30 |
| - </xs:simpleContent> |
31 |
| - </xs:complexType> |
32 |
| - |
33 |
| - <xs:simpleType name="descriptionType"> |
34 |
| - <xs:restriction base="xs:string"></xs:restriction> |
35 |
| - </xs:simpleType> |
36 |
| - |
37 |
| - <xs:simpleType name="fileType"> |
38 |
| - <xs:restriction base="xs:string"></xs:restriction> |
39 |
| - </xs:simpleType> |
40 |
| - |
41 |
| - <xs:complexType name="configType"> |
42 |
| - <xs:attribute name="name" type="xs:string" use="required"></xs:attribute> |
43 |
| - <xs:attribute name="value" type="xs:string" use="required"></xs:attribute> |
44 |
| - </xs:complexType> |
45 |
| - |
46 |
| - <xs:complexType name="argType"> |
47 |
| - <xs:attribute name="name" type="xs:string"></xs:attribute> |
48 |
| - <xs:attribute name="value" type="xs:string" use="required"></xs:attribute> |
49 |
| - </xs:complexType> |
50 |
| - |
51 |
| - <xs:complexType name="iniType"> |
52 |
| - <xs:attribute name="name" type="xs:string" use="required"></xs:attribute> |
53 |
| - <xs:attribute name="value" type="xs:string" use="required"></xs:attribute> |
54 |
| - </xs:complexType> |
55 |
| - |
56 |
| - <xs:complexType name="ruleType"> |
57 |
| - <xs:sequence> |
58 |
| - <xs:element name="exclude" type="excludeType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
59 |
| - <xs:element name="message" type="messageType" maxOccurs="1" minOccurs="0"></xs:element> |
60 |
| - <xs:element name="severity" type="severityType" maxOccurs="1" minOccurs="0"></xs:element> |
61 |
| - <xs:element name="type" type="typeType" maxOccurs="1" minOccurs="0"></xs:element> |
62 |
| - <xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
63 |
| - <xs:element name="include-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
64 |
| - <xs:element name="properties" type="propertiesType" maxOccurs="1" minOccurs="0"></xs:element> |
65 |
| - </xs:sequence> |
66 |
| - <xs:attribute name="ref" type="xs:string" use="required"></xs:attribute> |
67 |
| - </xs:complexType> |
68 |
| - |
69 |
| - <xs:complexType name="excludeType"> |
70 |
| - <xs:attribute name="name" type="xs:string" use="required"></xs:attribute> |
71 |
| - </xs:complexType> |
72 |
| - |
73 |
| - <xs:simpleType name="messageType"> |
74 |
| - <xs:restriction base="xs:string"></xs:restriction> |
75 |
| - </xs:simpleType> |
| 4 | + <xs:element name="ruleset"> |
| 5 | + <xs:complexType> |
| 6 | + <xs:choice minOccurs="0" maxOccurs="unbounded"> |
| 7 | + <xs:element name="description" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element> |
| 8 | + <xs:element name="config" maxOccurs="unbounded" minOccurs="0"> |
| 9 | + <xs:complexType> |
| 10 | + <xs:attribute name="name" type="xs:string" use="required"></xs:attribute> |
| 11 | + <xs:attribute name="value" type="xs:string" use="required"></xs:attribute> |
| 12 | + </xs:complexType> |
| 13 | + </xs:element> |
| 14 | + <xs:element name="file" type="xs:string" maxOccurs="unbounded" minOccurs="0"></xs:element> |
| 15 | + <xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
| 16 | + <xs:element name="arg" maxOccurs="unbounded" minOccurs="0"> |
| 17 | + <xs:complexType> |
| 18 | + <xs:attribute name="name" type="xs:string"></xs:attribute> |
| 19 | + <xs:attribute name="value" type="xs:string"></xs:attribute> |
| 20 | + </xs:complexType> |
| 21 | + </xs:element> |
| 22 | + <xs:element name="ini" maxOccurs="unbounded" minOccurs="0"> |
| 23 | + <xs:complexType> |
| 24 | + <xs:attribute name="name" type="xs:string" use="required"></xs:attribute> |
| 25 | + <xs:attribute name="value" type="xs:string" use="required"></xs:attribute> |
| 26 | + </xs:complexType> |
| 27 | + </xs:element> |
| 28 | + <xs:element name="autoload" type="xs:string" maxOccurs="unbounded" minOccurs="0"></xs:element> |
| 29 | + <xs:element name="rule" type="ruleType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
| 30 | + </xs:choice> |
| 31 | + <xs:attribute name="name" type="xs:string"></xs:attribute> |
| 32 | + <xs:attribute name="namespace" type="xs:string"></xs:attribute> |
| 33 | + </xs:complexType> |
| 34 | + </xs:element> |
76 | 35 |
|
77 |
| - <xs:simpleType name="severityType"> |
78 |
| - <xs:restriction base="xs:integer"></xs:restriction> |
79 |
| - </xs:simpleType> |
| 36 | + <xs:complexType name="ruleType"> |
| 37 | + <xs:choice minOccurs="0" maxOccurs="unbounded"> |
| 38 | + <xs:element name="exclude" maxOccurs="unbounded" minOccurs="0"> |
| 39 | + <xs:complexType> |
| 40 | + <xs:attribute name="name" type="xs:string" use="required"></xs:attribute> |
| 41 | + </xs:complexType> |
| 42 | + </xs:element> |
| 43 | + <xs:element name="message" type="xs:string" maxOccurs="1" minOccurs="0"></xs:element> |
| 44 | + <xs:element name="severity" type="xs:integer" maxOccurs="1" minOccurs="0"></xs:element> |
| 45 | + <xs:element name="type" maxOccurs="1" minOccurs="0"> |
| 46 | + <xs:simpleType> |
| 47 | + <xs:restriction base="xs:string"> |
| 48 | + <xs:enumeration value="error"></xs:enumeration> |
| 49 | + <xs:enumeration value="warning"></xs:enumeration> |
| 50 | + </xs:restriction> |
| 51 | + </xs:simpleType> |
| 52 | + </xs:element> |
| 53 | + <xs:element name="exclude-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
| 54 | + <xs:element name="include-pattern" type="patternType" maxOccurs="unbounded" minOccurs="0"></xs:element> |
| 55 | + <xs:element name="properties" type="propertiesType" maxOccurs="1" minOccurs="0"></xs:element> |
| 56 | + </xs:choice> |
| 57 | + <xs:attribute name="ref" type="xs:string" use="required"></xs:attribute> |
| 58 | + </xs:complexType> |
80 | 59 |
|
81 |
| - <xs:simpleType name="typeType"> |
82 |
| - <xs:restriction base="xs:string"> |
83 |
| - <xs:enumeration value="error"></xs:enumeration> |
84 |
| - <xs:enumeration value="warning"></xs:enumeration> |
85 |
| - </xs:restriction> |
86 |
| - </xs:simpleType> |
| 60 | + <xs:complexType name="patternType"> |
| 61 | + <xs:simpleContent> |
| 62 | + <xs:extension base="xs:string"> |
| 63 | + <xs:attribute name="type"> |
| 64 | + <xs:simpleType> |
| 65 | + <xs:restriction base="xs:string"> |
| 66 | + <xs:enumeration value="relative"></xs:enumeration> |
| 67 | + </xs:restriction> |
| 68 | + </xs:simpleType> |
| 69 | + </xs:attribute> |
| 70 | + </xs:extension> |
| 71 | + </xs:simpleContent> |
| 72 | + </xs:complexType> |
87 | 73 |
|
88 |
| - <xs:complexType name="propertiesType"> |
89 |
| - <xs:sequence> |
90 |
| - <xs:element name="property" maxOccurs="unbounded" minOccurs="1"> |
91 |
| - <xs:complexType> |
92 |
| - <xs:attribute name="type" type="xs:string"></xs:attribute> |
93 |
| - <xs:attribute name="name" type="xs:string" use="required"></xs:attribute> |
94 |
| - <xs:attribute name="value" type="xs:string" use="required"></xs:attribute> |
95 |
| - </xs:complexType> |
96 |
| - </xs:element> |
97 |
| - </xs:sequence> |
98 |
| - </xs:complexType> |
| 74 | + <xs:complexType name="propertiesType"> |
| 75 | + <xs:sequence> |
| 76 | + <xs:element name="property" maxOccurs="unbounded" minOccurs="1"> |
| 77 | + <xs:complexType> |
| 78 | + <xs:attribute name="type"> |
| 79 | + <xs:simpleType> |
| 80 | + <xs:restriction base="xs:string"> |
| 81 | + <xs:enumeration value="array"></xs:enumeration> |
| 82 | + </xs:restriction> |
| 83 | + </xs:simpleType> |
| 84 | + </xs:attribute> |
| 85 | + <xs:attribute name="name" type="xs:string" use="required"></xs:attribute> |
| 86 | + <xs:attribute name="value" type="xs:string" use="required"></xs:attribute> |
| 87 | + </xs:complexType> |
| 88 | + </xs:element> |
| 89 | + </xs:sequence> |
| 90 | + </xs:complexType> |
99 | 91 |
|
100 | 92 | </xs:schema>
|
0 commit comments