relaton-cen 1.8.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,478 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
4
+ <include href="isodoc.rng">
5
+ <start>
6
+ <ref name="iso-standard"/>
7
+ </start>
8
+ <define name="organization">
9
+ <element name="organization">
10
+ <oneOrMore>
11
+ <ref name="orgname"/>
12
+ </oneOrMore>
13
+ <optional>
14
+ <ref name="abbreviation"/>
15
+ </optional>
16
+ <optional>
17
+ <ref name="uri"/>
18
+ </optional>
19
+ <zeroOrMore>
20
+ <ref name="org-identifier"/>
21
+ </zeroOrMore>
22
+ <zeroOrMore>
23
+ <ref name="contact"/>
24
+ </zeroOrMore>
25
+ <optional>
26
+ <ref name="technical-committee"/>
27
+ </optional>
28
+ <optional>
29
+ <ref name="subcommittee"/>
30
+ </optional>
31
+ <optional>
32
+ <ref name="workgroup"/>
33
+ </optional>
34
+ <optional>
35
+ <ref name="secretariat"/>
36
+ </optional>
37
+ </element>
38
+ </define>
39
+ <define name="BibDataExtensionType">
40
+ <ref name="doctype"/>
41
+ <optional>
42
+ <ref name="horizontal"/>
43
+ </optional>
44
+ <ref name="editorialgroup"/>
45
+ <zeroOrMore>
46
+ <ref name="ics"/>
47
+ </zeroOrMore>
48
+ <ref name="structuredidentifier"/>
49
+ <optional>
50
+ <ref name="stagename"/>
51
+ </optional>
52
+ </define>
53
+ <define name="bdate">
54
+ <element name="date">
55
+ <attribute name="type">
56
+ <choice>
57
+ <ref name="BibliographicDateType"/>
58
+ <text/>
59
+ </choice>
60
+ </attribute>
61
+ <choice>
62
+ <group>
63
+ <element name="from">
64
+ <ref name="ISO8601Date"/>
65
+ </element>
66
+ <optional>
67
+ <element name="to">
68
+ <ref name="ISO8601Date"/>
69
+ </element>
70
+ </optional>
71
+ </group>
72
+ <element name="on">
73
+ <choice>
74
+ <ref name="ISO8601Date"/>
75
+ <value>--</value>
76
+ <value>–</value>
77
+ </choice>
78
+ </element>
79
+ </choice>
80
+ </element>
81
+ </define>
82
+ <define name="sections">
83
+ <element name="sections">
84
+ <zeroOrMore>
85
+ <choice>
86
+ <ref name="note"/>
87
+ <ref name="admonition"/>
88
+ </choice>
89
+ </zeroOrMore>
90
+ <ref name="clause"/>
91
+ <optional>
92
+ <choice>
93
+ <ref name="term-clause"/>
94
+ <ref name="terms"/>
95
+ </choice>
96
+ </optional>
97
+ <optional>
98
+ <ref name="definitions"/>
99
+ </optional>
100
+ <oneOrMore>
101
+ <ref name="clause"/>
102
+ </oneOrMore>
103
+ </element>
104
+ </define>
105
+ <define name="Clause-Section">
106
+ <optional>
107
+ <attribute name="id">
108
+ <data type="ID"/>
109
+ </attribute>
110
+ </optional>
111
+ <optional>
112
+ <attribute name="language"/>
113
+ </optional>
114
+ <optional>
115
+ <attribute name="script"/>
116
+ </optional>
117
+ <optional>
118
+ <attribute name="inline-header">
119
+ <data type="boolean"/>
120
+ </attribute>
121
+ </optional>
122
+ <optional>
123
+ <attribute name="obligation">
124
+ <choice>
125
+ <value>normative</value>
126
+ <value>informative</value>
127
+ </choice>
128
+ </attribute>
129
+ </optional>
130
+ <optional>
131
+ <attribute name="type"/>
132
+ </optional>
133
+ <optional>
134
+ <ref name="section-title"/>
135
+ </optional>
136
+ <group>
137
+ <choice>
138
+ <group>
139
+ <oneOrMore>
140
+ <ref name="BasicBlock"/>
141
+ </oneOrMore>
142
+ <zeroOrMore>
143
+ <ref name="note"/>
144
+ </zeroOrMore>
145
+ </group>
146
+ <ref name="amend"/>
147
+ </choice>
148
+ <oneOrMore>
149
+ <ref name="clause-subsection"/>
150
+ </oneOrMore>
151
+ </group>
152
+ </define>
153
+ <define name="term">
154
+ <element name="term">
155
+ <optional>
156
+ <attribute name="id">
157
+ <data type="ID"/>
158
+ </attribute>
159
+ </optional>
160
+ <ref name="preferred"/>
161
+ <zeroOrMore>
162
+ <ref name="admitted"/>
163
+ </zeroOrMore>
164
+ <zeroOrMore>
165
+ <ref name="deprecates"/>
166
+ </zeroOrMore>
167
+ <optional>
168
+ <ref name="termdomain"/>
169
+ </optional>
170
+ <ref name="definition"/>
171
+ <zeroOrMore>
172
+ <ref name="termnote"/>
173
+ </zeroOrMore>
174
+ <zeroOrMore>
175
+ <ref name="termexample"/>
176
+ </zeroOrMore>
177
+ <zeroOrMore>
178
+ <ref name="termsource"/>
179
+ </zeroOrMore>
180
+ </element>
181
+ </define>
182
+ <define name="annex">
183
+ <element name="annex">
184
+ <optional>
185
+ <attribute name="id">
186
+ <data type="ID"/>
187
+ </attribute>
188
+ </optional>
189
+ <optional>
190
+ <attribute name="language"/>
191
+ </optional>
192
+ <optional>
193
+ <attribute name="script"/>
194
+ </optional>
195
+ <optional>
196
+ <attribute name="inline-header">
197
+ <data type="boolean"/>
198
+ </attribute>
199
+ </optional>
200
+ <optional>
201
+ <attribute name="obligation">
202
+ <choice>
203
+ <value>normative</value>
204
+ <value>informative</value>
205
+ </choice>
206
+ </attribute>
207
+ </optional>
208
+ <optional>
209
+ <ref name="section-title"/>
210
+ </optional>
211
+ <zeroOrMore>
212
+ <!--
213
+ allow hanging paragraps in annexes: they introduce lists
214
+ ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
215
+ -->
216
+ <ref name="BasicBlock"/>
217
+ </zeroOrMore>
218
+ <zeroOrMore>
219
+ <ref name="note"/>
220
+ </zeroOrMore>
221
+ <zeroOrMore>
222
+ <ref name="clause-hanging-paragraph-with-footnote"/>
223
+ </zeroOrMore>
224
+ <zeroOrMore>
225
+ <ref name="annex-appendix"/>
226
+ </zeroOrMore>
227
+ </element>
228
+ </define>
229
+ <define name="AdmonitionType">
230
+ <choice>
231
+ <value>danger</value>
232
+ <value>caution</value>
233
+ <value>warning</value>
234
+ <value>important</value>
235
+ <value>safety precautions</value>
236
+ </choice>
237
+ </define>
238
+ <define name="preface">
239
+ <element name="preface">
240
+ <optional>
241
+ <ref name="abstract"/>
242
+ </optional>
243
+ <ref name="foreword"/>
244
+ <optional>
245
+ <ref name="introduction"/>
246
+ </optional>
247
+ </element>
248
+ </define>
249
+ <define name="DocumentType">
250
+ <choice>
251
+ <value>international-standard</value>
252
+ <value>technical-specification</value>
253
+ <value>technical-report</value>
254
+ <value>publicly-available-specification</value>
255
+ <value>international-workshop-agreement</value>
256
+ <value>guide</value>
257
+ <value>amendment</value>
258
+ <value>technical-corrigendum</value>
259
+ <value>directive</value>
260
+ </choice>
261
+ </define>
262
+ <define name="structuredidentifier">
263
+ <element name="structuredidentifier">
264
+ <optional>
265
+ <attribute name="type"/>
266
+ </optional>
267
+ <group>
268
+ <ref name="documentnumber"/>
269
+ <optional>
270
+ <ref name="tc-documentnumber"/>
271
+ </optional>
272
+ </group>
273
+ </element>
274
+ </define>
275
+ <define name="foreword">
276
+ <element name="foreword">
277
+ <ref name="Basic-Section"/>
278
+ </element>
279
+ </define>
280
+ <define name="introduction">
281
+ <element name="introduction">
282
+ <ref name="Content-Section"/>
283
+ </element>
284
+ </define>
285
+ <define name="editorialgroup">
286
+ <element name="editorialgroup">
287
+ <oneOrMore>
288
+ <ref name="technical-committee"/>
289
+ </oneOrMore>
290
+ <zeroOrMore>
291
+ <ref name="subcommittee"/>
292
+ </zeroOrMore>
293
+ <zeroOrMore>
294
+ <ref name="workgroup"/>
295
+ </zeroOrMore>
296
+ <optional>
297
+ <ref name="secretariat"/>
298
+ </optional>
299
+ </element>
300
+ </define>
301
+ <define name="Content-Section">
302
+ <optional>
303
+ <attribute name="id">
304
+ <data type="ID"/>
305
+ </attribute>
306
+ </optional>
307
+ <optional>
308
+ <attribute name="language"/>
309
+ </optional>
310
+ <optional>
311
+ <attribute name="script"/>
312
+ </optional>
313
+ <optional>
314
+ <attribute name="inline-header">
315
+ <data type="boolean"/>
316
+ </attribute>
317
+ </optional>
318
+ <optional>
319
+ <attribute name="obligation">
320
+ <choice>
321
+ <value>normative</value>
322
+ <value>informative</value>
323
+ </choice>
324
+ </attribute>
325
+ </optional>
326
+ <optional>
327
+ <attribute name="number"/>
328
+ </optional>
329
+ <optional>
330
+ <attribute name="type"/>
331
+ </optional>
332
+ <optional>
333
+ <ref name="section-title"/>
334
+ </optional>
335
+ <choice>
336
+ <group>
337
+ <zeroOrMore>
338
+ <ref name="BasicBlock"/>
339
+ </zeroOrMore>
340
+ <zeroOrMore>
341
+ <ref name="note"/>
342
+ </zeroOrMore>
343
+ </group>
344
+ <oneOrMore>
345
+ <ref name="content-subsection"/>
346
+ </oneOrMore>
347
+ </choice>
348
+ </define>
349
+ </include>
350
+ <!-- end overrides -->
351
+ <!--
352
+ We display the Normative References between scope and terms; but to keep the
353
+ grammar simple, we keep the references together
354
+ -->
355
+ <define name="iso-standard">
356
+ <element name="iso-standard">
357
+ <attribute name="version"/>
358
+ <attribute name="type">
359
+ <choice>
360
+ <value>semantic</value>
361
+ <value>presentation</value>
362
+ </choice>
363
+ </attribute>
364
+ <ref name="bibdata"/>
365
+ <zeroOrMore>
366
+ <ref name="termdocsource"/>
367
+ </zeroOrMore>
368
+ <optional>
369
+ <ref name="misccontainer"/>
370
+ </optional>
371
+ <optional>
372
+ <ref name="boilerplate"/>
373
+ </optional>
374
+ <ref name="preface"/>
375
+ <oneOrMore>
376
+ <ref name="sections"/>
377
+ </oneOrMore>
378
+ <zeroOrMore>
379
+ <ref name="annex"/>
380
+ </zeroOrMore>
381
+ <ref name="bibliography"/>
382
+ <zeroOrMore>
383
+ <ref name="indexsect"/>
384
+ </zeroOrMore>
385
+ </element>
386
+ </define>
387
+ <define name="horizontal">
388
+ <element name="horizontal">
389
+ <data type="boolean"/>
390
+ </element>
391
+ </define>
392
+ <define name="documentnumber">
393
+ <element name="project-number">
394
+ <optional>
395
+ <attribute name="part">
396
+ <data type="int"/>
397
+ </attribute>
398
+ </optional>
399
+ <optional>
400
+ <attribute name="subpart">
401
+ <data type="int"/>
402
+ </attribute>
403
+ </optional>
404
+ <text/>
405
+ </element>
406
+ </define>
407
+ <define name="tc-documentnumber">
408
+ <element name="tc-document-number">
409
+ <data type="int"/>
410
+ </element>
411
+ </define>
412
+ <define name="subcommittee">
413
+ <element name="subcommittee">
414
+ <ref name="IsoWorkgroup"/>
415
+ </element>
416
+ </define>
417
+ <define name="workgroup">
418
+ <element name="workgroup">
419
+ <ref name="IsoWorkgroup"/>
420
+ </element>
421
+ </define>
422
+ <define name="secretariat">
423
+ <element name="secretariat">
424
+ <text/>
425
+ </element>
426
+ </define>
427
+ <define name="clause-hanging-paragraph-with-footnote">
428
+ <element name="clause">
429
+ <optional>
430
+ <attribute name="id">
431
+ <data type="ID"/>
432
+ </attribute>
433
+ </optional>
434
+ <optional>
435
+ <attribute name="language"/>
436
+ </optional>
437
+ <optional>
438
+ <attribute name="script"/>
439
+ </optional>
440
+ <optional>
441
+ <attribute name="inline-header">
442
+ <data type="boolean"/>
443
+ </attribute>
444
+ </optional>
445
+ <optional>
446
+ <attribute name="obligation">
447
+ <choice>
448
+ <value>normative</value>
449
+ <value>informative</value>
450
+ </choice>
451
+ </attribute>
452
+ </optional>
453
+ <optional>
454
+ <ref name="section-title"/>
455
+ </optional>
456
+ <zeroOrMore>
457
+ <!-- allow hanging paragraphs in annexes: they introduce lists -->
458
+ <ref name="BasicBlock"/>
459
+ </zeroOrMore>
460
+ <zeroOrMore>
461
+ <ref name="note"/>
462
+ </zeroOrMore>
463
+ <zeroOrMore>
464
+ <ref name="clause-hanging-paragraph-with-footnote"/>
465
+ </zeroOrMore>
466
+ </element>
467
+ </define>
468
+ <define name="annex-appendix">
469
+ <element name="appendix">
470
+ <ref name="Clause-Section"/>
471
+ </element>
472
+ </define>
473
+ <define name="stagename">
474
+ <element name="stagename">
475
+ <text/>
476
+ </element>
477
+ </define>
478
+ </grammar>