-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelaxng.dtd
179 lines (169 loc) · 4.41 KB
/
relaxng.dtd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!-- relaxng.dtd
Based on grammar in section 3 of RELAX NG 1.0 (3 December 2001), which
made this very easy to put together. While entity declarations such as
those for param, start, and define may look redundant, I wanted this to
reflect the BNF grammar as closely as possible.
12/05/01 Bob DuCharme. Use at your own risk, no warrantee expressed or
implied, etc.
Last updated 12/31/01.
See http://www.snee.com/xml/relaxng/dtdChangeList.html for changes.
CL 2003-12-05
Added xml:lang to common attrs
Tested with:
- RELAX NG schema for RELAX NG, App A of spec:
http://www.oasis-open.org/committees/relax-ng/spec-20011203.html#IDA5MCS
- RELAX NG schema for RELAX NG at
http://thaiopensource.com/relaxng/relaxng.rng
- XSLT schema at http://thaiopensource.com/relaxng/xslt.rng
- testSuite.rng from http://thaiopensource.com/relaxng/testSuite.zip
-->
<!ENTITY % extensionAtts "">
<!ENTITY % extensionPattern "">
<!-- Add | before each one, e.g. "| x | y" -->
<!ENTITY % extensionGrammarContent "">
<!-- Add | before each one -->
<!ENTITY % commonAtts "datatypeLibrary CDATA #IMPLIED
ns CDATA #IMPLIED
xml:lang CDATA #IMPLIED
xmlns CDATA #FIXED 'http://relaxng.org/ns/structure/1.0'
%extensionAtts;">
<!-- Declare all nonterminals in grammar as parameter entities. -->
<!ENTITY % pattern "element | attribute | group | interleave | choice |
optional | zeroOrMore | oneOrMore | list | mixed |
ref | parentRef | empty | text | value | data |
notAllowed | externalRef | grammar %extensionPattern;">
<!ENTITY % param "param">
<!ENTITY % exceptPattern "except">
<!ENTITY % start "start">
<!ENTITY % define "define">
<!ENTITY % grammarContent "%start; | %define; |
div | include %extensionGrammarContent;">
<!ENTITY % includeContent "%start; | %define; | div %extensionGrammarContent;">
<!ENTITY % method "choice | interleave">
<!-- "| choice" not in the following; See change notes. -->
<!ENTITY % nameClass "name | anyName | nsName">
<!ENTITY % exceptNameClass "except">
<!ELEMENT element ((%nameClass;)?, (%pattern;)+)>
<!ATTLIST element
name NMTOKEN #IMPLIED
%commonAtts;
>
<!ELEMENT attribute ((%nameClass;)?, (%pattern;)?)>
<!ATTLIST attribute
name NMTOKEN #IMPLIED
%commonAtts;
>
<!ELEMENT group (%pattern;)+>
<!ATTLIST group
%commonAtts;
>
<!ELEMENT interleave (%pattern;)+>
<!ATTLIST interleave
%commonAtts;
>
<!ELEMENT choice (%nameClass; | %pattern;)+>
<!ATTLIST choice
%commonAtts;
>
<!ELEMENT optional (%pattern;)+>
<!ATTLIST optional
%commonAtts;
>
<!ELEMENT zeroOrMore (%pattern;)+>
<!ATTLIST zeroOrMore
%commonAtts;
>
<!ELEMENT oneOrMore (%pattern;)+>
<!ATTLIST oneOrMore
%commonAtts;
>
<!ELEMENT list (%pattern;)+>
<!ATTLIST list
%commonAtts;
>
<!ELEMENT mixed (%pattern;)+>
<!ATTLIST mixed
%commonAtts;
>
<!ELEMENT ref EMPTY>
<!ATTLIST ref
name NMTOKEN #REQUIRED
%commonAtts;
>
<!ELEMENT parentRef EMPTY>
<!ATTLIST parentRef
name NMTOKEN #REQUIRED
%commonAtts;
>
<!ELEMENT empty EMPTY>
<!ATTLIST empty
%commonAtts;
>
<!ELEMENT text EMPTY>
<!ATTLIST text
%commonAtts;
>
<!ELEMENT value (#PCDATA)>
<!ATTLIST value
type NMTOKEN #IMPLIED
%commonAtts;
>
<!ELEMENT data ((%param;)*, (%exceptPattern;)?)>
<!ATTLIST data
type NMTOKEN #REQUIRED
%commonAtts;
>
<!ELEMENT notAllowed EMPTY>
<!ATTLIST notAllowed
%commonAtts;
>
<!ELEMENT externalRef EMPTY>
<!ATTLIST externalRef
href CDATA #REQUIRED
%commonAtts;
>
<!ELEMENT grammar (%grammarContent;)*>
<!ATTLIST grammar
%commonAtts;
>
<!ELEMENT param (#PCDATA)>
<!ATTLIST param
name NMTOKEN #REQUIRED
>
<!ELEMENT except (%nameClass; | %pattern;)+>
<!ATTLIST except
%commonAtts;
>
<!ELEMENT div (%grammarContent;)*>
<!ATTLIST div
%commonAtts;
>
<!ELEMENT include (%includeContent;)*>
<!ATTLIST include
href CDATA #REQUIRED
%commonAtts;
>
<!ELEMENT start (%pattern;)>
<!ATTLIST start
combine (%method;) #IMPLIED
%commonAtts;
>
<!ELEMENT define (%pattern;)+>
<!ATTLIST define
name NMTOKEN #REQUIRED
combine (%method;) #IMPLIED
%commonAtts;
>
<!ELEMENT name (#PCDATA)>
<!ATTLIST name
%commonAtts;
>
<!ELEMENT anyName (%exceptNameClass;)?>
<!ATTLIST anyName
%commonAtts;
>
<!ELEMENT nsName (%exceptNameClass;)?>
<!ATTLIST nsName
%commonAtts;
>
<!-- eof for relaxng.dtd -->