vinayakb | 93b7668 | 2012-10-06 03:38:51 +0000 | [diff] [blame] | 1 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
| 2 | xmlns:test="urn:xml.testframework.asterix.ics.uci.edu"
|
| 3 | targetNamespace="urn:xml.testframework.asterix.ics.uci.edu" elementFormDefault="qualified">
|
| 4 |
|
| 5 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
| 6 | <!-- test-suite - top level element -->
|
| 7 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
| 8 |
|
| 9 | <xs:element name="test-suite">
|
| 10 | <xs:annotation>
|
| 11 | <xs:documentation>
|
| 12 | This is the top level element for documents that use this schema.
|
| 13 | </xs:documentation>
|
| 14 | </xs:annotation>
|
| 15 |
|
| 16 | <xs:complexType>
|
| 17 | <xs:sequence>
|
| 18 | <xs:element ref="test:test-group" maxOccurs="unbounded"/>
|
| 19 | </xs:sequence>
|
| 20 |
|
| 21 | <xs:attribute name="CatalogDesignDate" type="xs:date" use="required"/>
|
| 22 |
|
| 23 | <xs:attribute name="ResultOffsetPath" type="test:SimplifiedRelativeFilePath" use="required">
|
| 24 | <xs:annotation>
|
| 25 | <xs:documentation>
|
| 26 | offset from root to results
|
| 27 | </xs:documentation>
|
| 28 | </xs:annotation>
|
| 29 | </xs:attribute>
|
| 30 |
|
| 31 | <xs:attribute name="QueryOffsetPath" type="test:SimplifiedRelativeFilePath"
|
| 32 | use="required">
|
| 33 | <xs:annotation>
|
| 34 | <xs:documentation>
|
| 35 | offset from root to Query expression files
|
| 36 | </xs:documentation>
|
| 37 | </xs:annotation>
|
| 38 | </xs:attribute>
|
| 39 |
|
vinayakb | 93b7668 | 2012-10-06 03:38:51 +0000 | [diff] [blame] | 40 | </xs:complexType>
|
| 41 |
|
| 42 | <xs:unique name="unique-test-group">
|
| 43 | <xs:selector xpath=".//test:test-group"/>
|
| 44 | <xs:field xpath="@name"/>
|
| 45 | </xs:unique>
|
| 46 |
|
| 47 | </xs:element>
|
| 48 |
|
| 49 |
|
| 50 | <!-- SimplifiedRelativeFilePath type -->
|
| 51 |
|
| 52 | <xs:simpleType name="SimplifiedRelativeFilePath">
|
| 53 | <xs:restriction base="xs:anyURI">
|
| 54 | <xs:pattern value="([a-zA-Z0-9\-\.]+/)+"/>
|
| 55 | </xs:restriction>
|
| 56 | </xs:simpleType>
|
| 57 |
|
| 58 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
| 59 | <!-- test-group -->
|
| 60 | <!-- -->
|
| 61 | <!-- Group of test cases and test groups. -->
|
| 62 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
| 63 |
|
| 64 | <xs:element name="test-group">
|
| 65 | <xs:annotation>
|
| 66 | <xs:documentation>
|
| 67 | Group of test cases and test groups.
|
| 68 | </xs:documentation>
|
| 69 | </xs:annotation>
|
| 70 |
|
| 71 | <xs:complexType>
|
| 72 | <xs:sequence>
|
| 73 | <xs:element name="test-case" type="test:test-case" minOccurs="0" maxOccurs="unbounded">
|
| 74 | <xs:unique name="unique-expected-error">
|
| 75 | <xs:selector xpath=".//test:expected-error"/>
|
| 76 | <xs:field xpath="."/>
|
| 77 | </xs:unique>
|
| 78 | </xs:element>
|
| 79 |
|
| 80 | <xs:element ref="test:test-group" minOccurs="0" maxOccurs="unbounded"/>
|
| 81 | </xs:sequence>
|
| 82 | <xs:attribute name="name" type="xs:string" use="required"/>
|
| 83 | </xs:complexType>
|
| 84 | </xs:element>
|
| 85 |
|
| 86 |
|
| 87 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
| 88 | <!-- test-case -->
|
| 89 | <!-- -->
|
| 90 | <!-- A test case to be run. -->
|
| 91 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
| 92 |
|
| 93 | <xs:complexType name="test-case">
|
| 94 | <xs:sequence>
|
| 95 | <xs:element name="description" type="test:description"/>
|
| 96 |
|
| 97 | <xs:element name="compilation-unit" minOccurs="1" maxOccurs="unbounded">
|
| 98 | <xs:complexType>
|
| 99 | <xs:sequence>
|
| 100 | <xs:element name="description" type="test:description" minOccurs="0"/>
|
khfaraaz82@gmail.com | d8b3b90 | 2013-03-09 01:05:01 +0000 | [diff] [blame] | 101 | <xs:element name="output-dir" minOccurs="0">
|
vinayakb | 93b7668 | 2012-10-06 03:38:51 +0000 | [diff] [blame] | 102 | <xs:annotation>
|
| 103 | <xs:documentation>
|
| 104 | Zero or one file containing expected results for this query.
|
| 105 | </xs:documentation>
|
| 106 | </xs:annotation>
|
| 107 | <xs:complexType>
|
| 108 | <xs:simpleContent>
|
| 109 | <xs:extension base="xs:string">
|
| 110 | <xs:attribute name="compare" type="test:comparison-enum" use="required"/>
|
| 111 | </xs:extension>
|
| 112 | </xs:simpleContent>
|
| 113 | </xs:complexType>
|
| 114 | </xs:element>
|
| 115 |
|
| 116 |
|
| 117 | <!-- Zero or more expected errors for this query -->
|
| 118 |
|
| 119 | <xs:element name="expected-error" minOccurs="0" maxOccurs="unbounded">
|
| 120 | <xs:annotation>
|
| 121 | <xs:documentation>
|
| 122 | Zero or more expected errors for this query.
|
| 123 | </xs:documentation>
|
| 124 | </xs:annotation>
|
| 125 |
|
| 126 | <xs:complexType>
|
| 127 | <xs:simpleContent>
|
| 128 | <xs:extension base="test:ErrorCode">
|
| 129 | </xs:extension>
|
| 130 | </xs:simpleContent>
|
| 131 | </xs:complexType>
|
| 132 | </xs:element>
|
| 133 |
|
| 134 | </xs:sequence>
|
| 135 |
|
| 136 | <!-- This name is always equal to the name of the test case -->
|
| 137 | <xs:attribute name="name" type="xs:string" use="required"/>
|
| 138 | </xs:complexType>
|
| 139 | </xs:element>
|
| 140 |
|
| 141 | <!-- Zero or more files containing expected results for this query -->
|
| 142 |
|
| 143 | </xs:sequence>
|
| 144 |
|
| 145 | <!-- The filename for this query can be constructed from: -->
|
| 146 | <!-- the QueryOffsetPath -->
|
| 147 | <!-- the FilePath -->
|
| 148 | <!-- the name -->
|
| 149 | <!-- the QueryFileExtension -->
|
| 150 |
|
| 151 | <xs:attribute name="FilePath" type="test:SimplifiedRelativeFilePath" use="required"/>
|
| 152 | <xs:attribute name="date" type="xs:date" use="required"/>
|
| 153 | </xs:complexType>
|
| 154 |
|
| 155 | <!-- comparison-enum type -->
|
| 156 | <!-- Identify the type of comparison used to determine whether an -->
|
| 157 | <!-- expected result and an actual result match. -->
|
| 158 |
|
| 159 | <xs:simpleType name="comparison-enum">
|
| 160 | <xs:annotation>
|
| 161 | <xs:documentation>
|
| 162 | Identify the type of comparison used to determine whether an
|
| 163 | expected result and an actual result match.
|
| 164 | </xs:documentation>
|
| 165 | </xs:annotation>
|
| 166 |
|
| 167 | <xs:restriction base="xs:string">
|
| 168 | <xs:enumeration value="XML"/>
|
| 169 | <xs:enumeration value="Text"/>
|
| 170 | <xs:enumeration value="Inspect"/>
|
| 171 | <xs:enumeration value="Ignore"/>
|
| 172 | </xs:restriction>
|
| 173 | </xs:simpleType>
|
| 174 |
|
| 175 | <!-- description type -->
|
| 176 |
|
| 177 | <xs:complexType name="description">
|
| 178 | <xs:simpleContent>
|
| 179 | <xs:extension base="xs:string">
|
| 180 | <xs:attribute name="last-mod" type="xs:date"/>
|
| 181 | </xs:extension>
|
| 182 | </xs:simpleContent>
|
| 183 | </xs:complexType>
|
| 184 |
|
| 185 |
|
| 186 | <!-- ErrorCode type -->
|
| 187 | <!-- * is used to mean that any error code is acceptable -->
|
| 188 |
|
| 189 | <xs:simpleType name="ErrorCode">
|
| 190 | <xs:annotation>
|
| 191 | <xs:documentation>
|
| 192 | * is used to mean that any error code is acceptable
|
| 193 | </xs:documentation>
|
| 194 | </xs:annotation>
|
| 195 |
|
| 196 | <xs:restriction base="xs:string">
|
| 197 | <xs:pattern value="\*|([A-Z]{4}[0-9]{4})"/>
|
| 198 | </xs:restriction>
|
| 199 | </xs:simpleType>
|
| 200 |
|
| 201 | </xs:schema>
|