Project

Profile

Help

Download (6.54 KB) Statistics
| Branch: | Tag: | Revision:

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

1 02f8308b O'Neil Delpratt
<!--
2
        DTD for XML Schemas: Part 2: Datatypes
3
        
4
        Id: datatypes.dtd,v 1.1.2.4 2005/01/31 18:40:42 cmsmcq Exp 
5
        Note this DTD is NOT normative, or even definitive.
6
  -->
7
8
<!--
9
        This DTD cannot be used on its own, it is intended
10
        only for incorporation in XMLSchema.dtd, q.v.
11
  -->
12
13
<!-- Define all the element names, with optional prefix -->
14
<!ENTITY % simpleType "%p;simpleType">
15
<!ENTITY % restriction "%p;restriction">
16
<!ENTITY % list "%p;list">
17
<!ENTITY % union "%p;union">
18
<!ENTITY % maxExclusive "%p;maxExclusive">
19
<!ENTITY % minExclusive "%p;minExclusive">
20
<!ENTITY % maxInclusive "%p;maxInclusive">
21
<!ENTITY % minInclusive "%p;minInclusive">
22
<!ENTITY % totalDigits "%p;totalDigits">
23
<!ENTITY % fractionDigits "%p;fractionDigits">
24
25
<!ENTITY % length "%p;length">
26
<!ENTITY % minLength "%p;minLength">
27
<!ENTITY % maxLength "%p;maxLength">
28
<!ENTITY % enumeration "%p;enumeration">
29
<!ENTITY % whiteSpace "%p;whiteSpace">
30
<!ENTITY % pattern "%p;pattern">
31
32
<!ENTITY % assertion "%p;assertion">
33
34
<!ENTITY % explicitTimezone "%p;explicitTimezone">
35
36
37
<!--
38
        Customization entities for the ATTLIST of each element
39
        type. Define one of these if your schema takes advantage
40
        of the anyAttribute='##other' in the schema for schemas
41
  -->
42
43
<!ENTITY % simpleTypeAttrs "">
44
<!ENTITY % restrictionAttrs "">
45
<!ENTITY % listAttrs "">
46
<!ENTITY % unionAttrs "">
47
<!ENTITY % maxExclusiveAttrs "">
48
<!ENTITY % minExclusiveAttrs "">
49
<!ENTITY % maxInclusiveAttrs "">
50
<!ENTITY % minInclusiveAttrs "">
51
<!ENTITY % totalDigitsAttrs "">
52
<!ENTITY % fractionDigitsAttrs "">
53
<!ENTITY % lengthAttrs "">
54
<!ENTITY % minLengthAttrs "">
55
<!ENTITY % maxLengthAttrs "">
56
57
<!ENTITY % enumerationAttrs "">
58
<!ENTITY % whiteSpaceAttrs "">
59
<!ENTITY % patternAttrs "">
60
<!ENTITY % assertionAttrs "">
61
<!ENTITY % explicitTimezoneAttrs "">
62
63
<!-- Define some entities for informative use as attribute
64
        types -->
65
<!ENTITY % URIref "CDATA">
66
<!ENTITY % XPathExpr "CDATA">
67
<!ENTITY % QName "NMTOKEN">
68
<!ENTITY % QNames "NMTOKENS">
69
<!ENTITY % NCName "NMTOKEN">
70
<!ENTITY % nonNegativeInteger "NMTOKEN">
71
<!ENTITY % boolean "(true|false)">
72
<!ENTITY % simpleDerivationSet "CDATA">
73
<!--
74
        #all or space-separated list drawn from derivationChoice
75
  -->
76
77
<!--
78
        Note that the use of 'facet' below is less restrictive
79
        than is really intended:  There should in fact be no
80
        more than one of each of minInclusive, minExclusive,
81
        maxInclusive, maxExclusive, totalDigits, fractionDigits,
82
        length, maxLength, minLength within datatype,
83
        and the min- and max- variants of Inclusive and Exclusive
84
        are mutually exclusive. On the other hand,  pattern and
85
        enumeration and assertion may repeat.
86
  -->
87
<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
88
<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
89
<!ENTITY % bounds "%minBound; | %maxBound;">
90
<!ENTITY % numeric "%totalDigits; | %fractionDigits;"> 
91
<!ENTITY % ordered "%bounds; | %numeric;">
92
<!ENTITY % unordered
93
   "%pattern; | %enumeration; | %whiteSpace; | %length; |
94
   %maxLength; | %minLength; | %assertion;
95
   | %explicitTimezone;">
96
<!ENTITY % implementation-defined-facets "">
97
<!ENTITY % facet "%ordered; | %unordered; %implementation-defined-facets;">
98
<!ENTITY % facetAttr 
99
        "value CDATA #REQUIRED
100
        id ID #IMPLIED">
101
<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
102
<!ENTITY % facetModel "(%annotation;)?">
103
<!ELEMENT %simpleType;
104
        ((%annotation;)?, (%restriction; | %list; | %union;))>
105
<!ATTLIST %simpleType;
106
    name      %NCName; #IMPLIED
107
    final     %simpleDerivationSet; #IMPLIED
108
    id        ID       #IMPLIED
109
    %simpleTypeAttrs;>
110
<!-- name is required at top level -->
111
<!ELEMENT %restriction; ((%annotation;)?,
112
                         (%restriction1; |
113
                          ((%simpleType;)?,(%facet;)*)),
114
                         (%attrDecls;))>
115
<!ATTLIST %restriction;
116
    base      %QName;                  #IMPLIED
117
    id        ID       #IMPLIED
118
    %restrictionAttrs;>
119
<!--
120
        base and simpleType child are mutually exclusive,
121
        one is required.
122
123
        restriction is shared between simpleType and
124
        simpleContent and complexContent (in XMLSchema.xsd).
125
        restriction1 is for the latter cases, when this
126
        is restricting a complex type, as is attrDecls.
127
  -->
128
<!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)>
129
<!ATTLIST %list;
130
    itemType      %QName;             #IMPLIED
131
    id        ID       #IMPLIED
132
    %listAttrs;>
133
<!--
134
        itemType and simpleType child are mutually exclusive,
135
        one is required
136
  -->
137
<!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)>
138
<!ATTLIST %union;
139
    id            ID       #IMPLIED
140
    memberTypes   %QNames;            #IMPLIED
141
    %unionAttrs;>
142
<!--
143
        At least one item in memberTypes or one simpleType
144
        child is required
145
  -->
146
147
<!ELEMENT %maxExclusive; %facetModel;>
148
<!ATTLIST %maxExclusive;
149
        %facetAttr;
150
        %fixedAttr;
151
        %maxExclusiveAttrs;>
152
<!ELEMENT %minExclusive; %facetModel;>
153
<!ATTLIST %minExclusive;
154
        %facetAttr;
155
        %fixedAttr;
156
        %minExclusiveAttrs;>
157
158
<!ELEMENT %maxInclusive; %facetModel;>
159
<!ATTLIST %maxInclusive;
160
        %facetAttr;
161
        %fixedAttr;
162
        %maxInclusiveAttrs;>
163
<!ELEMENT %minInclusive; %facetModel;>
164
<!ATTLIST %minInclusive;
165
        %facetAttr;
166
        %fixedAttr;
167
        %minInclusiveAttrs;>
168
169
<!ELEMENT %totalDigits; %facetModel;>
170
<!ATTLIST %totalDigits;
171
        %facetAttr;
172
        %fixedAttr;
173
        %totalDigitsAttrs;>
174
<!ELEMENT %fractionDigits; %facetModel;>
175
<!ATTLIST %fractionDigits;
176
        %facetAttr;
177
        %fixedAttr;
178
        %fractionDigitsAttrs;>
179
180
<!ELEMENT %length; %facetModel;>
181
<!ATTLIST %length;
182
        %facetAttr;
183
        %fixedAttr;
184
        %lengthAttrs;>
185
<!ELEMENT %minLength; %facetModel;>
186
<!ATTLIST %minLength;
187
        %facetAttr;
188
        %fixedAttr;
189
        %minLengthAttrs;>
190
<!ELEMENT %maxLength; %facetModel;>
191
<!ATTLIST %maxLength;
192
        %facetAttr;
193
        %fixedAttr;
194
        %maxLengthAttrs;>
195
196
<!-- This one can be repeated -->
197
<!ELEMENT %enumeration; %facetModel;>
198
<!ATTLIST %enumeration;
199
        %facetAttr;
200
        %enumerationAttrs;>
201
202
<!ELEMENT %whiteSpace; %facetModel;>
203
<!ATTLIST %whiteSpace;
204
        %facetAttr;
205
        %fixedAttr;
206
        %whiteSpaceAttrs;>
207
208
<!-- This one can be repeated -->
209
<!ELEMENT %pattern; %facetModel;>
210
<!ATTLIST %pattern;
211
        %facetAttr;
212
        %patternAttrs;>
213
214
<!ELEMENT %assertion; %facetModel;>
215
<!ATTLIST %assertion;
216
        %facetAttr;
217
        %assertionAttrs;>
218
219
<!ELEMENT %explicitTimezone; %facetModel;>
220
<!ATTLIST %explicitTimezone;
221
        %facetAttr;
222
        %explicitTimezoneAttrs;>