source: icXML/icXML-devel/tests/src/XSTSHarness/regression/AnnotatedTSSchema.xsd

Last change on this file was 2726, checked in by cameron, 7 years ago

Add original Xerces tests and samples directories

File size: 23.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3NOTE (JT): This schema differs from the official version adopted by the WG in that
41) these attribute declarations in the xs:schema element:
5  xmlns:ts="http://www.w3.org/2003/XMLSchema/TestSuite/PLACEHOLDER"
6  targetNamespace="http://www.w3.org/2003/XMLSchema/TestSuite/PLACEHOLDER"
7are replaced by lines to enable the use of a local copy of this schema.
82) The import declarations for XLink and XML namespace are given schemaLocation attributes.
9-->
10<xs:schema 
11  xmlns:ts="TestSuite"
12  targetNamespace="TestSuite"
13  xmlns:xs="http://www.w3.org/2001/XMLSchema"
14  xmlns:xlink="http://www.w3.org/1999/xlink"
15  >
16<!--
17  <xs:import namespace="http://www.w3.org/1999/xlink"/>
18
19  <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
20-->
21
22  <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="file:///C:/3rd-party/XlnGui/Catalogs/Large/www.xbrl.org/2003/xlink-2003-12-31.xsd"/>
23
24  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="file:///C:/3rd-party/XlnGui/Catalogs/Small/www.w3.org/2001/03/xml.xsd"/>
25
26
27  <xs:annotation>
28    <xs:documentation>
29      This is the schema for the W3C XML Schema Test Suite collection
30      (TS), as approved by the W3C XML Schema Working Group on May 12,
31      2003. It defines the namespace:
32
33        http://www.w3.org/2003/XMLSchema/TestSuite/PLACEHOLDER
34
35      The TS consists of a set of test suites, each of which is identified
36      according to the version of W3C XML Schema it is designed to
37      test. Previous versions of test suites are archived and are also
38      available, identifiable by the version of the test suite itself.
39
40      This schema defines three separate but related document types for
41      the TS:
42
43        1) The testSuite element is the root element of a document
44           which defines a test suite as described above (e.g. the
45           2003-10-25 version of the test suite for version 1 of the
46           Recommendation).
47
48           The principal purpose of a testSuite document is the provision
49           of a set of links to documents defining the tests which
50           constitute the test suite.
51
52           Files containing testSuite documents have the filename suffix
53           ".suite".
54
55        2) The testSet element is the root element of a document which
56           describes a set of tests. Each testSuite consists primarily
57           of a set of links to testSet documents.  The scope of the
58           testSet is typically determined by the contributor of the
59           tests which make up the testSet: it is the unit in which
60           tests are contributed to the collection.
61
62           Files containing testSet documents have the filename suffix
63           ".testSet".
64
65        3) The testSuiteResults element is the root element of a
66           document describing the results of testing a processor
67           against a testSuite.
68
69           Files containing testSuiteResults documents have the filename
70           suffix ".results".
71    </xs:documentation>
72  </xs:annotation>
73
74
75  <xs:element name="testSuite">
76    <xs:annotation>
77      <xs:documentation>
78        The root element of a document describing all tests for a
79        particular version of W3C XML Schema, for the version of the TS
80        defined by the document.
81
82        The element has three attributes, each of which is required:
83
84          name - the name of this test suite.
85
86          releaseDate - the date on which this test suite was
87                        released. This value serves to identify the
88                        version of the test suite.
89
90          schemaVersion - the version of W3C XML Schema for which the
91                          tests are designed.
92
93        Two elements may optionally be present:
94
95          annotation - at most one instance of general documentation.
96
97          testSetRef - a set of references to the sets of tests which
98                       make up this test suite.
99
100                       The test sets referenced are uniquely named.
101      </xs:documentation>
102    </xs:annotation>
103    <xs:complexType>
104      <xs:sequence>
105        <xs:element ref="ts:annotation" minOccurs="0"/>
106        <xs:element ref="ts:testSetRef" minOccurs="0" maxOccurs="unbounded"/>
107      </xs:sequence>
108      <xs:attribute name="name" use="required" type="xs:Name"/>
109      <xs:attribute name="releaseDate" use="required" type="xs:date"/>
110      <xs:attribute name="schemaVersion" use="required" type="xs:string"/>
111      <xs:anyAttribute namespace="##other" processContents="lax"/>
112    </xs:complexType>
113  </xs:element>
114
115
116  <xs:element name="testSetRef" type="ts:ref"/>
117
118
119  <xs:element name="testSet">
120    <xs:annotation>
121      <xs:documentation>
122        The root element of a document describing a set of tests,
123        normally from a single contributor.  A contributor may supply
124        any number of testSet files.
125
126        The element has two attributes, each of which is required:
127
128          contributor - the name of the contributor of this testSet.
129
130          name - the name of this testSet, which must be unique within
131                 the enclosing testSuite.
132
133        Two elements may optionally be present:
134
135          annotation - at most one instance of general documentation.
136
137          testGroup - a set of testGroup elements, each of which defines a
138                      group of closely related tests.
139
140                      The testGroup elements must be uniquely named.
141      </xs:documentation>
142    </xs:annotation>
143    <xs:complexType>
144      <xs:sequence>
145        <xs:element ref="ts:annotation" minOccurs="0"/>
146        <xs:element ref="ts:testGroup" minOccurs="0" maxOccurs="unbounded"/>
147      </xs:sequence>
148      <xs:attribute name="contributor" use="required" type="xs:string"/>
149      <xs:attribute name="name" use="required" type="xs:Name"/>
150      <xs:anyAttribute namespace="##other" processContents="lax"/>
151    </xs:complexType>
152    <xs:unique name="uniqueGroupName">
153      <xs:annotation>
154        <xs:documentation>
155          Each test group within a test set must have a unique name.
156        </xs:documentation>
157      </xs:annotation>
158      <xs:selector xpath="ts:testGroup"/>
159      <xs:field xpath="@name"/>
160    </xs:unique>
161  </xs:element>
162
163
164  <xs:element name="testGroup">
165    <xs:annotation>
166      <xs:documentation>
167        This element groups a collection of closely related tests. In the
168        case where a schema is present, this element groups the schema with a
169        set of instance documents which should be validated against the
170        schema.
171
172        It has one attribute, which is required:
173
174          name - an identifier for the testGroup which is unique within
175                 the enclosing testSet.
176
177        Four elements may optionally be present:
178
179          annotation - at most one instance of general documentation.
180
181          documentationReference - any number of references to external
182                                   documentation upon which the test
183                                   is based, e.g. links to relevant
184                                   sections of the Recommendation,
185                                   to the Errata, etc.
186
187          schemaTest - any number of elements, each of which holds
188                       information on a single schema document.
189
190                       When more than one schema document is present,
191                       a single schema is constructed from the set
192                       (or from other schemas via import).
193
194                       Schema documents may be omitted, for the purpose
195                       of testing a processor's validation of an instance
196                       containing only the built-in datatypes defined in
197                       the Recommendation.
198
199          instanceTest - any number of elements, each of which holds
200                         information on a single instance document to
201                         be validated against the included schema.
202      </xs:documentation>
203    </xs:annotation>
204    <xs:complexType>
205      <xs:sequence>
206        <xs:element ref="ts:annotation" minOccurs="0"/>
207        <xs:element ref="ts:documentationReference" minOccurs="0" maxOccurs="unbounded"/>
208        <xs:element ref="ts:schemaTest" minOccurs="0"/>
209        <xs:element ref="ts:instanceTest" minOccurs="0" maxOccurs="unbounded"/>
210      </xs:sequence>
211      <xs:attribute name="name" use="required" type="xs:Name"/>
212      <xs:anyAttribute namespace="##other" processContents="lax"/>
213    </xs:complexType>
214    <xs:unique name="uniqueTestName">
215      <xs:annotation>
216        <xs:documentation>
217          Each test within a test group must have a unique name.
218        </xs:documentation>
219      </xs:annotation>
220      <xs:selector xpath="ts:schemaTest|ts:instanceTest"/>
221      <xs:field xpath="@name"/>
222    </xs:unique>
223  </xs:element>
224
225
226  <xs:element name="schemaTest">
227    <xs:annotation>
228      <xs:documentation>
229        This element groups together information about the schema for
230        a particular test condition.
231
232        It has one attribute, which is required:
233
234          name - the name of the schema, which must be unique within
235                 the enclosing testGroup (i.e. it must differ from the
236                 name(s) of any associated instanceTest elements).
237
238        One element is required:
239
240          schemaDocument - at least one link to a file containing a
241                           schema document. The schema for the test is
242                           constructed from the set (or from other
243                           schemas via import).
244
245        Three elements may optionally be present:
246
247          expected - the expected validation outcome for the schema
248                     contained in the schema document(s).
249
250          current - the current status of this test in the TS (an
251                    indication of the test's accuracy in testing the
252                    feature it is intended to test).
253
254          prior - the history of any changes in the status of this test.
255
256        The elements "expected" and "current" may be absent when tests
257        are contributed, but will always be present for tests included in
258        the TS.
259      </xs:documentation>
260    </xs:annotation>
261    <xs:complexType>
262      <xs:sequence>
263        <xs:element ref="ts:schemaDocument" maxOccurs="unbounded"/>
264        <xs:element ref="ts:expected" minOccurs="0"/>
265        <xs:element ref="ts:current" minOccurs="0"/>
266        <xs:element ref="ts:prior" minOccurs="0" maxOccurs="unbounded"/>
267      </xs:sequence>
268      <xs:attribute name="name" use="required" type="xs:Name"/>
269      <xs:anyAttribute namespace="##other" processContents="lax"/>
270    </xs:complexType>
271  </xs:element>
272
273
274  <xs:element name="instanceTest">
275    <xs:annotation>
276      <xs:documentation>
277        This element groups together information about an instance
278        document which should be validated against the schema referenced
279        in the enclosing testGroup.
280
281        It has one attribute, which is required:
282
283          name - the name of the instance document, which must be unique
284                 within the enclosing testGroup (i.e. it must differ
285                 from the name of any associated schemaTest elements).
286
287        One element is required:
288
289          instanceDocument - a link to a file containing the instance
290                             document.
291
292        Three elements may optionally be present:
293
294          expected - the expected validation outcome for the instance
295                     document.
296
297          current - the current status of this test in the TS (an
298                    indication of the test's accuracy in testing the
299                    feature it is intended to test).
300
301          prior - the history of any changes in the status of this test.
302
303        The elements "expected" and "current" may be absent when tests
304        are contributed, but will always be present for tests included in
305        the TS.
306
307        Note: per section 5.2 "Assessing Schema-Validity" of the
308        Recommendation "XML Schema Part 1: Structures", validation may
309        be started in a variety of ways.  For the purposes of the TS,
310        only the third method shall be used:
311
312          "The processor starts from Schema-Validity Assessment (Element)
313          (3.3.4) with no stipulated declaration or definition".
314      </xs:documentation>
315    </xs:annotation>
316    <xs:complexType>
317      <xs:sequence>
318        <xs:element ref="ts:instanceDocument"/>
319        <xs:element ref="ts:expected" minOccurs="0"/>
320        <xs:element ref="ts:current" minOccurs="0"/>
321        <xs:element ref="ts:prior" minOccurs="0" maxOccurs="unbounded"/>
322      </xs:sequence>
323      <xs:attribute name="name" use="required" type="xs:Name"/>
324      <xs:anyAttribute namespace="##other" processContents="lax"/>
325    </xs:complexType>
326  </xs:element>
327
328
329  <xs:element name="schemaDocument" type="ts:ref"/>
330  <xs:element name="instanceDocument" type="ts:ref"/>
331
332
333  <xs:element name="current" type="ts:statusEntry">
334    <xs:annotation>
335      <xs:documentation>
336        The current status of a test in the TS.
337       
338        This element has two attributes, both of which are required:
339
340          status - the status of the test. One of "accepted", "stable",
341                   "disputed-test" or "disputed-spec" (see the TS website
342                   for an explanation of these values).
343
344          date - the date on which the value in the status attribute
345                 was attained.
346      </xs:documentation>
347    </xs:annotation>
348  </xs:element>
349
350
351  <xs:element name="prior" type="ts:statusEntry">
352    <xs:annotation>
353      <xs:documentation>
354        A former status of a test in the TS.
355
356        This element has two attributes, both of which are required:
357
358          status - the former status of the test. One of "accepted",
359                   "stable", "disputed-test" or "disputed-spec" (see
360                   the TS website for an explanation of these values).
361
362          date - the date on which the value in the status attribute
363                 was attained.
364      </xs:documentation>
365    </xs:annotation>
366  </xs:element>
367
368
369  <xs:complexType name="statusEntry">
370    <xs:attribute name="status" use="required" type="ts:status"/>
371    <xs:attribute name="date" use="required" type="xs:date"/>
372    <xs:anyAttribute namespace="##other" processContents="lax"/>
373  </xs:complexType>
374
375
376  <xs:simpleType name="status">
377    <xs:restriction base="xs:token">
378      <xs:enumeration value="accepted"/>
379      <xs:enumeration value="stable"/>
380      <xs:enumeration value="disputed-test"/>
381      <xs:enumeration value="disputed-spec"/>
382    </xs:restriction>
383  </xs:simpleType>
384
385
386  <xs:element name="expected">
387    <xs:annotation>
388      <xs:documentation>
389        The expected validation outcome of a test in the TS.
390       
391        This element has one attribute, which is required:
392       
393          validity - the expected validity of the test. One of "valid",
394                     "invalid" or "notKnown".
395      </xs:documentation>
396    </xs:annotation>
397    <xs:complexType>
398      <xs:attribute name="validity" use="required" type="ts:validityOutcome"/>
399      <xs:anyAttribute namespace="##other" processContents="lax"/>
400    </xs:complexType>
401  </xs:element>
402
403
404  <xs:simpleType name="validityOutcome">
405    <xs:restriction base="xs:token">
406      <xs:enumeration value="valid"/>
407      <xs:enumeration value="invalid"/>
408      <xs:enumeration value="notKnown"/>
409    </xs:restriction>
410  </xs:simpleType>
411
412
413  <xs:element name="testSuiteResults">
414    <xs:annotation>
415      <xs:documentation>
416        This is the root element of a document containing a test result
417        report. The report takes the form of a set of test results
418        returned by a processor/validator when run against the TS.
419
420        It has three required attributes:
421
422          suite - the name of the test suite to which these results
423                  correspond.  This should be the value of the name
424                  attribute of the testSuite element at the root of
425                  the test suite document describing the tests to which
426                  these results correspond.
427
428          processor - some identifying information for the processor/
429                      validator which produced the reported results. The
430                      value of this attribute is left to the discretion
431                      of the reporter.
432
433          submitDate - the date on which these results were submitted
434                       to the TS Task Force.
435
436        The element also has one optional attribute:
437
438          publicationPermission - the degree to which the result reporter
439                                  authorizes the W3C to disseminate the
440                                  reported results. One of "W3C members"
441                                  or "public" (see the TS website for an
442                                  explanation of these values). If this
443                                  attribute is absent, no permission to
444                                  publish is granted.
445
446        This element has two optional elements:
447
448          annotation - at most one instance of more detailed
449                       (ts:documentation) or structured (ts:appinfo)
450                       information or commentary regarding the enclosed
451                       test results.
452
453          testResult - any number of reports of the results of individual
454                       tests. Any results may be omitted, particularly
455                       those for tests of features for which the processor
456                       claims no support.
457      </xs:documentation>
458    </xs:annotation>
459    <xs:complexType>
460      <xs:sequence>
461        <xs:element ref="ts:annotation" minOccurs="0"/>
462        <xs:element ref="ts:testResult" minOccurs="0" maxOccurs="unbounded"/>
463      </xs:sequence>
464      <xs:attribute name="suite" use="required" type="xs:Name"/>
465      <xs:attribute name="processor" use="required" type="xs:string"/>
466      <xs:attribute name="submitDate" use="required" type="xs:date"/>
467      <xs:attribute name="publicationPermission">
468        <xs:simpleType>
469          <xs:restriction base="xs:string">
470            <xs:enumeration value="W3C members"/>
471            <xs:enumeration value="public"/>
472          </xs:restriction>
473        </xs:simpleType>
474      </xs:attribute>
475      <xs:anyAttribute namespace="##other" processContents="lax"/>
476    </xs:complexType>
477  </xs:element>
478
479
480  <xs:element name="testResult">
481    <xs:annotation>
482      <xs:documentation>
483        The result of an individual instance test or a schema test.
484       
485        This element has four required attributes:
486       
487          validity - the validition outcome of the test. One of "valid",
488                     "invalid" or "notKnown".
489
490          set - the value of the "name" attribute of the test set to
491                which the test belongs.
492
493          group - the value of the "name" attribute of the test group
494                  to which the test belongs.
495
496          test - the value of the "name" attribute of the schema test
497                 or instance test, the validation outcome of which this
498                 result reports.
499
500            NOTE: The "set", "group" and "test" attributes are used to
501            uniquely identify the test within the TS for which this
502            result reports the validation outcome.  Each matches the
503            "name" attribute of the respective element in the test suite.
504
505        This element has one optional attribute:
506       
507          normalizedLoad - a relative load value, intended as an indicator
508                           of the resource requirements of an individual
509                           test. Values may be based on processing time,
510                           memory usage or a combination of the two.
511                           Values should be in the vicinity of 1.0.
512
513        The element has one optional element:
514       
515          annotation - at most one instance of more detailed
516                       (ts:documentation) or structured (ts:appinfo)
517                       information or commentary regarding the individual
518                       test result. Reporters are encouraged to use
519                       annotation/appinfo to report more detailed outcome
520                       information, such as error and warning messages.
521     </xs:documentation>
522    </xs:annotation>
523    <xs:complexType>
524      <xs:sequence>
525        <xs:element ref="ts:annotation" minOccurs="0"/>
526      </xs:sequence>
527      <xs:attribute name="validity" use="required" type="ts:validityOutcome"/>
528      <xs:attribute name="set" use="required" type="xs:Name"/>
529      <xs:attribute name="group" use="required" type="xs:Name"/>
530      <xs:attribute name="test" use="required" type="xs:Name"/>
531      <xs:attribute name="normalizedLoad" type="xs:decimal"/>
532      <xs:anyAttribute namespace="##other" processContents="lax"/>
533    </xs:complexType>
534  </xs:element>
535
536
537  <xs:complexType name="ref">
538    <xs:attribute ref="xlink:type" default="locator"/>
539    <xs:attribute ref="xlink:href"/>
540    <xs:anyAttribute namespace="##other" processContents="lax"/>
541  </xs:complexType>
542
543
544  <xs:element name="documentationReference" type="ts:ref">
545    <xs:annotation>
546      <xs:documentation>
547        A link to documentation relevant to a test, such as a link to the
548        Recommendation, an erratum, an archived email discussion, etc.
549      </xs:documentation>
550    </xs:annotation>
551  </xs:element>
552
553
554  <xs:element name="annotation">
555    <xs:annotation>
556      <xs:documentation>
557        This is an exact copy of the annotation element defined in the Schema
558        Recommendation. It is duplicated here in order to replicate the
559        functionality of the xs:annotation element and because the Schema for
560        Schemas cannot be imported.
561      </xs:documentation>
562    </xs:annotation>
563    <xs:complexType>
564      <xs:choice maxOccurs="unbounded" minOccurs="0">
565        <xs:element ref="ts:appinfo"/>
566        <xs:element ref="ts:documentation"/>
567      </xs:choice>
568      <xs:anyAttribute namespace="##other" processContents="lax"/>
569    </xs:complexType>
570  </xs:element>
571
572
573  <xs:element name="appinfo">
574    <xs:complexType mixed="true">
575      <xs:sequence maxOccurs="unbounded" minOccurs="0">
576        <xs:any processContents="lax"/>
577      </xs:sequence>
578      <xs:attribute name="source" type="xs:anyURI"/>
579      <xs:anyAttribute namespace="##other" processContents="lax"/>
580    </xs:complexType>
581  </xs:element>
582
583  <xs:element name="documentation">
584    <xs:complexType mixed="true">
585      <xs:sequence maxOccurs="unbounded" minOccurs="0">
586        <xs:any processContents="lax"/>
587      </xs:sequence>
588      <xs:attribute name="source" type="xs:anyURI"/>
589      <xs:attribute ref="xml:lang"/>
590      <xs:anyAttribute namespace="##other" processContents="lax"/>
591    </xs:complexType>
592  </xs:element>
593
594</xs:schema>
Note: See TracBrowser for help on using the repository browser.