forked from phoedos/pmd
Replace old schema with newer one
(This is backward compatible)
This commit is contained in:
@ -1,70 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schema
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://pmd.sourceforge.net/rule-tests"
|
||||
xmlns:tns="http://pmd.sourceforge.net/rule-tests"
|
||||
elementFormDefault="qualified">
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:tns="http://pmd.sourceforge.net/rule-tests"
|
||||
targetNamespace="http://pmd.sourceforge.net/rule-tests"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<element name="test-data">
|
||||
<complexType>
|
||||
<group ref="tns:testCodeOrCodeFragment" minOccurs="1" maxOccurs="unbounded"></group>
|
||||
<choice maxOccurs="unbounded">
|
||||
<element name="test-code" minOccurs="0" maxOccurs="unbounded" type="tns:testType"/>
|
||||
<element name="code-fragment" minOccurs="0" maxOccurs="unbounded" type="tns:codeFragmentType">
|
||||
<annotation>
|
||||
<documentation>
|
||||
A code fragment that can be referred to by several tests.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
</choice>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<group name="testCodeOrCodeFragment">
|
||||
<complexType name="testType">
|
||||
<sequence>
|
||||
<element name="test-code" minOccurs="0" maxOccurs="unbounded" type="tns:testCodeType"></element>
|
||||
<element name="code-fragment" minOccurs="0" maxOccurs="unbounded" type="tns:codeFragmentType"></element>
|
||||
</sequence>
|
||||
</group>
|
||||
|
||||
<complexType name="testCodeType">
|
||||
<sequence>
|
||||
<element name="description" type="string"></element>
|
||||
<element name="description" type="string"/>
|
||||
<element name="rule-property" minOccurs="0" maxOccurs="unbounded">
|
||||
<complexType>
|
||||
<simpleContent>
|
||||
<extension base="string">
|
||||
<attribute name="name" type="string" use="required"></attribute>
|
||||
<attribute name="name" type="string" use="required"/>
|
||||
</extension>
|
||||
</simpleContent>
|
||||
</complexType>
|
||||
</element>
|
||||
<element name="expected-problems" type="integer"></element>
|
||||
<element name="expected-linenumbers" type="string" minOccurs="0"></element>
|
||||
|
||||
<element name="expected-problems" type="nonNegativeInteger"/>
|
||||
<element name="expected-linenumbers" type="string" minOccurs="0"/>
|
||||
<element name="expected-messages" minOccurs="0">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="message" type="string" maxOccurs="unbounded"></element>
|
||||
<element name="message" type="string" maxOccurs="unbounded"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
<choice>
|
||||
<element name="code"></element>
|
||||
<element name="code" type="string"/>
|
||||
<element name="code-ref">
|
||||
<complexType>
|
||||
<attribute name="id" type="IDREF" use="required"></attribute>
|
||||
<attribute name="id" type="IDREF" use="required"/>
|
||||
</complexType>
|
||||
</element>
|
||||
</choice>
|
||||
<element name="source-type" minOccurs="0" default="java">
|
||||
<simpleType>
|
||||
<restriction base="string">
|
||||
<pattern value="(apex|ecmascript|java|jsp|modelica|plsql|pom|scala|vf|vm|wsdl|xml|xsl)( [\w\d._-]+)?"></pattern>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
<element name="source-type" minOccurs="0" default="" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Language version of the source, eg 'java 8'.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</element>
|
||||
</sequence>
|
||||
<attribute name="reinitializeRule" type="boolean" default="true"></attribute>
|
||||
<attribute name="regressionTest" type="boolean" default="true"></attribute>
|
||||
<attribute name="useAuxClasspath" type="boolean" default="true"></attribute>
|
||||
<attribute name="reinitializeRule" type="boolean" default="true"/>
|
||||
<attribute name="regressionTest" type="boolean" default="true"/>
|
||||
<attribute name="useAuxClasspath" type="boolean" default="true"/>
|
||||
|
||||
<attribute name="ignored" type="string" default="">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Contains a reason for why the test is ignored.
|
||||
If non-empty, the test will be ignored.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
|
||||
<complexType name="codeFragmentType">
|
||||
<simpleContent>
|
||||
<extension base="string">
|
||||
<attribute name="id" type="ID" use="required"></attribute>
|
||||
<attribute name="id" type="ID" use="required"/>
|
||||
</extension>
|
||||
</simpleContent>
|
||||
</complexType>
|
||||
</schema>
|
||||
|
||||
<simpleType name="positiveInt">
|
||||
<restriction base="int">
|
||||
<minInclusive value="1"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
</schema>
|
||||
|
Reference in New Issue
Block a user