relaton-ietf 1.1.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b4c5d8312868629129478bdcae9e7974ed1e32052a4bb674f8e2e93f43448ab
4
- data.tar.gz: 6fd9cc41e53b2a0333faafaa692a6c6a5c0f60b36a1a93d3520a31e420c48cc3
3
+ metadata.gz: 5b582d89c8f44fb110d82a47cd477f50be19667cd4482de9753280d9b6ba8a84
4
+ data.tar.gz: 3da49d99a2b3fa8880b603b252eea0d551e3f1457c8b8486d0256df957f227a1
5
5
  SHA512:
6
- metadata.gz: 721d3953bb74e0ca0b7a63a8870ce845491c458fe9b1f33d1f9219cf2d40d853da68c2c413296480aad01c546caa79ed89820408f391a5f62c35e178a1ef0354
7
- data.tar.gz: 4c6ea63c04af0190e09e0bc42b807be9e4e7e2f0548022b8de6fc640829e46a887b83f2cf3ed8e07b9acbb0497c62cea0951db9e9b96c99d6944b69bcdabb0bf
6
+ metadata.gz: ea84e7f6f05e5b95aaaf1668cd9502b6e781409b9f899efafcb757bce60056e5f292e5147f5564c49662a016286300f198de9504427beec1e4677d9ca1eb7f24
7
+ data.tar.gz: 0c5fcefc0c2e17233f874f252d2b66e488867dd6b0af77f5043a90e2f547a2237a0ba2302bbcd4d723b3330cba8976c1bf272062ea12f948fc3c12b5b9d08316
@@ -532,7 +532,7 @@
532
532
  </define>
533
533
  <define name="LocalityType">
534
534
  <data type="string">
535
- <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|locality:[a-zA-Z0-9_]+</param>
535
+ <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
536
536
  </data>
537
537
  </define>
538
538
  <define name="referenceFrom">
@@ -69,12 +69,12 @@
69
69
  </attribute>
70
70
  </optional>
71
71
  <optional>
72
- <attribute name="keepWithNext">
72
+ <attribute name="keep-with-next">
73
73
  <data type="boolean"/>
74
74
  </attribute>
75
75
  </optional>
76
76
  <optional>
77
- <attribute name="keepWithPrevious">
77
+ <attribute name="keep-with-previous">
78
78
  <data type="boolean"/>
79
79
  </attribute>
80
80
  </optional>
@@ -297,6 +297,9 @@
297
297
  <data type="boolean"/>
298
298
  </attribute>
299
299
  </optional>
300
+ <optional>
301
+ <attribute name="number"/>
302
+ </optional>
300
303
  <optional>
301
304
  <attribute name="subsequence"/>
302
305
  </optional>
@@ -379,6 +382,9 @@
379
382
  <data type="boolean"/>
380
383
  </attribute>
381
384
  </optional>
385
+ <optional>
386
+ <attribute name="number"/>
387
+ </optional>
382
388
  <optional>
383
389
  <attribute name="subsequence"/>
384
390
  </optional>
@@ -64,6 +64,85 @@
64
64
  <text/>
65
65
  </element>
66
66
  </define>
67
+ <define name="ul">
68
+ <element name="ul">
69
+ <attribute name="id">
70
+ <data type="ID"/>
71
+ </attribute>
72
+ <optional>
73
+ <attribute name="keep-with-next">
74
+ <data type="boolean"/>
75
+ </attribute>
76
+ </optional>
77
+ <optional>
78
+ <attribute name="keep-lines-together">
79
+ <data type="boolean"/>
80
+ </attribute>
81
+ </optional>
82
+ <oneOrMore>
83
+ <ref name="li"/>
84
+ </oneOrMore>
85
+ <zeroOrMore>
86
+ <ref name="note"/>
87
+ </zeroOrMore>
88
+ </element>
89
+ </define>
90
+ <define name="ol">
91
+ <element name="ol">
92
+ <attribute name="id">
93
+ <data type="ID"/>
94
+ </attribute>
95
+ <optional>
96
+ <attribute name="keep-with-next">
97
+ <data type="boolean"/>
98
+ </attribute>
99
+ </optional>
100
+ <optional>
101
+ <attribute name="keep-lines-together">
102
+ <data type="boolean"/>
103
+ </attribute>
104
+ </optional>
105
+ <attribute name="type">
106
+ <choice>
107
+ <value>roman</value>
108
+ <value>alphabet</value>
109
+ <value>arabic</value>
110
+ <value>roman_upper</value>
111
+ <value>alphabet_upper</value>
112
+ </choice>
113
+ </attribute>
114
+ <oneOrMore>
115
+ <ref name="li"/>
116
+ </oneOrMore>
117
+ <zeroOrMore>
118
+ <ref name="note"/>
119
+ </zeroOrMore>
120
+ </element>
121
+ </define>
122
+ <define name="dl">
123
+ <element name="dl">
124
+ <attribute name="id">
125
+ <data type="ID"/>
126
+ </attribute>
127
+ <optional>
128
+ <attribute name="keep-with-next">
129
+ <data type="boolean"/>
130
+ </attribute>
131
+ </optional>
132
+ <optional>
133
+ <attribute name="keep-lines-together">
134
+ <data type="boolean"/>
135
+ </attribute>
136
+ </optional>
137
+ <oneOrMore>
138
+ <ref name="dt"/>
139
+ <ref name="dd"/>
140
+ </oneOrMore>
141
+ <zeroOrMore>
142
+ <ref name="note"/>
143
+ </zeroOrMore>
144
+ </element>
145
+ </define>
67
146
  <define name="example">
68
147
  <element name="example">
69
148
  <attribute name="id">
@@ -77,6 +156,19 @@
77
156
  <optional>
78
157
  <attribute name="subsequence"/>
79
158
  </optional>
159
+ <optional>
160
+ <attribute name="number"/>
161
+ </optional>
162
+ <optional>
163
+ <attribute name="keep-with-next">
164
+ <data type="boolean"/>
165
+ </attribute>
166
+ </optional>
167
+ <optional>
168
+ <attribute name="keep-lines-together">
169
+ <data type="boolean"/>
170
+ </attribute>
171
+ </optional>
80
172
  <optional>
81
173
  <ref name="tname"/>
82
174
  </optional>
@@ -97,6 +189,296 @@
97
189
  </zeroOrMore>
98
190
  </element>
99
191
  </define>
192
+ <define name="table">
193
+ <element name="table">
194
+ <attribute name="id">
195
+ <data type="ID"/>
196
+ </attribute>
197
+ <optional>
198
+ <attribute name="unnumbered">
199
+ <data type="boolean"/>
200
+ </attribute>
201
+ </optional>
202
+ <optional>
203
+ <attribute name="number"/>
204
+ </optional>
205
+ <optional>
206
+ <attribute name="subsequence"/>
207
+ </optional>
208
+ <optional>
209
+ <attribute name="alt"/>
210
+ </optional>
211
+ <optional>
212
+ <attribute name="summary"/>
213
+ </optional>
214
+ <optional>
215
+ <attribute name="uri">
216
+ <data type="anyURI"/>
217
+ </attribute>
218
+ </optional>
219
+ <optional>
220
+ <attribute name="keep-with-next">
221
+ <data type="boolean"/>
222
+ </attribute>
223
+ </optional>
224
+ <optional>
225
+ <attribute name="keep-lines-together">
226
+ <data type="boolean"/>
227
+ </attribute>
228
+ </optional>
229
+ <optional>
230
+ <ref name="tname"/>
231
+ </optional>
232
+ <optional>
233
+ <ref name="thead"/>
234
+ </optional>
235
+ <ref name="tbody"/>
236
+ <optional>
237
+ <ref name="tfoot"/>
238
+ </optional>
239
+ <zeroOrMore>
240
+ <ref name="table-note"/>
241
+ </zeroOrMore>
242
+ <optional>
243
+ <ref name="dl"/>
244
+ </optional>
245
+ </element>
246
+ </define>
247
+ <define name="figure">
248
+ <element name="figure">
249
+ <attribute name="id">
250
+ <data type="ID"/>
251
+ </attribute>
252
+ <optional>
253
+ <attribute name="unnumbered">
254
+ <data type="boolean"/>
255
+ </attribute>
256
+ </optional>
257
+ <optional>
258
+ <attribute name="number"/>
259
+ </optional>
260
+ <optional>
261
+ <attribute name="subsequence"/>
262
+ </optional>
263
+ <optional>
264
+ <attribute name="keep-with-next">
265
+ <data type="boolean"/>
266
+ </attribute>
267
+ </optional>
268
+ <optional>
269
+ <attribute name="keep-lines-together">
270
+ <data type="boolean"/>
271
+ </attribute>
272
+ </optional>
273
+ <optional>
274
+ <attribute name="class"/>
275
+ </optional>
276
+ <optional>
277
+ <ref name="source"/>
278
+ </optional>
279
+ <optional>
280
+ <ref name="tname"/>
281
+ </optional>
282
+ <choice>
283
+ <ref name="image"/>
284
+ <ref name="video"/>
285
+ <ref name="audio"/>
286
+ <ref name="pre"/>
287
+ <oneOrMore>
288
+ <ref name="paragraph-with-footnote"/>
289
+ </oneOrMore>
290
+ <zeroOrMore>
291
+ <ref name="figure"/>
292
+ </zeroOrMore>
293
+ </choice>
294
+ <zeroOrMore>
295
+ <ref name="fn"/>
296
+ </zeroOrMore>
297
+ <optional>
298
+ <ref name="dl"/>
299
+ </optional>
300
+ <zeroOrMore>
301
+ <ref name="note"/>
302
+ </zeroOrMore>
303
+ </element>
304
+ </define>
305
+ <define name="sourcecode">
306
+ <element name="sourcecode">
307
+ <attribute name="id">
308
+ <data type="ID"/>
309
+ </attribute>
310
+ <optional>
311
+ <attribute name="unnumbered">
312
+ <data type="boolean"/>
313
+ </attribute>
314
+ </optional>
315
+ <optional>
316
+ <attribute name="number"/>
317
+ </optional>
318
+ <optional>
319
+ <attribute name="subsequence"/>
320
+ </optional>
321
+ <optional>
322
+ <attribute name="keep-with-next">
323
+ <data type="boolean"/>
324
+ </attribute>
325
+ </optional>
326
+ <optional>
327
+ <attribute name="keep-lines-together">
328
+ <data type="boolean"/>
329
+ </attribute>
330
+ </optional>
331
+ <optional>
332
+ <attribute name="lang"/>
333
+ </optional>
334
+ <optional>
335
+ <ref name="tname"/>
336
+ </optional>
337
+ <oneOrMore>
338
+ <choice>
339
+ <text/>
340
+ <ref name="callout"/>
341
+ </choice>
342
+ </oneOrMore>
343
+ <zeroOrMore>
344
+ <ref name="annotation"/>
345
+ </zeroOrMore>
346
+ <zeroOrMore>
347
+ <ref name="note"/>
348
+ </zeroOrMore>
349
+ </element>
350
+ </define>
351
+ <define name="formula">
352
+ <element name="formula">
353
+ <attribute name="id">
354
+ <data type="ID"/>
355
+ </attribute>
356
+ <optional>
357
+ <attribute name="unnumbered">
358
+ <data type="boolean"/>
359
+ </attribute>
360
+ </optional>
361
+ <optional>
362
+ <attribute name="number"/>
363
+ </optional>
364
+ <optional>
365
+ <attribute name="subsequence"/>
366
+ </optional>
367
+ <optional>
368
+ <attribute name="keep-with-next">
369
+ <data type="boolean"/>
370
+ </attribute>
371
+ </optional>
372
+ <optional>
373
+ <attribute name="keep-lines-together">
374
+ <data type="boolean"/>
375
+ </attribute>
376
+ </optional>
377
+ <optional>
378
+ <attribute name="inequality">
379
+ <data type="boolean"/>
380
+ </attribute>
381
+ </optional>
382
+ <ref name="stem"/>
383
+ <optional>
384
+ <ref name="dl"/>
385
+ </optional>
386
+ <zeroOrMore>
387
+ <ref name="note"/>
388
+ </zeroOrMore>
389
+ </element>
390
+ </define>
391
+ <define name="ParagraphType">
392
+ <attribute name="id">
393
+ <data type="ID"/>
394
+ </attribute>
395
+ <optional>
396
+ <attribute name="align">
397
+ <ref name="Alignments"/>
398
+ </attribute>
399
+ </optional>
400
+ <optional>
401
+ <attribute name="keep-with-next">
402
+ <data type="boolean"/>
403
+ </attribute>
404
+ </optional>
405
+ <optional>
406
+ <attribute name="keep-lines-together">
407
+ <data type="boolean"/>
408
+ </attribute>
409
+ </optional>
410
+ <zeroOrMore>
411
+ <ref name="TextElement"/>
412
+ </zeroOrMore>
413
+ <zeroOrMore>
414
+ <ref name="note"/>
415
+ </zeroOrMore>
416
+ </define>
417
+ <define name="paragraph-with-footnote">
418
+ <element name="p">
419
+ <attribute name="id">
420
+ <data type="ID"/>
421
+ </attribute>
422
+ <optional>
423
+ <attribute name="align">
424
+ <ref name="Alignments"/>
425
+ </attribute>
426
+ </optional>
427
+ <optional>
428
+ <attribute name="keep-with-next">
429
+ <data type="boolean"/>
430
+ </attribute>
431
+ </optional>
432
+ <optional>
433
+ <attribute name="keep-lines-together">
434
+ <data type="boolean"/>
435
+ </attribute>
436
+ </optional>
437
+ <zeroOrMore>
438
+ <choice>
439
+ <ref name="TextElement"/>
440
+ <ref name="fn"/>
441
+ </choice>
442
+ </zeroOrMore>
443
+ <zeroOrMore>
444
+ <ref name="note"/>
445
+ </zeroOrMore>
446
+ </element>
447
+ </define>
448
+ <define name="quote">
449
+ <element name="quote">
450
+ <attribute name="id">
451
+ <data type="ID"/>
452
+ </attribute>
453
+ <optional>
454
+ <attribute name="alignment">
455
+ <ref name="Alignments"/>
456
+ </attribute>
457
+ </optional>
458
+ <optional>
459
+ <attribute name="keep-with-next">
460
+ <data type="boolean"/>
461
+ </attribute>
462
+ </optional>
463
+ <optional>
464
+ <attribute name="keep-lines-together">
465
+ <data type="boolean"/>
466
+ </attribute>
467
+ </optional>
468
+ <optional>
469
+ <ref name="quote-source"/>
470
+ </optional>
471
+ <optional>
472
+ <ref name="quote-author"/>
473
+ </optional>
474
+ <oneOrMore>
475
+ <ref name="paragraph-with-footnote"/>
476
+ </oneOrMore>
477
+ <zeroOrMore>
478
+ <ref name="note"/>
479
+ </zeroOrMore>
480
+ </element>
481
+ </define>
100
482
  <define name="BibDataExtensionType">
101
483
  <ref name="doctype"/>
102
484
  <optional>
@@ -165,6 +547,30 @@
165
547
  <attribute name="id">
166
548
  <data type="ID"/>
167
549
  </attribute>
550
+ <optional>
551
+ <attribute name="unnumbered">
552
+ <data type="boolean"/>
553
+ </attribute>
554
+ </optional>
555
+ <optional>
556
+ <attribute name="number"/>
557
+ </optional>
558
+ <optional>
559
+ <attribute name="subsequence"/>
560
+ </optional>
561
+ <optional>
562
+ <attribute name="keep-with-next">
563
+ <data type="boolean"/>
564
+ </attribute>
565
+ </optional>
566
+ <optional>
567
+ <attribute name="keep-lines-together">
568
+ <data type="boolean"/>
569
+ </attribute>
570
+ </optional>
571
+ <optional>
572
+ <attribute name="type"/>
573
+ </optional>
168
574
  <oneOrMore>
169
575
  <choice>
170
576
  <ref name="paragraph"/>
@@ -910,6 +1316,27 @@
910
1316
  <attribute name="id">
911
1317
  <data type="ID"/>
912
1318
  </attribute>
1319
+ <optional>
1320
+ <attribute name="unnumbered">
1321
+ <data type="boolean"/>
1322
+ </attribute>
1323
+ </optional>
1324
+ <optional>
1325
+ <attribute name="number"/>
1326
+ </optional>
1327
+ <optional>
1328
+ <attribute name="subsequence"/>
1329
+ </optional>
1330
+ <optional>
1331
+ <attribute name="keep-with-next">
1332
+ <data type="boolean"/>
1333
+ </attribute>
1334
+ </optional>
1335
+ <optional>
1336
+ <attribute name="keep-lines-together">
1337
+ <data type="boolean"/>
1338
+ </attribute>
1339
+ </optional>
913
1340
  <oneOrMore>
914
1341
  <choice>
915
1342
  <ref name="paragraph"/>
@@ -1,5 +1,7 @@
1
1
  module RelatonIetf
2
2
  class IetfBibliographicItem < RelatonBib::BibliographicItem
3
+ DOCTYPES = %w[rfc internet-draft].freeze
4
+
3
5
  # @return [String, NilClass]
4
6
  attr_reader :doctype
5
7
 
@@ -9,8 +11,11 @@ module RelatonIetf
9
11
  # @param doctype [String]
10
12
  # @param keyword [Array<String>]
11
13
  def initialize(**args)
12
- @doctype = args.delete :doctype
14
+ if args[:doctype] && !DOCTYPES.include?(args[:doctype])
15
+ warn "[relaton-ietf] WARNING: invalid doctype #{args[:doctype]}"
16
+ end
13
17
  super
18
+ # @doctype = args[:doctype]
14
19
  end
15
20
 
16
21
  # @param builder
@@ -1,3 +1,3 @@
1
1
  module RelatonIetf
2
- VERSION = "1.1.4".freeze
2
+ VERSION = "1.2.0".freeze
3
3
  end
@@ -3,19 +3,26 @@ require "nokogiri"
3
3
  module RelatonIetf
4
4
  class XMLParser < RelatonBib::XMLParser
5
5
  class << self
6
- def from_xml(xml)
7
- doc = Nokogiri::XML(xml)
8
- doc.remove_namespaces!
9
- ietfitem = doc.at("/bibitem|/bibdata")
10
- if ietfitem
11
- RelatonIetf::IetfBibliographicItem.new(item_data(ietfitem))
12
- elsif
13
- warn "[relato-ietf] can't find bibitem or bibdata element in the XML"
14
- end
15
- end
6
+ # def from_xml(xml)
7
+ # doc = Nokogiri::XML(xml)
8
+ # doc.remove_namespaces!
9
+ # ietfitem = doc.at("/bibitem|/bibdata")
10
+ # if ietfitem
11
+ # RelatonIetf::IetfBibliographicItem.new(item_data(ietfitem))
12
+ # elsif
13
+ # warn "[relato-ietf] can't find bibitem or bibdata element in the XML"
14
+ # end
15
+ # end
16
16
 
17
17
  private
18
18
 
19
+ # override RelatonBib::BibliographicItem.bib_item method
20
+ # @param item_hash [Hash]
21
+ # @return [RelatonIetf::IetfBibliographicItem]
22
+ def bib_item(item_hash)
23
+ IetfBibliographicItem.new item_hash
24
+ end
25
+
19
26
  def item_data(ietfitem)
20
27
  data = super
21
28
  ext = ietfitem.at "./ext"
@@ -40,5 +40,5 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency "vcr"
41
41
  spec.add_development_dependency "webmock"
42
42
 
43
- spec.add_dependency "relaton-bib", "~> 1.1.0"
43
+ spec.add_dependency "relaton-bib", "~> 1.2.0"
44
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ietf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-18 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.1.0
159
+ version: 1.2.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.1.0
166
+ version: 1.2.0
167
167
  description: "RelatonIetf: retrieve IETF Standards for bibliographic use \nusing the
168
168
  BibliographicItem model.\n\nFormerly known as rfcbib.\n"
169
169
  email:
@@ -190,7 +190,6 @@ files:
190
190
  - grammars/biblio.rng
191
191
  - grammars/ietf.rng
192
192
  - grammars/isodoc.rng
193
- - grammars/isostandard.rng
194
193
  - grammars/reqt.rng
195
194
  - lib/relaton/provider_ietf.rb
196
195
  - lib/relaton_ietf.rb
@@ -1,530 +0,0 @@
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
- <ref name="editorialgroup"/>
42
- <zeroOrMore>
43
- <ref name="ics"/>
44
- </zeroOrMore>
45
- <ref name="structuredidentifier"/>
46
- <optional>
47
- <ref name="stagename"/>
48
- </optional>
49
- </define>
50
- <define name="bdate">
51
- <element name="date">
52
- <attribute name="type">
53
- <choice>
54
- <ref name="BibliographicDateType"/>
55
- <text/>
56
- </choice>
57
- </attribute>
58
- <choice>
59
- <group>
60
- <element name="from">
61
- <ref name="ISO8601Date"/>
62
- </element>
63
- <optional>
64
- <element name="to">
65
- <ref name="ISO8601Date"/>
66
- </element>
67
- </optional>
68
- </group>
69
- <element name="on">
70
- <choice>
71
- <ref name="ISO8601Date"/>
72
- <value>--</value>
73
- <value>–</value>
74
- </choice>
75
- </element>
76
- </choice>
77
- </element>
78
- </define>
79
- <define name="ul">
80
- <element name="ul">
81
- <attribute name="id">
82
- <data type="ID"/>
83
- </attribute>
84
- <oneOrMore>
85
- <ref name="ul_li"/>
86
- </oneOrMore>
87
- <zeroOrMore>
88
- <ref name="note"/>
89
- </zeroOrMore>
90
- </element>
91
- </define>
92
- <define name="sections">
93
- <element name="sections">
94
- <zeroOrMore>
95
- <choice>
96
- <ref name="note"/>
97
- <ref name="admonition"/>
98
- </choice>
99
- </zeroOrMore>
100
- <ref name="clause"/>
101
- <optional>
102
- <choice>
103
- <ref name="term-clause"/>
104
- <ref name="terms"/>
105
- </choice>
106
- </optional>
107
- <optional>
108
- <ref name="definitions"/>
109
- </optional>
110
- <oneOrMore>
111
- <ref name="clause"/>
112
- </oneOrMore>
113
- </element>
114
- </define>
115
- <define name="Clause-Section">
116
- <optional>
117
- <attribute name="id">
118
- <data type="ID"/>
119
- </attribute>
120
- </optional>
121
- <optional>
122
- <attribute name="language"/>
123
- </optional>
124
- <optional>
125
- <attribute name="script"/>
126
- </optional>
127
- <optional>
128
- <attribute name="inline-header">
129
- <data type="boolean"/>
130
- </attribute>
131
- </optional>
132
- <optional>
133
- <attribute name="obligation">
134
- <choice>
135
- <value>normative</value>
136
- <value>informative</value>
137
- </choice>
138
- </attribute>
139
- </optional>
140
- <optional>
141
- <ref name="section-title"/>
142
- </optional>
143
- <choice>
144
- <group>
145
- <oneOrMore>
146
- <ref name="BasicBlock"/>
147
- </oneOrMore>
148
- <zeroOrMore>
149
- <ref name="note"/>
150
- </zeroOrMore>
151
- </group>
152
- <oneOrMore>
153
- <ref name="clause-subsection"/>
154
- </oneOrMore>
155
- </choice>
156
- </define>
157
- <define name="term">
158
- <element name="term">
159
- <optional>
160
- <attribute name="id">
161
- <data type="ID"/>
162
- </attribute>
163
- </optional>
164
- <ref name="preferred"/>
165
- <zeroOrMore>
166
- <ref name="admitted"/>
167
- </zeroOrMore>
168
- <zeroOrMore>
169
- <ref name="deprecates"/>
170
- </zeroOrMore>
171
- <optional>
172
- <ref name="termdomain"/>
173
- </optional>
174
- <ref name="definition"/>
175
- <zeroOrMore>
176
- <ref name="termnote"/>
177
- </zeroOrMore>
178
- <zeroOrMore>
179
- <ref name="termexample"/>
180
- </zeroOrMore>
181
- <zeroOrMore>
182
- <ref name="termsource"/>
183
- </zeroOrMore>
184
- </element>
185
- </define>
186
- <define name="definition">
187
- <element name="definition">
188
- <oneOrMore>
189
- <choice>
190
- <ref name="paragraph"/>
191
- <ref name="figure"/>
192
- <ref name="formula"/>
193
- </choice>
194
- </oneOrMore>
195
- </element>
196
- </define>
197
- <define name="annex">
198
- <element name="annex">
199
- <optional>
200
- <attribute name="id">
201
- <data type="ID"/>
202
- </attribute>
203
- </optional>
204
- <optional>
205
- <attribute name="language"/>
206
- </optional>
207
- <optional>
208
- <attribute name="script"/>
209
- </optional>
210
- <optional>
211
- <attribute name="inline-header">
212
- <data type="boolean"/>
213
- </attribute>
214
- </optional>
215
- <optional>
216
- <attribute name="obligation">
217
- <choice>
218
- <value>normative</value>
219
- <value>informative</value>
220
- </choice>
221
- </attribute>
222
- </optional>
223
- <optional>
224
- <ref name="section-title"/>
225
- </optional>
226
- <zeroOrMore>
227
- <!--
228
- allow hanging paragraps in annexes: they introduce lists
229
- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
230
- -->
231
- <ref name="BasicBlock"/>
232
- </zeroOrMore>
233
- <zeroOrMore>
234
- <ref name="note"/>
235
- </zeroOrMore>
236
- <zeroOrMore>
237
- <ref name="clause-hanging-paragraph-with-footnote"/>
238
- </zeroOrMore>
239
- <zeroOrMore>
240
- <ref name="annex-appendix"/>
241
- </zeroOrMore>
242
- </element>
243
- </define>
244
- <define name="AdmonitionType">
245
- <choice>
246
- <value>danger</value>
247
- <value>caution</value>
248
- <value>warning</value>
249
- <value>important</value>
250
- <value>safety precautions</value>
251
- </choice>
252
- </define>
253
- <define name="preface">
254
- <element name="preface">
255
- <optional>
256
- <ref name="preface_abstract"/>
257
- </optional>
258
- <ref name="foreword"/>
259
- <optional>
260
- <ref name="introduction"/>
261
- </optional>
262
- </element>
263
- </define>
264
- <define name="DocumentType">
265
- <choice>
266
- <value>international-standard</value>
267
- <value>technical-specification</value>
268
- <value>technical-report</value>
269
- <value>publicly-available-specification</value>
270
- <value>international-workshop-agreement</value>
271
- <value>guide</value>
272
- <value>amendment</value>
273
- <value>technical-corrigendum</value>
274
- </choice>
275
- </define>
276
- <define name="structuredidentifier">
277
- <element name="structuredidentifier">
278
- <optional>
279
- <attribute name="type"/>
280
- </optional>
281
- <group>
282
- <ref name="documentnumber"/>
283
- <optional>
284
- <ref name="tc-documentnumber"/>
285
- </optional>
286
- </group>
287
- </element>
288
- </define>
289
- <define name="foreword">
290
- <element name="foreword">
291
- <ref name="Basic-Section"/>
292
- </element>
293
- </define>
294
- <define name="introduction">
295
- <element name="introduction">
296
- <ref name="Content-Section"/>
297
- </element>
298
- </define>
299
- <define name="editorialgroup">
300
- <element name="editorialgroup">
301
- <oneOrMore>
302
- <ref name="technical-committee"/>
303
- </oneOrMore>
304
- <zeroOrMore>
305
- <ref name="subcommittee"/>
306
- </zeroOrMore>
307
- <zeroOrMore>
308
- <ref name="workgroup"/>
309
- </zeroOrMore>
310
- <optional>
311
- <ref name="secretariat"/>
312
- </optional>
313
- </element>
314
- </define>
315
- <define name="Content-Section">
316
- <optional>
317
- <attribute name="id">
318
- <data type="ID"/>
319
- </attribute>
320
- </optional>
321
- <optional>
322
- <attribute name="language"/>
323
- </optional>
324
- <optional>
325
- <attribute name="script"/>
326
- </optional>
327
- <optional>
328
- <attribute name="obligation">
329
- <choice>
330
- <value>normative</value>
331
- <value>informative</value>
332
- </choice>
333
- </attribute>
334
- </optional>
335
- <optional>
336
- <ref name="section-title"/>
337
- </optional>
338
- <choice>
339
- <group>
340
- <zeroOrMore>
341
- <ref name="BasicBlock"/>
342
- </zeroOrMore>
343
- <zeroOrMore>
344
- <ref name="note"/>
345
- </zeroOrMore>
346
- </group>
347
- <oneOrMore>
348
- <ref name="content-subsection"/>
349
- </oneOrMore>
350
- </choice>
351
- </define>
352
- <define name="table">
353
- <element name="table">
354
- <attribute name="id">
355
- <data type="ID"/>
356
- </attribute>
357
- <optional>
358
- <attribute name="width"/>
359
- </optional>
360
- <optional>
361
- <attribute name="unnumbered">
362
- <data type="boolean"/>
363
- </attribute>
364
- </optional>
365
- <optional>
366
- <attribute name="subsequence"/>
367
- </optional>
368
- <optional>
369
- <attribute name="alt"/>
370
- </optional>
371
- <optional>
372
- <attribute name="summary"/>
373
- </optional>
374
- <optional>
375
- <attribute name="uri">
376
- <data type="anyURI"/>
377
- </attribute>
378
- </optional>
379
- <optional>
380
- <ref name="tname"/>
381
- </optional>
382
- <optional>
383
- <ref name="thead"/>
384
- </optional>
385
- <ref name="tbody"/>
386
- <optional>
387
- <ref name="tfoot"/>
388
- </optional>
389
- <zeroOrMore>
390
- <ref name="table-note"/>
391
- </zeroOrMore>
392
- <optional>
393
- <ref name="dl"/>
394
- </optional>
395
- </element>
396
- </define>
397
- </include>
398
- <!-- end overrides -->
399
- <!--
400
- We display the Normative References between scope and terms; but to keep the
401
- grammar simple, we keep the references together
402
- -->
403
- <define name="iso-standard">
404
- <element name="iso-standard">
405
- <ref name="bibdata"/>
406
- <zeroOrMore>
407
- <ref name="termdocsource"/>
408
- </zeroOrMore>
409
- <optional>
410
- <ref name="boilerplate"/>
411
- </optional>
412
- <ref name="preface"/>
413
- <oneOrMore>
414
- <ref name="sections"/>
415
- </oneOrMore>
416
- <zeroOrMore>
417
- <ref name="annex"/>
418
- </zeroOrMore>
419
- <ref name="bibliography"/>
420
- </element>
421
- </define>
422
- <define name="documentnumber">
423
- <element name="project-number">
424
- <optional>
425
- <attribute name="part">
426
- <data type="int"/>
427
- </attribute>
428
- </optional>
429
- <optional>
430
- <attribute name="subpart">
431
- <data type="int"/>
432
- </attribute>
433
- </optional>
434
- <text/>
435
- </element>
436
- </define>
437
- <define name="tc-documentnumber">
438
- <element name="tc-document-number">
439
- <data type="int"/>
440
- </element>
441
- </define>
442
- <define name="subcommittee">
443
- <element name="subcommittee">
444
- <ref name="IsoWorkgroup"/>
445
- </element>
446
- </define>
447
- <define name="workgroup">
448
- <element name="workgroup">
449
- <ref name="IsoWorkgroup"/>
450
- </element>
451
- </define>
452
- <define name="secretariat">
453
- <element name="secretariat">
454
- <text/>
455
- </element>
456
- </define>
457
- <define name="clause-hanging-paragraph-with-footnote">
458
- <element name="clause">
459
- <optional>
460
- <attribute name="id">
461
- <data type="ID"/>
462
- </attribute>
463
- </optional>
464
- <optional>
465
- <attribute name="language"/>
466
- </optional>
467
- <optional>
468
- <attribute name="script"/>
469
- </optional>
470
- <optional>
471
- <attribute name="inline-header">
472
- <data type="boolean"/>
473
- </attribute>
474
- </optional>
475
- <optional>
476
- <attribute name="obligation">
477
- <choice>
478
- <value>normative</value>
479
- <value>informative</value>
480
- </choice>
481
- </attribute>
482
- </optional>
483
- <optional>
484
- <ref name="section-title"/>
485
- </optional>
486
- <zeroOrMore>
487
- <!-- allow hanging paragraphs in annexes: they introduce lists -->
488
- <ref name="BasicBlock"/>
489
- </zeroOrMore>
490
- <zeroOrMore>
491
- <ref name="note"/>
492
- </zeroOrMore>
493
- <zeroOrMore>
494
- <ref name="clause-hanging-paragraph-with-footnote"/>
495
- </zeroOrMore>
496
- </element>
497
- </define>
498
- <define name="annex-appendix">
499
- <element name="appendix">
500
- <ref name="Clause-Section"/>
501
- </element>
502
- </define>
503
- <define name="ul_li">
504
- <element name="li">
505
- <optional>
506
- <attribute name="id">
507
- <data type="ID"/>
508
- </attribute>
509
- </optional>
510
- <optional>
511
- <attribute name="uncheckedcheckbox">
512
- <data type="boolean"/>
513
- </attribute>
514
- </optional>
515
- <optional>
516
- <attribute name="checkedcheckbox">
517
- <data type="boolean"/>
518
- </attribute>
519
- </optional>
520
- <oneOrMore>
521
- <ref name="BasicBlock"/>
522
- </oneOrMore>
523
- </element>
524
- </define>
525
- <define name="stagename">
526
- <element name="stagename">
527
- <text/>
528
- </element>
529
- </define>
530
- </grammar>