Project

General

Profile

Download (84 KB) Statistics
| Branch: | Tag: | Revision:
1
<?xml version="1.0" encoding="UTF-8"?>
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">
3
 <xs:annotation>
4
  <xs:documentation>
5
    Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp 
6
    Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp 
7
  </xs:documentation>
8
 </xs:annotation>
9

    
10
 <xs:annotation>
11
   <xs:documentation source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html">
12
   The schema corresponding to this document is normative,
13
   with respect to the syntactic constraints it expresses in the
14
   XML Schema language.  The documentation (within &lt;documentation&gt; elements)
15
   below, is not normative, but rather highlights important aspects of
16
   the W3C Recommendation of which this is a part</xs:documentation>
17
 </xs:annotation>
18

    
19
 <xs:annotation>
20
   <xs:documentation>
21
   The simpleType element and all of its members are defined
22
      towards the end of this schema document</xs:documentation>
23
 </xs:annotation>
24

    
25
 <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd">
26
   <xs:annotation>
27
     <xs:documentation>
28
       Get access to the xml: attribute groups for xml:lang
29
       as declared on 'schema' and 'documentation' below
30
     </xs:documentation>
31
   </xs:annotation>
32
 </xs:import>
33

    
34
 <xs:complexType name="openAttrs">
35
   <xs:annotation>
36
     <xs:documentation>
37
       This type is extended by almost all schema types
38
       to allow attributes from other namespaces to be
39
       added to user schemas.
40
     </xs:documentation>
41
   </xs:annotation>
42
   <xs:complexContent>
43
     <xs:restriction base="xs:anyType">
44
       <xs:anyAttribute namespace="##other" processContents="lax"/>
45
     </xs:restriction>
46
   </xs:complexContent>
47
 </xs:complexType>
48

    
49
 <xs:complexType name="annotated">
50
   <xs:annotation>
51
     <xs:documentation>
52
       This type is extended by all types which allow annotation
53
       other than &lt;schema&gt; itself
54
     </xs:documentation>
55
   </xs:annotation>
56
   <xs:complexContent>
57
     <xs:extension base="xs:openAttrs">
58
       <xs:sequence>
59
         <xs:element ref="xs:annotation" minOccurs="0"/>
60
       </xs:sequence>
61
       <xs:attribute name="id" type="xs:ID"/>
62
     </xs:extension>
63
   </xs:complexContent>
64
 </xs:complexType>
65

    
66
 <xs:group name="schemaTop">
67
  <xs:annotation>
68
   <xs:documentation>
69
   This group is for the
70
   elements which occur freely at the top level of schemas.
71
   All of their types are based on the "annotated" type by extension.</xs:documentation>
72
  </xs:annotation>
73
  <xs:choice>
74
   <xs:group ref="xs:redefinable"/>
75
   <xs:element ref="xs:element"/>
76
   <xs:element ref="xs:attribute"/>
77
   <xs:element ref="xs:notation"/>
78
  </xs:choice>
79
 </xs:group>
80
 
81
 <xs:group name="redefinable">
82
  <xs:annotation>
83
   <xs:documentation>
84
   This group is for the
85
   elements which can self-redefine (see &lt;redefine&gt; below).</xs:documentation>
86
  </xs:annotation>
87
  <xs:choice>
88
   <xs:element ref="xs:simpleType"/>
89
   <xs:element ref="xs:complexType"/>
90
   <xs:element ref="xs:group"/>
91
   <xs:element ref="xs:attributeGroup"/>
92
  </xs:choice>
93
 </xs:group>
94

    
95
 <xs:simpleType name="formChoice">
96
  <xs:annotation>
97
   <xs:documentation>
98
   A utility type, not for public use</xs:documentation>
99
  </xs:annotation>
100
  <xs:restriction base="xs:NMTOKEN">
101
   <xs:enumeration value="qualified"/>
102
   <xs:enumeration value="unqualified"/>
103
  </xs:restriction>
104
 </xs:simpleType>
105

    
106
 <xs:simpleType name="reducedDerivationControl">
107
  <xs:annotation>
108
   <xs:documentation>
109
   A utility type, not for public use</xs:documentation>
110
  </xs:annotation>
111
  <xs:restriction base="xs:derivationControl">
112
   <xs:enumeration value="extension"/>
113
   <xs:enumeration value="restriction"/>
114
  </xs:restriction>
115
 </xs:simpleType>
116

    
117
 <xs:simpleType name="derivationSet">
118
  <xs:annotation>
119
   <xs:documentation>
120
   A utility type, not for public use</xs:documentation>
121
   <xs:documentation>
122
   #all or (possibly empty) subset of {extension, restriction}</xs:documentation>
123
  </xs:annotation>
124
  <xs:union>
125
   <xs:simpleType>    
126
    <xs:restriction base="xs:token">
127
     <xs:enumeration value="#all"/>
128
    </xs:restriction>
129
   </xs:simpleType>
130
   <xs:simpleType>
131
    <xs:list itemType="xs:reducedDerivationControl"/>
132
   </xs:simpleType>
133
  </xs:union>
134
 </xs:simpleType>
135

    
136
 <xs:simpleType name="typeDerivationControl">
137
  <xs:annotation>
138
   <xs:documentation>
139
   A utility type, not for public use</xs:documentation>
140
  </xs:annotation>
141
  <xs:restriction base="xs:derivationControl">
142
   <xs:enumeration value="extension"/>
143
   <xs:enumeration value="restriction"/>
144
   <xs:enumeration value="list"/>
145
   <xs:enumeration value="union"/>
146
  </xs:restriction>
147
 </xs:simpleType>
148

    
149
  <xs:simpleType name="fullDerivationSet">
150
  <xs:annotation>
151
   <xs:documentation>
152
   A utility type, not for public use</xs:documentation>
153
   <xs:documentation>
154
   #all or (possibly empty) subset of {extension, restriction, list, union}</xs:documentation>
155
  </xs:annotation>
156
  <xs:union>
157
   <xs:simpleType>    
158
    <xs:restriction base="xs:token">
159
     <xs:enumeration value="#all"/>
160
    </xs:restriction>
161
   </xs:simpleType>
162
   <xs:simpleType>
163
    <xs:list itemType="xs:typeDerivationControl"/>
164
   </xs:simpleType>
165
  </xs:union>
166
 </xs:simpleType>
167

    
168
 <xs:element name="schema" id="schema">
169
  <xs:annotation>
170
    <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>
171
  </xs:annotation>
172
  <xs:complexType>
173
   <xs:complexContent>
174
    <xs:extension base="xs:openAttrs">
175
     <xs:sequence>
176
      <xs:choice minOccurs="0" maxOccurs="unbounded">
177
       <xs:element ref="xs:include"/>
178
       <xs:element ref="xs:import"/>
179
       <xs:element ref="xs:redefine"/>
180
       <xs:element ref="xs:annotation"/>
181
      </xs:choice>
182
      <xs:sequence minOccurs="0" maxOccurs="unbounded">
183
       <xs:group ref="xs:schemaTop"/>
184
       <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>
185
      </xs:sequence>
186
     </xs:sequence>
187
     <xs:attribute name="targetNamespace" type="xs:anyURI"/>
188
     <xs:attribute name="version" type="xs:token"/>
189
     <xs:attribute name="finalDefault" type="xs:fullDerivationSet" use="optional" default=""/>
190
     <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>
191
     <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
192
     <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
193
     <xs:attribute name="id" type="xs:ID"/>
194
     <xs:attribute ref="xml:lang"/>
195
    </xs:extension>
196
   </xs:complexContent>
197
  </xs:complexType>
198

    
199
  <xs:key name="element">
200
   <xs:selector xpath="xs:element"/>
201
   <xs:field xpath="@name"/>
202
  </xs:key>
203

    
204
  <xs:key name="attribute">
205
   <xs:selector xpath="xs:attribute"/>
206
   <xs:field xpath="@name"/>
207
  </xs:key>
208

    
209
  <xs:key name="type">
210
   <xs:selector xpath="xs:complexType|xs:simpleType"/>
211
   <xs:field xpath="@name"/>
212
  </xs:key>
213
 
214
  <xs:key name="group">
215
   <xs:selector xpath="xs:group"/>
216
   <xs:field xpath="@name"/>
217
  </xs:key>
218
 
219
  <xs:key name="attributeGroup">
220
   <xs:selector xpath="xs:attributeGroup"/>
221
   <xs:field xpath="@name"/>
222
  </xs:key>
223
 
224
  <xs:key name="notation">
225
   <xs:selector xpath="xs:notation"/>
226
   <xs:field xpath="@name"/>
227
  </xs:key>
228

    
229
  <xs:key name="identityConstraint">
230
   <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
231
   <xs:field xpath="@name"/>
232
  </xs:key>
233

    
234
 </xs:element>
235

    
236
 <xs:simpleType name="allNNI">
237
  <xs:annotation><xs:documentation>
238
   for maxOccurs</xs:documentation></xs:annotation>
239
  <xs:union memberTypes="xs:nonNegativeInteger">
240
   <xs:simpleType>
241
    <xs:restriction base="xs:NMTOKEN">
242
     <xs:enumeration value="unbounded"/>
243
    </xs:restriction>
244
   </xs:simpleType>
245
  </xs:union>
246
 </xs:simpleType>
247

    
248
 <xs:attributeGroup name="occurs">
249
  <xs:annotation><xs:documentation>
250
   for all particles</xs:documentation></xs:annotation>
251
  <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>
252
  <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>
253
 </xs:attributeGroup>
254

    
255
 <xs:attributeGroup name="defRef">
256
  <xs:annotation><xs:documentation>
257
   for element, group and attributeGroup,
258
   which both define and reference</xs:documentation></xs:annotation>
259
  <xs:attribute name="name" type="xs:NCName"/>
260
  <xs:attribute name="ref" type="xs:QName"/>
261
 </xs:attributeGroup>
262

    
263
 <xs:group name="typeDefParticle">
264
  <xs:annotation>
265
    <xs:documentation>
266
   'complexType' uses this</xs:documentation></xs:annotation>
267
  <xs:choice>
268
   <xs:element name="group" type="xs:groupRef"/>
269
   <xs:element ref="xs:all"/>
270
   <xs:element ref="xs:choice"/>
271
   <xs:element ref="xs:sequence"/>
272
  </xs:choice>
273
 </xs:group>
274
 
275
 
276

    
277
 <xs:group name="nestedParticle">
278
  <xs:choice>
279
   <xs:element name="element" type="xs:localElement"/>
280
   <xs:element name="group" type="xs:groupRef"/>
281
   <xs:element ref="xs:choice"/>
282
   <xs:element ref="xs:sequence"/>
283
   <xs:element ref="xs:any"/>
284
  </xs:choice>
285
 </xs:group>
286
 
287
 <xs:group name="particle">
288
  <xs:choice>
289
   <xs:element name="element" type="xs:localElement"/>
290
   <xs:element name="group" type="xs:groupRef"/>
291
   <xs:element ref="xs:all"/>
292
   <xs:element ref="xs:choice"/>
293
   <xs:element ref="xs:sequence"/>
294
   <xs:element ref="xs:any"/>
295
  </xs:choice>
296
 </xs:group>
297
 
298
 <xs:complexType name="attribute">
299
  <xs:complexContent>
300
   <xs:extension base="xs:annotated">
301
    <xs:sequence>
302
     <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
303
    </xs:sequence>
304
    <xs:attributeGroup ref="xs:defRef"/>
305
    <xs:attribute name="type" type="xs:QName"/>
306
    <xs:attribute name="use" use="optional" default="optional">
307
     <xs:simpleType>
308
      <xs:restriction base="xs:NMTOKEN">
309
       <xs:enumeration value="prohibited"/>
310
       <xs:enumeration value="optional"/>
311
       <xs:enumeration value="required"/>
312
      </xs:restriction>
313
     </xs:simpleType>
314
    </xs:attribute>
315
    <xs:attribute name="default" type="xs:string"/>
316
    <xs:attribute name="fixed" type="xs:string"/>
317
    <xs:attribute name="form" type="xs:formChoice"/>
318
   </xs:extension>
319
  </xs:complexContent>
320
 </xs:complexType>
321
 
322
 <xs:complexType name="topLevelAttribute">
323
  <xs:complexContent>
324
   <xs:restriction base="xs:attribute">
325
    <xs:sequence>
326
     <xs:element ref="xs:annotation" minOccurs="0"/>
327
     <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
328
    </xs:sequence>
329
    <xs:attribute name="ref" use="prohibited"/>
330
    <xs:attribute name="form" use="prohibited"/>
331
    <xs:attribute name="use" use="prohibited"/>
332
    <xs:attribute name="name" use="required" type="xs:NCName"/>
333
    <xs:anyAttribute namespace="##other" processContents="lax"/>
334
   </xs:restriction>
335
  </xs:complexContent>
336
 </xs:complexType>
337

    
338
 <xs:group name="attrDecls">
339
  <xs:sequence>
340
   <xs:choice minOccurs="0" maxOccurs="unbounded">
341
    <xs:element name="attribute" type="xs:attribute"/>
342
    <xs:element name="attributeGroup" type="xs:attributeGroupRef"/>
343
   </xs:choice>
344
   <xs:element ref="xs:anyAttribute" minOccurs="0"/>
345
  </xs:sequence>
346
 </xs:group>
347

    
348
 <xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute">
349
  <xs:annotation>
350
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>
351
  </xs:annotation>
352
 </xs:element>
353

    
354
 <xs:group name="complexTypeModel">
355
  <xs:choice>
356
      <xs:element ref="xs:simpleContent"/>
357
      <xs:element ref="xs:complexContent"/>
358
      <xs:sequence>
359
       <xs:annotation>
360
        <xs:documentation>
361
   This branch is short for
362
   &lt;complexContent&gt;
363
   &lt;restriction base="xs:anyType"&gt;
364
   ...
365
   &lt;/restriction&gt;
366
   &lt;/complexContent&gt;</xs:documentation>
367
       </xs:annotation>
368
       <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
369
       <xs:group ref="xs:attrDecls"/>
370
      </xs:sequence>
371
  </xs:choice>
372
 </xs:group>
373

    
374
 <xs:complexType name="complexType" abstract="true">
375
  <xs:complexContent>
376
   <xs:extension base="xs:annotated">
377
    <xs:group ref="xs:complexTypeModel"/>
378
    <xs:attribute name="name" type="xs:NCName">
379
     <xs:annotation>
380
      <xs:documentation>
381
      Will be restricted to required or forbidden</xs:documentation>
382
     </xs:annotation>
383
    </xs:attribute>
384
    <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">
385
     <xs:annotation>
386
      <xs:documentation>
387
      Not allowed if simpleContent child is chosen.
388
      May be overriden by setting on complexContent child.</xs:documentation>
389
    </xs:annotation>
390
    </xs:attribute>
391
    <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
392
    <xs:attribute name="final" type="xs:derivationSet"/>
393
    <xs:attribute name="block" type="xs:derivationSet"/>
394
   </xs:extension>
395
  </xs:complexContent>
396
 </xs:complexType>
397
 
398
 <xs:complexType name="topLevelComplexType">
399
  <xs:complexContent>
400
   <xs:restriction base="xs:complexType">
401
    <xs:sequence>
402
     <xs:element ref="xs:annotation" minOccurs="0"/>
403
     <xs:group ref="xs:complexTypeModel"/>
404
    </xs:sequence>
405
    <xs:attribute name="name" type="xs:NCName" use="required"/>
406
    <xs:anyAttribute namespace="##other" processContents="lax"/>
407
   </xs:restriction>
408
  </xs:complexContent>
409
 </xs:complexType>
410
 
411
 <xs:complexType name="localComplexType">
412
  <xs:complexContent>
413
   <xs:restriction base="xs:complexType">
414
    <xs:sequence>
415
     <xs:element ref="xs:annotation" minOccurs="0"/>
416
     <xs:group ref="xs:complexTypeModel"/>
417
    </xs:sequence>
418
    <xs:attribute name="name" use="prohibited"/>
419
    <xs:attribute name="abstract" use="prohibited"/>
420
    <xs:attribute name="final" use="prohibited"/>
421
    <xs:attribute name="block" use="prohibited"/>
422
    <xs:anyAttribute namespace="##other" processContents="lax"/>
423
   </xs:restriction>
424
  </xs:complexContent>
425
 </xs:complexType>
426
 
427
 <xs:complexType name="restrictionType">
428
  <xs:complexContent>
429
   <xs:extension base="xs:annotated">
430
    <xs:sequence>
431
     <xs:choice minOccurs="0">
432
      <xs:group ref="xs:typeDefParticle"/>
433
      <xs:group ref="xs:simpleRestrictionModel"/>
434
     </xs:choice>
435
     <xs:group ref="xs:attrDecls"/>
436
    </xs:sequence>
437
    <xs:attribute name="base" type="xs:QName" use="required"/>
438
   </xs:extension>
439
  </xs:complexContent>       
440
 </xs:complexType>
441

    
442
 <xs:complexType name="complexRestrictionType">
443
  <xs:complexContent>
444
   <xs:restriction base="xs:restrictionType">
445
    <xs:sequence>
446
     <xs:element ref="xs:annotation" minOccurs="0"/>
447
     <xs:choice minOccurs="0">
448
      <xs:annotation>
449
       <xs:documentation>This choice is added simply to
450
                   make this a valid restriction per the REC</xs:documentation>
451
      </xs:annotation>
452
      <xs:group ref="xs:typeDefParticle"/>
453
     </xs:choice>
454
     <xs:group ref="xs:attrDecls"/>
455
    </xs:sequence>
456
    <xs:anyAttribute namespace="##other" processContents="lax"/>
457
   </xs:restriction>
458
  </xs:complexContent>       
459
 </xs:complexType>
460

    
461
 <xs:complexType name="extensionType">
462
  <xs:complexContent>
463
   <xs:extension base="xs:annotated">
464
    <xs:sequence>
465
     <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
466
     <xs:group ref="xs:attrDecls"/>
467
    </xs:sequence>
468
    <xs:attribute name="base" type="xs:QName" use="required"/>
469
   </xs:extension>
470
  </xs:complexContent>       
471
 </xs:complexType>
472

    
473
 <xs:element name="complexContent" id="complexContent">
474
  <xs:annotation>
475
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
476
  </xs:annotation>
477
  <xs:complexType>
478
   <xs:complexContent>
479
    <xs:extension base="xs:annotated">
480
     <xs:choice>
481
      <xs:element name="restriction" type="xs:complexRestrictionType"/>
482
      <xs:element name="extension" type="xs:extensionType"/>
483
     </xs:choice>     
484
     <xs:attribute name="mixed" type="xs:boolean">
485
      <xs:annotation>
486
       <xs:documentation>
487
       Overrides any setting on complexType parent.</xs:documentation>
488
      </xs:annotation>
489
    </xs:attribute>
490
    </xs:extension>
491
   </xs:complexContent>
492
  </xs:complexType>
493
 </xs:element>
494

    
495
 <xs:complexType name="simpleRestrictionType">
496
  <xs:complexContent>
497
   <xs:restriction base="xs:restrictionType">
498
    <xs:sequence>
499
     <xs:element ref="xs:annotation" minOccurs="0"/>
500
     <xs:choice minOccurs="0">
501
      <xs:annotation>
502
       <xs:documentation>This choice is added simply to
503
                   make this a valid restriction per the REC</xs:documentation>
504
      </xs:annotation>
505
      <xs:group ref="xs:simpleRestrictionModel"/>
506
     </xs:choice>
507
     <xs:group ref="xs:attrDecls"/>
508
    </xs:sequence>
509
    <xs:anyAttribute namespace="##other" processContents="lax"/>
510
   </xs:restriction>
511
  </xs:complexContent>
512
 </xs:complexType>
513

    
514
 <xs:complexType name="simpleExtensionType">
515
  <xs:complexContent>
516
   <xs:restriction base="xs:extensionType">
517
    <xs:sequence>
518
     <xs:annotation>
519
      <xs:documentation>
520
      No typeDefParticle group reference</xs:documentation>
521
     </xs:annotation>
522
     <xs:element ref="xs:annotation" minOccurs="0"/>
523
     <xs:group ref="xs:attrDecls"/>
524
    </xs:sequence>
525
    <xs:anyAttribute namespace="##other" processContents="lax"/>
526
   </xs:restriction>
527
  </xs:complexContent>
528
 </xs:complexType>
529

    
530
 <xs:element name="simpleContent" id="simpleContent">
531
  <xs:annotation>
532
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
533
  </xs:annotation>
534
  <xs:complexType>
535
   <xs:complexContent>
536
    <xs:extension base="xs:annotated">
537
     <xs:choice>
538
      <xs:element name="restriction" type="xs:simpleRestrictionType"/>
539
      <xs:element name="extension" type="xs:simpleExtensionType"/>
540
     </xs:choice>
541
    </xs:extension>
542
   </xs:complexContent>
543
  </xs:complexType>
544
 </xs:element>
545
 
546
 <xs:element name="complexType" type="xs:topLevelComplexType" id="complexType">
547
  <xs:annotation>
548
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>
549
  </xs:annotation>
550
 </xs:element>
551

    
552

    
553
  <xs:simpleType name="blockSet">
554
   <xs:annotation>
555
    <xs:documentation>
556
    A utility type, not for public use</xs:documentation>
557
    <xs:documentation>
558
    #all or (possibly empty) subset of {substitution, extension,
559
    restriction}</xs:documentation>
560
   </xs:annotation>
561
   <xs:union>
562
    <xs:simpleType>    
563
     <xs:restriction base="xs:token">
564
      <xs:enumeration value="#all"/>
565
     </xs:restriction>
566
    </xs:simpleType>
567
    <xs:simpleType>
568
     <xs:list>
569
      <xs:simpleType>
570
       <xs:restriction base="xs:derivationControl">
571
        <xs:enumeration value="extension"/>
572
        <xs:enumeration value="restriction"/>
573
        <xs:enumeration value="substitution"/>
574
       </xs:restriction>
575
      </xs:simpleType>
576
     </xs:list>
577
    </xs:simpleType>
578
   </xs:union>  
579
  </xs:simpleType>
580

    
581
 <xs:complexType name="element" abstract="true">
582
  <xs:annotation>
583
   <xs:documentation>
584
   The element element can be used either
585
   at the top level to define an element-type binding globally,
586
   or within a content model to either reference a globally-defined
587
   element or type or declare an element-type binding locally.
588
   The ref form is not allowed at the top level.</xs:documentation>
589
  </xs:annotation>
590

    
591
  <xs:complexContent>
592
   <xs:extension base="xs:annotated">
593
    <xs:sequence>
594
     <xs:choice minOccurs="0">
595
      <xs:element name="simpleType" type="xs:localSimpleType"/>
596
      <xs:element name="complexType" type="xs:localComplexType"/>
597
     </xs:choice>
598
     <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
599
    </xs:sequence>
600
    <xs:attributeGroup ref="xs:defRef"/>
601
    <xs:attribute name="type" type="xs:QName"/>
602
    <xs:attribute name="substitutionGroup" type="xs:QName"/>
603
    <xs:attributeGroup ref="xs:occurs"/>
604
    <xs:attribute name="default" type="xs:string"/>
605
    <xs:attribute name="fixed" type="xs:string"/>
606
    <xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/>
607
    <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
608
    <xs:attribute name="final" type="xs:derivationSet"/>
609
    <xs:attribute name="block" type="xs:blockSet"/>
610
    <xs:attribute name="form" type="xs:formChoice"/>
611
   </xs:extension>
612
  </xs:complexContent>
613
 </xs:complexType>
614
 
615
 <xs:complexType name="topLevelElement">
616
  <xs:complexContent>
617
   <xs:restriction base="xs:element">
618
    <xs:sequence>
619
     <xs:element ref="xs:annotation" minOccurs="0"/>
620
     <xs:choice minOccurs="0">
621
      <xs:element name="simpleType" type="xs:localSimpleType"/>
622
      <xs:element name="complexType" type="xs:localComplexType"/>
623
     </xs:choice>
624
     <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
625
    </xs:sequence>
626
    <xs:attribute name="ref" use="prohibited"/>
627
    <xs:attribute name="form" use="prohibited"/>
628
    <xs:attribute name="minOccurs" use="prohibited"/>
629
    <xs:attribute name="maxOccurs" use="prohibited"/>
630
    <xs:attribute name="name" use="required" type="xs:NCName"/>
631
    <xs:anyAttribute namespace="##other" processContents="lax"/>
632
   </xs:restriction>
633
  </xs:complexContent>
634
 </xs:complexType>
635
 
636
 <xs:complexType name="localElement">
637
  <xs:complexContent>
638
   <xs:restriction base="xs:element">
639
    <xs:sequence>
640
     <xs:element ref="xs:annotation" minOccurs="0"/>
641
     <xs:choice minOccurs="0">
642
      <xs:element name="simpleType" type="xs:localSimpleType"/>
643
      <xs:element name="complexType" type="xs:localComplexType"/>
644
     </xs:choice>
645
     <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
646
    </xs:sequence>
647
    <xs:attribute name="substitutionGroup" use="prohibited"/>
648
    <xs:attribute name="final" use="prohibited"/>
649
    <xs:attribute name="abstract" use="prohibited"/>
650
    <xs:anyAttribute namespace="##other" processContents="lax"/>
651
   </xs:restriction>
652
  </xs:complexContent>
653
 </xs:complexType>
654

    
655
 <xs:element name="element" type="xs:topLevelElement" id="element">
656
  <xs:annotation>
657
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>
658
  </xs:annotation>
659
 </xs:element>
660

    
661
 <xs:complexType name="group" abstract="true">
662
  <xs:annotation>
663
   <xs:documentation>
664
   group type for explicit groups, named top-level groups and
665
   group references</xs:documentation>
666
  </xs:annotation>
667
  <xs:complexContent>
668
   <xs:extension base="xs:annotated">
669
    <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>
670
    <xs:attributeGroup ref="xs:defRef"/>
671
    <xs:attributeGroup ref="xs:occurs"/>
672
   </xs:extension>
673
  </xs:complexContent>
674
 </xs:complexType>
675
 
676
 <xs:complexType name="realGroup">
677
  <xs:complexContent>
678
   <xs:restriction base="xs:group">
679
    <xs:sequence>
680
     <xs:element ref="xs:annotation" minOccurs="0"/>
681
     <xs:choice minOccurs="0" maxOccurs="1">
682
      <xs:element ref="xs:all"/>
683
      <xs:element ref="xs:choice"/>
684
      <xs:element ref="xs:sequence"/>
685
     </xs:choice>
686
    </xs:sequence>
687
    <xs:anyAttribute namespace="##other" processContents="lax"/>
688
   </xs:restriction>
689
  </xs:complexContent>
690
 </xs:complexType>
691

    
692
 <xs:complexType name="namedGroup">
693
  <xs:complexContent>
694
   <xs:restriction base="xs:realGroup">
695
    <xs:sequence>
696
     <xs:element ref="xs:annotation" minOccurs="0"/>
697
     <xs:choice minOccurs="1" maxOccurs="1">
698
      <xs:element name="all">
699
       <xs:complexType>
700
        <xs:complexContent>
701
         <xs:restriction base="xs:all">
702
          <xs:group ref="xs:allModel"/>
703
          <xs:attribute name="minOccurs" use="prohibited"/>
704
          <xs:attribute name="maxOccurs" use="prohibited"/>
705
          <xs:anyAttribute namespace="##other" processContents="lax"/>
706
         </xs:restriction>
707
        </xs:complexContent>
708
       </xs:complexType>
709
      </xs:element>
710
      <xs:element name="choice" type="xs:simpleExplicitGroup"/>
711
      <xs:element name="sequence" type="xs:simpleExplicitGroup"/>
712
     </xs:choice>
713
    </xs:sequence>
714
    <xs:attribute name="name" use="required" type="xs:NCName"/>
715
    <xs:attribute name="ref" use="prohibited"/>
716
    <xs:attribute name="minOccurs" use="prohibited"/>
717
    <xs:attribute name="maxOccurs" use="prohibited"/>
718
    <xs:anyAttribute namespace="##other" processContents="lax"/>
719
   </xs:restriction>
720
  </xs:complexContent>
721
 </xs:complexType>
722

    
723
 <xs:complexType name="groupRef">
724
  <xs:complexContent>
725
   <xs:restriction base="xs:realGroup">
726
    <xs:sequence>
727
     <xs:element ref="xs:annotation" minOccurs="0"/>
728
    </xs:sequence>
729
    <xs:attribute name="ref" use="required" type="xs:QName"/>
730
    <xs:attribute name="name" use="prohibited"/>
731
    <xs:anyAttribute namespace="##other" processContents="lax"/>
732
   </xs:restriction>
733
  </xs:complexContent>
734
 </xs:complexType>
735

    
736
 <xs:complexType name="explicitGroup">
737
  <xs:annotation>
738
   <xs:documentation>
739
   group type for the three kinds of group</xs:documentation>
740
  </xs:annotation>
741
  <xs:complexContent>
742
   <xs:restriction base="xs:group">
743
    <xs:sequence>
744
     <xs:element ref="xs:annotation" minOccurs="0"/>
745
     <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
746
    </xs:sequence>
747
    <xs:attribute name="name" type="xs:NCName" use="prohibited"/>
748
    <xs:attribute name="ref" type="xs:QName" use="prohibited"/>
749
    <xs:anyAttribute namespace="##other" processContents="lax"/>
750
   </xs:restriction>
751
  </xs:complexContent>
752
 </xs:complexType>
753
 
754
 <xs:complexType name="simpleExplicitGroup">
755
  <xs:complexContent>
756
   <xs:restriction base="xs:explicitGroup">
757
    <xs:sequence>
758
     <xs:element ref="xs:annotation" minOccurs="0"/>
759
     <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
760
    </xs:sequence>
761
    <xs:attribute name="minOccurs" use="prohibited"/>
762
    <xs:attribute name="maxOccurs" use="prohibited"/>
763
    <xs:anyAttribute namespace="##other" processContents="lax"/>
764
   </xs:restriction>
765
  </xs:complexContent>
766
 </xs:complexType>
767
 
768
 <xs:group name="allModel">
769
  <xs:sequence>
770
      <xs:element ref="xs:annotation" minOccurs="0"/>
771
      <xs:choice minOccurs="0" maxOccurs="unbounded">
772
       <xs:annotation>
773
        <xs:documentation>This choice with min/max is here to
774
                          avoid a pblm with the Elt:All/Choice/Seq
775
                          Particle derivation constraint</xs:documentation>
776
       </xs:annotation>
777
       <xs:element name="element" type="xs:narrowMaxMin"/>
778
      </xs:choice>
779
     </xs:sequence>
780
 </xs:group>
781
 
782
 
783
 <xs:complexType name="narrowMaxMin">
784
  <xs:annotation>
785
   <xs:documentation>restricted max/min</xs:documentation>
786
  </xs:annotation>
787
  <xs:complexContent>
788
   <xs:restriction base="xs:localElement">
789
    <xs:sequence>
790
     <xs:element ref="xs:annotation" minOccurs="0"/>
791
     <xs:choice minOccurs="0">
792
      <xs:element name="simpleType" type="xs:localSimpleType"/>
793
      <xs:element name="complexType" type="xs:localComplexType"/>
794
     </xs:choice>
795
     <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
796
    </xs:sequence>
797
    <xs:attribute name="minOccurs" use="optional" default="1">
798
     <xs:simpleType>
799
      <xs:restriction base="xs:nonNegativeInteger">
800
       <xs:enumeration value="0"/>
801
       <xs:enumeration value="1"/>
802
      </xs:restriction>
803
     </xs:simpleType>
804
    </xs:attribute>
805
    <xs:attribute name="maxOccurs" use="optional" default="1">
806
     <xs:simpleType>
807
      <xs:restriction base="xs:allNNI">
808
       <xs:enumeration value="0"/>
809
       <xs:enumeration value="1"/>
810
      </xs:restriction>
811
     </xs:simpleType>
812
    </xs:attribute>
813
    <xs:anyAttribute namespace="##other" processContents="lax"/>
814
   </xs:restriction>
815
  </xs:complexContent>
816
 </xs:complexType>
817

    
818
  <xs:complexType name="all">
819
   <xs:annotation>
820
    <xs:documentation>
821
   Only elements allowed inside</xs:documentation>
822
   </xs:annotation>
823
   <xs:complexContent>
824
    <xs:restriction base="xs:explicitGroup">
825
     <xs:group ref="xs:allModel"/>
826
     <xs:attribute name="minOccurs" use="optional" default="1">
827
      <xs:simpleType>
828
       <xs:restriction base="xs:nonNegativeInteger">
829
        <xs:enumeration value="0"/>
830
        <xs:enumeration value="1"/>
831
       </xs:restriction>
832
      </xs:simpleType>
833
     </xs:attribute>
834
     <xs:attribute name="maxOccurs" use="optional" default="1">
835
      <xs:simpleType>
836
       <xs:restriction base="xs:allNNI">
837
        <xs:enumeration value="1"/>
838
       </xs:restriction>
839
      </xs:simpleType>
840
     </xs:attribute>
841
     <xs:anyAttribute namespace="##other" processContents="lax"/>
842
    </xs:restriction>
843
   </xs:complexContent>
844
  </xs:complexType>
845

    
846
 <xs:element name="all" id="all" type="xs:all">
847
  <xs:annotation>
848
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/>
849
  </xs:annotation>
850
 </xs:element>
851

    
852
 <xs:element name="choice" type="xs:explicitGroup" id="choice">
853
  <xs:annotation>
854
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
855
  </xs:annotation>
856
 </xs:element>
857

    
858
 <xs:element name="sequence" type="xs:explicitGroup" id="sequence">
859
  <xs:annotation>
860
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>
861
  </xs:annotation>
862
 </xs:element>
863

    
864
 <xs:element name="group" type="xs:namedGroup" id="group">
865
  <xs:annotation>
866
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
867
  </xs:annotation>
868
 </xs:element>
869

    
870
 <xs:complexType name="wildcard">
871
  <xs:complexContent>
872
   <xs:extension base="xs:annotated">
873
    <xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/>
874
    <xs:attribute name="processContents" use="optional" default="strict">
875
     <xs:simpleType>
876
      <xs:restriction base="xs:NMTOKEN">
877
       <xs:enumeration value="skip"/>
878
       <xs:enumeration value="lax"/>
879
       <xs:enumeration value="strict"/>
880
      </xs:restriction>
881
     </xs:simpleType>
882
    </xs:attribute>
883
   </xs:extension>
884
  </xs:complexContent>
885
 </xs:complexType>
886

    
887
 <xs:element name="any" id="any">
888
  <xs:annotation>
889
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
890
  </xs:annotation>
891
  <xs:complexType>
892
   <xs:complexContent>
893
    <xs:extension base="xs:wildcard">
894
     <xs:attributeGroup ref="xs:occurs"/>
895
    </xs:extension>
896
   </xs:complexContent>
897
  </xs:complexType>
898
 </xs:element>
899

    
900
  <xs:annotation>
901
   <xs:documentation>
902
   simple type for the value of the 'namespace' attr of
903
   'any' and 'anyAttribute'</xs:documentation>
904
  </xs:annotation>
905
  <xs:annotation>
906
   <xs:documentation>
907
   Value is
908
              ##any      - - any non-conflicting WFXML/attribute at all
909

    
910
              ##other    - - any non-conflicting WFXML/attribute from
911
                              namespace other than targetNS
912

    
913
              ##local    - - any unqualified non-conflicting WFXML/attribute 
914

    
915
              one or     - - any non-conflicting WFXML/attribute from
916
              more URI        the listed namespaces
917
              references
918
              (space separated)
919

    
920
    ##targetNamespace or ##local may appear in the above list, to
921
        refer to the targetNamespace of the enclosing
922
        schema or an absent targetNamespace respectively</xs:documentation>
923
  </xs:annotation>
924

    
925
 <xs:simpleType name="namespaceList">
926
  <xs:annotation>
927
   <xs:documentation>
928
   A utility type, not for public use</xs:documentation>
929
  </xs:annotation>
930
  <xs:union>
931
   <xs:simpleType>
932
    <xs:restriction base="xs:token">
933
     <xs:enumeration value="##any"/>
934
     <xs:enumeration value="##other"/>
935
    </xs:restriction>
936
   </xs:simpleType>
937
   <xs:simpleType>
938
    <xs:list>
939
     <xs:simpleType>
940
      <xs:union memberTypes="xs:anyURI">
941
       <xs:simpleType>
942
        <xs:restriction base="xs:token">
943
         <xs:enumeration value="##targetNamespace"/>
944
         <xs:enumeration value="##local"/>
945
        </xs:restriction>
946
       </xs:simpleType>
947
      </xs:union>
948
     </xs:simpleType>
949
    </xs:list>
950
   </xs:simpleType>
951
  </xs:union>
952
 </xs:simpleType>
953

    
954
 <xs:element name="attribute" type="xs:topLevelAttribute" id="attribute">
955
  <xs:annotation>
956
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
957
  </xs:annotation>
958
 </xs:element>
959

    
960
 <xs:complexType name="attributeGroup" abstract="true">
961
  <xs:complexContent>
962
   <xs:extension base="xs:annotated">
963
    <xs:group ref="xs:attrDecls"/>
964
    <xs:attributeGroup ref="xs:defRef"/>
965
   </xs:extension>
966
  </xs:complexContent>
967
 </xs:complexType>
968
 
969
 <xs:complexType name="namedAttributeGroup">
970
  <xs:complexContent>
971
   <xs:restriction base="xs:attributeGroup">
972
    <xs:sequence>
973
     <xs:element ref="xs:annotation" minOccurs="0"/>
974
     <xs:group ref="xs:attrDecls"/>
975
    </xs:sequence>
976
    <xs:attribute name="name" use="required" type="xs:NCName"/>
977
    <xs:attribute name="ref" use="prohibited"/>
978
    <xs:anyAttribute namespace="##other" processContents="lax"/>
979
   </xs:restriction>
980
  </xs:complexContent>
981
 </xs:complexType>
982

    
983
 <xs:complexType name="attributeGroupRef">
984
  <xs:complexContent>
985
   <xs:restriction base="xs:attributeGroup">
986
    <xs:sequence>
987
     <xs:element ref="xs:annotation" minOccurs="0"/>
988
    </xs:sequence>
989
    <xs:attribute name="ref" use="required" type="xs:QName"/>
990
    <xs:attribute name="name" use="prohibited"/>
991
    <xs:anyAttribute namespace="##other" processContents="lax"/>
992
   </xs:restriction>
993
  </xs:complexContent>
994
 </xs:complexType>
995

    
996
 <xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup">
997
  <xs:annotation>
998
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
999
  </xs:annotation>
1000
 </xs:element>
1001

    
1002
 <xs:element name="include" id="include">
1003
  <xs:annotation>
1004
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>
1005
  </xs:annotation>
1006
  <xs:complexType>
1007
   <xs:complexContent>
1008
    <xs:extension base="xs:annotated">
1009
     <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
1010
    </xs:extension>
1011
   </xs:complexContent>
1012
  </xs:complexType>
1013
 </xs:element>
1014

    
1015
 <xs:element name="redefine" id="redefine">
1016
  <xs:annotation>
1017
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>
1018
  </xs:annotation>
1019
  <xs:complexType>
1020
   <xs:complexContent>
1021
    <xs:extension base="xs:openAttrs">
1022
     <xs:choice minOccurs="0" maxOccurs="unbounded">
1023
      <xs:element ref="xs:annotation"/>
1024
      <xs:group ref="xs:redefinable"/>
1025
     </xs:choice>
1026
     <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
1027
     <xs:attribute name="id" type="xs:ID"/>
1028
    </xs:extension>
1029
   </xs:complexContent>
1030
  </xs:complexType>
1031
 </xs:element>
1032

    
1033
 <xs:element name="import" id="import">
1034
  <xs:annotation>
1035
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/>
1036
  </xs:annotation>
1037
  <xs:complexType>
1038
   <xs:complexContent>
1039
    <xs:extension base="xs:annotated">
1040
     <xs:attribute name="namespace" type="xs:anyURI"/>
1041
     <xs:attribute name="schemaLocation" type="xs:anyURI"/>
1042
    </xs:extension>
1043
   </xs:complexContent>
1044
  </xs:complexType>
1045
 </xs:element>
1046

    
1047
 <xs:element name="selector" id="selector">
1048
  <xs:annotation>
1049
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>
1050
  </xs:annotation>
1051
  <xs:complexType>
1052
  <xs:complexContent>
1053
   <xs:extension base="xs:annotated">
1054
     <xs:attribute name="xpath" use="required">
1055
      <xs:simpleType>
1056
       <xs:annotation>
1057
        <xs:documentation>A subset of XPath expressions for use
1058
in selectors</xs:documentation>
1059
        <xs:documentation>A utility type, not for public
1060
use</xs:documentation>
1061
       </xs:annotation>
1062
       <xs:restriction base="xs:token">
1063
        <xs:annotation>
1064
         <xs:documentation>The following pattern is intended to allow XPath
1065
                           expressions per the following EBNF:
1066
          Selector    ::=    Path ( '|' Path )*  
1067
          Path    ::=    ('.//')? Step ( '/' Step )*  
1068
          Step    ::=    '.' | NameTest  
1069
          NameTest    ::=    QName | '*' | NCName ':' '*'  
1070
                           child:: is also allowed
1071
         </xs:documentation>
1072
        </xs:annotation>
1073
        <xs:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">
1074
        </xs:pattern>
1075
       </xs:restriction>
1076
      </xs:simpleType>
1077
     </xs:attribute>
1078
   </xs:extension>
1079
  </xs:complexContent>
1080
 </xs:complexType>
1081
 </xs:element>
1082

    
1083
 <xs:element name="field" id="field">
1084
  <xs:annotation>
1085
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
1086
  </xs:annotation>
1087
  <xs:complexType>
1088
  <xs:complexContent>
1089
   <xs:extension base="xs:annotated">
1090
     <xs:attribute name="xpath" use="required">
1091
      <xs:simpleType>
1092
       <xs:annotation>
1093
        <xs:documentation>A subset of XPath expressions for use
1094
in fields</xs:documentation>
1095
        <xs:documentation>A utility type, not for public
1096
use</xs:documentation>
1097
       </xs:annotation>
1098
       <xs:restriction base="xs:token">
1099
        <xs:annotation>
1100
         <xs:documentation>The following pattern is intended to allow XPath
1101
                           expressions per the same EBNF as for selector,
1102
                           with the following change:
1103
          Path    ::=    ('.//')? ( Step '/' )* ( Step | '@' NameTest ) 
1104
         </xs:documentation>
1105
        </xs:annotation>
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*|\*)))))*">
1107
        </xs:pattern>
1108
       </xs:restriction>
1109
      </xs:simpleType>
1110
     </xs:attribute>
1111
   </xs:extension>
1112
  </xs:complexContent>
1113
 </xs:complexType>
1114
 </xs:element>
1115

    
1116
 <xs:complexType name="keybase">
1117
  <xs:complexContent>
1118
   <xs:extension base="xs:annotated">
1119
    <xs:sequence>
1120
     <xs:element ref="xs:selector"/>
1121
     <xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/>
1122
    </xs:sequence>
1123
    <xs:attribute name="name" type="xs:NCName" use="required"/>
1124
   </xs:extension>
1125
  </xs:complexContent>
1126
 </xs:complexType>
1127

    
1128
 <xs:group name="identityConstraint">
1129
  <xs:annotation>
1130
   <xs:documentation>The three kinds of identity constraints, all with
1131
                     type of or derived from 'keybase'.
1132
   </xs:documentation>
1133
  </xs:annotation>
1134
  <xs:choice>
1135
   <xs:element ref="xs:unique"/>
1136
   <xs:element ref="xs:key"/>
1137
   <xs:element ref="xs:keyref"/>
1138
  </xs:choice>
1139
 </xs:group>
1140

    
1141
 <xs:element name="unique" type="xs:keybase" id="unique">
1142
  <xs:annotation>
1143
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>
1144
  </xs:annotation>
1145
 </xs:element>
1146
 <xs:element name="key" type="xs:keybase" id="key">
1147
  <xs:annotation>
1148
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>
1149
  </xs:annotation>
1150
 </xs:element>
1151
 <xs:element name="keyref" id="keyref">
1152
  <xs:annotation>
1153
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>
1154
  </xs:annotation>
1155
  <xs:complexType>
1156
   <xs:complexContent>
1157
    <xs:extension base="xs:keybase">
1158
     <xs:attribute name="refer" type="xs:QName" use="required"/>
1159
    </xs:extension>
1160
   </xs:complexContent>
1161
  </xs:complexType>
1162
 </xs:element>
1163

    
1164
 <xs:element name="notation" id="notation">
1165
  <xs:annotation>
1166
   <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>
1167
  </xs:annotation>
1168
  <xs:complexType>
1169
   <xs:complexContent>
1170
    <xs:extension base="xs:annotated">
1171
     <xs:attribute name="name" type="xs:NCName" use="required"/>
1172
     <xs:attribute name="public" type="xs:public"/>
1173
     <xs:attribute name="system" type="xs:anyURI"/>
1174
    </xs:extension>
1175
   </xs:complexContent>
1176
  </xs:complexType>
1177
 </xs:element>
1178

    
1179
 <xs:simpleType name="public">
1180
  <xs:annotation>
1181
   <xs:documentation>
1182
   A utility type, not for public use</xs:documentation>
1183
   <xs:documentation>
1184
   A public identifier, per ISO 8879</xs:documentation>
1185
  </xs:annotation>
1186
  <xs:restriction base="xs:token"/>
1187
 </xs:simpleType>
1188

    
1189
 <xs:element name="appinfo" id="appinfo">
1190
   <xs:annotation>
1191
     <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/>
1192
   </xs:annotation>
1193
   <xs:complexType mixed="true">
1194
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
1195
     <xs:any processContents="lax"/>
1196
    </xs:sequence>
1197
    <xs:attribute name="source" type="xs:anyURI"/>
1198
    <xs:anyAttribute namespace="##other" processContents="lax"/>
1199
   </xs:complexType>
1200
 </xs:element>
1201

    
1202
 <xs:element name="documentation" id="documentation">
1203
   <xs:annotation>
1204
     <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>
1205
   </xs:annotation>
1206
   <xs:complexType mixed="true">
1207
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
1208
     <xs:any processContents="lax"/>
1209
    </xs:sequence>
1210
    <xs:attribute name="source" type="xs:anyURI"/>
1211
    <xs:attribute ref="xml:lang"/>
1212
    <xs:anyAttribute namespace="##other" processContents="lax"/>
1213
   </xs:complexType>
1214
 </xs:element>
1215

    
1216
 <xs:element name="annotation" id="annotation">
1217
   <xs:annotation>
1218
     <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>
1219
   </xs:annotation>
1220
   <xs:complexType>
1221
    <xs:complexContent>
1222
     <xs:extension base="xs:openAttrs">
1223
      <xs:choice minOccurs="0" maxOccurs="unbounded">
1224
       <xs:element ref="xs:appinfo"/>
1225
       <xs:element ref="xs:documentation"/>
1226
      </xs:choice>
1227
      <xs:attribute name="id" type="xs:ID"/>
1228
     </xs:extension>
1229
    </xs:complexContent>
1230
   </xs:complexType>
1231
 </xs:element>
1232

    
1233
 <xs:annotation>
1234
  <xs:documentation>
1235
   notations for use within XML Schema schemas</xs:documentation>
1236
 </xs:annotation>
1237

    
1238
 <xs:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/>
1239
 <xs:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/>
1240
  
1241
 <xs:complexType name="anyType" mixed="true">
1242
  <xs:annotation>
1243
   <xs:documentation>
1244
   Not the real urType, but as close an approximation as we can
1245
   get in the XML representation</xs:documentation>
1246
  </xs:annotation>
1247
  <xs:sequence>
1248
   <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
1249
  </xs:sequence>
1250
  <xs:anyAttribute processContents="lax"/>
1251
 </xs:complexType>
1252

    
1253
  <xs:annotation>
1254
    <xs:documentation>
1255
      First the built-in primitive datatypes.  These definitions are for
1256
      information only, the real built-in definitions are magic.
1257
    </xs:documentation>
1258

    
1259
    <xs:documentation>
1260
      For each built-in datatype in this schema (both primitive and
1261
      derived) can be uniquely addressed via a URI constructed
1262
      as follows:
1263
        1) the base URI is the URI of the XML Schema namespace
1264
        2) the fragment identifier is the name of the datatype
1265

    
1266
      For example, to address the int datatype, the URI is:
1267

    
1268
        http://www.w3.org/2001/XMLSchema#int
1269

    
1270
      Additionally, each facet definition element can be uniquely
1271
      addressed via a URI constructed as follows:
1272
        1) the base URI is the URI of the XML Schema namespace
1273
        2) the fragment identifier is the name of the facet
1274

    
1275
      For example, to address the maxInclusive facet, the URI is:
1276

    
1277
        http://www.w3.org/2001/XMLSchema#maxInclusive
1278

    
1279
      Additionally, each facet usage in a built-in datatype definition
1280
      can be uniquely addressed via a URI constructed as follows:
1281
        1) the base URI is the URI of the XML Schema namespace
1282
        2) the fragment identifier is the name of the datatype, followed
1283
           by a period (".") followed by the name of the facet
1284

    
1285
      For example, to address the usage of the maxInclusive facet in
1286
      the definition of int, the URI is:
1287

    
1288
        http://www.w3.org/2001/XMLSchema#int.maxInclusive
1289

    
1290
    </xs:documentation>
1291
  </xs:annotation>
1292

    
1293
  <xs:simpleType name="string" id="string">
1294
    <xs:annotation>
1295
      <xs:appinfo>
1296
        <hfp:hasFacet name="length"/>
1297
        <hfp:hasFacet name="minLength"/>
1298
        <hfp:hasFacet name="maxLength"/>
1299
        <hfp:hasFacet name="pattern"/>
1300
        <hfp:hasFacet name="enumeration"/>
1301
        <hfp:hasFacet name="whiteSpace"/>
1302
        <hfp:hasProperty name="ordered" value="false"/>
1303
        <hfp:hasProperty name="bounded" value="false"/>
1304
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1305
        <hfp:hasProperty name="numeric" value="false"/>
1306
      </xs:appinfo>
1307
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#string"/>
1308
    </xs:annotation>
1309
    <xs:restriction base="xs:anySimpleType">
1310
      <xs:whiteSpace value="preserve" id="string.preserve"/>
1311
    </xs:restriction>
1312
  </xs:simpleType>
1313

    
1314
  <xs:simpleType name="boolean" id="boolean">
1315
    <xs:annotation>
1316
      <xs:appinfo>
1317
        <hfp:hasFacet name="pattern"/>
1318
        <hfp:hasFacet name="whiteSpace"/>
1319
        <hfp:hasProperty name="ordered" value="false"/>
1320
        <hfp:hasProperty name="bounded" value="false"/>
1321
        <hfp:hasProperty name="cardinality" value="finite"/>
1322
        <hfp:hasProperty name="numeric" value="false"/>
1323
      </xs:appinfo>
1324
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#boolean"/>
1325
    </xs:annotation>
1326
    <xs:restriction base="xs:anySimpleType">
1327
      <xs:whiteSpace value="collapse" fixed="true" id="boolean.whiteSpace"/>
1328
    </xs:restriction>
1329
  </xs:simpleType>
1330

    
1331
  <xs:simpleType name="float" id="float">
1332
    <xs:annotation>
1333
      <xs:appinfo>
1334
        <hfp:hasFacet name="pattern"/>
1335
        <hfp:hasFacet name="enumeration"/>
1336
        <hfp:hasFacet name="whiteSpace"/>
1337
        <hfp:hasFacet name="maxInclusive"/>
1338
        <hfp:hasFacet name="maxExclusive"/>
1339
        <hfp:hasFacet name="minInclusive"/>
1340
        <hfp:hasFacet name="minExclusive"/>
1341
        <hfp:hasProperty name="ordered" value="total"/>
1342
        <hfp:hasProperty name="bounded" value="true"/>
1343
        <hfp:hasProperty name="cardinality" value="finite"/>
1344
        <hfp:hasProperty name="numeric" value="true"/>
1345
      </xs:appinfo>
1346
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#float"/>
1347
    </xs:annotation>
1348
    <xs:restriction base="xs:anySimpleType">
1349
      <xs:whiteSpace value="collapse" fixed="true" id="float.whiteSpace"/>
1350
    </xs:restriction>
1351
  </xs:simpleType>
1352

    
1353
  <xs:simpleType name="double" id="double">
1354
    <xs:annotation>
1355
      <xs:appinfo>
1356
        <hfp:hasFacet name="pattern"/>
1357
        <hfp:hasFacet name="enumeration"/>
1358
        <hfp:hasFacet name="whiteSpace"/>
1359
        <hfp:hasFacet name="maxInclusive"/>
1360
        <hfp:hasFacet name="maxExclusive"/>
1361
        <hfp:hasFacet name="minInclusive"/>
1362
        <hfp:hasFacet name="minExclusive"/>
1363
        <hfp:hasProperty name="ordered" value="total"/>
1364
        <hfp:hasProperty name="bounded" value="true"/>
1365
        <hfp:hasProperty name="cardinality" value="finite"/>
1366
        <hfp:hasProperty name="numeric" value="true"/>
1367
      </xs:appinfo>
1368
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#double"/>
1369
    </xs:annotation>
1370
    <xs:restriction base="xs:anySimpleType">
1371
      <xs:whiteSpace value="collapse" fixed="true" id="double.whiteSpace"/>
1372
    </xs:restriction>
1373
  </xs:simpleType>
1374

    
1375
  <xs:simpleType name="decimal" id="decimal">
1376
    <xs:annotation>
1377
      <xs:appinfo>
1378
        <hfp:hasFacet name="totalDigits"/>
1379
        <hfp:hasFacet name="fractionDigits"/>
1380
        <hfp:hasFacet name="pattern"/>
1381
        <hfp:hasFacet name="whiteSpace"/>
1382
        <hfp:hasFacet name="enumeration"/>
1383
        <hfp:hasFacet name="maxInclusive"/>
1384
        <hfp:hasFacet name="maxExclusive"/>
1385
        <hfp:hasFacet name="minInclusive"/>
1386
        <hfp:hasFacet name="minExclusive"/>
1387
        <hfp:hasProperty name="ordered" value="total"/>
1388
        <hfp:hasProperty name="bounded" value="false"/>
1389
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1390
        <hfp:hasProperty name="numeric" value="true"/>
1391
      </xs:appinfo>
1392
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
1393
    </xs:annotation>
1394
    <xs:restriction base="xs:anySimpleType">
1395
      <xs:whiteSpace value="collapse" fixed="true" id="decimal.whiteSpace"/>
1396
    </xs:restriction>
1397
   </xs:simpleType>
1398

    
1399
   <xs:simpleType name="duration" id="duration">
1400
    <xs:annotation>
1401
      <xs:appinfo>
1402
        <hfp:hasFacet name="pattern"/>
1403
        <hfp:hasFacet name="enumeration"/>
1404
        <hfp:hasFacet name="whiteSpace"/>
1405
        <hfp:hasFacet name="maxInclusive"/>
1406
        <hfp:hasFacet name="maxExclusive"/>
1407
        <hfp:hasFacet name="minInclusive"/>
1408
        <hfp:hasFacet name="minExclusive"/>
1409
        <hfp:hasProperty name="ordered" value="partial"/>
1410
        <hfp:hasProperty name="bounded" value="false"/>
1411
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1412
        <hfp:hasProperty name="numeric" value="false"/>
1413
      </xs:appinfo>
1414
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#duration"/>
1415
    </xs:annotation>
1416
    <xs:restriction base="xs:anySimpleType">
1417
      <xs:whiteSpace value="collapse" fixed="true" id="duration.whiteSpace"/>
1418
    </xs:restriction>
1419
   </xs:simpleType>
1420

    
1421
 <xs:simpleType name="dateTime" id="dateTime">
1422
    <xs:annotation>
1423
    <xs:appinfo>
1424
        <hfp:hasFacet name="pattern"/>
1425
        <hfp:hasFacet name="enumeration"/>
1426
        <hfp:hasFacet name="whiteSpace"/>
1427
        <hfp:hasFacet name="maxInclusive"/>
1428
        <hfp:hasFacet name="maxExclusive"/>
1429
        <hfp:hasFacet name="minInclusive"/>
1430
        <hfp:hasFacet name="minExclusive"/>
1431
        <hfp:hasProperty name="ordered" value="partial"/>
1432
        <hfp:hasProperty name="bounded" value="false"/>
1433
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1434
        <hfp:hasProperty name="numeric" value="false"/>
1435
      </xs:appinfo>
1436
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>
1437
    </xs:annotation>
1438
    <xs:restriction base="xs:anySimpleType">
1439
      <xs:whiteSpace value="collapse" fixed="true" id="dateTime.whiteSpace"/>
1440
    </xs:restriction>
1441
  </xs:simpleType>
1442

    
1443
  <xs:simpleType name="time" id="time">
1444
    <xs:annotation>
1445
    <xs:appinfo>
1446
        <hfp:hasFacet name="pattern"/>
1447
        <hfp:hasFacet name="enumeration"/>
1448
        <hfp:hasFacet name="whiteSpace"/>
1449
        <hfp:hasFacet name="maxInclusive"/>
1450
        <hfp:hasFacet name="maxExclusive"/>
1451
        <hfp:hasFacet name="minInclusive"/>
1452
        <hfp:hasFacet name="minExclusive"/>
1453
        <hfp:hasProperty name="ordered" value="partial"/>
1454
        <hfp:hasProperty name="bounded" value="false"/>
1455
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1456
        <hfp:hasProperty name="numeric" value="false"/>
1457
      </xs:appinfo>
1458
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#time"/>
1459
    </xs:annotation>
1460
    <xs:restriction base="xs:anySimpleType">
1461
      <xs:whiteSpace value="collapse" fixed="true" id="time.whiteSpace"/>
1462
    </xs:restriction>
1463
  </xs:simpleType>
1464

    
1465
  <xs:simpleType name="date" id="date">
1466
   <xs:annotation>
1467
    <xs:appinfo>
1468
        <hfp:hasFacet name="pattern"/>
1469
        <hfp:hasFacet name="enumeration"/>
1470
        <hfp:hasFacet name="whiteSpace"/>
1471
        <hfp:hasFacet name="maxInclusive"/>
1472
        <hfp:hasFacet name="maxExclusive"/>
1473
        <hfp:hasFacet name="minInclusive"/>
1474
        <hfp:hasFacet name="minExclusive"/>
1475
        <hfp:hasProperty name="ordered" value="partial"/>
1476
        <hfp:hasProperty name="bounded" value="false"/>
1477
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1478
        <hfp:hasProperty name="numeric" value="false"/>
1479
      </xs:appinfo>
1480
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#date"/>
1481
    </xs:annotation>
1482
    <xs:restriction base="xs:anySimpleType">
1483
      <xs:whiteSpace value="collapse" fixed="true" id="date.whiteSpace"/>
1484
    </xs:restriction>
1485
  </xs:simpleType>
1486

    
1487
  <xs:simpleType name="gYearMonth" id="gYearMonth">
1488
   <xs:annotation>
1489
    <xs:appinfo>
1490
        <hfp:hasFacet name="pattern"/>
1491
        <hfp:hasFacet name="enumeration"/>
1492
        <hfp:hasFacet name="whiteSpace"/>
1493
        <hfp:hasFacet name="maxInclusive"/>
1494
        <hfp:hasFacet name="maxExclusive"/>
1495
        <hfp:hasFacet name="minInclusive"/>
1496
        <hfp:hasFacet name="minExclusive"/>
1497
        <hfp:hasProperty name="ordered" value="partial"/>
1498
        <hfp:hasProperty name="bounded" value="false"/>
1499
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1500
        <hfp:hasProperty name="numeric" value="false"/>
1501
      </xs:appinfo>
1502
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>
1503
    </xs:annotation>
1504
    <xs:restriction base="xs:anySimpleType">
1505
      <xs:whiteSpace value="collapse" fixed="true" id="gYearMonth.whiteSpace"/>
1506
    </xs:restriction>
1507
  </xs:simpleType>
1508

    
1509
  <xs:simpleType name="gYear" id="gYear">
1510
    <xs:annotation>
1511
    <xs:appinfo>
1512
        <hfp:hasFacet name="pattern"/>
1513
        <hfp:hasFacet name="enumeration"/>
1514
        <hfp:hasFacet name="whiteSpace"/>
1515
        <hfp:hasFacet name="maxInclusive"/>
1516
        <hfp:hasFacet name="maxExclusive"/>
1517
        <hfp:hasFacet name="minInclusive"/>
1518
        <hfp:hasFacet name="minExclusive"/>
1519
        <hfp:hasProperty name="ordered" value="partial"/>
1520
        <hfp:hasProperty name="bounded" value="false"/>
1521
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1522
        <hfp:hasProperty name="numeric" value="false"/>
1523
      </xs:appinfo>
1524
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gYear"/>
1525
    </xs:annotation>
1526
    <xs:restriction base="xs:anySimpleType">
1527
      <xs:whiteSpace value="collapse" fixed="true" id="gYear.whiteSpace"/>
1528
    </xs:restriction>
1529
  </xs:simpleType>
1530

    
1531
 <xs:simpleType name="gMonthDay" id="gMonthDay">
1532
    <xs:annotation>
1533
      <xs:appinfo>
1534
        <hfp:hasFacet name="pattern"/>
1535
        <hfp:hasFacet name="enumeration"/>
1536
        <hfp:hasFacet name="whiteSpace"/>
1537
        <hfp:hasFacet name="maxInclusive"/>
1538
        <hfp:hasFacet name="maxExclusive"/>
1539
        <hfp:hasFacet name="minInclusive"/>
1540
        <hfp:hasFacet name="minExclusive"/>
1541
        <hfp:hasProperty name="ordered" value="partial"/>
1542
        <hfp:hasProperty name="bounded" value="false"/>
1543
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1544
        <hfp:hasProperty name="numeric" value="false"/>
1545
      </xs:appinfo>
1546
       <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>
1547
    </xs:annotation>
1548
    <xs:restriction base="xs:anySimpleType">
1549
         <xs:whiteSpace value="collapse" fixed="true" id="gMonthDay.whiteSpace"/>
1550
    </xs:restriction>
1551
  </xs:simpleType>
1552

    
1553
  <xs:simpleType name="gDay" id="gDay">
1554
    <xs:annotation>
1555
  <xs:appinfo>
1556
        <hfp:hasFacet name="pattern"/>
1557
        <hfp:hasFacet name="enumeration"/>
1558
        <hfp:hasFacet name="whiteSpace"/>
1559
        <hfp:hasFacet name="maxInclusive"/>
1560
        <hfp:hasFacet name="maxExclusive"/>
1561
        <hfp:hasFacet name="minInclusive"/>
1562
        <hfp:hasFacet name="minExclusive"/>
1563
        <hfp:hasProperty name="ordered" value="partial"/>
1564
        <hfp:hasProperty name="bounded" value="false"/>
1565
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1566
        <hfp:hasProperty name="numeric" value="false"/>
1567
      </xs:appinfo>
1568
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gDay"/>
1569
    </xs:annotation>
1570
    <xs:restriction base="xs:anySimpleType">
1571
         <xs:whiteSpace value="collapse" fixed="true" id="gDay.whiteSpace"/>
1572
    </xs:restriction>
1573
  </xs:simpleType>
1574

    
1575
 <xs:simpleType name="gMonth" id="gMonth">
1576
    <xs:annotation>
1577
  <xs:appinfo>
1578
        <hfp:hasFacet name="pattern"/>
1579
        <hfp:hasFacet name="enumeration"/>
1580
        <hfp:hasFacet name="whiteSpace"/>
1581
        <hfp:hasFacet name="maxInclusive"/>
1582
        <hfp:hasFacet name="maxExclusive"/>
1583
        <hfp:hasFacet name="minInclusive"/>
1584
        <hfp:hasFacet name="minExclusive"/>
1585
        <hfp:hasProperty name="ordered" value="partial"/>
1586
        <hfp:hasProperty name="bounded" value="false"/>
1587
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1588
        <hfp:hasProperty name="numeric" value="false"/>
1589
      </xs:appinfo>
1590
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>
1591
    </xs:annotation>
1592
    <xs:restriction base="xs:anySimpleType">
1593
         <xs:whiteSpace value="collapse" fixed="true" id="gMonth.whiteSpace"/>
1594
    </xs:restriction>
1595
  </xs:simpleType>
1596

    
1597
   <xs:simpleType name="hexBinary" id="hexBinary">
1598
    <xs:annotation>
1599
      <xs:appinfo>
1600
        <hfp:hasFacet name="length"/>
1601
        <hfp:hasFacet name="minLength"/>
1602
        <hfp:hasFacet name="maxLength"/>
1603
        <hfp:hasFacet name="pattern"/>
1604
        <hfp:hasFacet name="enumeration"/>
1605
        <hfp:hasFacet name="whiteSpace"/>
1606
        <hfp:hasProperty name="ordered" value="false"/>
1607
        <hfp:hasProperty name="bounded" value="false"/>
1608
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1609
        <hfp:hasProperty name="numeric" value="false"/>
1610
      </xs:appinfo>
1611
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#binary"/>
1612
    </xs:annotation>
1613
    <xs:restriction base="xs:anySimpleType">
1614
      <xs:whiteSpace value="collapse" fixed="true" id="hexBinary.whiteSpace"/>
1615
    </xs:restriction>
1616
   </xs:simpleType>
1617

    
1618
 <xs:simpleType name="base64Binary" id="base64Binary">
1619
    <xs:annotation>
1620
      <xs:appinfo>
1621
        <hfp:hasFacet name="length"/>
1622
        <hfp:hasFacet name="minLength"/>
1623
        <hfp:hasFacet name="maxLength"/>
1624
        <hfp:hasFacet name="pattern"/>
1625
        <hfp:hasFacet name="enumeration"/>
1626
        <hfp:hasFacet name="whiteSpace"/>
1627
        <hfp:hasProperty name="ordered" value="false"/>
1628
        <hfp:hasProperty name="bounded" value="false"/>
1629
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1630
        <hfp:hasProperty name="numeric" value="false"/>
1631
      </xs:appinfo>
1632
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>
1633
    </xs:annotation>
1634
    <xs:restriction base="xs:anySimpleType">
1635
      <xs:whiteSpace value="collapse" fixed="true" id="base64Binary.whiteSpace"/>
1636
    </xs:restriction>
1637
   </xs:simpleType>
1638

    
1639
   <xs:simpleType name="anyURI" id="anyURI">
1640
    <xs:annotation>
1641
      <xs:appinfo>
1642
        <hfp:hasFacet name="length"/>
1643
        <hfp:hasFacet name="minLength"/>
1644
        <hfp:hasFacet name="maxLength"/>
1645
        <hfp:hasFacet name="pattern"/>
1646
        <hfp:hasFacet name="enumeration"/>
1647
        <hfp:hasFacet name="whiteSpace"/>
1648
        <hfp:hasProperty name="ordered" value="false"/>
1649
        <hfp:hasProperty name="bounded" value="false"/>
1650
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1651
        <hfp:hasProperty name="numeric" value="false"/>
1652
      </xs:appinfo>
1653
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>
1654
    </xs:annotation>
1655
    <xs:restriction base="xs:anySimpleType">
1656
      <xs:whiteSpace value="collapse" fixed="true" id="anyURI.whiteSpace"/>
1657
    </xs:restriction>
1658
   </xs:simpleType>
1659

    
1660
  <xs:simpleType name="QName" id="QName">
1661
    <xs:annotation>
1662
        <xs:appinfo>
1663
        <hfp:hasFacet name="length"/>
1664
        <hfp:hasFacet name="minLength"/>
1665
        <hfp:hasFacet name="maxLength"/>
1666
        <hfp:hasFacet name="pattern"/>
1667
        <hfp:hasFacet name="enumeration"/>
1668
        <hfp:hasFacet name="whiteSpace"/>
1669
        <hfp:hasProperty name="ordered" value="false"/>
1670
        <hfp:hasProperty name="bounded" value="false"/>
1671
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1672
        <hfp:hasProperty name="numeric" value="false"/>
1673
      </xs:appinfo>
1674
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#QName"/>
1675
    </xs:annotation>
1676
    <xs:restriction base="xs:anySimpleType">
1677
      <xs:whiteSpace value="collapse" fixed="true" id="QName.whiteSpace"/>
1678
    </xs:restriction>
1679
  </xs:simpleType>
1680

    
1681
   <xs:simpleType name="NOTATION" id="NOTATION">
1682
    <xs:annotation>
1683
        <xs:appinfo>
1684
        <hfp:hasFacet name="length"/>
1685
        <hfp:hasFacet name="minLength"/>
1686
        <hfp:hasFacet name="maxLength"/>
1687
        <hfp:hasFacet name="pattern"/>
1688
        <hfp:hasFacet name="enumeration"/>
1689
        <hfp:hasFacet name="whiteSpace"/>
1690
        <hfp:hasProperty name="ordered" value="false"/>
1691
        <hfp:hasProperty name="bounded" value="false"/>
1692
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1693
        <hfp:hasProperty name="numeric" value="false"/>
1694
      </xs:appinfo>
1695
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>
1696
      <xs:documentation>
1697
        NOTATION cannot be used directly in a schema; rather a type
1698
        must be derived from it by specifying at least one enumeration
1699
        facet whose value is the name of a NOTATION declared in the
1700
        schema.
1701
      </xs:documentation>
1702
    </xs:annotation>
1703
    <xs:restriction base="xs:anySimpleType">
1704
      <xs:whiteSpace value="collapse" fixed="true" id="NOTATION.whiteSpace"/>
1705
    </xs:restriction>
1706
  </xs:simpleType>
1707

    
1708
  <xs:annotation>
1709
    <xs:documentation>
1710
      Now the derived primitive types
1711
    </xs:documentation>
1712
  </xs:annotation>
1713

    
1714
  <xs:simpleType name="normalizedString" id="normalizedString">
1715
    <xs:annotation>
1716
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
1717
    </xs:annotation>
1718
    <xs:restriction base="xs:string">
1719
      <xs:whiteSpace value="replace" id="normalizedString.whiteSpace"/>
1720
    </xs:restriction>
1721
  </xs:simpleType>
1722

    
1723
  <xs:simpleType name="token" id="token">
1724
    <xs:annotation>
1725
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#token"/>
1726
    </xs:annotation>
1727
    <xs:restriction base="xs:normalizedString">
1728
      <xs:whiteSpace value="collapse" id="token.whiteSpace"/>
1729
    </xs:restriction>
1730
  </xs:simpleType>
1731

    
1732
  <xs:simpleType name="language" id="language">
1733
    <xs:annotation>
1734
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#language"/>
1735
    </xs:annotation>
1736
    <xs:restriction base="xs:token">
1737
      <xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" id="language.pattern">
1738
        <xs:annotation>
1739
          <xs:documentation source="http://www.ietf.org/rfc/rfc3066.txt">
1740
            pattern specifies the content of section 2.12 of XML 1.0e2
1741
            and RFC 3066 (Revised version of RFC 1766).
1742
          </xs:documentation>
1743
        </xs:annotation>
1744
      </xs:pattern>
1745
    </xs:restriction>
1746
  </xs:simpleType>
1747

    
1748
  <xs:simpleType name="IDREFS" id="IDREFS">
1749
    <xs:annotation>
1750
      <xs:appinfo>
1751
        <hfp:hasFacet name="length"/>
1752
        <hfp:hasFacet name="minLength"/>
1753
        <hfp:hasFacet name="maxLength"/>
1754
        <hfp:hasFacet name="enumeration"/>
1755
        <hfp:hasFacet name="whiteSpace"/>
1756
        <hfp:hasFacet name="pattern"/>
1757
        <hfp:hasProperty name="ordered" value="false"/>
1758
        <hfp:hasProperty name="bounded" value="false"/>
1759
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1760
        <hfp:hasProperty name="numeric" value="false"/>
1761
      </xs:appinfo>
1762
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
1763
    </xs:annotation>
1764
    <xs:restriction>
1765
      <xs:simpleType>
1766
        <xs:list itemType="xs:IDREF"/>
1767
      </xs:simpleType>
1768
        <xs:minLength value="1" id="IDREFS.minLength"/>
1769
    </xs:restriction>
1770
  </xs:simpleType>
1771

    
1772
  <xs:simpleType name="ENTITIES" id="ENTITIES">
1773
    <xs:annotation>
1774
      <xs:appinfo>
1775
        <hfp:hasFacet name="length"/>
1776
        <hfp:hasFacet name="minLength"/>
1777
        <hfp:hasFacet name="maxLength"/>
1778
        <hfp:hasFacet name="enumeration"/>
1779
        <hfp:hasFacet name="whiteSpace"/>
1780
        <hfp:hasFacet name="pattern"/>
1781
        <hfp:hasProperty name="ordered" value="false"/>
1782
        <hfp:hasProperty name="bounded" value="false"/>
1783
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1784
        <hfp:hasProperty name="numeric" value="false"/>
1785
      </xs:appinfo>
1786
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
1787
    </xs:annotation>
1788
    <xs:restriction>
1789
      <xs:simpleType>
1790
        <xs:list itemType="xs:ENTITY"/>
1791
      </xs:simpleType>
1792
        <xs:minLength value="1" id="ENTITIES.minLength"/>
1793
    </xs:restriction>
1794
  </xs:simpleType>
1795

    
1796
  <xs:simpleType name="NMTOKEN" id="NMTOKEN">
1797
    <xs:annotation>
1798
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>
1799
    </xs:annotation>
1800
    <xs:restriction base="xs:token">
1801
      <xs:pattern value="\c+" id="NMTOKEN.pattern">
1802
        <xs:annotation>
1803
          <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
1804
            pattern matches production 7 from the XML spec
1805
          </xs:documentation>
1806
        </xs:annotation>
1807
      </xs:pattern>
1808
    </xs:restriction>
1809
  </xs:simpleType>
1810

    
1811
  <xs:simpleType name="NMTOKENS" id="NMTOKENS">
1812
    <xs:annotation>
1813
      <xs:appinfo>
1814
        <hfp:hasFacet name="length"/>
1815
        <hfp:hasFacet name="minLength"/>
1816
        <hfp:hasFacet name="maxLength"/>
1817
        <hfp:hasFacet name="enumeration"/>
1818
        <hfp:hasFacet name="whiteSpace"/>
1819
        <hfp:hasFacet name="pattern"/>
1820
        <hfp:hasProperty name="ordered" value="false"/>
1821
        <hfp:hasProperty name="bounded" value="false"/>
1822
        <hfp:hasProperty name="cardinality" value="countably infinite"/>
1823
        <hfp:hasProperty name="numeric" value="false"/>
1824
      </xs:appinfo>
1825
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
1826
    </xs:annotation>
1827
    <xs:restriction>
1828
      <xs:simpleType>
1829
        <xs:list itemType="xs:NMTOKEN"/>
1830
      </xs:simpleType>
1831
        <xs:minLength value="1" id="NMTOKENS.minLength"/>
1832
    </xs:restriction>
1833
  </xs:simpleType>
1834

    
1835
  <xs:simpleType name="Name" id="Name">
1836
    <xs:annotation>
1837
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#Name"/>
1838
    </xs:annotation>
1839
    <xs:restriction base="xs:token">
1840
      <xs:pattern value="\i\c*" id="Name.pattern">
1841
        <xs:annotation>
1842
          <xs:documentation source="http://www.w3.org/TR/REC-xml#NT-Name">
1843
            pattern matches production 5 from the XML spec
1844
          </xs:documentation>
1845
        </xs:annotation>
1846
      </xs:pattern>
1847
    </xs:restriction>
1848
  </xs:simpleType>
1849

    
1850
  <xs:simpleType name="NCName" id="NCName">
1851
    <xs:annotation>
1852
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#NCName"/>
1853
    </xs:annotation>
1854
    <xs:restriction base="xs:Name">
1855
      <xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">
1856
        <xs:annotation>
1857
          <xs:documentation source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">
1858
            pattern matches production 4 from the Namespaces in XML spec
1859
          </xs:documentation>
1860
        </xs:annotation>
1861
      </xs:pattern>
1862
    </xs:restriction>
1863
  </xs:simpleType>
1864

    
1865
   <xs:simpleType name="ID" id="ID">
1866
    <xs:annotation>
1867
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ID"/>
1868
    </xs:annotation>
1869
    <xs:restriction base="xs:NCName"/>
1870
   </xs:simpleType>
1871

    
1872
   <xs:simpleType name="IDREF" id="IDREF">
1873
    <xs:annotation>
1874
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#IDREF"/>
1875
    </xs:annotation>
1876
    <xs:restriction base="xs:NCName"/>
1877
   </xs:simpleType>
1878

    
1879
   <xs:simpleType name="ENTITY" id="ENTITY">
1880
    <xs:annotation>
1881
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/>
1882
    </xs:annotation>
1883
    <xs:restriction base="xs:NCName"/>
1884
   </xs:simpleType>
1885

    
1886
  <xs:simpleType name="integer" id="integer">
1887
    <xs:annotation>
1888
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#integer"/>
1889
    </xs:annotation>
1890
    <xs:restriction base="xs:decimal">
1891
      <xs:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/>
1892
      <xs:pattern value="[\-+]?[0-9]+"/>
1893
    </xs:restriction>
1894
  </xs:simpleType>
1895

    
1896
  <xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger">
1897
    <xs:annotation>
1898
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/>
1899
    </xs:annotation>
1900
    <xs:restriction base="xs:integer">
1901
      <xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/>
1902
    </xs:restriction>
1903
  </xs:simpleType>
1904

    
1905
  <xs:simpleType name="negativeInteger" id="negativeInteger">
1906
    <xs:annotation>
1907
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/>
1908
    </xs:annotation>
1909
    <xs:restriction base="xs:nonPositiveInteger">
1910
      <xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/>
1911
    </xs:restriction>
1912
  </xs:simpleType>
1913

    
1914
  <xs:simpleType name="long" id="long">
1915
    <xs:annotation>
1916
      <xs:appinfo>
1917
        <hfp:hasProperty name="bounded" value="true"/>
1918
        <hfp:hasProperty name="cardinality" value="finite"/>
1919
      </xs:appinfo>
1920
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#long"/>
1921
    </xs:annotation>
1922
    <xs:restriction base="xs:integer">
1923
      <xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/>
1924
      <xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/>
1925
    </xs:restriction>
1926
  </xs:simpleType>
1927

    
1928
  <xs:simpleType name="int" id="int">
1929
    <xs:annotation>
1930
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#int"/>
1931
    </xs:annotation>
1932
    <xs:restriction base="xs:long">
1933
      <xs:minInclusive value="-2147483648" id="int.minInclusive"/>
1934
      <xs:maxInclusive value="2147483647" id="int.maxInclusive"/>
1935
    </xs:restriction>
1936
  </xs:simpleType>
1937

    
1938
  <xs:simpleType name="short" id="short">
1939
    <xs:annotation>
1940
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#short"/>
1941
    </xs:annotation>
1942
    <xs:restriction base="xs:int">
1943
      <xs:minInclusive value="-32768" id="short.minInclusive"/>
1944
      <xs:maxInclusive value="32767" id="short.maxInclusive"/>
1945
    </xs:restriction>
1946
  </xs:simpleType>
1947

    
1948
  <xs:simpleType name="byte" id="byte">
1949
    <xs:annotation>
1950
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#byte"/>
1951
    </xs:annotation>
1952
    <xs:restriction base="xs:short">
1953
      <xs:minInclusive value="-128" id="byte.minInclusive"/>
1954
      <xs:maxInclusive value="127" id="byte.maxInclusive"/>
1955
    </xs:restriction>
1956
  </xs:simpleType>
1957

    
1958
  <xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger">
1959
    <xs:annotation>
1960
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/>
1961
    </xs:annotation>
1962
    <xs:restriction base="xs:integer">
1963
      <xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>
1964
    </xs:restriction>
1965
  </xs:simpleType>
1966

    
1967
  <xs:simpleType name="unsignedLong" id="unsignedLong">
1968
    <xs:annotation>
1969
      <xs:appinfo>
1970
        <hfp:hasProperty name="bounded" value="true"/>
1971
        <hfp:hasProperty name="cardinality" value="finite"/>
1972
      </xs:appinfo>
1973
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/>
1974
    </xs:annotation>
1975
    <xs:restriction base="xs:nonNegativeInteger">
1976
      <xs:maxInclusive value="18446744073709551615" id="unsignedLong.maxInclusive"/>
1977
    </xs:restriction>
1978
  </xs:simpleType>
1979

    
1980
  <xs:simpleType name="unsignedInt" id="unsignedInt">
1981
    <xs:annotation>
1982
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/>
1983
    </xs:annotation>
1984
    <xs:restriction base="xs:unsignedLong">
1985
      <xs:maxInclusive value="4294967295" id="unsignedInt.maxInclusive"/>
1986
    </xs:restriction>
1987
  </xs:simpleType>
1988

    
1989
  <xs:simpleType name="unsignedShort" id="unsignedShort">
1990
    <xs:annotation>
1991
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/>
1992
    </xs:annotation>
1993
    <xs:restriction base="xs:unsignedInt">
1994
      <xs:maxInclusive value="65535" id="unsignedShort.maxInclusive"/>
1995
    </xs:restriction>
1996
  </xs:simpleType>
1997

    
1998
  <xs:simpleType name="unsignedByte" id="unsignedByte">
1999
    <xs:annotation>
2000
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/>
2001
    </xs:annotation>
2002
    <xs:restriction base="xs:unsignedShort">
2003
      <xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/>
2004
    </xs:restriction>
2005
  </xs:simpleType>
2006

    
2007
  <xs:simpleType name="positiveInteger" id="positiveInteger">
2008
    <xs:annotation>
2009
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/>
2010
    </xs:annotation>
2011
    <xs:restriction base="xs:nonNegativeInteger">
2012
      <xs:minInclusive value="1" id="positiveInteger.minInclusive"/>
2013
    </xs:restriction>
2014
  </xs:simpleType>
2015

    
2016
 <xs:simpleType name="derivationControl">
2017
  <xs:annotation>
2018
   <xs:documentation>
2019
   A utility type, not for public use</xs:documentation>
2020
  </xs:annotation>
2021
  <xs:restriction base="xs:NMTOKEN">
2022
   <xs:enumeration value="substitution"/>
2023
   <xs:enumeration value="extension"/>
2024
   <xs:enumeration value="restriction"/>
2025
   <xs:enumeration value="list"/>
2026
   <xs:enumeration value="union"/>
2027
  </xs:restriction>
2028
 </xs:simpleType>
2029

    
2030
 <xs:group name="simpleDerivation">
2031
  <xs:choice>
2032
    <xs:element ref="xs:restriction"/>
2033
    <xs:element ref="xs:list"/>
2034
    <xs:element ref="xs:union"/>
2035
  </xs:choice>
2036
 </xs:group>
2037

    
2038
 <xs:simpleType name="simpleDerivationSet">
2039
  <xs:annotation>
2040
   <xs:documentation>
2041
   #all or (possibly empty) subset of {restriction, union, list}
2042
   </xs:documentation>
2043
   <xs:documentation>
2044
   A utility type, not for public use</xs:documentation>
2045
  </xs:annotation>
2046
  <xs:union>
2047
   <xs:simpleType>
2048
    <xs:restriction base="xs:token">
2049
     <xs:enumeration value="#all"/>
2050
    </xs:restriction>
2051
   </xs:simpleType>
2052
   <xs:simpleType>
2053
    <xs:list>
2054
     <xs:simpleType>
2055
      <xs:restriction base="xs:derivationControl">
2056
       <xs:enumeration value="list"/>
2057
       <xs:enumeration value="union"/>
2058
       <xs:enumeration value="restriction"/>
2059
      </xs:restriction>
2060
     </xs:simpleType>
2061
    </xs:list>
2062
   </xs:simpleType>
2063
  </xs:union>
2064
 </xs:simpleType>
2065

    
2066
  <xs:complexType name="simpleType" abstract="true">
2067
    <xs:complexContent>
2068
      <xs:extension base="xs:annotated">
2069
        <xs:group ref="xs:simpleDerivation"/>
2070
        <xs:attribute name="final" type="xs:simpleDerivationSet"/>
2071
        <xs:attribute name="name" type="xs:NCName">
2072
          <xs:annotation>
2073
            <xs:documentation>
2074
              Can be restricted to required or forbidden
2075
            </xs:documentation>
2076
          </xs:annotation>
2077
        </xs:attribute>
2078
      </xs:extension>
2079
    </xs:complexContent>
2080
  </xs:complexType>
2081

    
2082
  <xs:complexType name="topLevelSimpleType">
2083
    <xs:complexContent>
2084
      <xs:restriction base="xs:simpleType">
2085
        <xs:sequence>
2086
          <xs:element ref="xs:annotation" minOccurs="0"/>
2087
          <xs:group ref="xs:simpleDerivation"/>
2088
        </xs:sequence>
2089
        <xs:attribute name="name" use="required" type="xs:NCName">
2090
          <xs:annotation>
2091
            <xs:documentation>
2092
              Required at the top level
2093
            </xs:documentation>
2094
          </xs:annotation>
2095
        </xs:attribute>
2096
       <xs:anyAttribute namespace="##other" processContents="lax"/>
2097
      </xs:restriction>
2098
    </xs:complexContent>
2099
  </xs:complexType>
2100

    
2101
  <xs:complexType name="localSimpleType">
2102
    <xs:complexContent>
2103
      <xs:restriction base="xs:simpleType">
2104
        <xs:sequence>
2105
          <xs:element ref="xs:annotation" minOccurs="0"/>
2106
          <xs:group ref="xs:simpleDerivation"/>
2107
        </xs:sequence>
2108
        <xs:attribute name="name" use="prohibited">
2109
          <xs:annotation>
2110
            <xs:documentation>
2111
              Forbidden when nested
2112
            </xs:documentation>
2113
          </xs:annotation>
2114
        </xs:attribute>
2115
        <xs:attribute name="final" use="prohibited"/>
2116
       <xs:anyAttribute namespace="##other" processContents="lax"/>
2117
      </xs:restriction>
2118
    </xs:complexContent>
2119
  </xs:complexType>
2120

    
2121
  <xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType">
2122
    <xs:annotation>
2123
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>
2124
    </xs:annotation>
2125
  </xs:element>
2126

    
2127
  <xs:group name="facets">
2128
   <xs:annotation>
2129
    <xs:documentation>
2130
       We should use a substitution group for facets, but
2131
       that's ruled out because it would allow users to
2132
       add their own, which we're not ready for yet.
2133
    </xs:documentation>
2134
   </xs:annotation>
2135
   <xs:choice>
2136
    <xs:element ref="xs:minExclusive"/>
2137
    <xs:element ref="xs:minInclusive"/>
2138
    <xs:element ref="xs:maxExclusive"/>
2139
    <xs:element ref="xs:maxInclusive"/>
2140
    <xs:element ref="xs:totalDigits"/>
2141
    <xs:element ref="xs:fractionDigits"/>
2142
    <xs:element ref="xs:length"/>
2143
    <xs:element ref="xs:minLength"/>
2144
    <xs:element ref="xs:maxLength"/>
2145
    <xs:element ref="xs:enumeration"/>
2146
    <xs:element ref="xs:whiteSpace"/>
2147
    <xs:element ref="xs:pattern"/>
2148
   </xs:choice>
2149
  </xs:group>
2150

    
2151
  <xs:group name="simpleRestrictionModel">
2152
   <xs:sequence>
2153
    <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>
2154
    <xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/>
2155
   </xs:sequence>
2156
  </xs:group>
2157

    
2158
  <xs:element name="restriction" id="restriction">
2159
   <xs:complexType>
2160
    <xs:annotation>
2161
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-restriction">
2162
          base attribute and simpleType child are mutually
2163
          exclusive, but one or other is required
2164
        </xs:documentation>
2165
      </xs:annotation>
2166
      <xs:complexContent>
2167
        <xs:extension base="xs:annotated">
2168
         <xs:group ref="xs:simpleRestrictionModel"/>
2169
         <xs:attribute name="base" type="xs:QName" use="optional"/>
2170
        </xs:extension>
2171
      </xs:complexContent>
2172
    </xs:complexType>
2173
  </xs:element>
2174

    
2175
  <xs:element name="list" id="list">
2176
   <xs:complexType>
2177
    <xs:annotation>
2178
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-list">
2179
          itemType attribute and simpleType child are mutually
2180
          exclusive, but one or other is required
2181
        </xs:documentation>
2182
      </xs:annotation>
2183
      <xs:complexContent>
2184
        <xs:extension base="xs:annotated">
2185
          <xs:sequence>
2186
            <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>
2187
          </xs:sequence>
2188
          <xs:attribute name="itemType" type="xs:QName" use="optional"/>
2189
        </xs:extension>
2190
      </xs:complexContent>
2191
    </xs:complexType>
2192
  </xs:element>
2193

    
2194
  <xs:element name="union" id="union">
2195
   <xs:complexType>
2196
    <xs:annotation>
2197
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-union">
2198
          memberTypes attribute must be non-empty or there must be
2199
          at least one simpleType child
2200
        </xs:documentation>
2201
      </xs:annotation>
2202
      <xs:complexContent>
2203
        <xs:extension base="xs:annotated">
2204
          <xs:sequence>
2205
            <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0" maxOccurs="unbounded"/>
2206
          </xs:sequence>
2207
          <xs:attribute name="memberTypes" use="optional">
2208
            <xs:simpleType>
2209
              <xs:list itemType="xs:QName"/>
2210
            </xs:simpleType>
2211
          </xs:attribute>
2212
        </xs:extension>
2213
      </xs:complexContent>
2214
    </xs:complexType>
2215
  </xs:element>
2216

    
2217
  <xs:complexType name="facet">
2218
    <xs:complexContent>
2219
      <xs:extension base="xs:annotated">
2220
        <xs:attribute name="value" use="required"/>
2221
        <xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
2222
      </xs:extension>
2223
    </xs:complexContent>
2224
  </xs:complexType>
2225

    
2226
 <xs:complexType name="noFixedFacet">
2227
  <xs:complexContent>
2228
   <xs:restriction base="xs:facet">
2229
    <xs:sequence>
2230
     <xs:element ref="xs:annotation" minOccurs="0"/>
2231
    </xs:sequence>
2232
    <xs:attribute name="fixed" use="prohibited"/>
2233
    <xs:anyAttribute namespace="##other" processContents="lax"/>
2234
   </xs:restriction>
2235
  </xs:complexContent>
2236
 </xs:complexType>
2237

    
2238
  <xs:element name="minExclusive" id="minExclusive" type="xs:facet">
2239
    <xs:annotation>
2240
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/>
2241
    </xs:annotation>
2242
  </xs:element>
2243
  <xs:element name="minInclusive" id="minInclusive" type="xs:facet">
2244
    <xs:annotation>
2245
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/>
2246
    </xs:annotation>
2247
  </xs:element>
2248

    
2249
  <xs:element name="maxExclusive" id="maxExclusive" type="xs:facet">
2250
    <xs:annotation>
2251
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/>
2252
    </xs:annotation>
2253
  </xs:element>
2254
  <xs:element name="maxInclusive" id="maxInclusive" type="xs:facet">
2255
    <xs:annotation>
2256
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/>
2257
    </xs:annotation>
2258
  </xs:element>
2259

    
2260
  <xs:complexType name="numFacet">
2261
    <xs:complexContent>
2262
      <xs:restriction base="xs:facet">
2263
       <xs:sequence>
2264
         <xs:element ref="xs:annotation" minOccurs="0"/>
2265
       </xs:sequence>
2266
       <xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/>
2267
       <xs:anyAttribute namespace="##other" processContents="lax"/>
2268
      </xs:restriction>
2269
    </xs:complexContent>
2270
  </xs:complexType>
2271

    
2272
  <xs:element name="totalDigits" id="totalDigits">
2273
    <xs:annotation>
2274
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>
2275
    </xs:annotation>
2276
    <xs:complexType>
2277
      <xs:complexContent>
2278
        <xs:restriction base="xs:numFacet">
2279
          <xs:sequence>
2280
            <xs:element ref="xs:annotation" minOccurs="0"/>
2281
          </xs:sequence>
2282
          <xs:attribute name="value" type="xs:positiveInteger" use="required"/>
2283
         <xs:anyAttribute namespace="##other" processContents="lax"/>
2284
        </xs:restriction>
2285
      </xs:complexContent>
2286
    </xs:complexType>
2287
  </xs:element>
2288
  <xs:element name="fractionDigits" id="fractionDigits" type="xs:numFacet">
2289
    <xs:annotation>
2290
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>
2291
    </xs:annotation>
2292
  </xs:element>
2293

    
2294
  <xs:element name="length" id="length" type="xs:numFacet">
2295
    <xs:annotation>
2296
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-length"/>
2297
    </xs:annotation>
2298
  </xs:element>
2299
  <xs:element name="minLength" id="minLength" type="xs:numFacet">
2300
    <xs:annotation>
2301
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>
2302
    </xs:annotation>
2303
  </xs:element>
2304
  <xs:element name="maxLength" id="maxLength" type="xs:numFacet">
2305
    <xs:annotation>
2306
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>
2307
    </xs:annotation>
2308
  </xs:element>
2309

    
2310
  <xs:element name="enumeration" id="enumeration" type="xs:noFixedFacet">
2311
    <xs:annotation>
2312
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/>
2313
    </xs:annotation>
2314
  </xs:element>
2315

    
2316
  <xs:element name="whiteSpace" id="whiteSpace">
2317
    <xs:annotation>
2318
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/>
2319
    </xs:annotation>
2320
    <xs:complexType>
2321
      <xs:complexContent>
2322
        <xs:restriction base="xs:facet">
2323
          <xs:sequence>
2324
            <xs:element ref="xs:annotation" minOccurs="0"/>
2325
          </xs:sequence>
2326
          <xs:attribute name="value" use="required">
2327
            <xs:simpleType>
2328
              <xs:restriction base="xs:NMTOKEN">
2329
                <xs:enumeration value="preserve"/>
2330
                <xs:enumeration value="replace"/>
2331
                <xs:enumeration value="collapse"/>
2332
              </xs:restriction>
2333
            </xs:simpleType>
2334
          </xs:attribute>
2335
         <xs:anyAttribute namespace="##other" processContents="lax"/>
2336
        </xs:restriction>
2337
      </xs:complexContent>
2338
    </xs:complexType>
2339
  </xs:element>
2340

    
2341
  <xs:element name="pattern" id="pattern">
2342
    <xs:annotation>
2343
      <xs:documentation source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/>
2344
    </xs:annotation>
2345
    <xs:complexType>
2346
      <xs:complexContent>
2347
        <xs:restriction base="xs:noFixedFacet">
2348
          <xs:sequence>
2349
            <xs:element ref="xs:annotation" minOccurs="0"/>
2350
          </xs:sequence>
2351
          <xs:attribute name="value" type="xs:string" use="required"/>
2352
         <xs:anyAttribute namespace="##other" processContents="lax"/>
2353
        </xs:restriction>
2354
      </xs:complexContent>
2355
    </xs:complexType>
2356
  </xs:element>
2357

    
2358
</xs:schema>
(1-1/2)