<?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="propertiesType">
        <xs:sequence>
            <xs:element name="property" type="propertyType" maxOccurs="unbounded" minOccurs="1" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="propertyType">
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="value" type="xs:string" use="required" />
    </xs:complexType>
    <xs:complexType name="environmentType">
        <xs:attribute name="nunit-version" type="xs:string" use="required" />
        <xs:attribute name="clr-version" type="xs:string" use="required" />
        <xs:attribute name="os-version" type="xs:string" use="required" />
        <xs:attribute name="platform" type="xs:string" use="required" />
        <xs:attribute name="cwd" type="xs:string" use="required" />
        <xs:attribute name="machine-name" type="xs:string" use="required" />
        <xs:attribute name="user" type="xs:string" use="required" />
        <xs:attribute name="user-domain" type="xs:string" use="required" />
    </xs:complexType>
    <xs:complexType name="culture-infoType">
        <xs:attribute name="current-culture" type="xs:string" use="required" />
        <xs:attribute name="current-uiculture" type="xs:string" use="required" />
    </xs:complexType>
    <xs:complexType name="resultType">
        <xs:sequence>
            <xs:element name="environment" type="environmentType" />
            <xs:element name="culture-info" type="culture-infoType" />
            <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="errors" type="xs:decimal" use="required" />
    <xs:attribute name="failures" type="xs:decimal" use="required" />
    <xs:attribute name="inconclusive" type="xs:decimal" use="required" />
    <xs:attribute name="not-run" type="xs:decimal" use="required" />
    <xs:attribute name="ignored" type="xs:decimal" use="required" />
    <xs:attribute name="skipped" type="xs:decimal" use="required" />
    <xs:attribute name="invalid" 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:element name="properties" type="propertiesType" 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:attribute name="result" type="xs:string" use="required" />
  </xs:complexType>
    <xs:complexType name="test-suiteType">
        <xs:sequence>
            <xs:element name="categories" type="categoriesType" minOccurs="0" maxOccurs="1" />
            <xs:element name="properties" type="propertiesType" 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:element name="results" type="resultsType" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    <xs:attribute name="type" type="xs:string" use="required" />
        <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:attribute name="result" type="xs:string" use="required" />
  </xs:complexType>
</xs:schema>