Project

Profile

Help

How to connect?
Download (20.2 KB) Statistics
| Branch: | Tag: | Revision:

he / latest10 / hej / net / sf / saxon / data / w3c / xmlschema11 / XMLSchema.dtd @ 02f8308b

1
<!-- DTD for XML Schema Definition Language Part 1: Structures
2
     Public Identifier: "-//W3C//DTD XSD 1.1//EN"
3
     Official Location: http://www.w3.org/2009/XMLSchema/XMLSchema.dtd -->
4
<!-- Id: structures.dtd,v 1.1 2003/08/28 13:30:52 ht Exp  -->
5
<!-- With the exception of cases with multiple namespace
6
     prefixes for the XSD namespace, any XML document which is
7
     not valid per this DTD given redefinitions in its internal subset of the
8
     'p' and 's' parameter entities below appropriate to its namespace
9
     declaration of the XSD namespace is almost certainly not
10
     a valid schema document. -->
11

    
12
<!-- See below (at the bottom of this document) for information about
13
      the revision and namespace-versioning policy governing this DTD. -->
14
<!-- The simpleType element and its constituent parts
15
     are defined in XML Schema Definition Language Part 2: Datatypes -->
16
<!ENTITY % xs-datatypes PUBLIC '-//W3C//DTD XSD 1.1 Datatypes//EN' 'datatypes.dtd' >
17

    
18
<!ENTITY % p 'xs:'> <!-- can be overridden in the internal subset of a
19
                         schema document to establish a different
20
                         namespace prefix -->
21
<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must
22
                         also define %s as the suffix for the appropriate
23
                         namespace declaration (e.g. :foo) -->
24
<!ENTITY % nds 'xmlns%s;'>
25

    
26
<!-- Define all the element names, with optional prefix -->
27
<!ENTITY % schema "%p;schema">
28
<!ENTITY % defaultOpenContent "%p;defaultOpenContent">
29
<!ENTITY % complexType "%p;complexType">
30
<!ENTITY % complexContent "%p;complexContent">
31
<!ENTITY % openContent "%p;openContent">
32
<!ENTITY % simpleContent "%p;simpleContent">
33
<!ENTITY % extension "%p;extension">
34
<!ENTITY % element "%p;element">
35
<!ENTITY % alternative "%p;alternative">
36
<!ENTITY % unique "%p;unique">
37
<!ENTITY % key "%p;key">
38
<!ENTITY % keyref "%p;keyref">
39
<!ENTITY % selector "%p;selector">
40
<!ENTITY % field "%p;field">
41
<!ENTITY % group "%p;group">
42
<!ENTITY % all "%p;all">
43
<!ENTITY % choice "%p;choice">
44
<!ENTITY % sequence "%p;sequence">
45
<!ENTITY % any "%p;any">
46
<!ENTITY % anyAttribute "%p;anyAttribute">
47
<!ENTITY % attribute "%p;attribute">
48
<!ENTITY % attributeGroup "%p;attributeGroup">
49
<!ENTITY % include "%p;include">
50
<!ENTITY % import "%p;import">
51
<!ENTITY % redefine "%p;redefine">
52
<!ENTITY % override "%p;override">
53
<!ENTITY % notation "%p;notation">
54
<!ENTITY % assert   "%p;assert">
55

    
56

    
57
<!-- annotation elements -->
58
<!ENTITY % annotation "%p;annotation">
59
<!ENTITY % appinfo "%p;appinfo">
60
<!ENTITY % documentation "%p;documentation">
61

    
62
<!-- Customisation entities for the ATTLIST of each element type.
63
     Define one of these if your schema takes advantage of the
64
     anyAttribute='##other' in the
65
     schema for schema documents -->
66

    
67
<!ENTITY % schemaAttrs ''>
68
<!ENTITY % defaultOpenContentAttrs ''>
69
<!ENTITY % complexTypeAttrs ''>
70
<!ENTITY % complexContentAttrs ''>
71
<!ENTITY % openContentAttrs ''>
72
<!ENTITY % simpleContentAttrs ''>
73
<!ENTITY % extensionAttrs ''>
74
<!ENTITY % elementAttrs ''>
75
<!ENTITY % groupAttrs ''>
76
<!ENTITY % allAttrs ''>
77
<!ENTITY % choiceAttrs ''>
78
<!ENTITY % sequenceAttrs ''>
79
<!ENTITY % anyAttrs ''>
80
<!ENTITY % anyAttributeAttrs ''>
81
<!ENTITY % attributeAttrs ''>
82
<!ENTITY % attributeGroupAttrs ''>
83
<!ENTITY % uniqueAttrs ''>
84
<!ENTITY % keyAttrs ''>
85
<!ENTITY % keyrefAttrs ''>
86
<!ENTITY % selectorAttrs ''>
87
<!ENTITY % fieldAttrs ''>
88
<!ENTITY % assertAttrs ''>
89

    
90
<!ENTITY % includeAttrs ''>
91
<!ENTITY % importAttrs ''>
92
<!ENTITY % redefineAttrs ''>
93
<!ENTITY % overrideAttrs ''>
94
<!ENTITY % notationAttrs ''>
95
<!ENTITY % annotationAttrs ''>
96
<!ENTITY % appinfoAttrs ''>
97
<!ENTITY % documentationAttrs ''>
98

    
99
<!ENTITY % complexDerivationSet "CDATA">
100
      <!-- #all or space-separated list drawn from derivationChoice -->
101
<!ENTITY % blockSet "CDATA">
102
      <!-- #all or space-separated list drawn from
103
                      derivationChoice + 'substitution' -->
104

    
105
<!ENTITY % composition '%include; | %import; | %override; | %redefine;'>
106
<!ENTITY % mgs '%all; | %choice; | %sequence;'>
107
<!ENTITY % cs '%choice; | %sequence;'>
108
<!ENTITY % formValues '(qualified|unqualified)'>
109

    
110

    
111
<!ENTITY % attrDecls    '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
112

    
113
<!ENTITY % assertions   '(%assert;)*'>
114

    
115
<!ENTITY % particleAndAttrs '(%openContent;?, (%mgs; | %group;)?,
116
                              %attrDecls;, %assertions;)'>
117

    
118
<!-- This is used in part2 -->
119
<!ENTITY % restriction1 '(%openContent;?, (%mgs; | %group;)?)'>
120

    
121
%xs-datatypes;
122

    
123
<!-- the duplication below is to produce an unambiguous content model
124
     which allows annotation everywhere -->
125
<!ELEMENT %schema; ((%composition; | %annotation;)*,
126
                    (%defaultOpenContent;, (%annotation;)*)?,
127
                    ((%simpleType; | %complexType;
128
                      | %element; | %attribute;
129
                      | %attributeGroup; | %group;
130
                      | %notation; ),
131
                     (%annotation;)*)* )>
132
<!ATTLIST %schema;
133
   targetNamespace      %URIref;               #IMPLIED
134
   version              CDATA                  #IMPLIED
135
   %nds;                %URIref;               #FIXED 'http://www.w3.org/2001/XMLSchema'
136
   xmlns                CDATA                  #IMPLIED
137
   finalDefault         %complexDerivationSet; ''
138
   blockDefault         %blockSet;             ''
139
   id                   ID                     #IMPLIED
140
   elementFormDefault   %formValues;           'unqualified'
141
   attributeFormDefault %formValues;           'unqualified'
142
   defaultAttributes    CDATA                  #IMPLIED
143
   xpathDefaultNamespace    CDATA       '##local'
144
   xml:lang             CDATA                  #IMPLIED
145
   %schemaAttrs;>
146
<!-- Note the xmlns declaration is NOT in the
147
     schema for schema documents,
148
     because at the Infoset level where schemas operate,
149
     xmlns(:prefix) is NOT an attribute! -->
150
<!-- The declaration of xmlns is a convenience for schema authors -->
151
 
152
<!-- The id attribute here and below is for use in external references
153
     from non-schemas using simple fragment identifiers.
154
     It is NOT used for schema-to-schema reference, internal or
155
     external. -->
156

    
157
<!ELEMENT %defaultOpenContent; ((%annotation;)?, %any;)>
158
<!ATTLIST %defaultOpenContent;
159
          appliesToEmpty  (true|false)           'false'
160
          mode            (interleave|suffix)    'interleave'
161
          id              ID                     #IMPLIED
162
          %defaultOpenContentAttrs;>
163

    
164
<!-- a type is a named content type specification which allows attribute
165
     declarations-->
166
<!-- -->
167

    
168
<!ELEMENT %complexType; ((%annotation;)?,
169
                         (%simpleContent;|%complexContent;|
170
                          %particleAndAttrs;))>
171

    
172
<!ATTLIST %complexType;
173
          name                    %NCName;                 #IMPLIED
174
          id                      ID                       #IMPLIED
175
          abstract                %boolean;                #IMPLIED
176
          final                   %complexDerivationSet;   #IMPLIED
177
          block                   %complexDerivationSet;   #IMPLIED
178
          mixed                   (true|false)             'false'
179
          defaultAttributesApply  %boolean;                'true'
180
          %complexTypeAttrs;>
181

    
182
<!-- particleAndAttrs is shorthand for a root type -->
183
<!-- mixed is disallowed if simpleContent, overridden if complexContent has one too. -->
184

    
185
<!-- If anyAttribute appears in one or more referenced attributeGroups
186
     and/or explicitly, the intersection of the permissions is used -->
187

    
188
<!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
189
<!ATTLIST %complexContent;
190
          mixed (true|false) #IMPLIED
191
          id    ID           #IMPLIED
192
          %complexContentAttrs;>
193

    
194
<!ELEMENT %openContent; ((%annotation;)?, (%any;)?)>
195
<!ATTLIST %openContent;
196
          mode            (none|interleave|suffix)  'interleave'
197
          id              ID                        #IMPLIED
198
          %openContentAttrs;>
199

    
200
<!-- restriction should use the branch defined above, not the simple
201
     one from part2; extension should use the full model  -->
202

    
203
<!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
204
<!ATTLIST %simpleContent;
205
          id    ID           #IMPLIED
206
          %simpleContentAttrs;>
207

    
208
<!-- restriction should use the simple branch from part2, not the 
209
     one defined above; extension should have no particle  -->
210

    
211
<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
212
<!ATTLIST %extension;
213
          base  %QName;               #REQUIRED
214
          id    ID                    #IMPLIED
215
          
216
          %extensionAttrs;>
217

    
218
<!-- an element is declared by either:
219
 a name and a type (either nested or referenced via the type attribute)
220
 or a ref to an existing element declaration -->
221

    
222
<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
223
                     (%alternative;)*,
224
                     (%unique; | %key; | %keyref;)*)>
225
<!-- simpleType or complexType only if no type|ref attribute -->
226
<!-- ref not allowed at top level -->
227
<!ATTLIST %element;
228
            name               %NCName;               #IMPLIED
229
            id                 ID                     #IMPLIED
230
            ref                %QName;                #IMPLIED
231
            type               %QName;                #IMPLIED
232
            minOccurs          %nonNegativeInteger;   #IMPLIED
233
            maxOccurs          CDATA                  #IMPLIED
234
            nillable           %boolean;              #IMPLIED
235
            substitutionGroup  %QName;                #IMPLIED
236
            abstract           %boolean;              #IMPLIED
237
            final              %complexDerivationSet; #IMPLIED
238
            block              %blockSet;             #IMPLIED
239
            default            CDATA                  #IMPLIED
240
            fixed              CDATA                  #IMPLIED
241
            form               %formValues;           #IMPLIED
242
            targetNamespace    %URIref;               #IMPLIED
243
            %elementAttrs;>
244
<!-- type and ref are mutually exclusive.
245
     name and ref are mutually exclusive, one is required -->
246
<!-- In the absence of type AND ref, type defaults to type of
247
     substitutionGroup, if any, else xs:anyType, i.e. unconstrained -->
248
<!-- default and fixed are mutually exclusive -->
249

    
250
<!ELEMENT %alternative; ((%annotation;)?, 
251
            (%simpleType; | %complexType;)?) >
252
<!ATTLIST %alternative; 
253
            test                     CDATA     #IMPLIED
254
            type                     %QName;   #IMPLIED
255
            xpathDefaultNamespace    CDATA     #IMPLIED
256
            id                       ID        #IMPLIED >
257

    
258

    
259
<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
260
<!ATTLIST %group; 
261
          name        %NCName;               #IMPLIED
262
          ref         %QName;                #IMPLIED
263
          minOccurs   %nonNegativeInteger;   #IMPLIED
264
          maxOccurs   CDATA                  #IMPLIED
265
          id          ID                     #IMPLIED
266
          %groupAttrs;>
267

    
268
<!ELEMENT %all; ((%annotation;)?, (%element;| %group;| %any;)*)>
269
<!ATTLIST %all;
270
          minOccurs   (0 | 1)                #IMPLIED
271
          maxOccurs   (0 | 1)                #IMPLIED
272
          id          ID                     #IMPLIED
273
          %allAttrs;>
274

    
275
<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
276
<!ATTLIST %choice;
277
          minOccurs   %nonNegativeInteger;   #IMPLIED
278
          maxOccurs   CDATA                  #IMPLIED
279
          id          ID                     #IMPLIED
280
          %choiceAttrs;>
281

    
282
<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
283
<!ATTLIST %sequence;
284
          minOccurs   %nonNegativeInteger;   #IMPLIED
285
          maxOccurs   CDATA                  #IMPLIED
286
          id          ID                     #IMPLIED
287
          %sequenceAttrs;>
288

    
289
<!-- an anonymous grouping in a model, or
290
     a top-level named group definition, or a reference to same -->
291

    
292

    
293
<!ELEMENT %any; (%annotation;)?>
294
<!ATTLIST %any;
295
            namespace       CDATA                  #IMPLIED
296
            notNamespace    CDATA                  #IMPLIED
297
            notQName        CDATA                  ''
298
            processContents (skip|lax|strict)      'strict'
299
            minOccurs       %nonNegativeInteger;   '1'
300
            maxOccurs       CDATA                  '1'
301
            id              ID                     #IMPLIED
302
            %anyAttrs;>
303

    
304
<!-- namespace is interpreted as follows:
305
                  ##any      - - any non-conflicting WFXML at all
306

    
307
                  ##other    - - any non-conflicting WFXML from namespace other
308
                                  than targetNamespace
309

    
310
                  ##local    - - any unqualified non-conflicting WFXML/attribute
311
                  one or     - - any non-conflicting WFXML from
312
                  more URI        the listed namespaces
313
                  references
314

    
315
                  ##targetNamespace ##local may appear in the above list,
316
                    with the obvious meaning -->
317

    
318
<!-- notNamespace is interpreted as follows:
319
                  ##local    - - any unqualified non-conflicting WFXML/attribute
320
                  one or     - - any non-conflicting WFXML from
321
                  more URI        the listed namespaces
322
                  references
323

    
324
                  ##targetNamespace ##local may appear in the above list,
325
                    with the obvious meaning -->
326

    
327
<!ELEMENT %anyAttribute; (%annotation;)?>
328
<!ATTLIST %anyAttribute;
329
            namespace       CDATA              #IMPLIED
330
            notNamespace    CDATA              #IMPLIED
331
            notQName        CDATA              ''
332
            processContents (skip|lax|strict)  'strict'
333
            id              ID                 #IMPLIED
334
            %anyAttributeAttrs;>
335
<!-- namespace and notNamespace are interpreted as for 'any' above -->
336

    
337
<!-- simpleType only if no type|ref attribute -->
338
<!-- ref not allowed at top level, name iff at top level -->
339
<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
340
<!ATTLIST %attribute;
341
          name              %NCName;      #IMPLIED
342
          id                ID            #IMPLIED
343
          ref               %QName;       #IMPLIED
344
          type              %QName;       #IMPLIED
345
          use               (prohibited|optional|required) #IMPLIED
346
          default           CDATA         #IMPLIED
347
          fixed             CDATA         #IMPLIED
348
          form              %formValues;  #IMPLIED
349
          targetNamespace   %URIref;      #IMPLIED
350
          inheritable       %boolean;      #IMPLIED
351
          %attributeAttrs;>
352
<!-- type and ref are mutually exclusive.
353
     name and ref are mutually exclusive, one is required -->
354
<!-- default for use is optional when nested, none otherwise -->
355
<!-- default and fixed are mutually exclusive -->
356
<!-- type attr and simpleType content are mutually exclusive -->
357

    
358
<!-- an attributeGroup is a named collection of attribute decls, or a
359
     reference thereto -->
360
<!ELEMENT %attributeGroup; ((%annotation;)?,
361
                       (%attribute; | %attributeGroup;)*,
362
                       (%anyAttribute;)?) >
363
<!ATTLIST %attributeGroup;
364
                 name       %NCName;       #IMPLIED
365
                 id         ID             #IMPLIED
366
                 ref        %QName;        #IMPLIED
367
                 %attributeGroupAttrs;>
368

    
369
<!-- ref iff no content, no name.  ref iff not top level -->
370

    
371
<!-- better reference mechanisms -->
372
<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
373
<!ATTLIST %unique;
374
          name                     %NCName;       #IMPLIED
375
          ref                      %QName;        #IMPLIED
376
          id                       ID             #IMPLIED
377
          %uniqueAttrs;>
378

    
379
<!ELEMENT %key;    ((%annotation;)?, %selector;, (%field;)+)>
380
<!ATTLIST %key;
381
          name                     %NCName;       #IMPLIED
382
          ref                      %QName;        #IMPLIED
383
          id                       ID             #IMPLIED
384
          %keyAttrs;>
385

    
386
<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
387
<!ATTLIST %keyref;
388
          name                     %NCName;       #IMPLIED
389
          ref                      %QName;        #IMPLIED
390
          refer                    %QName;        #IMPLIED
391
          id                       ID             #IMPLIED
392
          %keyrefAttrs;>
393

    
394
<!ELEMENT %selector; ((%annotation;)?)>
395
<!ATTLIST %selector;
396
          xpath                    %XPathExpr; #REQUIRED
397
          xpathDefaultNamespace    CDATA       #IMPLIED
398
          id                       ID          #IMPLIED
399
          %selectorAttrs;>
400
<!ELEMENT %field; ((%annotation;)?)>
401
<!ATTLIST %field;
402
          xpath                    %XPathExpr; #REQUIRED
403
          xpathDefaultNamespace    CDATA       #IMPLIED
404
          id                       ID          #IMPLIED
405
          %fieldAttrs;>
406

    
407
<!-- co-constraint assertions -->
408
<!ELEMENT %assert; ((%annotation;)?)>
409
<!ATTLIST %assert;
410
          test                     %XPathExpr; #REQUIRED
411
          id                       ID          #IMPLIED
412
          xpathDefaultNamespace    CDATA       #IMPLIED
413
          %assertAttrs;>
414

    
415

    
416
<!-- Schema combination mechanisms -->
417
<!ELEMENT %include; (%annotation;)?>
418
<!ATTLIST %include;
419
          schemaLocation %URIref; #REQUIRED
420
          id             ID       #IMPLIED
421
          %includeAttrs;>
422

    
423
<!ELEMENT %import; (%annotation;)?>
424
<!ATTLIST %import;
425
          namespace      %URIref; #IMPLIED
426
          schemaLocation %URIref; #IMPLIED
427
          id             ID       #IMPLIED
428
          %importAttrs;>
429

    
430
<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
431
                      %attributeGroup; | %group;)*>
432
<!ATTLIST %redefine;
433
          schemaLocation %URIref; #REQUIRED
434
          id             ID       #IMPLIED
435
          %redefineAttrs;>
436

    
437
<!ELEMENT %override; ((%annotation;)?,
438
                      ((%simpleType; | %complexType; | %group; | %attributeGroup;) |
439
                       %element; | %attribute; | %notation;)*)>
440
<!ATTLIST %override;
441
          schemaLocation %URIref; #REQUIRED
442
          id             ID       #IMPLIED
443
          %overrideAttrs;>
444

    
445
<!ELEMENT %notation; (%annotation;)?>
446
<!ATTLIST %notation;
447
	  name        %NCName;    #REQUIRED
448
	  id          ID          #IMPLIED
449
	  public      CDATA       #REQUIRED
450
	  system      %URIref;    #IMPLIED
451
	  %notationAttrs;>
452

    
453
<!-- Annotation is either application information or documentation -->
454
<!-- By having these here they are available for datatypes as well
455
     as all the structures elements -->
456

    
457
<!ELEMENT %annotation; (%appinfo; | %documentation;)*>
458
<!ATTLIST %annotation; %annotationAttrs;>
459

    
460
<!-- User must define annotation elements in internal subset for this
461
     to work -->
462
<!ELEMENT %appinfo; ANY>   <!-- too restrictive -->
463
<!ATTLIST %appinfo;
464
          source     %URIref;      #IMPLIED
465
          id         ID         #IMPLIED
466
          %appinfoAttrs;>
467
<!ELEMENT %documentation; ANY>   <!-- too restrictive -->
468
<!ATTLIST %documentation;
469
          source     %URIref;   #IMPLIED
470
          id         ID         #IMPLIED
471
          xml:lang   CDATA      #IMPLIED
472
          %documentationAttrs;>
473

    
474
<!NOTATION XMLSchemaStructures PUBLIC
475
           'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >
476
<!NOTATION XML PUBLIC
477
           'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >
478

    
479
<!-- 
480
      In keeping with the XML Schema WG's standard versioning policy, 
481
      this DTD will persist at the URI
482
      http://www.w3.org/2012/04/XMLSchema.dtd.
483

    
484
      At the date of issue it can also be found at the URI
485
      http://www.w3.org/2009/XMLSchema/XMLSchema.dtd.
486

    
487
      The schema document at that URI may however change in the future, 
488
      in order to remain compatible with the latest version of XSD 
489
      and its namespace.  In other words, if XSD or the XML Schema 
490
      namespace change, the version of this document at 
491
      http://www.w3.org/2009/XMLSchema/XMLSchema.dtd will change accordingly; 
492
      the version at http://www.w3.org/2012/04/XMLSchema.dtd 
493
      will not change.
494

    
495
      Previous dated (and unchanging) versions of this DTD include:
496

    
497
       http://www.w3.org/2012/01/XMLSchema.dtd
498
          (XSD 1.1 Proposed Recommendation)
499

    
500

    
501
        http://www.w3.org/2011/07/XMLSchema.dtd
502
          (XSD 1.1 Candidate Recommendation)
503

    
504
        http://www.w3.org/2009/04/XMLSchema.dtd 
505
          (XSD 1.1 Candidate Recommendation)
506

    
507
        http://www.w3.org/2004/10/XMLSchema.dtd
508
          (XSD 1.0 Recommendation, Second Edition)
509

    
510
        http://www.w3.org/2001/05/XMLSchema.dtd
511
          (XSD 1.0 Recommendation, First Edition)
512

    
513
-->
(1-1/2)