]> gerrit.simantics Code Review - simantics/interop.git/blob - org.simantics.xml.sax/schema/XMLSchema.xsd
Merge "Inverse relation for hasReference"
[simantics/interop.git] / org.simantics.xml.sax / schema / XMLSchema.xsd
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">\r
3  <xs:annotation>\r
4   <xs:documentation>\r
5     Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp \r
6     Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp \r
7   </xs:documentation>\r
8  </xs:annotation>\r
9 \r
10  <xs:annotation>\r
11    <xs:documentation source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html">\r
12    The schema corresponding to this document is normative,\r
13    with respect to the syntactic constraints it expresses in the\r
14    XML Schema language.  The documentation (within &lt;documentation&gt; elements)\r
15    below, is not normative, but rather highlights important aspects of\r
16    the W3C Recommendation of which this is a part</xs:documentation>\r
17  </xs:annotation>\r
18 \r
19  <xs:annotation>\r
20    <xs:documentation>\r
21    The simpleType element and all of its members are defined\r
22       towards the end of this schema document</xs:documentation>\r
23  </xs:annotation>\r
24 \r
25  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd">\r
26    <xs:annotation>\r
27      <xs:documentation>\r
28        Get access to the xml: attribute groups for xml:lang\r
29        as declared on 'schema' and 'documentation' below\r
30      </xs:documentation>\r
31    </xs:annotation>\r
32  </xs:import>\r
33 \r
34  <xs:complexType name="openAttrs">\r
35    <xs:annotation>\r
36      <xs:documentation>\r
37        This type is extended by almost all schema types\r
38        to allow attributes from other namespaces to be\r
39        added to user schemas.\r
40      </xs:documentation>\r
41    </xs:annotation>\r
42    <xs:complexContent>\r
43      <xs:restriction base="xs:anyType">\r
44        <xs:anyAttribute namespace="##other" processContents="lax"/>\r
45      </xs:restriction>\r
46    </xs:complexContent>\r
47  </xs:complexType>\r
48 \r
49  <xs:complexType name="annotated">\r
50    <xs:annotation>\r
51      <xs:documentation>\r
52        This type is extended by all types which allow annotation\r
53        other than &lt;schema&gt; itself\r
54      </xs:documentation>\r
55    </xs:annotation>\r
56    <xs:complexContent>\r
57      <xs:extension base="xs:openAttrs">\r
58        <xs:sequence>\r
59          <xs:element ref="xs:annotation" minOccurs="0"/>\r
60        </xs:sequence>\r
61        <xs:attribute name="id" type="xs:ID"/>\r
62      </xs:extension>\r
63    </xs:complexContent>\r
64  </xs:complexType>\r
65 \r
66  <xs:group name="schemaTop">\r
67   <xs:annotation>\r
68    <xs:documentation>\r
69    This group is for the\r
70    elements which occur freely at the top level of schemas.\r
71    All of their types are based on the "annotated" type by extension.</xs:documentation>\r
72   </xs:annotation>\r
73   <xs:choice>\r
74    <xs:group ref="xs:redefinable"/>\r
75    <xs:element ref="xs:element"/>\r
76    <xs:element ref="xs:attribute"/>\r
77    <xs:element ref="xs:notation"/>\r
78   </xs:choice>\r
79  </xs:group>\r
80  \r
81  <xs:group name="redefinable">\r
82   <xs:annotation>\r
83    <xs:documentation>\r
84    This group is for the\r
85    elements which can self-redefine (see &lt;redefine&gt; below).</xs:documentation>\r
86   </xs:annotation>\r
87   <xs:choice>\r
88    <xs:element ref="xs:simpleType"/>\r
89    <xs:element ref="xs:complexType"/>\r
90    <xs:element ref="xs:group"/>\r
91    <xs:element ref="xs:attributeGroup"/>\r
92   </xs:choice>\r
93  </xs:group>\r
94 \r
95  <xs:simpleType name="formChoice">\r
96   <xs:annotation>\r
97    <xs:documentation>\r
98    A utility type, not for public use</xs:documentation>\r
99   </xs:annotation>\r
100   <xs:restriction base="xs:NMTOKEN">\r
101    <xs:enumeration value="qualified"/>\r
102    <xs:enumeration value="unqualified"/>\r
103   </xs:restriction>\r
104  </xs:simpleType>\r
105 \r
106  <xs:simpleType name="reducedDerivationControl">\r
107   <xs:annotation>\r
108    <xs:documentation>\r
109    A utility type, not for public use</xs:documentation>\r
110   </xs:annotation>\r
111   <xs:restriction base="xs:derivationControl">\r
112    <xs:enumeration value="extension"/>\r
113    <xs:enumeration value="restriction"/>\r
114   </xs:restriction>\r
115  </xs:simpleType>\r
116 \r
117  <xs:simpleType name="derivationSet">\r
118   <xs:annotation>\r
119    <xs:documentation>\r
120    A utility type, not for public use</xs:documentation>\r
121    <xs:documentation>\r
122    #all or (possibly empty) subset of {extension, restriction}</xs:documentation>\r
123   </xs:annotation>\r
124   <xs:union>\r
125    <xs:simpleType>    \r
126     <xs:restriction base="xs:token">\r
127      <xs:enumeration value="#all"/>\r
128     </xs:restriction>\r
129    </xs:simpleType>\r
130    <xs:simpleType>\r
131     <xs:list itemType="xs:reducedDerivationControl"/>\r
132    </xs:simpleType>\r
133   </xs:union>\r
134  </xs:simpleType>\r
135 \r
136  <xs:simpleType name="typeDerivationControl">\r
137   <xs:annotation>\r
138    <xs:documentation>\r
139    A utility type, not for public use</xs:documentation>\r
140   </xs:annotation>\r
141   <xs:restriction base="xs:derivationControl">\r
142    <xs:enumeration value="extension"/>\r
143    <xs:enumeration value="restriction"/>\r
144    <xs:enumeration value="list"/>\r
145    <xs:enumeration value="union"/>\r
146   </xs:restriction>\r
147  </xs:simpleType>\r
148 \r
149   <xs:simpleType name="fullDerivationSet">\r
150   <xs:annotation>\r
151    <xs:documentation>\r
152    A utility type, not for public use</xs:documentation>\r
153    <xs:documentation>\r
154    #all or (possibly empty) subset of {extension, restriction, list, union}</xs:documentation>\r
155   </xs:annotation>\r
156   <xs:union>\r
157    <xs:simpleType>    \r
158     <xs:restriction base="xs:token">\r
159      <xs:enumeration value="#all"/>\r
160     </xs:restriction>\r
161    </xs:simpleType>\r
162    <xs:simpleType>\r
163     <xs:list itemType="xs:typeDerivationControl"/>\r
164    </xs:simpleType>\r
165   </xs:union>\r
166  </xs:simpleType>\r
167 \r
168  <xs:element name="schema" id="schema">\r
169   <xs:annotation>\r
170     <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>\r
171   </xs:annotation>\r
172   <xs:complexType>\r
173    <xs:complexContent>\r
174     <xs:extension base="xs:openAttrs">\r
175      <xs:sequence>\r
176       <xs:choice minOccurs="0" maxOccurs="unbounded">\r
177        <xs:element ref="xs:include"/>\r
178        <xs:element ref="xs:import"/>\r
179        <xs:element ref="xs:redefine"/>\r
180        <xs:element ref="xs:annotation"/>\r
181       </xs:choice>\r
182       <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
183        <xs:group ref="xs:schemaTop"/>\r
184        <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>\r
185       </xs:sequence>\r
186      </xs:sequence>\r
187      <xs:attribute name="targetNamespace" type="xs:anyURI"/>\r
188      <xs:attribute name="version" type="xs:token"/>\r
189      <xs:attribute name="finalDefault" type="xs:fullDerivationSet" use="optional" default=""/>\r
190      <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>\r
191      <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>\r
192      <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>\r
193      <xs:attribute name="id" type="xs:ID"/>\r
194      <xs:attribute ref="xml:lang"/>\r
195     </xs:extension>\r
196    </xs:complexContent>\r
197   </xs:complexType>\r
198 \r
199   <xs:key name="element">\r
200    <xs:selector xpath="xs:element"/>\r
201    <xs:field xpath="@name"/>\r
202   </xs:key>\r
203 \r
204   <xs:key name="attribute">\r
205    <xs:selector xpath="xs:attribute"/>\r
206    <xs:field xpath="@name"/>\r
207   </xs:key>\r
208 \r
209   <xs:key name="type">\r
210    <xs:selector xpath="xs:complexType|xs:simpleType"/>\r
211    <xs:field xpath="@name"/>\r
212   </xs:key>\r
213  \r
214   <xs:key name="group">\r
215    <xs:selector xpath="xs:group"/>\r
216    <xs:field xpath="@name"/>\r
217   </xs:key>\r
218  \r
219   <xs:key name="attributeGroup">\r
220    <xs:selector xpath="xs:attributeGroup"/>\r
221    <xs:field xpath="@name"/>\r
222   </xs:key>\r
223  \r
224   <xs:key name="notation">\r
225    <xs:selector xpath="xs:notation"/>\r
226    <xs:field xpath="@name"/>\r
227   </xs:key>\r
228 \r
229   <xs:key name="identityConstraint">\r
230    <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>\r
231    <xs:field xpath="@name"/>\r
232   </xs:key>\r
233 \r
234  </xs:element>\r
235 \r
236  <xs:simpleType name="allNNI">\r
237   <xs:annotation><xs:documentation>\r
238    for maxOccurs</xs:documentation></xs:annotation>\r
239   <xs:union memberTypes="xs:nonNegativeInteger">\r
240    <xs:simpleType>\r
241     <xs:restriction base="xs:NMTOKEN">\r
242      <xs:enumeration value="unbounded"/>\r
243     </xs:restriction>\r
244    </xs:simpleType>\r
245   </xs:union>\r
246  </xs:simpleType>\r
247 \r
248  <xs:attributeGroup name="occurs">\r
249   <xs:annotation><xs:documentation>\r
250    for all particles</xs:documentation></xs:annotation>\r
251   <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>\r
252   <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>\r
253  </xs:attributeGroup>\r
254 \r
255  <xs:attributeGroup name="defRef">\r
256   <xs:annotation><xs:documentation>\r
257    for element, group and attributeGroup,\r
258    which both define and reference</xs:documentation></xs:annotation>\r
259   <xs:attribute name="name" type="xs:NCName"/>\r
260   <xs:attribute name="ref" type="xs:QName"/>\r
261  </xs:attributeGroup>\r
262 \r
263  <xs:group name="typeDefParticle">\r
264   <xs:annotation>\r
265     <xs:documentation>\r
266    'complexType' uses this</xs:documentation></xs:annotation>\r
267   <xs:choice>\r
268    <xs:element name="group" type="xs:groupRef"/>\r
269    <xs:element ref="xs:all"/>\r
270    <xs:element ref="xs:choice"/>\r
271    <xs:element ref="xs:sequence"/>\r
272   </xs:choice>\r
273  </xs:group>\r
274  \r
275  \r
276 \r
277  <xs:group name="nestedParticle">\r
278   <xs:choice>\r
279    <xs:element name="element" type="xs:localElement"/>\r
280    <xs:element name="group" type="xs:groupRef"/>\r
281    <xs:element ref="xs:choice"/>\r
282    <xs:element ref="xs:sequence"/>\r
283    <xs:element ref="xs:any"/>\r
284   </xs:choice>\r
285  </xs:group>\r
286  \r
287  <xs:group name="particle">\r
288   <xs:choice>\r
289    <xs:element name="element" type="xs:localElement"/>\r
290    <xs:element name="group" type="xs:groupRef"/>\r
291    <xs:element ref="xs:all"/>\r
292    <xs:element ref="xs:choice"/>\r
293    <xs:element ref="xs:sequence"/>\r
294    <xs:element ref="xs:any"/>\r
295   </xs:choice>\r
296  </xs:group>\r
297  \r
298  <xs:complexType name="attribute">\r
299   <xs:complexContent>\r
300    <xs:extension base="xs:annotated">\r
301     <xs:sequence>\r
302      <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>\r
303     </xs:sequence>\r
304     <xs:attributeGroup ref="xs:defRef"/>\r
305     <xs:attribute name="type" type="xs:QName"/>\r
306     <xs:attribute name="use" use="optional" default="optional">\r
307      <xs:simpleType>\r
308       <xs:restriction base="xs:NMTOKEN">\r
309        <xs:enumeration value="prohibited"/>\r
310        <xs:enumeration value="optional"/>\r
311        <xs:enumeration value="required"/>\r
312       </xs:restriction>\r
313      </xs:simpleType>\r
314     </xs:attribute>\r
315     <xs:attribute name="default" type="xs:string"/>\r
316     <xs:attribute name="fixed" type="xs:string"/>\r
317     <xs:attribute name="form" type="xs:formChoice"/>\r
318    </xs:extension>\r
319   </xs:complexContent>\r
320  </xs:complexType>\r
321  \r
322  <xs:complexType name="topLevelAttribute">\r
323   <xs:complexContent>\r
324    <xs:restriction base="xs:attribute">\r
325     <xs:sequence>\r
326      <xs:element ref="xs:annotation" minOccurs="0"/>\r
327      <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>\r
328     </xs:sequence>\r
329     <xs:attribute name="ref" use="prohibited"/>\r
330     <xs:attribute name="form" use="prohibited"/>\r
331     <xs:attribute name="use" use="prohibited"/>\r
332     <xs:attribute name="name" use="required" type="xs:NCName"/>\r
333     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
334    </xs:restriction>\r
335   </xs:complexContent>\r
336  </xs:complexType>\r
337 \r
338  <xs:group name="attrDecls">\r
339   <xs:sequence>\r
340    <xs:choice minOccurs="0" maxOccurs="unbounded">\r
341     <xs:element name="attribute" type="xs:attribute"/>\r
342     <xs:element name="attributeGroup" type="xs:attributeGroupRef"/>\r
343    </xs:choice>\r
344    <xs:element ref="xs:anyAttribute" minOccurs="0"/>\r
345   </xs:sequence>\r
346  </xs:group>\r
347 \r
348  <xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute">\r
349   <xs:annotation>\r
350    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>\r
351   </xs:annotation>\r
352  </xs:element>\r
353 \r
354  <xs:group name="complexTypeModel">\r
355   <xs:choice>\r
356       <xs:element ref="xs:simpleContent"/>\r
357       <xs:element ref="xs:complexContent"/>\r
358       <xs:sequence>\r
359        <xs:annotation>\r
360         <xs:documentation>\r
361    This branch is short for\r
362    &lt;complexContent&gt;\r
363    &lt;restriction base="xs:anyType"&gt;\r
364    ...\r
365    &lt;/restriction&gt;\r
366    &lt;/complexContent&gt;</xs:documentation>\r
367        </xs:annotation>\r
368        <xs:group ref="xs:typeDefParticle" minOccurs="0"/>\r
369        <xs:group ref="xs:attrDecls"/>\r
370       </xs:sequence>\r
371   </xs:choice>\r
372  </xs:group>\r
373 \r
374  <xs:complexType name="complexType" abstract="true">\r
375   <xs:complexContent>\r
376    <xs:extension base="xs:annotated">\r
377     <xs:group ref="xs:complexTypeModel"/>\r
378     <xs:attribute name="name" type="xs:NCName">\r
379      <xs:annotation>\r
380       <xs:documentation>\r
381       Will be restricted to required or forbidden</xs:documentation>\r
382      </xs:annotation>\r
383     </xs:attribute>\r
384     <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">\r
385      <xs:annotation>\r
386       <xs:documentation>\r
387       Not allowed if simpleContent child is chosen.\r
388       May be overriden by setting on complexContent child.</xs:documentation>\r
389     </xs:annotation>\r
390     </xs:attribute>\r
391     <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>\r
392     <xs:attribute name="final" type="xs:derivationSet"/>\r
393     <xs:attribute name="block" type="xs:derivationSet"/>\r
394    </xs:extension>\r
395   </xs:complexContent>\r
396  </xs:complexType>\r
397  \r
398  <xs:complexType name="topLevelComplexType">\r
399   <xs:complexContent>\r
400    <xs:restriction base="xs:complexType">\r
401     <xs:sequence>\r
402      <xs:element ref="xs:annotation" minOccurs="0"/>\r
403      <xs:group ref="xs:complexTypeModel"/>\r
404     </xs:sequence>\r
405     <xs:attribute name="name" type="xs:NCName" use="required"/>\r
406     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
407    </xs:restriction>\r
408   </xs:complexContent>\r
409  </xs:complexType>\r
410  \r
411  <xs:complexType name="localComplexType">\r
412   <xs:complexContent>\r
413    <xs:restriction base="xs:complexType">\r
414     <xs:sequence>\r
415      <xs:element ref="xs:annotation" minOccurs="0"/>\r
416      <xs:group ref="xs:complexTypeModel"/>\r
417     </xs:sequence>\r
418     <xs:attribute name="name" use="prohibited"/>\r
419     <xs:attribute name="abstract" use="prohibited"/>\r
420     <xs:attribute name="final" use="prohibited"/>\r
421     <xs:attribute name="block" use="prohibited"/>\r
422     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
423    </xs:restriction>\r
424   </xs:complexContent>\r
425  </xs:complexType>\r
426  \r
427  <xs:complexType name="restrictionType">\r
428   <xs:complexContent>\r
429    <xs:extension base="xs:annotated">\r
430     <xs:sequence>\r
431      <xs:choice minOccurs="0">\r
432       <xs:group ref="xs:typeDefParticle"/>\r
433       <xs:group ref="xs:simpleRestrictionModel"/>\r
434      </xs:choice>\r
435      <xs:group ref="xs:attrDecls"/>\r
436     </xs:sequence>\r
437     <xs:attribute name="base" type="xs:QName" use="required"/>\r
438    </xs:extension>\r
439   </xs:complexContent>       \r
440  </xs:complexType>\r
441 \r
442  <xs:complexType name="complexRestrictionType">\r
443   <xs:complexContent>\r
444    <xs:restriction base="xs:restrictionType">\r
445     <xs:sequence>\r
446      <xs:element ref="xs:annotation" minOccurs="0"/>\r
447      <xs:choice minOccurs="0">\r
448       <xs:annotation>\r
449        <xs:documentation>This choice is added simply to\r
450                    make this a valid restriction per the REC</xs:documentation>\r
451       </xs:annotation>\r
452       <xs:group ref="xs:typeDefParticle"/>\r
453      </xs:choice>\r
454      <xs:group ref="xs:attrDecls"/>\r
455     </xs:sequence>\r
456     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
457    </xs:restriction>\r
458   </xs:complexContent>       \r
459  </xs:complexType>\r
460 \r
461  <xs:complexType name="extensionType">\r
462   <xs:complexContent>\r
463    <xs:extension base="xs:annotated">\r
464     <xs:sequence>\r
465      <xs:group ref="xs:typeDefParticle" minOccurs="0"/>\r
466      <xs:group ref="xs:attrDecls"/>\r
467     </xs:sequence>\r
468     <xs:attribute name="base" type="xs:QName" use="required"/>\r
469    </xs:extension>\r
470   </xs:complexContent>       \r
471  </xs:complexType>\r
472 \r
473  <xs:element name="complexContent" id="complexContent">\r
474   <xs:annotation>\r
475    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>\r
476   </xs:annotation>\r
477   <xs:complexType>\r
478    <xs:complexContent>\r
479     <xs:extension base="xs:annotated">\r
480      <xs:choice>\r
481       <xs:element name="restriction" type="xs:complexRestrictionType"/>\r
482       <xs:element name="extension" type="xs:extensionType"/>\r
483      </xs:choice>     \r
484      <xs:attribute name="mixed" type="xs:boolean">\r
485       <xs:annotation>\r
486        <xs:documentation>\r
487        Overrides any setting on complexType parent.</xs:documentation>\r
488       </xs:annotation>\r
489     </xs:attribute>\r
490     </xs:extension>\r
491    </xs:complexContent>\r
492   </xs:complexType>\r
493  </xs:element>\r
494 \r
495  <xs:complexType name="simpleRestrictionType">\r
496   <xs:complexContent>\r
497    <xs:restriction base="xs:restrictionType">\r
498     <xs:sequence>\r
499      <xs:element ref="xs:annotation" minOccurs="0"/>\r
500      <xs:choice minOccurs="0">\r
501       <xs:annotation>\r
502        <xs:documentation>This choice is added simply to\r
503                    make this a valid restriction per the REC</xs:documentation>\r
504       </xs:annotation>\r
505       <xs:group ref="xs:simpleRestrictionModel"/>\r
506      </xs:choice>\r
507      <xs:group ref="xs:attrDecls"/>\r
508     </xs:sequence>\r
509     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
510    </xs:restriction>\r
511   </xs:complexContent>\r
512  </xs:complexType>\r
513 \r
514  <xs:complexType name="simpleExtensionType">\r
515   <xs:complexContent>\r
516    <xs:restriction base="xs:extensionType">\r
517     <xs:sequence>\r
518      <xs:annotation>\r
519       <xs:documentation>\r
520       No typeDefParticle group reference</xs:documentation>\r
521      </xs:annotation>\r
522      <xs:element ref="xs:annotation" minOccurs="0"/>\r
523      <xs:group ref="xs:attrDecls"/>\r
524     </xs:sequence>\r
525     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
526    </xs:restriction>\r
527   </xs:complexContent>\r
528  </xs:complexType>\r
529 \r
530  <xs:element name="simpleContent" id="simpleContent">\r
531   <xs:annotation>\r
532    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>\r
533   </xs:annotation>\r
534   <xs:complexType>\r
535    <xs:complexContent>\r
536     <xs:extension base="xs:annotated">\r
537      <xs:choice>\r
538       <xs:element name="restriction" type="xs:simpleRestrictionType"/>\r
539       <xs:element name="extension" type="xs:simpleExtensionType"/>\r
540      </xs:choice>\r
541     </xs:extension>\r
542    </xs:complexContent>\r
543   </xs:complexType>\r
544  </xs:element>\r
545  \r
546  <xs:element name="complexType" type="xs:topLevelComplexType" id="complexType">\r
547   <xs:annotation>\r
548    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>\r
549   </xs:annotation>\r
550  </xs:element>\r
551 \r
552 \r
553   <xs:simpleType name="blockSet">\r
554    <xs:annotation>\r
555     <xs:documentation>\r
556     A utility type, not for public use</xs:documentation>\r
557     <xs:documentation>\r
558     #all or (possibly empty) subset of {substitution, extension,\r
559     restriction}</xs:documentation>\r
560    </xs:annotation>\r
561    <xs:union>\r
562     <xs:simpleType>    \r
563      <xs:restriction base="xs:token">\r
564       <xs:enumeration value="#all"/>\r
565      </xs:restriction>\r
566     </xs:simpleType>\r
567     <xs:simpleType>\r
568      <xs:list>\r
569       <xs:simpleType>\r
570        <xs:restriction base="xs:derivationControl">\r
571         <xs:enumeration value="extension"/>\r
572         <xs:enumeration value="restriction"/>\r
573         <xs:enumeration value="substitution"/>\r
574        </xs:restriction>\r
575       </xs:simpleType>\r
576      </xs:list>\r
577     </xs:simpleType>\r
578    </xs:union>  \r
579   </xs:simpleType>\r
580 \r
581  <xs:complexType name="element" abstract="true">\r
582   <xs:annotation>\r
583    <xs:documentation>\r
584    The element element can be used either\r
585    at the top level to define an element-type binding globally,\r
586    or within a content model to either reference a globally-defined\r
587    element or type or declare an element-type binding locally.\r
588    The ref form is not allowed at the top level.</xs:documentation>\r
589   </xs:annotation>\r
590 \r
591   <xs:complexContent>\r
592    <xs:extension base="xs:annotated">\r
593     <xs:sequence>\r
594      <xs:choice minOccurs="0">\r
595       <xs:element name="simpleType" type="xs:localSimpleType"/>\r
596       <xs:element name="complexType" type="xs:localComplexType"/>\r
597      </xs:choice>\r
598      <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>\r
599     </xs:sequence>\r
600     <xs:attributeGroup ref="xs:defRef"/>\r
601     <xs:attribute name="type" type="xs:QName"/>\r
602     <xs:attribute name="substitutionGroup" type="xs:QName"/>\r
603     <xs:attributeGroup ref="xs:occurs"/>\r
604     <xs:attribute name="default" type="xs:string"/>\r
605     <xs:attribute name="fixed" type="xs:string"/>\r
606     <xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/>\r
607     <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>\r
608     <xs:attribute name="final" type="xs:derivationSet"/>\r
609     <xs:attribute name="block" type="xs:blockSet"/>\r
610     <xs:attribute name="form" type="xs:formChoice"/>\r
611    </xs:extension>\r
612   </xs:complexContent>\r
613  </xs:complexType>\r
614  \r
615  <xs:complexType name="topLevelElement">\r
616   <xs:complexContent>\r
617    <xs:restriction base="xs:element">\r
618     <xs:sequence>\r
619      <xs:element ref="xs:annotation" minOccurs="0"/>\r
620      <xs:choice minOccurs="0">\r
621       <xs:element name="simpleType" type="xs:localSimpleType"/>\r
622       <xs:element name="complexType" type="xs:localComplexType"/>\r
623      </xs:choice>\r
624      <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>\r
625     </xs:sequence>\r
626     <xs:attribute name="ref" use="prohibited"/>\r
627     <xs:attribute name="form" use="prohibited"/>\r
628     <xs:attribute name="minOccurs" use="prohibited"/>\r
629     <xs:attribute name="maxOccurs" use="prohibited"/>\r
630     <xs:attribute name="name" use="required" type="xs:NCName"/>\r
631     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
632    </xs:restriction>\r
633   </xs:complexContent>\r
634  </xs:complexType>\r
635  \r
636  <xs:complexType name="localElement">\r
637   <xs:complexContent>\r
638    <xs:restriction base="xs:element">\r
639     <xs:sequence>\r
640      <xs:element ref="xs:annotation" minOccurs="0"/>\r
641      <xs:choice minOccurs="0">\r
642       <xs:element name="simpleType" type="xs:localSimpleType"/>\r
643       <xs:element name="complexType" type="xs:localComplexType"/>\r
644      </xs:choice>\r
645      <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>\r
646     </xs:sequence>\r
647     <xs:attribute name="substitutionGroup" use="prohibited"/>\r
648     <xs:attribute name="final" use="prohibited"/>\r
649     <xs:attribute name="abstract" use="prohibited"/>\r
650     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
651    </xs:restriction>\r
652   </xs:complexContent>\r
653  </xs:complexType>\r
654 \r
655  <xs:element name="element" type="xs:topLevelElement" id="element">\r
656   <xs:annotation>\r
657    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>\r
658   </xs:annotation>\r
659  </xs:element>\r
660 \r
661  <xs:complexType name="group" abstract="true">\r
662   <xs:annotation>\r
663    <xs:documentation>\r
664    group type for explicit groups, named top-level groups and\r
665    group references</xs:documentation>\r
666   </xs:annotation>\r
667   <xs:complexContent>\r
668    <xs:extension base="xs:annotated">\r
669     <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>\r
670     <xs:attributeGroup ref="xs:defRef"/>\r
671     <xs:attributeGroup ref="xs:occurs"/>\r
672    </xs:extension>\r
673   </xs:complexContent>\r
674  </xs:complexType>\r
675  \r
676  <xs:complexType name="realGroup">\r
677   <xs:complexContent>\r
678    <xs:restriction base="xs:group">\r
679     <xs:sequence>\r
680      <xs:element ref="xs:annotation" minOccurs="0"/>\r
681      <xs:choice minOccurs="0" maxOccurs="1">\r
682       <xs:element ref="xs:all"/>\r
683       <xs:element ref="xs:choice"/>\r
684       <xs:element ref="xs:sequence"/>\r
685      </xs:choice>\r
686     </xs:sequence>\r
687     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
688    </xs:restriction>\r
689   </xs:complexContent>\r
690  </xs:complexType>\r
691 \r
692  <xs:complexType name="namedGroup">\r
693   <xs:complexContent>\r
694    <xs:restriction base="xs:realGroup">\r
695     <xs:sequence>\r
696      <xs:element ref="xs:annotation" minOccurs="0"/>\r
697      <xs:choice minOccurs="1" maxOccurs="1">\r
698       <xs:element name="all">\r
699        <xs:complexType>\r
700         <xs:complexContent>\r
701          <xs:restriction base="xs:all">\r
702           <xs:group ref="xs:allModel"/>\r
703           <xs:attribute name="minOccurs" use="prohibited"/>\r
704           <xs:attribute name="maxOccurs" use="prohibited"/>\r
705           <xs:anyAttribute namespace="##other" processContents="lax"/>\r
706          </xs:restriction>\r
707         </xs:complexContent>\r
708        </xs:complexType>\r
709       </xs:element>\r
710       <xs:element name="choice" type="xs:simpleExplicitGroup"/>\r
711       <xs:element name="sequence" type="xs:simpleExplicitGroup"/>\r
712      </xs:choice>\r
713     </xs:sequence>\r
714     <xs:attribute name="name" use="required" type="xs:NCName"/>\r
715     <xs:attribute name="ref" use="prohibited"/>\r
716     <xs:attribute name="minOccurs" use="prohibited"/>\r
717     <xs:attribute name="maxOccurs" use="prohibited"/>\r
718     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
719    </xs:restriction>\r
720   </xs:complexContent>\r
721  </xs:complexType>\r
722 \r
723  <xs:complexType name="groupRef">\r
724   <xs:complexContent>\r
725    <xs:restriction base="xs:realGroup">\r
726     <xs:sequence>\r
727      <xs:element ref="xs:annotation" minOccurs="0"/>\r
728     </xs:sequence>\r
729     <xs:attribute name="ref" use="required" type="xs:QName"/>\r
730     <xs:attribute name="name" use="prohibited"/>\r
731     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
732    </xs:restriction>\r
733   </xs:complexContent>\r
734  </xs:complexType>\r
735 \r
736  <xs:complexType name="explicitGroup">\r
737   <xs:annotation>\r
738    <xs:documentation>\r
739    group type for the three kinds of group</xs:documentation>\r
740   </xs:annotation>\r
741   <xs:complexContent>\r
742    <xs:restriction base="xs:group">\r
743     <xs:sequence>\r
744      <xs:element ref="xs:annotation" minOccurs="0"/>\r
745      <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>\r
746     </xs:sequence>\r
747     <xs:attribute name="name" type="xs:NCName" use="prohibited"/>\r
748     <xs:attribute name="ref" type="xs:QName" use="prohibited"/>\r
749     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
750    </xs:restriction>\r
751   </xs:complexContent>\r
752  </xs:complexType>\r
753  \r
754  <xs:complexType name="simpleExplicitGroup">\r
755   <xs:complexContent>\r
756    <xs:restriction base="xs:explicitGroup">\r
757     <xs:sequence>\r
758      <xs:element ref="xs:annotation" minOccurs="0"/>\r
759      <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>\r
760     </xs:sequence>\r
761     <xs:attribute name="minOccurs" use="prohibited"/>\r
762     <xs:attribute name="maxOccurs" use="prohibited"/>\r
763     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
764    </xs:restriction>\r
765   </xs:complexContent>\r
766  </xs:complexType>\r
767  \r
768  <xs:group name="allModel">\r
769   <xs:sequence>\r
770       <xs:element ref="xs:annotation" minOccurs="0"/>\r
771       <xs:choice minOccurs="0" maxOccurs="unbounded">\r
772        <xs:annotation>\r
773         <xs:documentation>This choice with min/max is here to\r
774                           avoid a pblm with the Elt:All/Choice/Seq\r
775                           Particle derivation constraint</xs:documentation>\r
776        </xs:annotation>\r
777        <xs:element name="element" type="xs:narrowMaxMin"/>\r
778       </xs:choice>\r
779      </xs:sequence>\r
780  </xs:group>\r
781  \r
782  \r
783  <xs:complexType name="narrowMaxMin">\r
784   <xs:annotation>\r
785    <xs:documentation>restricted max/min</xs:documentation>\r
786   </xs:annotation>\r
787   <xs:complexContent>\r
788    <xs:restriction base="xs:localElement">\r
789     <xs:sequence>\r
790      <xs:element ref="xs:annotation" minOccurs="0"/>\r
791      <xs:choice minOccurs="0">\r
792       <xs:element name="simpleType" type="xs:localSimpleType"/>\r
793       <xs:element name="complexType" type="xs:localComplexType"/>\r
794      </xs:choice>\r
795      <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>\r
796     </xs:sequence>\r
797     <xs:attribute name="minOccurs" use="optional" default="1">\r
798      <xs:simpleType>\r
799       <xs:restriction base="xs:nonNegativeInteger">\r
800        <xs:enumeration value="0"/>\r
801        <xs:enumeration value="1"/>\r
802       </xs:restriction>\r
803      </xs:simpleType>\r
804     </xs:attribute>\r
805     <xs:attribute name="maxOccurs" use="optional" default="1">\r
806      <xs:simpleType>\r
807       <xs:restriction base="xs:allNNI">\r
808        <xs:enumeration value="0"/>\r
809        <xs:enumeration value="1"/>\r
810       </xs:restriction>\r
811      </xs:simpleType>\r
812     </xs:attribute>\r
813     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
814    </xs:restriction>\r
815   </xs:complexContent>\r
816  </xs:complexType>\r
817 \r
818   <xs:complexType name="all">\r
819    <xs:annotation>\r
820     <xs:documentation>\r
821    Only elements allowed inside</xs:documentation>\r
822    </xs:annotation>\r
823    <xs:complexContent>\r
824     <xs:restriction base="xs:explicitGroup">\r
825      <xs:group ref="xs:allModel"/>\r
826      <xs:attribute name="minOccurs" use="optional" default="1">\r
827       <xs:simpleType>\r
828        <xs:restriction base="xs:nonNegativeInteger">\r
829         <xs:enumeration value="0"/>\r
830         <xs:enumeration value="1"/>\r
831        </xs:restriction>\r
832       </xs:simpleType>\r
833      </xs:attribute>\r
834      <xs:attribute name="maxOccurs" use="optional" default="1">\r
835       <xs:simpleType>\r
836        <xs:restriction base="xs:allNNI">\r
837         <xs:enumeration value="1"/>\r
838        </xs:restriction>\r
839       </xs:simpleType>\r
840      </xs:attribute>\r
841      <xs:anyAttribute namespace="##other" processContents="lax"/>\r
842     </xs:restriction>\r
843    </xs:complexContent>\r
844   </xs:complexType>\r
845 \r
846  <xs:element name="all" id="all" type="xs:all">\r
847   <xs:annotation>\r
848    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/>\r
849   </xs:annotation>\r
850  </xs:element>\r
851 \r
852  <xs:element name="choice" type="xs:explicitGroup" id="choice">\r
853   <xs:annotation>\r
854    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>\r
855   </xs:annotation>\r
856  </xs:element>\r
857 \r
858  <xs:element name="sequence" type="xs:explicitGroup" id="sequence">\r
859   <xs:annotation>\r
860    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>\r
861   </xs:annotation>\r
862  </xs:element>\r
863 \r
864  <xs:element name="group" type="xs:namedGroup" id="group">\r
865   <xs:annotation>\r
866    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>\r
867   </xs:annotation>\r
868  </xs:element>\r
869 \r
870  <xs:complexType name="wildcard">\r
871   <xs:complexContent>\r
872    <xs:extension base="xs:annotated">\r
873     <xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/>\r
874     <xs:attribute name="processContents" use="optional" default="strict">\r
875      <xs:simpleType>\r
876       <xs:restriction base="xs:NMTOKEN">\r
877        <xs:enumeration value="skip"/>\r
878        <xs:enumeration value="lax"/>\r
879        <xs:enumeration value="strict"/>\r
880       </xs:restriction>\r
881      </xs:simpleType>\r
882     </xs:attribute>\r
883    </xs:extension>\r
884   </xs:complexContent>\r
885  </xs:complexType>\r
886 \r
887  <xs:element name="any" id="any">\r
888   <xs:annotation>\r
889    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>\r
890   </xs:annotation>\r
891   <xs:complexType>\r
892    <xs:complexContent>\r
893     <xs:extension base="xs:wildcard">\r
894      <xs:attributeGroup ref="xs:occurs"/>\r
895     </xs:extension>\r
896    </xs:complexContent>\r
897   </xs:complexType>\r
898  </xs:element>\r
899 \r
900   <xs:annotation>\r
901    <xs:documentation>\r
902    simple type for the value of the 'namespace' attr of\r
903    'any' and 'anyAttribute'</xs:documentation>\r
904   </xs:annotation>\r
905   <xs:annotation>\r
906    <xs:documentation>\r
907    Value is\r
908               ##any      - - any non-conflicting WFXML/attribute at all\r
909 \r
910               ##other    - - any non-conflicting WFXML/attribute from\r
911                               namespace other than targetNS\r
912 \r
913               ##local    - - any unqualified non-conflicting WFXML/attribute \r
914 \r
915               one or     - - any non-conflicting WFXML/attribute from\r
916               more URI        the listed namespaces\r
917               references\r
918               (space separated)\r
919 \r
920     ##targetNamespace or ##local may appear in the above list, to\r
921         refer to the targetNamespace of the enclosing\r
922         schema or an absent targetNamespace respectively</xs:documentation>\r
923   </xs:annotation>\r
924 \r
925  <xs:simpleType name="namespaceList">\r
926   <xs:annotation>\r
927    <xs:documentation>\r
928    A utility type, not for public use</xs:documentation>\r
929   </xs:annotation>\r
930   <xs:union>\r
931    <xs:simpleType>\r
932     <xs:restriction base="xs:token">\r
933      <xs:enumeration value="##any"/>\r
934      <xs:enumeration value="##other"/>\r
935     </xs:restriction>\r
936    </xs:simpleType>\r
937    <xs:simpleType>\r
938     <xs:list>\r
939      <xs:simpleType>\r
940       <xs:union memberTypes="xs:anyURI">\r
941        <xs:simpleType>\r
942         <xs:restriction base="xs:token">\r
943          <xs:enumeration value="##targetNamespace"/>\r
944          <xs:enumeration value="##local"/>\r
945         </xs:restriction>\r
946        </xs:simpleType>\r
947       </xs:union>\r
948      </xs:simpleType>\r
949     </xs:list>\r
950    </xs:simpleType>\r
951   </xs:union>\r
952  </xs:simpleType>\r
953 \r
954  <xs:element name="attribute" type="xs:topLevelAttribute" id="attribute">\r
955   <xs:annotation>\r
956    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>\r
957   </xs:annotation>\r
958  </xs:element>\r
959 \r
960  <xs:complexType name="attributeGroup" abstract="true">\r
961   <xs:complexContent>\r
962    <xs:extension base="xs:annotated">\r
963     <xs:group ref="xs:attrDecls"/>\r
964     <xs:attributeGroup ref="xs:defRef"/>\r
965    </xs:extension>\r
966   </xs:complexContent>\r
967  </xs:complexType>\r
968  \r
969  <xs:complexType name="namedAttributeGroup">\r
970   <xs:complexContent>\r
971    <xs:restriction base="xs:attributeGroup">\r
972     <xs:sequence>\r
973      <xs:element ref="xs:annotation" minOccurs="0"/>\r
974      <xs:group ref="xs:attrDecls"/>\r
975     </xs:sequence>\r
976     <xs:attribute name="name" use="required" type="xs:NCName"/>\r
977     <xs:attribute name="ref" use="prohibited"/>\r
978     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
979    </xs:restriction>\r
980   </xs:complexContent>\r
981  </xs:complexType>\r
982 \r
983  <xs:complexType name="attributeGroupRef">\r
984   <xs:complexContent>\r
985    <xs:restriction base="xs:attributeGroup">\r
986     <xs:sequence>\r
987      <xs:element ref="xs:annotation" minOccurs="0"/>\r
988     </xs:sequence>\r
989     <xs:attribute name="ref" use="required" type="xs:QName"/>\r
990     <xs:attribute name="name" use="prohibited"/>\r
991     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
992    </xs:restriction>\r
993   </xs:complexContent>\r
994  </xs:complexType>\r
995 \r
996  <xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup">\r
997   <xs:annotation>\r
998    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>\r
999   </xs:annotation>\r
1000  </xs:element>\r
1001 \r
1002  <xs:element name="include" id="include">\r
1003   <xs:annotation>\r
1004    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>\r
1005   </xs:annotation>\r
1006   <xs:complexType>\r
1007    <xs:complexContent>\r
1008     <xs:extension base="xs:annotated">\r
1009      <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>\r
1010     </xs:extension>\r
1011    </xs:complexContent>\r
1012   </xs:complexType>\r
1013  </xs:element>\r
1014 \r
1015  <xs:element name="redefine" id="redefine">\r
1016   <xs:annotation>\r
1017    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>\r
1018   </xs:annotation>\r
1019   <xs:complexType>\r
1020    <xs:complexContent>\r
1021     <xs:extension base="xs:openAttrs">\r
1022      <xs:choice minOccurs="0" maxOccurs="unbounded">\r
1023       <xs:element ref="xs:annotation"/>\r
1024       <xs:group ref="xs:redefinable"/>\r
1025      </xs:choice>\r
1026      <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>\r
1027      <xs:attribute name="id" type="xs:ID"/>\r
1028     </xs:extension>\r
1029    </xs:complexContent>\r
1030   </xs:complexType>\r
1031  </xs:element>\r
1032 \r
1033  <xs:element name="import" id="import">\r
1034   <xs:annotation>\r
1035    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/>\r
1036   </xs:annotation>\r
1037   <xs:complexType>\r
1038    <xs:complexContent>\r
1039     <xs:extension base="xs:annotated">\r
1040      <xs:attribute name="namespace" type="xs:anyURI"/>\r
1041      <xs:attribute name="schemaLocation" type="xs:anyURI"/>\r
1042     </xs:extension>\r
1043    </xs:complexContent>\r
1044   </xs:complexType>\r
1045  </xs:element>\r
1046 \r
1047  <xs:element name="selector" id="selector">\r
1048   <xs:annotation>\r
1049    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>\r
1050   </xs:annotation>\r
1051   <xs:complexType>\r
1052   <xs:complexContent>\r
1053    <xs:extension base="xs:annotated">\r
1054      <xs:attribute name="xpath" use="required">\r
1055       <xs:simpleType>\r
1056        <xs:annotation>\r
1057         <xs:documentation>A subset of XPath expressions for use\r
1058 in selectors</xs:documentation>\r
1059         <xs:documentation>A utility type, not for public\r
1060 use</xs:documentation>\r
1061        </xs:annotation>\r
1062        <xs:restriction base="xs:token">\r
1063         <xs:annotation>\r
1064          <xs:documentation>The following pattern is intended to allow XPath\r
1065                            expressions per the following EBNF:\r
1066           Selector    ::=    Path ( '|' Path )*  \r
1067           Path    ::=    ('.//')? Step ( '/' Step )*  \r
1068           Step    ::=    '.' | NameTest  \r
1069           NameTest    ::=    QName | '*' | NCName ':' '*'  \r
1070                            child:: is also allowed\r
1071          </xs:documentation>\r
1072         </xs:annotation>\r
1073         <xs:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">\r
1074         </xs:pattern>\r
1075        </xs:restriction>\r
1076       </xs:simpleType>\r
1077      </xs:attribute>\r
1078    </xs:extension>\r
1079   </xs:complexContent>\r
1080  </xs:complexType>\r
1081  </xs:element>\r
1082 \r
1083  <xs:element name="field" id="field">\r
1084   <xs:annotation>\r
1085    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>\r
1086   </xs:annotation>\r
1087   <xs:complexType>\r
1088   <xs:complexContent>\r
1089    <xs:extension base="xs:annotated">\r
1090      <xs:attribute name="xpath" use="required">\r
1091       <xs:simpleType>\r
1092        <xs:annotation>\r
1093         <xs:documentation>A subset of XPath expressions for use\r
1094 in fields</xs:documentation>\r
1095         <xs:documentation>A utility type, not for public\r
1096 use</xs:documentation>\r
1097        </xs:annotation>\r
1098        <xs:restriction base="xs:token">\r
1099         <xs:annotation>\r
1100          <xs:documentation>The following pattern is intended to allow XPath\r
1101                            expressions per the same EBNF as for selector,\r
1102                            with the following change:\r
1103           Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest ) \r
1104          </xs:documentation>\r
1105         </xs:annotation>\r
1106         <xs:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*">\r
1107         </xs:pattern>\r
1108        </xs:restriction>\r
1109       </xs:simpleType>\r
1110      </xs:attribute>\r
1111    </xs:extension>\r
1112   </xs:complexContent>\r
1113  </xs:complexType>\r
1114  </xs:element>\r
1115 \r
1116  <xs:complexType name="keybase">\r
1117   <xs:complexContent>\r
1118    <xs:extension base="xs:annotated">\r
1119     <xs:sequence>\r
1120      <xs:element ref="xs:selector"/>\r
1121      <xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/>\r
1122     </xs:sequence>\r
1123     <xs:attribute name="name" type="xs:NCName" use="required"/>\r
1124    </xs:extension>\r
1125   </xs:complexContent>\r
1126  </xs:complexType>\r
1127 \r
1128  <xs:group name="identityConstraint">\r
1129   <xs:annotation>\r
1130    <xs:documentation>The three kinds of identity constraints, all with\r
1131                      type of or derived from 'keybase'.\r
1132    </xs:documentation>\r
1133   </xs:annotation>\r
1134   <xs:choice>\r
1135    <xs:element ref="xs:unique"/>\r
1136    <xs:element ref="xs:key"/>\r
1137    <xs:element ref="xs:keyref"/>\r
1138   </xs:choice>\r
1139  </xs:group>\r
1140 \r
1141  <xs:element name="unique" type="xs:keybase" id="unique">\r
1142   <xs:annotation>\r
1143    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>\r
1144   </xs:annotation>\r
1145  </xs:element>\r
1146  <xs:element name="key" type="xs:keybase" id="key">\r
1147   <xs:annotation>\r
1148    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>\r
1149   </xs:annotation>\r
1150  </xs:element>\r
1151  <xs:element name="keyref" id="keyref">\r
1152   <xs:annotation>\r
1153    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>\r
1154   </xs:annotation>\r
1155   <xs:complexType>\r
1156    <xs:complexContent>\r
1157     <xs:extension base="xs:keybase">\r
1158      <xs:attribute name="refer" type="xs:QName" use="required"/>\r
1159     </xs:extension>\r
1160    </xs:complexContent>\r
1161   </xs:complexType>\r
1162  </xs:element>\r
1163 \r
1164  <xs:element name="notation" id="notation">\r
1165   <xs:annotation>\r
1166    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>\r
1167   </xs:annotation>\r
1168   <xs:complexType>\r
1169    <xs:complexContent>\r
1170     <xs:extension base="xs:annotated">\r
1171      <xs:attribute name="name" type="xs:NCName" use="required"/>\r
1172      <xs:attribute name="public" type="xs:public"/>\r
1173      <xs:attribute name="system" type="xs:anyURI"/>\r
1174     </xs:extension>\r
1175    </xs:complexContent>\r
1176   </xs:complexType>\r
1177  </xs:element>\r
1178 \r
1179  <xs:simpleType name="public">\r
1180   <xs:annotation>\r
1181    <xs:documentation>\r
1182    A utility type, not for public use</xs:documentation>\r
1183    <xs:documentation>\r
1184    A public identifier, per ISO 8879</xs:documentation>\r
1185   </xs:annotation>\r
1186   <xs:restriction base="xs:token"/>\r
1187  </xs:simpleType>\r
1188 \r
1189  <xs:element name="appinfo" id="appinfo">\r
1190    <xs:annotation>\r
1191      <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/>\r
1192    </xs:annotation>\r
1193    <xs:complexType mixed="true">\r
1194     <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
1195      <xs:any processContents="lax"/>\r
1196     </xs:sequence>\r
1197     <xs:attribute name="source" type="xs:anyURI"/>\r
1198     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
1199    </xs:complexType>\r
1200  </xs:element>\r
1201 \r
1202  <xs:element name="documentation" id="documentation">\r
1203    <xs:annotation>\r
1204      <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>\r
1205    </xs:annotation>\r
1206    <xs:complexType mixed="true">\r
1207     <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
1208      <xs:any processContents="lax"/>\r
1209     </xs:sequence>\r
1210     <xs:attribute name="source" type="xs:anyURI"/>\r
1211     <xs:attribute ref="xml:lang"/>\r
1212     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
1213    </xs:complexType>\r
1214  </xs:element>\r
1215 \r
1216  <xs:element name="annotation" id="annotation">\r
1217    <xs:annotation>\r
1218      <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>\r
1219    </xs:annotation>\r
1220    <xs:complexType>\r
1221     <xs:complexContent>\r
1222      <xs:extension base="xs:openAttrs">\r
1223       <xs:choice minOccurs="0" maxOccurs="unbounded">\r
1224        <xs:element ref="xs:appinfo"/>\r
1225        <xs:element ref="xs:documentation"/>\r
1226       </xs:choice>\r
1227       <xs:attribute name="id" type="xs:ID"/>\r
1228      </xs:extension>\r
1229     </xs:complexContent>\r
1230    </xs:complexType>\r
1231  </xs:element>\r
1232 \r
1233  <xs:annotation>\r
1234   <xs:documentation>\r
1235    notations for use within XML Schema schemas</xs:documentation>\r
1236  </xs:annotation>\r
1237 \r
1238  <xs:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/>\r
1239  <xs:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/>\r
1240   \r
1241  <xs:complexType name="anyType" mixed="true">\r
1242   <xs:annotation>\r
1243    <xs:documentation>\r
1244    Not the real urType, but as close an approximation as we can\r
1245    get in the XML representation</xs:documentation>\r
1246   </xs:annotation>\r
1247   <xs:sequence>\r
1248    <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>\r
1249   </xs:sequence>\r
1250   <xs:anyAttribute processContents="lax"/>\r
1251  </xs:complexType>\r
1252 \r
1253   <xs:annotation>\r
1254     <xs:documentation>\r
1255       First the built-in primitive datatypes.  These definitions are for\r
1256       information only, the real built-in definitions are magic.\r
1257     </xs:documentation>\r
1258 \r
1259     <xs:documentation>\r
1260       For each built-in datatype in this schema (both primitive and\r
1261       derived) can be uniquely addressed via a URI constructed\r
1262       as follows:\r
1263         1) the base URI is the URI of the XML Schema namespace\r
1264         2) the fragment identifier is the name of the datatype\r
1265 \r
1266       For example, to address the int datatype, the URI is:\r
1267 \r
1268         http://www.w3.org/2001/XMLSchema#int\r
1269 \r
1270       Additionally, each facet definition element can be uniquely\r
1271       addressed via a URI constructed as follows:\r
1272         1) the base URI is the URI of the XML Schema namespace\r
1273         2) the fragment identifier is the name of the facet\r
1274 \r
1275       For example, to address the maxInclusive facet, the URI is:\r
1276 \r
1277         http://www.w3.org/2001/XMLSchema#maxInclusive\r
1278 \r
1279       Additionally, each facet usage in a built-in datatype definition\r
1280       can be uniquely addressed via a URI constructed as follows:\r
1281         1) the base URI is the URI of the XML Schema namespace\r
1282         2) the fragment identifier is the name of the datatype, followed\r
1283            by a period (".") followed by the name of the facet\r
1284 \r
1285       For example, to address the usage of the maxInclusive facet in\r
1286       the definition of int, the URI is:\r
1287 \r
1288         http://www.w3.org/2001/XMLSchema#int.maxInclusive\r
1289 \r
1290     </xs:documentation>\r
1291   </xs:annotation>\r
1292 \r
1293   <xs:simpleType name="string" id="string">\r
1294     <xs:annotation>\r
1295       <xs:appinfo>\r
1296         <hfp:hasFacet name="length"/>\r
1297         <hfp:hasFacet name="minLength"/>\r
1298         <hfp:hasFacet name="maxLength"/>\r
1299         <hfp:hasFacet name="pattern"/>\r
1300         <hfp:hasFacet name="enumeration"/>\r
1301         <hfp:hasFacet name="whiteSpace"/>\r
1302         <hfp:hasProperty name="ordered" value="false"/>\r
1303         <hfp:hasProperty name="bounded" value="false"/>\r
1304         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1305         <hfp:hasProperty name="numeric" value="false"/>\r
1306       </xs:appinfo>\r
1307       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#string"/>\r
1308     </xs:annotation>\r
1309     <xs:restriction base="xs:anySimpleType">\r
1310       <xs:whiteSpace value="preserve" id="string.preserve"/>\r
1311     </xs:restriction>\r
1312   </xs:simpleType>\r
1313 \r
1314   <xs:simpleType name="boolean" id="boolean">\r
1315     <xs:annotation>\r
1316       <xs:appinfo>\r
1317         <hfp:hasFacet name="pattern"/>\r
1318         <hfp:hasFacet name="whiteSpace"/>\r
1319         <hfp:hasProperty name="ordered" value="false"/>\r
1320         <hfp:hasProperty name="bounded" value="false"/>\r
1321         <hfp:hasProperty name="cardinality" value="finite"/>\r
1322         <hfp:hasProperty name="numeric" value="false"/>\r
1323       </xs:appinfo>\r
1324       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#boolean"/>\r
1325     </xs:annotation>\r
1326     <xs:restriction base="xs:anySimpleType">\r
1327       <xs:whiteSpace value="collapse" fixed="true" id="boolean.whiteSpace"/>\r
1328     </xs:restriction>\r
1329   </xs:simpleType>\r
1330 \r
1331   <xs:simpleType name="float" id="float">\r
1332     <xs:annotation>\r
1333       <xs:appinfo>\r
1334         <hfp:hasFacet name="pattern"/>\r
1335         <hfp:hasFacet name="enumeration"/>\r
1336         <hfp:hasFacet name="whiteSpace"/>\r
1337         <hfp:hasFacet name="maxInclusive"/>\r
1338         <hfp:hasFacet name="maxExclusive"/>\r
1339         <hfp:hasFacet name="minInclusive"/>\r
1340         <hfp:hasFacet name="minExclusive"/>\r
1341         <hfp:hasProperty name="ordered" value="total"/>\r
1342         <hfp:hasProperty name="bounded" value="true"/>\r
1343         <hfp:hasProperty name="cardinality" value="finite"/>\r
1344         <hfp:hasProperty name="numeric" value="true"/>\r
1345       </xs:appinfo>\r
1346       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#float"/>\r
1347     </xs:annotation>\r
1348     <xs:restriction base="xs:anySimpleType">\r
1349       <xs:whiteSpace value="collapse" fixed="true" id="float.whiteSpace"/>\r
1350     </xs:restriction>\r
1351   </xs:simpleType>\r
1352 \r
1353   <xs:simpleType name="double" id="double">\r
1354     <xs:annotation>\r
1355       <xs:appinfo>\r
1356         <hfp:hasFacet name="pattern"/>\r
1357         <hfp:hasFacet name="enumeration"/>\r
1358         <hfp:hasFacet name="whiteSpace"/>\r
1359         <hfp:hasFacet name="maxInclusive"/>\r
1360         <hfp:hasFacet name="maxExclusive"/>\r
1361         <hfp:hasFacet name="minInclusive"/>\r
1362         <hfp:hasFacet name="minExclusive"/>\r
1363         <hfp:hasProperty name="ordered" value="total"/>\r
1364         <hfp:hasProperty name="bounded" value="true"/>\r
1365         <hfp:hasProperty name="cardinality" value="finite"/>\r
1366         <hfp:hasProperty name="numeric" value="true"/>\r
1367       </xs:appinfo>\r
1368       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#double"/>\r
1369     </xs:annotation>\r
1370     <xs:restriction base="xs:anySimpleType">\r
1371       <xs:whiteSpace value="collapse" fixed="true" id="double.whiteSpace"/>\r
1372     </xs:restriction>\r
1373   </xs:simpleType>\r
1374 \r
1375   <xs:simpleType name="decimal" id="decimal">\r
1376     <xs:annotation>\r
1377       <xs:appinfo>\r
1378         <hfp:hasFacet name="totalDigits"/>\r
1379         <hfp:hasFacet name="fractionDigits"/>\r
1380         <hfp:hasFacet name="pattern"/>\r
1381         <hfp:hasFacet name="whiteSpace"/>\r
1382         <hfp:hasFacet name="enumeration"/>\r
1383         <hfp:hasFacet name="maxInclusive"/>\r
1384         <hfp:hasFacet name="maxExclusive"/>\r
1385         <hfp:hasFacet name="minInclusive"/>\r
1386         <hfp:hasFacet name="minExclusive"/>\r
1387         <hfp:hasProperty name="ordered" value="total"/>\r
1388         <hfp:hasProperty name="bounded" value="false"/>\r
1389         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1390         <hfp:hasProperty name="numeric" value="true"/>\r
1391       </xs:appinfo>\r
1392       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#decimal"/>\r
1393     </xs:annotation>\r
1394     <xs:restriction base="xs:anySimpleType">\r
1395       <xs:whiteSpace value="collapse" fixed="true" id="decimal.whiteSpace"/>\r
1396     </xs:restriction>\r
1397    </xs:simpleType>\r
1398 \r
1399    <xs:simpleType name="duration" id="duration">\r
1400     <xs:annotation>\r
1401       <xs:appinfo>\r
1402         <hfp:hasFacet name="pattern"/>\r
1403         <hfp:hasFacet name="enumeration"/>\r
1404         <hfp:hasFacet name="whiteSpace"/>\r
1405         <hfp:hasFacet name="maxInclusive"/>\r
1406         <hfp:hasFacet name="maxExclusive"/>\r
1407         <hfp:hasFacet name="minInclusive"/>\r
1408         <hfp:hasFacet name="minExclusive"/>\r
1409         <hfp:hasProperty name="ordered" value="partial"/>\r
1410         <hfp:hasProperty name="bounded" value="false"/>\r
1411         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1412         <hfp:hasProperty name="numeric" value="false"/>\r
1413       </xs:appinfo>\r
1414       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#duration"/>\r
1415     </xs:annotation>\r
1416     <xs:restriction base="xs:anySimpleType">\r
1417       <xs:whiteSpace value="collapse" fixed="true" id="duration.whiteSpace"/>\r
1418     </xs:restriction>\r
1419    </xs:simpleType>\r
1420 \r
1421  <xs:simpleType name="dateTime" id="dateTime">\r
1422     <xs:annotation>\r
1423     <xs:appinfo>\r
1424         <hfp:hasFacet name="pattern"/>\r
1425         <hfp:hasFacet name="enumeration"/>\r
1426         <hfp:hasFacet name="whiteSpace"/>\r
1427         <hfp:hasFacet name="maxInclusive"/>\r
1428         <hfp:hasFacet name="maxExclusive"/>\r
1429         <hfp:hasFacet name="minInclusive"/>\r
1430         <hfp:hasFacet name="minExclusive"/>\r
1431         <hfp:hasProperty name="ordered" value="partial"/>\r
1432         <hfp:hasProperty name="bounded" value="false"/>\r
1433         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1434         <hfp:hasProperty name="numeric" value="false"/>\r
1435       </xs:appinfo>\r
1436       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>\r
1437     </xs:annotation>\r
1438     <xs:restriction base="xs:anySimpleType">\r
1439       <xs:whiteSpace value="collapse" fixed="true" id="dateTime.whiteSpace"/>\r
1440     </xs:restriction>\r
1441   </xs:simpleType>\r
1442 \r
1443   <xs:simpleType name="time" id="time">\r
1444     <xs:annotation>\r
1445     <xs:appinfo>\r
1446         <hfp:hasFacet name="pattern"/>\r
1447         <hfp:hasFacet name="enumeration"/>\r
1448         <hfp:hasFacet name="whiteSpace"/>\r
1449         <hfp:hasFacet name="maxInclusive"/>\r
1450         <hfp:hasFacet name="maxExclusive"/>\r
1451         <hfp:hasFacet name="minInclusive"/>\r
1452         <hfp:hasFacet name="minExclusive"/>\r
1453         <hfp:hasProperty name="ordered" value="partial"/>\r
1454         <hfp:hasProperty name="bounded" value="false"/>\r
1455         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1456         <hfp:hasProperty name="numeric" value="false"/>\r
1457       </xs:appinfo>\r
1458       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#time"/>\r
1459     </xs:annotation>\r
1460     <xs:restriction base="xs:anySimpleType">\r
1461       <xs:whiteSpace value="collapse" fixed="true" id="time.whiteSpace"/>\r
1462     </xs:restriction>\r
1463   </xs:simpleType>\r
1464 \r
1465   <xs:simpleType name="date" id="date">\r
1466    <xs:annotation>\r
1467     <xs:appinfo>\r
1468         <hfp:hasFacet name="pattern"/>\r
1469         <hfp:hasFacet name="enumeration"/>\r
1470         <hfp:hasFacet name="whiteSpace"/>\r
1471         <hfp:hasFacet name="maxInclusive"/>\r
1472         <hfp:hasFacet name="maxExclusive"/>\r
1473         <hfp:hasFacet name="minInclusive"/>\r
1474         <hfp:hasFacet name="minExclusive"/>\r
1475         <hfp:hasProperty name="ordered" value="partial"/>\r
1476         <hfp:hasProperty name="bounded" value="false"/>\r
1477         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1478         <hfp:hasProperty name="numeric" value="false"/>\r
1479       </xs:appinfo>\r
1480       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#date"/>\r
1481     </xs:annotation>\r
1482     <xs:restriction base="xs:anySimpleType">\r
1483       <xs:whiteSpace value="collapse" fixed="true" id="date.whiteSpace"/>\r
1484     </xs:restriction>\r
1485   </xs:simpleType>\r
1486 \r
1487   <xs:simpleType name="gYearMonth" id="gYearMonth">\r
1488    <xs:annotation>\r
1489     <xs:appinfo>\r
1490         <hfp:hasFacet name="pattern"/>\r
1491         <hfp:hasFacet name="enumeration"/>\r
1492         <hfp:hasFacet name="whiteSpace"/>\r
1493         <hfp:hasFacet name="maxInclusive"/>\r
1494         <hfp:hasFacet name="maxExclusive"/>\r
1495         <hfp:hasFacet name="minInclusive"/>\r
1496         <hfp:hasFacet name="minExclusive"/>\r
1497         <hfp:hasProperty name="ordered" value="partial"/>\r
1498         <hfp:hasProperty name="bounded" value="false"/>\r
1499         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1500         <hfp:hasProperty name="numeric" value="false"/>\r
1501       </xs:appinfo>\r
1502       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>\r
1503     </xs:annotation>\r
1504     <xs:restriction base="xs:anySimpleType">\r
1505       <xs:whiteSpace value="collapse" fixed="true" id="gYearMonth.whiteSpace"/>\r
1506     </xs:restriction>\r
1507   </xs:simpleType>\r
1508 \r
1509   <xs:simpleType name="gYear" id="gYear">\r
1510     <xs:annotation>\r
1511     <xs:appinfo>\r
1512         <hfp:hasFacet name="pattern"/>\r
1513         <hfp:hasFacet name="enumeration"/>\r
1514         <hfp:hasFacet name="whiteSpace"/>\r
1515         <hfp:hasFacet name="maxInclusive"/>\r
1516         <hfp:hasFacet name="maxExclusive"/>\r
1517         <hfp:hasFacet name="minInclusive"/>\r
1518         <hfp:hasFacet name="minExclusive"/>\r
1519         <hfp:hasProperty name="ordered" value="partial"/>\r
1520         <hfp:hasProperty name="bounded" value="false"/>\r
1521         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1522         <hfp:hasProperty name="numeric" value="false"/>\r
1523       </xs:appinfo>\r
1524       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYear"/>\r
1525     </xs:annotation>\r
1526     <xs:restriction base="xs:anySimpleType">\r
1527       <xs:whiteSpace value="collapse" fixed="true" id="gYear.whiteSpace"/>\r
1528     </xs:restriction>\r
1529   </xs:simpleType>\r
1530 \r
1531  <xs:simpleType name="gMonthDay" id="gMonthDay">\r
1532     <xs:annotation>\r
1533       <xs:appinfo>\r
1534         <hfp:hasFacet name="pattern"/>\r
1535         <hfp:hasFacet name="enumeration"/>\r
1536         <hfp:hasFacet name="whiteSpace"/>\r
1537         <hfp:hasFacet name="maxInclusive"/>\r
1538         <hfp:hasFacet name="maxExclusive"/>\r
1539         <hfp:hasFacet name="minInclusive"/>\r
1540         <hfp:hasFacet name="minExclusive"/>\r
1541         <hfp:hasProperty name="ordered" value="partial"/>\r
1542         <hfp:hasProperty name="bounded" value="false"/>\r
1543         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1544         <hfp:hasProperty name="numeric" value="false"/>\r
1545       </xs:appinfo>\r
1546        <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>\r
1547     </xs:annotation>\r
1548     <xs:restriction base="xs:anySimpleType">\r
1549          <xs:whiteSpace value="collapse" fixed="true" id="gMonthDay.whiteSpace"/>\r
1550     </xs:restriction>\r
1551   </xs:simpleType>\r
1552 \r
1553   <xs:simpleType name="gDay" id="gDay">\r
1554     <xs:annotation>\r
1555   <xs:appinfo>\r
1556         <hfp:hasFacet name="pattern"/>\r
1557         <hfp:hasFacet name="enumeration"/>\r
1558         <hfp:hasFacet name="whiteSpace"/>\r
1559         <hfp:hasFacet name="maxInclusive"/>\r
1560         <hfp:hasFacet name="maxExclusive"/>\r
1561         <hfp:hasFacet name="minInclusive"/>\r
1562         <hfp:hasFacet name="minExclusive"/>\r
1563         <hfp:hasProperty name="ordered" value="partial"/>\r
1564         <hfp:hasProperty name="bounded" value="false"/>\r
1565         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1566         <hfp:hasProperty name="numeric" value="false"/>\r
1567       </xs:appinfo>\r
1568       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gDay"/>\r
1569     </xs:annotation>\r
1570     <xs:restriction base="xs:anySimpleType">\r
1571          <xs:whiteSpace value="collapse" fixed="true" id="gDay.whiteSpace"/>\r
1572     </xs:restriction>\r
1573   </xs:simpleType>\r
1574 \r
1575  <xs:simpleType name="gMonth" id="gMonth">\r
1576     <xs:annotation>\r
1577   <xs:appinfo>\r
1578         <hfp:hasFacet name="pattern"/>\r
1579         <hfp:hasFacet name="enumeration"/>\r
1580         <hfp:hasFacet name="whiteSpace"/>\r
1581         <hfp:hasFacet name="maxInclusive"/>\r
1582         <hfp:hasFacet name="maxExclusive"/>\r
1583         <hfp:hasFacet name="minInclusive"/>\r
1584         <hfp:hasFacet name="minExclusive"/>\r
1585         <hfp:hasProperty name="ordered" value="partial"/>\r
1586         <hfp:hasProperty name="bounded" value="false"/>\r
1587         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1588         <hfp:hasProperty name="numeric" value="false"/>\r
1589       </xs:appinfo>\r
1590       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>\r
1591     </xs:annotation>\r
1592     <xs:restriction base="xs:anySimpleType">\r
1593          <xs:whiteSpace value="collapse" fixed="true" id="gMonth.whiteSpace"/>\r
1594     </xs:restriction>\r
1595   </xs:simpleType>\r
1596 \r
1597    <xs:simpleType name="hexBinary" id="hexBinary">\r
1598     <xs:annotation>\r
1599       <xs:appinfo>\r
1600         <hfp:hasFacet name="length"/>\r
1601         <hfp:hasFacet name="minLength"/>\r
1602         <hfp:hasFacet name="maxLength"/>\r
1603         <hfp:hasFacet name="pattern"/>\r
1604         <hfp:hasFacet name="enumeration"/>\r
1605         <hfp:hasFacet name="whiteSpace"/>\r
1606         <hfp:hasProperty name="ordered" value="false"/>\r
1607         <hfp:hasProperty name="bounded" value="false"/>\r
1608         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1609         <hfp:hasProperty name="numeric" value="false"/>\r
1610       </xs:appinfo>\r
1611       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#binary"/>\r
1612     </xs:annotation>\r
1613     <xs:restriction base="xs:anySimpleType">\r
1614       <xs:whiteSpace value="collapse" fixed="true" id="hexBinary.whiteSpace"/>\r
1615     </xs:restriction>\r
1616    </xs:simpleType>\r
1617 \r
1618  <xs:simpleType name="base64Binary" id="base64Binary">\r
1619     <xs:annotation>\r
1620       <xs:appinfo>\r
1621         <hfp:hasFacet name="length"/>\r
1622         <hfp:hasFacet name="minLength"/>\r
1623         <hfp:hasFacet name="maxLength"/>\r
1624         <hfp:hasFacet name="pattern"/>\r
1625         <hfp:hasFacet name="enumeration"/>\r
1626         <hfp:hasFacet name="whiteSpace"/>\r
1627         <hfp:hasProperty name="ordered" value="false"/>\r
1628         <hfp:hasProperty name="bounded" value="false"/>\r
1629         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1630         <hfp:hasProperty name="numeric" value="false"/>\r
1631       </xs:appinfo>\r
1632       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>\r
1633     </xs:annotation>\r
1634     <xs:restriction base="xs:anySimpleType">\r
1635       <xs:whiteSpace value="collapse" fixed="true" id="base64Binary.whiteSpace"/>\r
1636     </xs:restriction>\r
1637    </xs:simpleType>\r
1638 \r
1639    <xs:simpleType name="anyURI" id="anyURI">\r
1640     <xs:annotation>\r
1641       <xs:appinfo>\r
1642         <hfp:hasFacet name="length"/>\r
1643         <hfp:hasFacet name="minLength"/>\r
1644         <hfp:hasFacet name="maxLength"/>\r
1645         <hfp:hasFacet name="pattern"/>\r
1646         <hfp:hasFacet name="enumeration"/>\r
1647         <hfp:hasFacet name="whiteSpace"/>\r
1648         <hfp:hasProperty name="ordered" value="false"/>\r
1649         <hfp:hasProperty name="bounded" value="false"/>\r
1650         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1651         <hfp:hasProperty name="numeric" value="false"/>\r
1652       </xs:appinfo>\r
1653       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>\r
1654     </xs:annotation>\r
1655     <xs:restriction base="xs:anySimpleType">\r
1656       <xs:whiteSpace value="collapse" fixed="true" id="anyURI.whiteSpace"/>\r
1657     </xs:restriction>\r
1658    </xs:simpleType>\r
1659 \r
1660   <xs:simpleType name="QName" id="QName">\r
1661     <xs:annotation>\r
1662         <xs:appinfo>\r
1663         <hfp:hasFacet name="length"/>\r
1664         <hfp:hasFacet name="minLength"/>\r
1665         <hfp:hasFacet name="maxLength"/>\r
1666         <hfp:hasFacet name="pattern"/>\r
1667         <hfp:hasFacet name="enumeration"/>\r
1668         <hfp:hasFacet name="whiteSpace"/>\r
1669         <hfp:hasProperty name="ordered" value="false"/>\r
1670         <hfp:hasProperty name="bounded" value="false"/>\r
1671         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1672         <hfp:hasProperty name="numeric" value="false"/>\r
1673       </xs:appinfo>\r
1674       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#QName"/>\r
1675     </xs:annotation>\r
1676     <xs:restriction base="xs:anySimpleType">\r
1677       <xs:whiteSpace value="collapse" fixed="true" id="QName.whiteSpace"/>\r
1678     </xs:restriction>\r
1679   </xs:simpleType>\r
1680 \r
1681    <xs:simpleType name="NOTATION" id="NOTATION">\r
1682     <xs:annotation>\r
1683         <xs:appinfo>\r
1684         <hfp:hasFacet name="length"/>\r
1685         <hfp:hasFacet name="minLength"/>\r
1686         <hfp:hasFacet name="maxLength"/>\r
1687         <hfp:hasFacet name="pattern"/>\r
1688         <hfp:hasFacet name="enumeration"/>\r
1689         <hfp:hasFacet name="whiteSpace"/>\r
1690         <hfp:hasProperty name="ordered" value="false"/>\r
1691         <hfp:hasProperty name="bounded" value="false"/>\r
1692         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1693         <hfp:hasProperty name="numeric" value="false"/>\r
1694       </xs:appinfo>\r
1695       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>\r
1696       <xs:documentation>\r
1697         NOTATION cannot be used directly in a schema; rather a type\r
1698         must be derived from it by specifying at least one enumeration\r
1699         facet whose value is the name of a NOTATION declared in the\r
1700         schema.\r
1701       </xs:documentation>\r
1702     </xs:annotation>\r
1703     <xs:restriction base="xs:anySimpleType">\r
1704       <xs:whiteSpace value="collapse" fixed="true" id="NOTATION.whiteSpace"/>\r
1705     </xs:restriction>\r
1706   </xs:simpleType>\r
1707 \r
1708   <xs:annotation>\r
1709     <xs:documentation>\r
1710       Now the derived primitive types\r
1711     </xs:documentation>\r
1712   </xs:annotation>\r
1713 \r
1714   <xs:simpleType name="normalizedString" id="normalizedString">\r
1715     <xs:annotation>\r
1716       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>\r
1717     </xs:annotation>\r
1718     <xs:restriction base="xs:string">\r
1719       <xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/>\r
1720     </xs:restriction>\r
1721   </xs:simpleType>\r
1722 \r
1723   <xs:simpleType name="token" id="token">\r
1724     <xs:annotation>\r
1725       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#token"/>\r
1726     </xs:annotation>\r
1727     <xs:restriction base="xs:normalizedString">\r
1728       <xs:whiteSpace value="collapse" id="token.whiteSpace"/>\r
1729     </xs:restriction>\r
1730   </xs:simpleType>\r
1731 \r
1732   <xs:simpleType name="language" id="language">\r
1733     <xs:annotation>\r
1734       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#language"/>\r
1735     </xs:annotation>\r
1736     <xs:restriction base="xs:token">\r
1737       <xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern">\r
1738         <xs:annotation>\r
1739           <xs:documentation source="http://www.ietf.org/rfc/rfc3066.txt">\r
1740             pattern specifies the content of section 2.12 of XML 1.0e2\r
1741             and RFC 3066 (Revised version of RFC 1766).\r
1742           </xs:documentation>\r
1743         </xs:annotation>\r
1744       </xs:pattern>\r
1745     </xs:restriction>\r
1746   </xs:simpleType>\r
1747 \r
1748   <xs:simpleType name="IDREFS" id="IDREFS">\r
1749     <xs:annotation>\r
1750       <xs:appinfo>\r
1751         <hfp:hasFacet name="length"/>\r
1752         <hfp:hasFacet name="minLength"/>\r
1753         <hfp:hasFacet name="maxLength"/>\r
1754         <hfp:hasFacet name="enumeration"/>\r
1755         <hfp:hasFacet name="whiteSpace"/>\r
1756         <hfp:hasFacet name="pattern"/>\r
1757         <hfp:hasProperty name="ordered" value="false"/>\r
1758         <hfp:hasProperty name="bounded" value="false"/>\r
1759         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1760         <hfp:hasProperty name="numeric" value="false"/>\r
1761       </xs:appinfo>\r
1762       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>\r
1763     </xs:annotation>\r
1764     <xs:restriction>\r
1765       <xs:simpleType>\r
1766         <xs:list itemType="xs:IDREF"/>\r
1767       </xs:simpleType>\r
1768         <xs:minLength value="1" id="IDREFS.minLength"/>\r
1769     </xs:restriction>\r
1770   </xs:simpleType>\r
1771 \r
1772   <xs:simpleType name="ENTITIES" id="ENTITIES">\r
1773     <xs:annotation>\r
1774       <xs:appinfo>\r
1775         <hfp:hasFacet name="length"/>\r
1776         <hfp:hasFacet name="minLength"/>\r
1777         <hfp:hasFacet name="maxLength"/>\r
1778         <hfp:hasFacet name="enumeration"/>\r
1779         <hfp:hasFacet name="whiteSpace"/>\r
1780         <hfp:hasFacet name="pattern"/>\r
1781         <hfp:hasProperty name="ordered" value="false"/>\r
1782         <hfp:hasProperty name="bounded" value="false"/>\r
1783         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1784         <hfp:hasProperty name="numeric" value="false"/>\r
1785       </xs:appinfo>\r
1786       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>\r
1787     </xs:annotation>\r
1788     <xs:restriction>\r
1789       <xs:simpleType>\r
1790         <xs:list itemType="xs:ENTITY"/>\r
1791       </xs:simpleType>\r
1792         <xs:minLength value="1" id="ENTITIES.minLength"/>\r
1793     </xs:restriction>\r
1794   </xs:simpleType>\r
1795 \r
1796   <xs:simpleType name="NMTOKEN" id="NMTOKEN">\r
1797     <xs:annotation>\r
1798       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>\r
1799     </xs:annotation>\r
1800     <xs:restriction base="xs:token">\r
1801       <xs:pattern value="\c+" id="NMTOKEN.pattern">\r
1802         <xs:annotation>\r
1803           <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">\r
1804             pattern matches production 7 from the XML spec\r
1805           </xs:documentation>\r
1806         </xs:annotation>\r
1807       </xs:pattern>\r
1808     </xs:restriction>\r
1809   </xs:simpleType>\r
1810 \r
1811   <xs:simpleType name="NMTOKENS" id="NMTOKENS">\r
1812     <xs:annotation>\r
1813       <xs:appinfo>\r
1814         <hfp:hasFacet name="length"/>\r
1815         <hfp:hasFacet name="minLength"/>\r
1816         <hfp:hasFacet name="maxLength"/>\r
1817         <hfp:hasFacet name="enumeration"/>\r
1818         <hfp:hasFacet name="whiteSpace"/>\r
1819         <hfp:hasFacet name="pattern"/>\r
1820         <hfp:hasProperty name="ordered" value="false"/>\r
1821         <hfp:hasProperty name="bounded" value="false"/>\r
1822         <hfp:hasProperty name="cardinality" value="countably infinite"/>\r
1823         <hfp:hasProperty name="numeric" value="false"/>\r
1824       </xs:appinfo>\r
1825       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>\r
1826     </xs:annotation>\r
1827     <xs:restriction>\r
1828       <xs:simpleType>\r
1829         <xs:list itemType="xs:NMTOKEN"/>\r
1830       </xs:simpleType>\r
1831         <xs:minLength value="1" id="NMTOKENS.minLength"/>\r
1832     </xs:restriction>\r
1833   </xs:simpleType>\r
1834 \r
1835   <xs:simpleType name="Name" id="Name">\r
1836     <xs:annotation>\r
1837       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#Name"/>\r
1838     </xs:annotation>\r
1839     <xs:restriction base="xs:token">\r
1840       <xs:pattern value="\i\c*" id="Name.pattern">\r
1841         <xs:annotation>\r
1842           <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Name">\r
1843             pattern matches production 5 from the XML spec\r
1844           </xs:documentation>\r
1845         </xs:annotation>\r
1846       </xs:pattern>\r
1847     </xs:restriction>\r
1848   </xs:simpleType>\r
1849 \r
1850   <xs:simpleType name="NCName" id="NCName">\r
1851     <xs:annotation>\r
1852       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NCName"/>\r
1853     </xs:annotation>\r
1854     <xs:restriction base="xs:Name">\r
1855       <xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">\r
1856         <xs:annotation>\r
1857           <xs:documentation source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">\r
1858             pattern matches production 4 from the Namespaces in XML spec\r
1859           </xs:documentation>\r
1860         </xs:annotation>\r
1861       </xs:pattern>\r
1862     </xs:restriction>\r
1863   </xs:simpleType>\r
1864 \r
1865    <xs:simpleType name="ID" id="ID">\r
1866     <xs:annotation>\r
1867       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ID"/>\r
1868     </xs:annotation>\r
1869     <xs:restriction base="xs:NCName"/>\r
1870    </xs:simpleType>\r
1871 \r
1872    <xs:simpleType name="IDREF" id="IDREF">\r
1873     <xs:annotation>\r
1874       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREF"/>\r
1875     </xs:annotation>\r
1876     <xs:restriction base="xs:NCName"/>\r
1877    </xs:simpleType>\r
1878 \r
1879    <xs:simpleType name="ENTITY" id="ENTITY">\r
1880     <xs:annotation>\r
1881       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/>\r
1882     </xs:annotation>\r
1883     <xs:restriction base="xs:NCName"/>\r
1884    </xs:simpleType>\r
1885 \r
1886   <xs:simpleType name="integer" id="integer">\r
1887     <xs:annotation>\r
1888       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#integer"/>\r
1889     </xs:annotation>\r
1890     <xs:restriction base="xs:decimal">\r
1891       <xs:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/>\r
1892       <xs:pattern value="[\-+]?[0-9]+"/>\r
1893     </xs:restriction>\r
1894   </xs:simpleType>\r
1895 \r
1896   <xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger">\r
1897     <xs:annotation>\r
1898       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/>\r
1899     </xs:annotation>\r
1900     <xs:restriction base="xs:integer">\r
1901       <xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/>\r
1902     </xs:restriction>\r
1903   </xs:simpleType>\r
1904 \r
1905   <xs:simpleType name="negativeInteger" id="negativeInteger">\r
1906     <xs:annotation>\r
1907       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/>\r
1908     </xs:annotation>\r
1909     <xs:restriction base="xs:nonPositiveInteger">\r
1910       <xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/>\r
1911     </xs:restriction>\r
1912   </xs:simpleType>\r
1913 \r
1914   <xs:simpleType name="long" id="long">\r
1915     <xs:annotation>\r
1916       <xs:appinfo>\r
1917         <hfp:hasProperty name="bounded" value="true"/>\r
1918         <hfp:hasProperty name="cardinality" value="finite"/>\r
1919       </xs:appinfo>\r
1920       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#long"/>\r
1921     </xs:annotation>\r
1922     <xs:restriction base="xs:integer">\r
1923       <xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/>\r
1924       <xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/>\r
1925     </xs:restriction>\r
1926   </xs:simpleType>\r
1927 \r
1928   <xs:simpleType name="int" id="int">\r
1929     <xs:annotation>\r
1930       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#int"/>\r
1931     </xs:annotation>\r
1932     <xs:restriction base="xs:long">\r
1933       <xs:minInclusive value="-2147483648" id="int.minInclusive"/>\r
1934       <xs:maxInclusive value="2147483647" id="int.maxInclusive"/>\r
1935     </xs:restriction>\r
1936   </xs:simpleType>\r
1937 \r
1938   <xs:simpleType name="short" id="short">\r
1939     <xs:annotation>\r
1940       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#short"/>\r
1941     </xs:annotation>\r
1942     <xs:restriction base="xs:int">\r
1943       <xs:minInclusive value="-32768" id="short.minInclusive"/>\r
1944       <xs:maxInclusive value="32767" id="short.maxInclusive"/>\r
1945     </xs:restriction>\r
1946   </xs:simpleType>\r
1947 \r
1948   <xs:simpleType name="byte" id="byte">\r
1949     <xs:annotation>\r
1950       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#byte"/>\r
1951     </xs:annotation>\r
1952     <xs:restriction base="xs:short">\r
1953       <xs:minInclusive value="-128" id="byte.minInclusive"/>\r
1954       <xs:maxInclusive value="127" id="byte.maxInclusive"/>\r
1955     </xs:restriction>\r
1956   </xs:simpleType>\r
1957 \r
1958   <xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger">\r
1959     <xs:annotation>\r
1960       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/>\r
1961     </xs:annotation>\r
1962     <xs:restriction base="xs:integer">\r
1963       <xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>\r
1964     </xs:restriction>\r
1965   </xs:simpleType>\r
1966 \r
1967   <xs:simpleType name="unsignedLong" id="unsignedLong">\r
1968     <xs:annotation>\r
1969       <xs:appinfo>\r
1970         <hfp:hasProperty name="bounded" value="true"/>\r
1971         <hfp:hasProperty name="cardinality" value="finite"/>\r
1972       </xs:appinfo>\r
1973       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/>\r
1974     </xs:annotation>\r
1975     <xs:restriction base="xs:nonNegativeInteger">\r
1976       <xs:maxInclusive value="18446744073709551615" id="unsignedLong.maxInclusive"/>\r
1977     </xs:restriction>\r
1978   </xs:simpleType>\r
1979 \r
1980   <xs:simpleType name="unsignedInt" id="unsignedInt">\r
1981     <xs:annotation>\r
1982       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/>\r
1983     </xs:annotation>\r
1984     <xs:restriction base="xs:unsignedLong">\r
1985       <xs:maxInclusive value="4294967295" id="unsignedInt.maxInclusive"/>\r
1986     </xs:restriction>\r
1987   </xs:simpleType>\r
1988 \r
1989   <xs:simpleType name="unsignedShort" id="unsignedShort">\r
1990     <xs:annotation>\r
1991       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/>\r
1992     </xs:annotation>\r
1993     <xs:restriction base="xs:unsignedInt">\r
1994       <xs:maxInclusive value="65535" id="unsignedShort.maxInclusive"/>\r
1995     </xs:restriction>\r
1996   </xs:simpleType>\r
1997 \r
1998   <xs:simpleType name="unsignedByte" id="unsignedByte">\r
1999     <xs:annotation>\r
2000       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/>\r
2001     </xs:annotation>\r
2002     <xs:restriction base="xs:unsignedShort">\r
2003       <xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/>\r
2004     </xs:restriction>\r
2005   </xs:simpleType>\r
2006 \r
2007   <xs:simpleType name="positiveInteger" id="positiveInteger">\r
2008     <xs:annotation>\r
2009       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/>\r
2010     </xs:annotation>\r
2011     <xs:restriction base="xs:nonNegativeInteger">\r
2012       <xs:minInclusive value="1" id="positiveInteger.minInclusive"/>\r
2013     </xs:restriction>\r
2014   </xs:simpleType>\r
2015 \r
2016  <xs:simpleType name="derivationControl">\r
2017   <xs:annotation>\r
2018    <xs:documentation>\r
2019    A utility type, not for public use</xs:documentation>\r
2020   </xs:annotation>\r
2021   <xs:restriction base="xs:NMTOKEN">\r
2022    <xs:enumeration value="substitution"/>\r
2023    <xs:enumeration value="extension"/>\r
2024    <xs:enumeration value="restriction"/>\r
2025    <xs:enumeration value="list"/>\r
2026    <xs:enumeration value="union"/>\r
2027   </xs:restriction>\r
2028  </xs:simpleType>\r
2029 \r
2030  <xs:group name="simpleDerivation">\r
2031   <xs:choice>\r
2032     <xs:element ref="xs:restriction"/>\r
2033     <xs:element ref="xs:list"/>\r
2034     <xs:element ref="xs:union"/>\r
2035   </xs:choice>\r
2036  </xs:group>\r
2037 \r
2038  <xs:simpleType name="simpleDerivationSet">\r
2039   <xs:annotation>\r
2040    <xs:documentation>\r
2041    #all or (possibly empty) subset of {restriction, union, list}\r
2042    </xs:documentation>\r
2043    <xs:documentation>\r
2044    A utility type, not for public use</xs:documentation>\r
2045   </xs:annotation>\r
2046   <xs:union>\r
2047    <xs:simpleType>\r
2048     <xs:restriction base="xs:token">\r
2049      <xs:enumeration value="#all"/>\r
2050     </xs:restriction>\r
2051    </xs:simpleType>\r
2052    <xs:simpleType>\r
2053     <xs:list>\r
2054      <xs:simpleType>\r
2055       <xs:restriction base="xs:derivationControl">\r
2056        <xs:enumeration value="list"/>\r
2057        <xs:enumeration value="union"/>\r
2058        <xs:enumeration value="restriction"/>\r
2059       </xs:restriction>\r
2060      </xs:simpleType>\r
2061     </xs:list>\r
2062    </xs:simpleType>\r
2063   </xs:union>\r
2064  </xs:simpleType>\r
2065 \r
2066   <xs:complexType name="simpleType" abstract="true">\r
2067     <xs:complexContent>\r
2068       <xs:extension base="xs:annotated">\r
2069         <xs:group ref="xs:simpleDerivation"/>\r
2070         <xs:attribute name="final" type="xs:simpleDerivationSet"/>\r
2071         <xs:attribute name="name" type="xs:NCName">\r
2072           <xs:annotation>\r
2073             <xs:documentation>\r
2074               Can be restricted to required or forbidden\r
2075             </xs:documentation>\r
2076           </xs:annotation>\r
2077         </xs:attribute>\r
2078       </xs:extension>\r
2079     </xs:complexContent>\r
2080   </xs:complexType>\r
2081 \r
2082   <xs:complexType name="topLevelSimpleType">\r
2083     <xs:complexContent>\r
2084       <xs:restriction base="xs:simpleType">\r
2085         <xs:sequence>\r
2086           <xs:element ref="xs:annotation" minOccurs="0"/>\r
2087           <xs:group ref="xs:simpleDerivation"/>\r
2088         </xs:sequence>\r
2089         <xs:attribute name="name" use="required" type="xs:NCName">\r
2090           <xs:annotation>\r
2091             <xs:documentation>\r
2092               Required at the top level\r
2093             </xs:documentation>\r
2094           </xs:annotation>\r
2095         </xs:attribute>\r
2096        <xs:anyAttribute namespace="##other" processContents="lax"/>\r
2097       </xs:restriction>\r
2098     </xs:complexContent>\r
2099   </xs:complexType>\r
2100 \r
2101   <xs:complexType name="localSimpleType">\r
2102     <xs:complexContent>\r
2103       <xs:restriction base="xs:simpleType">\r
2104         <xs:sequence>\r
2105           <xs:element ref="xs:annotation" minOccurs="0"/>\r
2106           <xs:group ref="xs:simpleDerivation"/>\r
2107         </xs:sequence>\r
2108         <xs:attribute name="name" use="prohibited">\r
2109           <xs:annotation>\r
2110             <xs:documentation>\r
2111               Forbidden when nested\r
2112             </xs:documentation>\r
2113           </xs:annotation>\r
2114         </xs:attribute>\r
2115         <xs:attribute name="final" use="prohibited"/>\r
2116        <xs:anyAttribute namespace="##other" processContents="lax"/>\r
2117       </xs:restriction>\r
2118     </xs:complexContent>\r
2119   </xs:complexType>\r
2120 \r
2121   <xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType">\r
2122     <xs:annotation>\r
2123       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>\r
2124     </xs:annotation>\r
2125   </xs:element>\r
2126 \r
2127   <xs:group name="facets">\r
2128    <xs:annotation>\r
2129     <xs:documentation>\r
2130        We should use a substitution group for facets, but\r
2131        that's ruled out because it would allow users to\r
2132        add their own, which we're not ready for yet.\r
2133     </xs:documentation>\r
2134    </xs:annotation>\r
2135    <xs:choice>\r
2136     <xs:element ref="xs:minExclusive"/>\r
2137     <xs:element ref="xs:minInclusive"/>\r
2138     <xs:element ref="xs:maxExclusive"/>\r
2139     <xs:element ref="xs:maxInclusive"/>\r
2140     <xs:element ref="xs:totalDigits"/>\r
2141     <xs:element ref="xs:fractionDigits"/>\r
2142     <xs:element ref="xs:length"/>\r
2143     <xs:element ref="xs:minLength"/>\r
2144     <xs:element ref="xs:maxLength"/>\r
2145     <xs:element ref="xs:enumeration"/>\r
2146     <xs:element ref="xs:whiteSpace"/>\r
2147     <xs:element ref="xs:pattern"/>\r
2148    </xs:choice>\r
2149   </xs:group>\r
2150 \r
2151   <xs:group name="simpleRestrictionModel">\r
2152    <xs:sequence>\r
2153     <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>\r
2154     <xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/>\r
2155    </xs:sequence>\r
2156   </xs:group>\r
2157 \r
2158   <xs:element name="restriction" id="restriction">\r
2159    <xs:complexType>\r
2160     <xs:annotation>\r
2161       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-restriction">\r
2162           base attribute and simpleType child are mutually\r
2163           exclusive, but one or other is required\r
2164         </xs:documentation>\r
2165       </xs:annotation>\r
2166       <xs:complexContent>\r
2167         <xs:extension base="xs:annotated">\r
2168          <xs:group ref="xs:simpleRestrictionModel"/>\r
2169          <xs:attribute name="base" type="xs:QName" use="optional"/>\r
2170         </xs:extension>\r
2171       </xs:complexContent>\r
2172     </xs:complexType>\r
2173   </xs:element>\r
2174 \r
2175   <xs:element name="list" id="list">\r
2176    <xs:complexType>\r
2177     <xs:annotation>\r
2178       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-list">\r
2179           itemType attribute and simpleType child are mutually\r
2180           exclusive, but one or other is required\r
2181         </xs:documentation>\r
2182       </xs:annotation>\r
2183       <xs:complexContent>\r
2184         <xs:extension base="xs:annotated">\r
2185           <xs:sequence>\r
2186             <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>\r
2187           </xs:sequence>\r
2188           <xs:attribute name="itemType" type="xs:QName" use="optional"/>\r
2189         </xs:extension>\r
2190       </xs:complexContent>\r
2191     </xs:complexType>\r
2192   </xs:element>\r
2193 \r
2194   <xs:element name="union" id="union">\r
2195    <xs:complexType>\r
2196     <xs:annotation>\r
2197       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-union">\r
2198           memberTypes attribute must be non-empty or there must be\r
2199           at least one simpleType child\r
2200         </xs:documentation>\r
2201       </xs:annotation>\r
2202       <xs:complexContent>\r
2203         <xs:extension base="xs:annotated">\r
2204           <xs:sequence>\r
2205             <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0" maxOccurs="unbounded"/>\r
2206           </xs:sequence>\r
2207           <xs:attribute name="memberTypes" use="optional">\r
2208             <xs:simpleType>\r
2209               <xs:list itemType="xs:QName"/>\r
2210             </xs:simpleType>\r
2211           </xs:attribute>\r
2212         </xs:extension>\r
2213       </xs:complexContent>\r
2214     </xs:complexType>\r
2215   </xs:element>\r
2216 \r
2217   <xs:complexType name="facet">\r
2218     <xs:complexContent>\r
2219       <xs:extension base="xs:annotated">\r
2220         <xs:attribute name="value" use="required"/>\r
2221         <xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>\r
2222       </xs:extension>\r
2223     </xs:complexContent>\r
2224   </xs:complexType>\r
2225 \r
2226  <xs:complexType name="noFixedFacet">\r
2227   <xs:complexContent>\r
2228    <xs:restriction base="xs:facet">\r
2229     <xs:sequence>\r
2230      <xs:element ref="xs:annotation" minOccurs="0"/>\r
2231     </xs:sequence>\r
2232     <xs:attribute name="fixed" use="prohibited"/>\r
2233     <xs:anyAttribute namespace="##other" processContents="lax"/>\r
2234    </xs:restriction>\r
2235   </xs:complexContent>\r
2236  </xs:complexType>\r
2237 \r
2238   <xs:element name="minExclusive" id="minExclusive" type="xs:facet">\r
2239     <xs:annotation>\r
2240       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/>\r
2241     </xs:annotation>\r
2242   </xs:element>\r
2243   <xs:element name="minInclusive" id="minInclusive" type="xs:facet">\r
2244     <xs:annotation>\r
2245       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/>\r
2246     </xs:annotation>\r
2247   </xs:element>\r
2248 \r
2249   <xs:element name="maxExclusive" id="maxExclusive" type="xs:facet">\r
2250     <xs:annotation>\r
2251       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/>\r
2252     </xs:annotation>\r
2253   </xs:element>\r
2254   <xs:element name="maxInclusive" id="maxInclusive" type="xs:facet">\r
2255     <xs:annotation>\r
2256       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/>\r
2257     </xs:annotation>\r
2258   </xs:element>\r
2259 \r
2260   <xs:complexType name="numFacet">\r
2261     <xs:complexContent>\r
2262       <xs:restriction base="xs:facet">\r
2263        <xs:sequence>\r
2264          <xs:element ref="xs:annotation" minOccurs="0"/>\r
2265        </xs:sequence>\r
2266        <xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/>\r
2267        <xs:anyAttribute namespace="##other" processContents="lax"/>\r
2268       </xs:restriction>\r
2269     </xs:complexContent>\r
2270   </xs:complexType>\r
2271 \r
2272   <xs:element name="totalDigits" id="totalDigits">\r
2273     <xs:annotation>\r
2274       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>\r
2275     </xs:annotation>\r
2276     <xs:complexType>\r
2277       <xs:complexContent>\r
2278         <xs:restriction base="xs:numFacet">\r
2279           <xs:sequence>\r
2280             <xs:element ref="xs:annotation" minOccurs="0"/>\r
2281           </xs:sequence>\r
2282           <xs:attribute name="value" type="xs:positiveInteger" use="required"/>\r
2283          <xs:anyAttribute namespace="##other" processContents="lax"/>\r
2284         </xs:restriction>\r
2285       </xs:complexContent>\r
2286     </xs:complexType>\r
2287   </xs:element>\r
2288   <xs:element name="fractionDigits" id="fractionDigits" type="xs:numFacet">\r
2289     <xs:annotation>\r
2290       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>\r
2291     </xs:annotation>\r
2292   </xs:element>\r
2293 \r
2294   <xs:element name="length" id="length" type="xs:numFacet">\r
2295     <xs:annotation>\r
2296       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-length"/>\r
2297     </xs:annotation>\r
2298   </xs:element>\r
2299   <xs:element name="minLength" id="minLength" type="xs:numFacet">\r
2300     <xs:annotation>\r
2301       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>\r
2302     </xs:annotation>\r
2303   </xs:element>\r
2304   <xs:element name="maxLength" id="maxLength" type="xs:numFacet">\r
2305     <xs:annotation>\r
2306       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>\r
2307     </xs:annotation>\r
2308   </xs:element>\r
2309 \r
2310   <xs:element name="enumeration" id="enumeration" type="xs:noFixedFacet">\r
2311     <xs:annotation>\r
2312       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/>\r
2313     </xs:annotation>\r
2314   </xs:element>\r
2315 \r
2316   <xs:element name="whiteSpace" id="whiteSpace">\r
2317     <xs:annotation>\r
2318       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/>\r
2319     </xs:annotation>\r
2320     <xs:complexType>\r
2321       <xs:complexContent>\r
2322         <xs:restriction base="xs:facet">\r
2323           <xs:sequence>\r
2324             <xs:element ref="xs:annotation" minOccurs="0"/>\r
2325           </xs:sequence>\r
2326           <xs:attribute name="value" use="required">\r
2327             <xs:simpleType>\r
2328               <xs:restriction base="xs:NMTOKEN">\r
2329                 <xs:enumeration value="preserve"/>\r
2330                 <xs:enumeration value="replace"/>\r
2331                 <xs:enumeration value="collapse"/>\r
2332               </xs:restriction>\r
2333             </xs:simpleType>\r
2334           </xs:attribute>\r
2335          <xs:anyAttribute namespace="##other" processContents="lax"/>\r
2336         </xs:restriction>\r
2337       </xs:complexContent>\r
2338     </xs:complexType>\r
2339   </xs:element>\r
2340 \r
2341   <xs:element name="pattern" id="pattern">\r
2342     <xs:annotation>\r
2343       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/>\r
2344     </xs:annotation>\r
2345     <xs:complexType>\r
2346       <xs:complexContent>\r
2347         <xs:restriction base="xs:noFixedFacet">\r
2348           <xs:sequence>\r
2349             <xs:element ref="xs:annotation" minOccurs="0"/>\r
2350           </xs:sequence>\r
2351           <xs:attribute name="value" type="xs:string" use="required"/>\r
2352          <xs:anyAttribute namespace="##other" processContents="lax"/>\r
2353         </xs:restriction>\r
2354       </xs:complexContent>\r
2355     </xs:complexType>\r
2356   </xs:element>\r
2357 \r
2358 </xs:schema>