relaton-gb 0.6.8 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,297 @@
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 = "http://riboseinc.com/gbstandard" -->
4
+ <!--
5
+ Currently we inherit from a namespaced grammar, isostandard. Unless we inherit from isodoc,
6
+ we cannot have a new default namespace: we will end up with a grammar with two different
7
+ namespaces, one for isostandard and one for csd additions. And we do not want that.
8
+ -->
9
+ <include href="isostandard.rng">
10
+ <start>
11
+ <ref name="gb-standard"/>
12
+ </start>
13
+ <define name="preferred">
14
+ <element name="preferred">
15
+ <ref name="ZhEnLocalizedString"/>
16
+ </element>
17
+ </define>
18
+ <define name="admitted">
19
+ <element name="admitted">
20
+ <ref name="ZhEnLocalizedString"/>
21
+ </element>
22
+ </define>
23
+ <define name="deprecates">
24
+ <element name="deprecates">
25
+ <ref name="ZhEnLocalizedString"/>
26
+ </element>
27
+ </define>
28
+ <define name="term">
29
+ <element name="term">
30
+ <optional>
31
+ <attribute name="id">
32
+ <data type="ID"/>
33
+ </attribute>
34
+ </optional>
35
+ <oneOrMore>
36
+ <ref name="preferred"/>
37
+ </oneOrMore>
38
+ <zeroOrMore>
39
+ <ref name="admitted"/>
40
+ </zeroOrMore>
41
+ <zeroOrMore>
42
+ <ref name="deprecates"/>
43
+ </zeroOrMore>
44
+ <optional>
45
+ <ref name="termdomain"/>
46
+ </optional>
47
+ <ref name="definition"/>
48
+ <zeroOrMore>
49
+ <ref name="termnote"/>
50
+ </zeroOrMore>
51
+ <zeroOrMore>
52
+ <ref name="termexample"/>
53
+ </zeroOrMore>
54
+ <zeroOrMore>
55
+ <ref name="termsource"/>
56
+ </zeroOrMore>
57
+ </element>
58
+ </define>
59
+ <define name="BibDataExtensionType">
60
+ <optional>
61
+ <ref name="doctype"/>
62
+ </optional>
63
+ <zeroOrMore>
64
+ <ref name="gbcommittee"/>
65
+ </zeroOrMore>
66
+ <zeroOrMore>
67
+ <ref name="ics"/>
68
+ </zeroOrMore>
69
+ <ref name="structuredidentifier"/>
70
+ <ref name="gbtype"/>
71
+ <oneOrMore>
72
+ <ref name="gbccs"/>
73
+ </oneOrMore>
74
+ <optional>
75
+ <ref name="gbplannumber"/>
76
+ </optional>
77
+ </define>
78
+ <define name="term-clause">
79
+ <element name="clause">
80
+ <optional>
81
+ <attribute name="id">
82
+ <data type="ID"/>
83
+ </attribute>
84
+ </optional>
85
+ <optional>
86
+ <attribute name="language"/>
87
+ </optional>
88
+ <optional>
89
+ <attribute name="script"/>
90
+ </optional>
91
+ <optional>
92
+ <attribute name="inline-header">
93
+ <data type="boolean"/>
94
+ </attribute>
95
+ </optional>
96
+ <optional>
97
+ <attribute name="obligation">
98
+ <choice>
99
+ <value>normative</value>
100
+ <value>informative</value>
101
+ </choice>
102
+ </attribute>
103
+ </optional>
104
+ <optional>
105
+ <ref name="section-title"/>
106
+ </optional>
107
+ <zeroOrMore>
108
+ <!-- boilerplate not stripped -->
109
+ <choice>
110
+ <ref name="paragraph"/>
111
+ <ref name="ul"/>
112
+ </choice>
113
+ </zeroOrMore>
114
+ <choice>
115
+ <oneOrMore>
116
+ <ref name="term-clause"/>
117
+ </oneOrMore>
118
+ <zeroOrMore>
119
+ <choice>
120
+ <ref name="terms"/>
121
+ <ref name="definitions"/>
122
+ </choice>
123
+ </zeroOrMore>
124
+ </choice>
125
+ </element>
126
+ </define>
127
+ <define name="terms">
128
+ <element name="terms">
129
+ <optional>
130
+ <attribute name="id">
131
+ <data type="ID"/>
132
+ </attribute>
133
+ </optional>
134
+ <optional>
135
+ <attribute name="language"/>
136
+ </optional>
137
+ <optional>
138
+ <attribute name="script"/>
139
+ </optional>
140
+ <optional>
141
+ <attribute name="obligation">
142
+ <choice>
143
+ <value>normative</value>
144
+ <value>informative</value>
145
+ </choice>
146
+ </attribute>
147
+ </optional>
148
+ <optional>
149
+ <ref name="section-title"/>
150
+ </optional>
151
+ <zeroOrMore>
152
+ <!-- boilerplate not stripped -->
153
+ <choice>
154
+ <ref name="paragraph"/>
155
+ <ref name="ul"/>
156
+ </choice>
157
+ </zeroOrMore>
158
+ <choice>
159
+ <oneOrMore>
160
+ <ref name="term"/>
161
+ </oneOrMore>
162
+ <group>
163
+ <zeroOrMore>
164
+ <ref name="terms"/>
165
+ </zeroOrMore>
166
+ <optional>
167
+ <ref name="definitions"/>
168
+ </optional>
169
+ </group>
170
+ </choice>
171
+ </element>
172
+ </define>
173
+ <define name="DocumentType">
174
+ <choice>
175
+ <value>standard</value>
176
+ <value>recommendation</value>
177
+ </choice>
178
+ </define>
179
+ </include>
180
+ <!-- identical structure to iso-standard -->
181
+ <define name="gb-standard">
182
+ <element name="gb-standard">
183
+ <ref name="bibdata"/>
184
+ <zeroOrMore>
185
+ <ref name="termdocsource"/>
186
+ </zeroOrMore>
187
+ <optional>
188
+ <ref name="boilerplate"/>
189
+ </optional>
190
+ <ref name="preface"/>
191
+ <oneOrMore>
192
+ <ref name="sections"/>
193
+ </oneOrMore>
194
+ <zeroOrMore>
195
+ <ref name="annex"/>
196
+ </zeroOrMore>
197
+ <ref name="bibliography"/>
198
+ </element>
199
+ </define>
200
+ <define name="gbccs">
201
+ <element name="ccs">
202
+ <element name="code">
203
+ <text/>
204
+ </element>
205
+ <optional>
206
+ <element name="text">
207
+ <text/>
208
+ </element>
209
+ </optional>
210
+ </element>
211
+ </define>
212
+ <define name="gbplannumber">
213
+ <element name="plannumber">
214
+ <text/>
215
+ </element>
216
+ </define>
217
+ <define name="gbcommittee">
218
+ <element name="gbcommittee">
219
+ <attribute name="type">
220
+ <choice>
221
+ <value>technical</value>
222
+ <value>provisional</value>
223
+ <value>drafting</value>
224
+ </choice>
225
+ </attribute>
226
+ <text/>
227
+ </element>
228
+ </define>
229
+ <define name="gbtype">
230
+ <element name="gbtype">
231
+ <ref name="gbscope"/>
232
+ <ref name="gbprefix"/>
233
+ <ref name="gbmandate"/>
234
+ <ref name="gbtopic"/>
235
+ </element>
236
+ </define>
237
+ <define name="gbscope">
238
+ <element name="gbscope">
239
+ <choice>
240
+ <value>national</value>
241
+ <value>sector</value>
242
+ <value>professional</value>
243
+ <value>local</value>
244
+ <value>enterprise</value>
245
+ <value>social-group</value>
246
+ </choice>
247
+ </element>
248
+ </define>
249
+ <define name="gbmandate">
250
+ <element name="gbmandate">
251
+ <choice>
252
+ <value>mandatory</value>
253
+ <value>recommended</value>
254
+ <value>guidelines</value>
255
+ </choice>
256
+ </element>
257
+ </define>
258
+ <define name="gbprefix">
259
+ <element name="gbprefix">
260
+ <text/>
261
+ </element>
262
+ </define>
263
+ <define name="gbtopic">
264
+ <element name="gbtopic">
265
+ <choice>
266
+ <value>basic</value>
267
+ <value>health-and-safety</value>
268
+ <value>environment-protection</value>
269
+ <value>engineering-and-construction</value>
270
+ <value>product</value>
271
+ <value>method</value>
272
+ <value>management-techniques</value>
273
+ <value>other</value>
274
+ </choice>
275
+ </element>
276
+ </define>
277
+ <define name="ZhEnLocalizedString">
278
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
279
+ <attribute name="language">
280
+ <choice>
281
+ <value>zh</value>
282
+ <value>en</value>
283
+ </choice>
284
+ </attribute>
285
+ <optional>
286
+ <attribute name="script">
287
+ <choice>
288
+ <value>Hans</value>
289
+ <value>Latn</value>
290
+ </choice>
291
+ </attribute>
292
+ </optional>
293
+ <oneOrMore>
294
+ <ref name="TextElement"/>
295
+ </oneOrMore>
296
+ </define>
297
+ </grammar>
@@ -0,0 +1,514 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ instantiations of this grammar may replace leaf strings
4
+ with more elaborated types; e.g. title (text) replaced with
5
+ title-main, title-intro, title-part; type replaced with
6
+ enum.
7
+
8
+ some renaming at leaf nodes is permissible
9
+
10
+ obligations can change both from optional to mandatory,
11
+ and from mandatory to optional; optional elements may
12
+ be omitted; freely positioned alternatives may be replaced
13
+ with strict ordering
14
+
15
+ DO NOT introduce a namespace here. We do not want a distinct namespace
16
+ for these elements, and a distinct namespace for any grammar inheriting
17
+ these elements; we just want one namespace for any child grammars
18
+ of this.
19
+ -->
20
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
+ <include href="reqt.rng"/>
22
+ <!-- include "biblio.rnc" { } -->
23
+ <include href="basicdoc.rng">
24
+ <start>
25
+ <ref name="standard-document"/>
26
+ </start>
27
+ <define name="BibDataExtensionType">
28
+ <ref name="doctype"/>
29
+ <zeroOrMore>
30
+ <ref name="structuredidentifier"/>
31
+ </zeroOrMore>
32
+ </define>
33
+ <define name="TitleType">
34
+ <text/>
35
+ </define>
36
+ <define name="sections">
37
+ <element name="sections">
38
+ <oneOrMore>
39
+ <choice>
40
+ <ref name="clause"/>
41
+ <ref name="terms"/>
42
+ <ref name="definitions"/>
43
+ </choice>
44
+ </oneOrMore>
45
+ </element>
46
+ </define>
47
+ <define name="references">
48
+ <element name="references">
49
+ <optional>
50
+ <attribute name="id">
51
+ <data type="ID"/>
52
+ </attribute>
53
+ </optional>
54
+ <optional>
55
+ <ref name="section-title"/>
56
+ </optional>
57
+ <zeroOrMore>
58
+ <ref name="BasicBlock"/>
59
+ </zeroOrMore>
60
+ <zeroOrMore>
61
+ <ref name="bibitem"/>
62
+ <zeroOrMore>
63
+ <ref name="note"/>
64
+ </zeroOrMore>
65
+ </zeroOrMore>
66
+ </element>
67
+ </define>
68
+ </include>
69
+ <define name="standard-document">
70
+ <element name="standard-document">
71
+ <ref name="bibdata"/>
72
+ <optional>
73
+ <ref name="boilerplate"/>
74
+ </optional>
75
+ <optional>
76
+ <ref name="preface"/>
77
+ </optional>
78
+ <ref name="sections"/>
79
+ <zeroOrMore>
80
+ <ref name="annex"/>
81
+ </zeroOrMore>
82
+ <zeroOrMore>
83
+ <ref name="references"/>
84
+ </zeroOrMore>
85
+ </element>
86
+ </define>
87
+ <define name="preface">
88
+ <element name="preface">
89
+ <oneOrMore>
90
+ <choice>
91
+ <ref name="content"/>
92
+ <ref name="abstract"/>
93
+ <ref name="foreword"/>
94
+ <ref name="introduction"/>
95
+ <ref name="acknowledgements"/>
96
+ </choice>
97
+ </oneOrMore>
98
+ </element>
99
+ </define>
100
+ <define name="foreword">
101
+ <element name="foreword">
102
+ <ref name="Content-Section"/>
103
+ </element>
104
+ </define>
105
+ <define name="introduction">
106
+ <element name="introduction">
107
+ <ref name="Content-Section"/>
108
+ </element>
109
+ </define>
110
+ <define name="boilerplate">
111
+ <element name="boilerplate">
112
+ <optional>
113
+ <ref name="copyright-statement"/>
114
+ </optional>
115
+ <optional>
116
+ <ref name="license-statement"/>
117
+ </optional>
118
+ <optional>
119
+ <ref name="legal-statement"/>
120
+ </optional>
121
+ <optional>
122
+ <ref name="feedback-statement"/>
123
+ </optional>
124
+ </element>
125
+ </define>
126
+ <define name="copyright-statement">
127
+ <element name="copyright-statement">
128
+ <ref name="Content-Section"/>
129
+ </element>
130
+ </define>
131
+ <define name="license-statement">
132
+ <element name="license-statement">
133
+ <ref name="Content-Section"/>
134
+ </element>
135
+ </define>
136
+ <define name="legal-statement">
137
+ <element name="legal-statement">
138
+ <ref name="Content-Section"/>
139
+ </element>
140
+ </define>
141
+ <define name="feedback-statement">
142
+ <element name="feedback-statement">
143
+ <ref name="Content-Section"/>
144
+ </element>
145
+ </define>
146
+ <define name="definitions">
147
+ <element name="definitions">
148
+ <optional>
149
+ <attribute name="id">
150
+ <data type="ID"/>
151
+ </attribute>
152
+ </optional>
153
+ <optional>
154
+ <attribute name="language"/>
155
+ </optional>
156
+ <optional>
157
+ <attribute name="script"/>
158
+ </optional>
159
+ <optional>
160
+ <ref name="section-title"/>
161
+ </optional>
162
+ <oneOrMore>
163
+ <zeroOrMore>
164
+ <ref name="BasicBlock"/>
165
+ </zeroOrMore>
166
+ <ref name="dl"/>
167
+ </oneOrMore>
168
+ </element>
169
+ </define>
170
+ <define name="content">
171
+ <element name="clause">
172
+ <ref name="Content-Section"/>
173
+ </element>
174
+ </define>
175
+ <define name="abstract">
176
+ <element name="abstract">
177
+ <ref name="Content-Section"/>
178
+ </element>
179
+ </define>
180
+ <define name="acknowledgements">
181
+ <element name="acknowledgements">
182
+ <ref name="Content-Section"/>
183
+ </element>
184
+ </define>
185
+ <define name="content-subsection">
186
+ <element name="clause">
187
+ <optional>
188
+ <attribute name="type"/>
189
+ </optional>
190
+ <ref name="Content-Section"/>
191
+ </element>
192
+ </define>
193
+ <define name="Content-Section">
194
+ <optional>
195
+ <attribute name="id">
196
+ <data type="ID"/>
197
+ </attribute>
198
+ </optional>
199
+ <optional>
200
+ <attribute name="language"/>
201
+ </optional>
202
+ <optional>
203
+ <attribute name="script"/>
204
+ </optional>
205
+ <optional>
206
+ <ref name="section-title"/>
207
+ </optional>
208
+ <choice>
209
+ <group>
210
+ <optional>
211
+ <ref name="BasicBlock"/>
212
+ </optional>
213
+ <zeroOrMore>
214
+ <ref name="note"/>
215
+ </zeroOrMore>
216
+ </group>
217
+ <oneOrMore>
218
+ <ref name="content-subsection"/>
219
+ </oneOrMore>
220
+ </choice>
221
+ </define>
222
+ <define name="clause">
223
+ <element name="clause">
224
+ <optional>
225
+ <attribute name="type"/>
226
+ </optional>
227
+ <ref name="Clause-Section"/>
228
+ </element>
229
+ </define>
230
+ <define name="Clause-Section">
231
+ <optional>
232
+ <attribute name="id">
233
+ <data type="ID"/>
234
+ </attribute>
235
+ </optional>
236
+ <optional>
237
+ <attribute name="language"/>
238
+ </optional>
239
+ <optional>
240
+ <attribute name="script"/>
241
+ </optional>
242
+ <optional>
243
+ <ref name="section-title"/>
244
+ </optional>
245
+ <choice>
246
+ <group>
247
+ <optional>
248
+ <ref name="BasicBlock"/>
249
+ </optional>
250
+ <zeroOrMore>
251
+ <ref name="note"/>
252
+ </zeroOrMore>
253
+ </group>
254
+ <oneOrMore>
255
+ <choice>
256
+ <ref name="clause-subsection"/>
257
+ <ref name="terms"/>
258
+ <ref name="definitions"/>
259
+ </choice>
260
+ </oneOrMore>
261
+ </choice>
262
+ </define>
263
+ <define name="clause-subsection">
264
+ <element name="clause">
265
+ <ref name="Clause-Section"/>
266
+ </element>
267
+ </define>
268
+ <define name="annex">
269
+ <element name="annex">
270
+ <optional>
271
+ <attribute name="id">
272
+ <data type="ID"/>
273
+ </attribute>
274
+ </optional>
275
+ <optional>
276
+ <attribute name="language"/>
277
+ </optional>
278
+ <optional>
279
+ <attribute name="script"/>
280
+ </optional>
281
+ <attribute name="obligation">
282
+ <choice>
283
+ <value>normative</value>
284
+ <value>informative</value>
285
+ </choice>
286
+ </attribute>
287
+ <optional>
288
+ <ref name="section-title"/>
289
+ </optional>
290
+ <choice>
291
+ <group>
292
+ <optional>
293
+ <ref name="BasicBlock"/>
294
+ </optional>
295
+ <zeroOrMore>
296
+ <ref name="note"/>
297
+ </zeroOrMore>
298
+ </group>
299
+ <oneOrMore>
300
+ <ref name="clause-subsection"/>
301
+ </oneOrMore>
302
+ </choice>
303
+ </element>
304
+ </define>
305
+ <define name="terms">
306
+ <element name="terms">
307
+ <optional>
308
+ <attribute name="id">
309
+ <data type="ID"/>
310
+ </attribute>
311
+ </optional>
312
+ <optional>
313
+ <attribute name="language"/>
314
+ </optional>
315
+ <optional>
316
+ <attribute name="script"/>
317
+ </optional>
318
+ <zeroOrMore>
319
+ <ref name="BasicBlock"/>
320
+ </zeroOrMore>
321
+ <oneOrMore>
322
+ <ref name="term"/>
323
+ </oneOrMore>
324
+ </element>
325
+ </define>
326
+ <define name="term">
327
+ <element name="term">
328
+ <optional>
329
+ <attribute name="id">
330
+ <data type="ID"/>
331
+ </attribute>
332
+ </optional>
333
+ <oneOrMore>
334
+ <ref name="preferred"/>
335
+ </oneOrMore>
336
+ <zeroOrMore>
337
+ <ref name="admitted"/>
338
+ </zeroOrMore>
339
+ <zeroOrMore>
340
+ <ref name="related"/>
341
+ </zeroOrMore>
342
+ <zeroOrMore>
343
+ <ref name="deprecates"/>
344
+ </zeroOrMore>
345
+ <optional>
346
+ <ref name="termdomain"/>
347
+ </optional>
348
+ <zeroOrMore>
349
+ <ref name="termgrammar"/>
350
+ </zeroOrMore>
351
+ <ref name="definition"/>
352
+ <zeroOrMore>
353
+ <ref name="termnote"/>
354
+ </zeroOrMore>
355
+ <zeroOrMore>
356
+ <ref name="termexample"/>
357
+ </zeroOrMore>
358
+ <zeroOrMore>
359
+ <ref name="termsource"/>
360
+ </zeroOrMore>
361
+ </element>
362
+ </define>
363
+ <define name="preferred">
364
+ <element name="preferred">
365
+ <oneOrMore>
366
+ <ref name="TextElement"/>
367
+ </oneOrMore>
368
+ </element>
369
+ </define>
370
+ <define name="admitted">
371
+ <element name="admitted">
372
+ <oneOrMore>
373
+ <ref name="TextElement"/>
374
+ </oneOrMore>
375
+ </element>
376
+ </define>
377
+ <define name="related">
378
+ <element name="related">
379
+ <optional>
380
+ <attribute name="type">
381
+ <choice>
382
+ <value>compare</value>
383
+ <value>contrast</value>
384
+ <value>see</value>
385
+ </choice>
386
+ </attribute>
387
+ </optional>
388
+ <oneOrMore>
389
+ <ref name="TextElement"/>
390
+ </oneOrMore>
391
+ </element>
392
+ </define>
393
+ <define name="deprecates">
394
+ <element name="deprecates">
395
+ <oneOrMore>
396
+ <ref name="TextElement"/>
397
+ </oneOrMore>
398
+ </element>
399
+ </define>
400
+ <define name="termdomain">
401
+ <element name="domain">
402
+ <oneOrMore>
403
+ <ref name="TextElement"/>
404
+ </oneOrMore>
405
+ </element>
406
+ </define>
407
+ <define name="termgrammar">
408
+ <element name="grammar">
409
+ <oneOrMore>
410
+ <ref name="TextElement"/>
411
+ </oneOrMore>
412
+ </element>
413
+ </define>
414
+ <define name="definition">
415
+ <element name="definition">
416
+ <ref name="paragraph"/>
417
+ </element>
418
+ </define>
419
+ <define name="termnote">
420
+ <element name="termnote">
421
+ <attribute name="id">
422
+ <data type="ID"/>
423
+ </attribute>
424
+ <ref name="paragraph"/>
425
+ </element>
426
+ </define>
427
+ <define name="termexample">
428
+ <element name="termexample">
429
+ <attribute name="id">
430
+ <data type="ID"/>
431
+ </attribute>
432
+ <ref name="paragraph"/>
433
+ </element>
434
+ </define>
435
+ <define name="termsource">
436
+ <element name="termsource">
437
+ <attribute name="status">
438
+ <choice>
439
+ <value>identical</value>
440
+ <value>modified</value>
441
+ </choice>
442
+ </attribute>
443
+ <ref name="origin"/>
444
+ <optional>
445
+ <ref name="modification"/>
446
+ </optional>
447
+ </element>
448
+ </define>
449
+ <define name="origin">
450
+ <element name="origin">
451
+ <ref name="erefType"/>
452
+ </element>
453
+ </define>
454
+ <define name="modification">
455
+ <element name="modification">
456
+ <ref name="paragraph"/>
457
+ </element>
458
+ </define>
459
+ <define name="structuredidentifier">
460
+ <element name="structuredidentifier">
461
+ <optional>
462
+ <attribute name="type"/>
463
+ </optional>
464
+ <oneOrMore>
465
+ <element name="agency">
466
+ <text/>
467
+ </element>
468
+ </oneOrMore>
469
+ <optional>
470
+ <element name="class">
471
+ <text/>
472
+ </element>
473
+ </optional>
474
+ <element name="docnumber">
475
+ <text/>
476
+ </element>
477
+ <optional>
478
+ <element name="partnumber">
479
+ <text/>
480
+ </element>
481
+ </optional>
482
+ <optional>
483
+ <element name="edition">
484
+ <text/>
485
+ </element>
486
+ </optional>
487
+ <optional>
488
+ <element name="version">
489
+ <text/>
490
+ </element>
491
+ </optional>
492
+ <optional>
493
+ <element name="supplementtype">
494
+ <text/>
495
+ </element>
496
+ </optional>
497
+ <optional>
498
+ <element name="supplementnumber">
499
+ <text/>
500
+ </element>
501
+ </optional>
502
+ <optional>
503
+ <element name="language">
504
+ <text/>
505
+ </element>
506
+ </optional>
507
+ <optional>
508
+ <element name="year">
509
+ <text/>
510
+ </element>
511
+ </optional>
512
+ </element>
513
+ </define>
514
+ </grammar>