<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:complexType name="failureType">
		<xs:sequence>
			<xs:element ref="message" />
			<xs:element ref="stack-trace" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="reasonType">
		<xs:sequence>
			<xs:element ref="message" />
		</xs:sequence>
	</xs:complexType>
	<xs:element name="message" type="xs:string" />
	<xs:complexType name="resultsType">
		<xs:choice>
			<xs:element name="test-suite" type="test-suiteType" maxOccurs="unbounded" />
			<xs:element name="test-case" type="test-caseType" maxOccurs="unbounded" minOccurs="0" />
		</xs:choice>
	</xs:complexType>
	<xs:element name="stack-trace" type="xs:string" />
	<xs:element name="test-results" type="resultType" />
	<xs:complexType name="categoriesType">
		<xs:sequence>
			<xs:element name="category" type="categoryType" maxOccurs="unbounded" minOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="categoryType">
		<xs:attribute name="name" type="xs:string" use="required"/>
	</xs:complexType>
	<xs:complexType name="resultType">
		<xs:sequence>
			<xs:element name="test-suite" type="test-suiteType" />
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="required" />
		<xs:attribute name="total" type="xs:decimal" use="required" />
		<xs:attribute name="failures" type="xs:decimal" use="required" />
		<xs:attribute name="not-run" type="xs:decimal" use="required" />
		<xs:attribute name="date" type="xs:string" use="required" />
		<xs:attribute name="time" type="xs:string" use="required" />
	</xs:complexType>
	<xs:complexType name="test-caseType">
		<xs:sequence>
			<xs:element name="categories" type="categoriesType" minOccurs="0" maxOccurs="1" />
			<xs:choice>
				<xs:element name="failure" type="failureType" minOccurs="0" />
				<xs:element name="reason" type="reasonType" minOccurs="0" />
			</xs:choice>
		</xs:sequence>
			
		<xs:attribute name="name" type="xs:string" use="required" />
		<xs:attribute name="description" type="xs:string" use="optional" />
		<xs:attribute name="success" type="xs:string" use="optional" />
		<xs:attribute name="time" type="xs:string" use="optional" />
		<xs:attribute name="executed" type="xs:string" use="required" />
		<xs:attribute name="asserts" type="xs:string" use="optional" />
	</xs:complexType>
	<xs:complexType name="test-suiteType">
		<xs:sequence>
			<xs:element name="categories" type="categoriesType" minOccurs="0" maxOccurs="1" />
			<xs:element name="results" type="resultsType" />
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="required" />
		<xs:attribute name="description" type="xs:string" use="optional" />
		<xs:attribute name="success" type="xs:string" use="required" />
		<xs:attribute name="time" type="xs:string" use="required" />
		<xs:attribute name="asserts" type="xs:string" use="optional" />
	</xs:complexType>

</xs:schema>