Skip to content

Commit fcc7d1d

Browse files
committed
Adding rule-tests schema, refs pmd/pmd#607
1 parent 8b0c31f commit fcc7d1d

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

rule-tests_1_0_0.xsd

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<schema
3+
xmlns="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://pmd.sourceforge.net/rule-tests"
5+
xmlns:tns="http://pmd.sourceforge.net/rule-tests"
6+
elementFormDefault="qualified">
7+
8+
<element name="test-data">
9+
<complexType>
10+
<group ref="tns:testCodeOrCodeFragment" minOccurs="1" maxOccurs="unbounded"></group>
11+
</complexType>
12+
</element>
13+
14+
<group name="testCodeOrCodeFragment">
15+
<sequence>
16+
<element name="test-code" minOccurs="0" maxOccurs="unbounded" type="tns:testCodeType"></element>
17+
<element name="code-fragment" minOccurs="0" maxOccurs="unbounded" type="tns:codeFragmentType"></element>
18+
</sequence>
19+
</group>
20+
21+
<complexType name="testCodeType">
22+
<sequence>
23+
<element name="description" type="string"></element>
24+
<element name="rule-property" minOccurs="0" maxOccurs="unbounded">
25+
<complexType>
26+
<simpleContent>
27+
<extension base="string">
28+
<attribute name="name" type="string" use="required"></attribute>
29+
</extension>
30+
</simpleContent>
31+
</complexType>
32+
</element>
33+
<element name="expected-problems" type="integer"></element>
34+
<element name="expected-linenumbers" type="string" minOccurs="0"></element>
35+
<element name="expected-messages" minOccurs="0">
36+
<complexType>
37+
<sequence>
38+
<element name="message" type="string" maxOccurs="unbounded"></element>
39+
</sequence>
40+
</complexType>
41+
</element>
42+
<choice>
43+
<element name="code"></element>
44+
<element name="code-ref">
45+
<complexType>
46+
<attribute name="id" type="IDREF" use="required"></attribute>
47+
</complexType>
48+
</element>
49+
</choice>
50+
<element name="source-type" minOccurs="0" default="java">
51+
<simpleType>
52+
<restriction base="string">
53+
<pattern value="(apex|ecmascript|java|jsp|plsql|pom|vf|vm|wsdl|xml|xsl)( [0-9.]+)?"></pattern>
54+
</restriction>
55+
</simpleType>
56+
</element>
57+
</sequence>
58+
<attribute name="reinitializeRule" type="boolean" default="true"></attribute>
59+
<attribute name="regressionTest" type="boolean" default="true"></attribute>
60+
<attribute name="useAuxClasspath" type="boolean" default="true"></attribute>
61+
</complexType>
62+
63+
<complexType name="codeFragmentType">
64+
<simpleContent>
65+
<extension base="string">
66+
<attribute name="id" type="ID" use="required"></attribute>
67+
</extension>
68+
</simpleContent>
69+
</complexType>
70+
</schema>

0 commit comments

Comments
 (0)