view harness/src/main/resources/xsd/descriptions/test-descriptions.xsd @ 66:d7f7a93800e4

Rewire the grading levels: introduce ACCEPTABLE_SPEC, remove REQUIRED, renames.
author shade
date Thu, 28 Nov 2013 19:10:32 +0400
parents dd797d922f1c
children
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

    This code is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License version 2 only, as
    published by the Free Software Foundation.  Oracle designates this
    particular file as subject to the "Classpath" exception as provided
    by Oracle in the LICENSE file that accompanied this code.

    This code is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    version 2 for more details (a copy is included in the LICENSE file that
    accompanied this code).

    You should have received a copy of the GNU General Public License version
    2 along with this work; if not, write to the Free Software Foundation,
    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

    Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    or visit www.oracle.com if you need additional information or have any
    questions.

-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
            jxb:version="2.0">

    <xsd:simpleType name="expectType">
        <xsd:restriction base="xsd:string">
            <!-- Acceptable by spec, acceptable by common sense -->
            <xsd:enumeration value="ACCEPTABLE"/>

            <!-- Acceptable by spec, acceptable by common sense, still interesting -->
            <xsd:enumeration value="ACCEPTABLE_INTERESTING"/>

            <!--
                Acceptable by spec, forbidden by common sense;
                Some implementations avoid these behaviors, even though formally allowed.
            -->
            <xsd:enumeration value="ACCEPTABLE_SPEC"/>

            <!-- Forbidden by spec -->
            <xsd:enumeration value="FORBIDDEN"/>

            <!-- Synthetic unknown -->
            <xsd:enumeration value="UNKNOWN"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:element name="testsuite">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="template" type="template" minOccurs="0" maxOccurs="unbounded"/>
                <xsd:element name="test" type="test" minOccurs="1" maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:complexType name="test">
        <xsd:sequence>
            <xsd:element name="contributed-by" type="xsd:string" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="case" type="case" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="unmatched" type="unmatched" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="refs" type="ref" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string"/>
        <xsd:attribute name="template" type="xsd:string" use="optional"/>
    </xsd:complexType>

    <xsd:complexType name="template">
        <xsd:sequence>
            <xsd:element name="contributed-by" type="xsd:string" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="case" type="case" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="unmatched" type="unmatched" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="refs" type="ref" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string"/>
    </xsd:complexType>

    <xsd:complexType name="case">
        <xsd:sequence>
            <xsd:element name="match" type="xsd:string" maxOccurs="unbounded"/>
            <xsd:element name="expect" type="expectType" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="refs" type="ref" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="unmatched">
        <xsd:sequence>
            <xsd:element name="expect" type="expectType" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
            <xsd:element name="refs" type="ref" minOccurs="0" maxOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="ref">
        <xsd:sequence>
            <xsd:element name="url" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

</xsd:schema>