1 <!-- DTD for XML Schemas: Part 2: Datatypes -->
2 <!-- $Id: datatypes.dtd,v 1.1 2002-08-25 10:21:54 scop Exp $ -->
3 <!-- Note this DTD is NOT the normative datatypes DTD - - the
4 prose copy in the datatypes REC is the normative version (which
5 shouldn't differ from this one except for this comment and entity
6 expansions, but just in case -->
7 <!ENTITY % p ''> <!-- can be overriden in the internal subset of a
8 schema document to establish a namespace prefix -->
11 <!ENTITY % dtpv '"%dtp;"'>
12 <!ENTITY % dtnds 'xmlns%dts;'>
15 <!-- Define all the element names, with optional prefix -->
16 <!ENTITY % simpleType "%p;simpleType">
17 <!ENTITY % maxExclusive "%p;maxExclusive">
18 <!ENTITY % minExclusive "%p;minExclusive">
19 <!ENTITY % maxInclusive "%p;maxInclusive">
20 <!ENTITY % minInclusive "%p;minInclusive">
21 <!ENTITY % precision "%p;precision">
22 <!ENTITY % scale "%p;scale">
23 <!ENTITY % length "%p;length">
24 <!ENTITY % minlength "%p;minlength">
25 <!ENTITY % maxlength "%p;maxlength">
26 <!ENTITY % enumeration "%p;enumeration">
27 <!ENTITY % pattern "%p;pattern">
28 <!ENTITY % encoding "%p;encoding">
29 <!ENTITY % period "%p;period">
31 <!-- Customisation entities for the ATTLIST of each element type.
32 Define one of these if your schema takes advantage of the
33 anyAttribute='##other' in the schema for schemas -->
35 <!ENTITY % simpleTypeAttrs ''>
36 <!ENTITY % maxExclusiveAttrs ''>
37 <!ENTITY % minExclusiveAttrs ''>
38 <!ENTITY % maxInclusiveAttrs ''>
39 <!ENTITY % minInclusiveAttrs ''>
40 <!ENTITY % precisionAttrs ''>
41 <!ENTITY % scaleAttrs ''>
42 <!ENTITY % lengthAttrs ''>
43 <!ENTITY % minlengthAttrs ''>
44 <!ENTITY % maxlengthAttrs ''>
45 <!ENTITY % enumerationAttrs ''>
46 <!ENTITY % patternAttrs ''>
47 <!ENTITY % encodingAttrs ''>
48 <!ENTITY % periodAttrs ''>
49 <!ENTITY % appinfoAttrs ''>
50 <!ENTITY % documentationAttrs ''>
53 <!-- annotation elements -->
54 <!ENTITY % annotation "%p;annotation">
55 <!ENTITY % appinfo "%p;appinfo">
56 <!ENTITY % documentation "%p;documentation">
59 <!-- Define some entities for informative use as attribute types -->
60 <!ENTITY % URIref "CDATA">
61 <!ENTITY % QName "CDATA">
62 <!ENTITY % NCName "NMTOKEN">
63 <!ENTITY % non-negative-integer "NMTOKEN">
64 <!ENTITY % boolean "(true|false)">
65 <!ENTITY % simpleDerivationChoice "(list|restriction|reproduction)">
66 <!ENTITY % simpleDerivationSet "CDATA">
67 <!-- #all or space-separated list drawn from derivationChoice -->
69 <!-- Note that the use of 'facet' below is less restrictive than is
70 really intended: There should in fact be no more than one of each of
71 minInclusive, minExclusive, maxInclusive, maxExclusive,
73 length, maxlength, minlength, encoding, period within datatype,
74 and the min- and max- variants of Inclusive and Exclusive are
76 On the other hand, pattern and enumeration may repeat -->
77 <!ENTITY % minBound '(%minInclusive; | %minExclusive;)'>
78 <!ENTITY % maxBound '(%maxInclusive; | %maxExclusive;)'>
79 <!ENTITY % bounds '%minBound; | %maxBound;'>
80 <!ENTITY % numeric '%precision; | %scale;'>
81 <!ENTITY % ordered '%bounds; | %numeric;'>
83 '%pattern; | %enumeration; | %length; | %maxlength; | %minlength;
84 | %encoding; | %period;'>
85 <!ENTITY % facet '%ordered; | %unordered;'>
86 <!ENTITY % facetAttr 'value CDATA #REQUIRED'>
87 <!ENTITY % facetModel '(%annotation;)?'>
88 <!ELEMENT %simpleType; ((%annotation;)?,(%facet;)*)>
89 <!ATTLIST %simpleType;
90 name %NCName; #IMPLIED
91 base %QName; #REQUIRED
92 abstract %boolean; 'false'
93 final %simpleDerivationSet; ''
94 derivedBy %simpleDerivationChoice; 'restriction'
96 <!-- name is required at top level -->
98 <!ELEMENT %maxExclusive; %facetModel;>
99 <!ATTLIST %maxExclusive; %facetAttr;
101 <!ELEMENT %minExclusive; %facetModel;>
102 <!ATTLIST %minExclusive; %facetAttr;
105 <!ELEMENT %maxInclusive; %facetModel;>
106 <!ATTLIST %maxInclusive; %facetAttr;
108 <!ELEMENT %minInclusive; %facetModel;>
109 <!ATTLIST %minInclusive; %facetAttr;
112 <!ELEMENT %precision; %facetModel;>
113 <!ATTLIST %precision; %facetAttr;
115 <!ELEMENT %scale; %facetModel;>
116 <!ATTLIST %scale; %facetAttr;
119 <!ELEMENT %length; %facetModel;>
120 <!ATTLIST %length; %facetAttr;
122 <!ELEMENT %minlength; %facetModel;>
123 <!ATTLIST %minlength; %facetAttr;
125 <!ELEMENT %maxlength; %facetModel;>
126 <!ATTLIST %maxlength; %facetAttr;
129 <!-- This one can be repeated -->
130 <!ELEMENT %enumeration; %facetModel;>
131 <!ATTLIST %enumeration; %facetAttr;
134 <!-- This one can be repeated -->
135 <!ELEMENT %pattern; %facetModel;>
136 <!ATTLIST %pattern; %facetAttr;
139 <!ELEMENT %encoding; %facetModel;>
140 <!ATTLIST %encoding; %facetAttr;
142 <!ELEMENT %period; %facetModel;>
143 <!ATTLIST %period; %facetAttr;
146 <!-- Annotation is either application information or documentation -->
147 <!-- By having these here they are available for datatypes as well
148 as all the structures elements -->
150 <!ELEMENT %annotation; (%appinfo; | %documentation;)*>
152 <!-- User must define annotation elements in internal subset for this
154 <!ELEMENT %appinfo; ANY> <!-- too restrictive -->
156 source %URIref; #IMPLIED
158 <!ELEMENT %documentation; ANY> <!-- too restrictive -->
159 <!ATTLIST %documentation;
160 source %URIref; #IMPLIED
161 xml:lang CDATA #IMPLIED
162 %documentationAttrs;>