<!--
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved
 * Use is subject to license terms.
 *
 * The contents of this file are subject to the terms of either the GNU
 * General Public License Version 2 only ("GPL") or the Common Development
 * and Distribution License("CDDL") (collectively, the "License").  You
 * may not use this file except in compliance with the License. You can obtain
 * a copy of the License in the file LICENSE.
 *
 * When distributing the software, include this License Header Notice in each
 * file and include the License file at LICENSE.
 *
 * Sun designates this particular file as subject to the "Classpath" exception
 * as provided by Sun in the GPL Version 2 section of the License file that
 * accompanied this code. If applicable, add the following below the License
 * Header, with the fields enclosed by brackets [] replaced by your own
 * identifying information: "Portions Copyrighted [year]
 * [name of copyright owner]"
 *
 * Contributor(s):
 *
 * If you wish your version of this file to be governed by only the CDDL or
 * only the GPL Version 2, indicate your decision by adding "[Contributor]
 * elects to include this software in this distribution under the [CDDL or GPL
 * Version 2] license."  If you don't indicate a single choice of license, a
 * recipient has the option to distribute your version of this file under
 * either the CDDL, the GPL Version 2 or to extend the choice of license to
 * its licensees as provided above.  However, if you add GPL Version 2 code
 * and therefore, elected the GPL Version 2 license, then the option applies
 * only if the new code is made subject to such option by the copyright
 * holder.

    A DTD for setting up a testsuite, including documentation.
-->
    <!ELEMENT Test (TestDescription, TestSetup) >
    <!ATTLIST Test
            maxduration CDATA #IMPLIED
    >

    <!ELEMENT TestDescription (Category?,Objective?,Coverage?,Behaviour?,Prerequisites?,Input?,Output?,PassCriteria?,Requirements?,Description?,EnvironmentalReq?,FailCriteria?)>
    <!ATTLIST TestDescription
            author CDATA #REQUIRED
            testobject CDATA #REQUIRED
    >
    
    <!-- NB! OBSOLETE, but leave until XML files fixed!. testsuite.xsl
    will flag these! -->
    <!ELEMENT Category EMPTY>
    <!ATTLIST Category
            primary CDATA #REQUIRED
            secondary CDATA #IMPLIED
    >
    <!ELEMENT Coverage (#PCDATA)>
    <!ELEMENT Behaviour (#PCDATA)>
    <!ELEMENT Prerequisites (#PCDATA)>
    <!ELEMENT Input (#PCDATA)>
    <!ELEMENT Output (#PCDATA)>
    <!ELEMENT PassCriteria (#PCDATA)>
    <!-- -->

    <!ELEMENT Objective (#PCDATA|LIST|LINK|B|I|U|P|BR)* >

    <!ELEMENT B (#PCDATA|LIST|LINK|I|U|P|BR)*>
    <!ELEMENT I (#PCDATA|LIST|LINK|B|U|P|BR)*>
    <!ELEMENT U (#PCDATA|LIST|LINK|B|I|P|BR)*>
    <!ELEMENT P (#PCDATA|LIST|LINK|B|I|U|BR)*>
    <!ELEMENT BR (#PCDATA)>
    <!ELEMENT LIST (ITEM)*>
    <!ATTLIST LIST
           type CDATA #REQUIRED
    >
    <!ELEMENT ITEM (#PCDATA|LIST|LINK|B|I|U|P|BR)*>
    <!ELEMENT LINK (#PCDATA)>
    <!ATTLIST LINK
           target CDATA #IMPLIED
    >

    <!ELEMENT Description (#PCDATA|LIST|LINK|B|I|U|P|BR)*>

    <!ELEMENT Requirements (#PCDATA|LIST|LINK|B|I|U|P|BR|Requirement)* >
    <!ATTLIST Requirements
            comment CDATA #IMPLIED
    >
 
    <!ELEMENT Requirement (#PCDATA|LIST|LINK|B|I|U|P|BR)* >
    <!ATTLIST Requirement
            ref     CDATA #IMPLIED
            docRef  CDATA #IMPLIED
            docTarget CDATA #IMPLIED
            reqRef  CDATA #IMPLIED
            reqTarget CDATA #IMPLIED
            comment CDATA #IMPLIED
    > <!-- We want to remove ref and use the pairs docRef,docTarget
           and reqRef,reqTarget, where ...Ref is "bibliographic" id,
           and ...Target is an URL -->

    <!ELEMENT EnvironmentalReq (#PCDATA|LIST|LINK|B|I|U|P|BR)*>

    <!ELEMENT FailCriteria (#PCDATA|LIST|LINK|B|I|U|P|BR)*>

    <!ELEMENT TestSetup ( (Client| LoadClient|Binding)*, TestSuite ) >
    <!ATTLIST TestSetup
           class   CDATA  #REQUIRED
           name    CDATA  #IMPLIED
           comment CDATA  #IMPLIED
    >

    <!ELEMENT TestSuite ( (TestSetup | TestCase)+) >

    <!ELEMENT TestCase (Binding*) >
    <!ATTLIST TestCase
           class   CDATA #REQUIRED
           method  CDATA #REQUIRED
           name    CDATA #IMPLIED
           comment CDATA #IMPLIED
    >

    <!ELEMENT Binding EMPTY >
    <!ATTLIST Binding
            key     CDATA #REQUIRED
            value   CDATA #REQUIRED
            comment CDATA #IMPLIED
    >

    <!ELEMENT Client (Binding*) >
    <!ATTLIST Client
           id      CDATA  #REQUIRED
           comment CDATA  #IMPLIED
    >

    <!ELEMENT LoadClient (Binding*, Transaction+) >
    <!ATTLIST LoadClient
           id             CDATA  #REQUIRED
           scheduler      CDATA  #REQUIRED
           thinktimeClass CDATA  #REQUIRED
           executeTime    CDATA  #REQUIRED
           comment        CDATA  #IMPLIED
    >

    <!ELEMENT Transaction (Binding*) >
    <!ATTLIST Transaction
            id             CDATA  #REQUIRED
            className      CDATA  #REQUIRED
            instanceCount  CDATA  "1"
            comment        CDATA  #IMPLIED
    >

