-
Notifications
You must be signed in to change notification settings - Fork 5
/
omstd20.dtd
316 lines (207 loc) · 6.8 KB
/
omstd20.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<?xml encoding="UTF-8"?>
<!--
DTD generated from simplified omstd20.rnc via trang then
edited by hand to add back entity definitions and other changes
-->
<!--
Abbreviations used in this document
-->
<!ENTITY OM "<emphasis>OpenMath</emphasis>">
<!ENTITY exml "<acronym>xml</acronym>">
<!ENTITY zsp "">
<!ENTITY longrightarrow "⟶">
<!-- trang from here -->
<!-- Custom Relax NG schema for omstd20.xml -->
<!--
The markup is docbook+MathML but constrained
to validate just the markup used here and supported by
the conversions to TeX and HTML in the stylesheets in this
repository.
If additional markup is required and the document is DTD-valid
(which uses the full docbook DTD) and the conversions to html
and TeX work, feel free to extend this schema as needed.
-->
<!--
The current schema is intentionally over-restrictive to limit the
choices when editing the document in nxml-mode or other schema aware
editing environments.
-->
<!-- David Carlisle September 2017 -->
<!ELEMENT book (title,bookinfo,toc,lot,chapter*,appendix*,
bibliography?)>
<!ATTLIST book
xml:space (preserve) #IMPLIED>
<!-- frontmatter -->
<!ELEMENT title (#PCDATA|phrase|xref|filename|math|emphasis|acronym)*>
<!ATTLIST title role CDATA #IMPLIED>
<!ELEMENT bookinfo (releaseinfo,author*,editor*,date,copyright,
abstract)>
<!ELEMENT releaseinfo (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT copyright (year,holder)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT holder (#PCDATA)>
<!ELEMENT abstract (para)+>
<!ELEMENT toc (title)?>
<!ELEMENT lot (title)?>
<!-- end of bibliographic elements -->
<!ENTITY % id "
id CDATA #REQUIRED">
<!-- block level elements -->
<!ENTITY % blocks "para|formalpara|figure|section|literallayout
|variablelist|itemizedlist|orderedlist|blockquote">
<!-- sectional elements -->
<!ELEMENT chapter (title,(%blocks;)*)>
<!ATTLIST chapter
%id;
revisionflag (added|changed|deleted) #IMPLIED>
<!ELEMENT appendix (title,(%blocks;)*)>
<!ATTLIST appendix
%id;
revisionflag (added|changed|deleted) #IMPLIED>
<!ELEMENT section (title,(%blocks;)*)>
<!ATTLIST section
%id;
revisionflag (added|changed|deleted) #IMPLIED>
<!ELEMENT formalpara (title,para+)>
<!ATTLIST formalpara
id CDATA #IMPLIED>
<!ELEMENT blockquote (para|informaltable)+>
<!ELEMENT literallayout (#PCDATA)>
<!ATTLIST literallayout
revisionflag (added|changed|deleted) #IMPLIED
role (rnc|dtd|rng|xsd|xml) #IMPLIED
file CDATA #IMPLIED>
<!ELEMENT comment (#PCDATA|comment|token|string)*>
<!ELEMENT token (#PCDATA)>
<!ELEMENT string (#PCDATA|token)*>
<!-- bibliographic elements -->
<!ELEMENT bibliography (title,biblioentry*)>
<!ATTLIST bibliography
%id;>
<!ELEMENT biblioentry (author|title|subtitle|pubdate|publisher|edition|
isbn|editor|biblioset|pagenums|seriesvolnums|
bibliomisc|address)*>
<!ATTLIST biblioentry
%id;
revisionflag (added|changed|deleted) #IMPLIED
role (finaledit|book|Article|misc|Manual|InProceedings|InCollection
|TechReport|PhdThesis|unpublished) #IMPLIED>
<!ELEMENT subtitle (#PCDATA|phrase|emphasis)*>
<!ELEMENT publisher (publishername)>
<!ELEMENT publishername (#PCDATA|phrase|emphasis)*>
<!ELEMENT edition (#PCDATA|phrase|emphasis)*>
<!ELEMENT address (#PCDATA|phrase|emphasis)*>
<!ELEMENT seriesvolnums (#PCDATA)>
<!ELEMENT pagenums (#PCDATA)>
<!ELEMENT author (firstname|othername|surname)*>
<!ELEMENT editor (firstname|othername|surname)*>
<!ELEMENT othername (#PCDATA|emphasis)*>
<!ELEMENT firstname (#PCDATA|emphasis)*>
<!ELEMENT surname (#PCDATA|emphasis)*>
<!ATTLIST surname
role (finaledit) #IMPLIED>
<!ELEMENT pubdate (#PCDATA)>
<!ATTLIST pubdate
role (month) #IMPLIED>
<!ELEMENT bibliomisc (#PCDATA|emphasis)*>
<!ATTLIST bibliomisc
role (finaledit|keywords|year|volume|series|number|pages|key
|organization|school|journal|booktitle) #IMPLIED>
<!ELEMENT isbn (#PCDATA)>
<!ELEMENT biblioset (title|volumenum|pagenums|pubdate)*>
<!ATTLIST biblioset
relation (series|article) #REQUIRED>
<!ELEMENT volumenum (#PCDATA)>
<!ENTITY % phrasetext "#PCDATA|xref|term|ulink|citation|varname|filename
|acronym|systemitem|quote|phrase|emphasis|math">
<!ELEMENT para (%phrasetext;|orderedlist|variablelist|itemizedlist
|literallayout|blockquote|footnote)*>
<!ATTLIST para
id CDATA #IMPLIED
revisionflag (added|changed|deleted) #IMPLIED>
<!ELEMENT footnote (para)+>
<!ATTLIST footnote
%id;>
<!-- inline text elements -->
<!ELEMENT phrase (%phrasetext;)*>
<!ATTLIST phrase
role (sl|finaledit) #IMPLIED
revisionflag (added|changed|deleted) #IMPLIED>
<!ELEMENT xref EMPTY>
<!ATTLIST xref
linkend CDATA #REQUIRED>
<!ELEMENT varname (#PCDATA)>
<!ELEMENT filename (#PCDATA)>
<!ELEMENT citation (#PCDATA)>
<!ELEMENT acronym (#PCDATA)>
<!ELEMENT systemitem (#PCDATA)>
<!ATTLIST systemitem
revisionflag (added|changed|deleted) #IMPLIED>
<!ELEMENT ulink (#PCDATA)>
<!ATTLIST ulink
url CDATA #REQUIRED>
<!ELEMENT quote (#PCDATA|math|phrase)*>
<!ELEMENT emphasis (#PCDATA|math|phrase)*>
<!ATTLIST emphasis
role (bold|finaledit) #IMPLIED>
<!-- docbook figures -->
<!ELEMENT figure (title,(graphic|informaltable|literallayout))>
<!ATTLIST figure
%id;
role (finaledit) #IMPLIED>
<!ELEMENT graphic EMPTY>
<!ATTLIST graphic
fileref CDATA #REQUIRED
depth CDATA #IMPLIED
width CDATA #IMPLIED>
<!ELEMENT itemizedlist (listitem)*>
<!ELEMENT orderedlist (listitem)*>
<!ATTLIST orderedlist
numeration (lowerroman) #IMPLIED>
<!ELEMENT listitem (para|figure|blockquote)+>
<!ELEMENT variablelist (varlistentry)*>
<!ELEMENT varlistentry (term+,listitem)*>
<!ELEMENT term (%phrasetext;)*>
<!ATTLIST term id CDATA #IMPLIED>
<!-- docbook tables -->
<!ELEMENT informaltable (tgroup)>
<!ATTLIST informaltable
role (finaledit) #IMPLIED>
<!ELEMENT tgroup (thead?,tbody)>
<!ATTLIST tgroup
cols CDATA #REQUIRED>
<!ELEMENT thead (row)+>
<!ELEMENT tbody (row)+>
<!ELEMENT row (entry)+>
<!ATTLIST row
revisionflag (added|changed|deleted) #IMPLIED>
<!ELEMENT entry (%phrasetext;)*>
<!ATTLIST entry
revisionflag (added|changed|deleted) #IMPLIED>
<!-- MathML (somewhat simplified) -->
<!ENTITY % mel "mspace|mn|mo|mi|mtext|mrow|mfenced|msub|msup|mfrac|mover">
<!ELEMENT math (%mel;)*>
<!ATTLIST math
id CDATA #IMPLIED
display (block) #IMPLIED
revisionflag (added|changed|deleted) #IMPLIED>
<!ELEMENT mrow (%mel;)*>
<!ELEMENT mfenced (%mel;)*>
<!ELEMENT mspace EMPTY>
<!ATTLIST mspace
width CDATA #REQUIRED>
<!ELEMENT mtext (#PCDATA)>
<!ELEMENT mn (#PCDATA)>
<!ELEMENT mo (#PCDATA)>
<!ATTLIST mo
fence (true) #IMPLIED
separator (true) #IMPLIED>
<!ELEMENT mi (#PCDATA)>
<!ATTLIST mi
mathvariant (bold) #IMPLIED
mathcolor CDATA #IMPLIED>
<!ELEMENT msub ((%mel;),(%mel;))>
<!ELEMENT msup ((%mel;),(%mel;))>
<!ELEMENT mfrac ((%mel;),(%mel;))>
<!ELEMENT mover ((%mel;),mo)>