relaton-un 1.0.1 → 1.4.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: 1d64886141fa17c10e8f8ec8d2c613ef8b0873d7161c0168a1e47af199c91f7c
4
- data.tar.gz: 2ab3789babe8098c187b11a5272a69d9ef7569f6f8964c1bbc21e22f273a180b
3
+ metadata.gz: 0725035a19dd3a50cf7c3cb122ff4af562adeba0c01447c7a41b8ea4aacd67f1
4
+ data.tar.gz: cd28290c02918a2f7754d453eb3f9977c311b354adb8fd55718c7bf2446909a0
5
5
  SHA512:
6
- metadata.gz: f9e219d127a0a13725ab75d6d2abfefa4e723c2b4a93bae0ab04b3eec44f0ef9a5be6af2485b75cbdc7011460ee1e6d26dc66f2c7557af7ddeea041afd203088
7
- data.tar.gz: d39429a73d6b50638ece5f6317b56bdfa9372104710f4910e89e72ad81313ae10bfebb49d9b0e9dcb051879f59dddb92316f52901103133216aef5a330d1e56c
6
+ metadata.gz: dd656a5b34cadb82262c017c38e5ed7738abc3e76af883b3921b21fda57c0163153e8120bfbadebdfe541bf00b67646bb61f5304a529f4be09f0240a2036532b
7
+ data.tar.gz: 5b8f6f49eb1af0ce6d6ecf2c9aeed3173743a093b9319b68dcb5290e0e33a1b90f83c41c690c9255909cf29ec519a347cc0e0f3e735041bc0f3cc87a3de07921
@@ -29,4 +29,5 @@ jobs:
29
29
  bundle install --jobs 4 --retry 3
30
30
  - name: Run specs
31
31
  run: |
32
+ unset JAVA_TOOL_OPTIONS
32
33
  bundle exec rake
@@ -5,6 +5,6 @@
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
7
  AllCops:
8
- TargetRubyVersion: 2.3
8
+ TargetRubyVersion: 2.4
9
9
  Rails:
10
- Enabled: true
10
+ Enabled: false
@@ -25,9 +25,10 @@ Or install it yourself as:
25
25
 
26
26
  === Search for a standard using keywords
27
27
 
28
- [source]
28
+ [source,ruby]
29
29
  ----
30
30
  require 'relaton_un'
31
+ => true
31
32
 
32
33
  hits = RelatonUn::UnBibliography.search("TRADE/CEFACT/2004/32")
33
34
  => <RelatonUn::HitCollection:0x007fc4e6ec2018 @ref=TRADE/CEFACT/2004/32 @fetched=false>
@@ -39,23 +40,23 @@ item = hits[0].fetch
39
40
 
40
41
  === XML serialization
41
42
 
42
- [source]
43
+ [source,ruby]
43
44
  ----
44
45
  item.to_xml
45
- => '<bibitem id="TRADE/CEFACT/2004/32">
46
+ => "<bibitem id="TRADE/CEFACT/2004/32" type="standard">
46
47
  <title type="main" format="text/plain" language="en" script="Latn">SECRETARIAT REVIEW OF UN/LOCODE, 19 DECEMBER 2003 / SUBMITTED BY THE SECRETARIAT</title>
47
48
  <uri type="pdf">https://documents-dds-ny.un.org/doc/UNDOC/GEN/G04/306/83/pdf/G0430683.pdf?OpenElement</uri>
48
49
  <uri type="word">https://documents-dds-ny.un.org/doc/UNDOC/GEN/G04/306/83/doc/G0430683.DOC?OpenElement</uri>
49
50
  <docidentifier type="UN">TRADE/CEFACT/2004/32</docidentifier>
50
51
  <docnumber>TRADE/CEFACT/2004/32</docnumber>
51
52
  ...
52
- </bibitem>'
53
+ </bibitem>"
53
54
  ----
54
55
  With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element.
55
- [source]
56
+ [source,ruby]
56
57
  ----
57
58
  item.to_xml bibdata: true
58
- => '<bibdata type="standard">
59
+ => "<bibdata type="standard">
59
60
  <fetched>2020-03-13</fetched>
60
61
  <title type="main" format="text/plain" language="en" script="Latn">SECRETARIAT REVIEW OF UN/LOCODE, 19 DECEMBER 2003 / SUBMITTED BY THE SECRETARIAT</title>
61
62
  <uri type="pdf">https://documents-dds-ny.un.org/doc/UNDOC/GEN/G04/306/83/pdf/G0430683.pdf?OpenElement</uri>
@@ -63,11 +64,23 @@ item.to_xml bibdata: true
63
64
  <docidentifier type="UN">TRADE/CEFACT/2004/32</docidentifier>
64
65
  <docnumber>TRADE/CEFACT/2004/32</docnumber>
65
66
  ...
66
- </bibdata>'
67
+ <ext>
68
+ <editorialgroup>
69
+ <committee>Committee on Trade</committee>
70
+ <committee>Centre for Trade Facilitation and Electronic Business</committee>
71
+ </editorialgroup>
72
+ <distribution>general</distribution>
73
+ <session>
74
+ <number>10</number>
75
+ <agenda-id>12</agenda-id>
76
+ </session>
77
+ <job_number>G0430683</job_number>
78
+ </ext>
79
+ </bibdata>"
67
80
  ----
68
81
 
69
82
  === Get code, and year
70
- [source]
83
+ [source,ruby]
71
84
  ----
72
85
  RelatonUn::UnBibliography.get "UN TRADE/CEFACT/2004/32"
73
86
  [relaton-un] ("UN TRADE/CEFACT/2004/32") fetching...
@@ -77,7 +90,7 @@ RelatonUn::UnBibliography.get "UN TRADE/CEFACT/2004/32"
77
90
  ----
78
91
 
79
92
  === Create bibliographic item from XML
80
- [source]
93
+ [source,ruby]
81
94
  ----
82
95
  RelatonUn::XMLParser.from_xml File.read('spec/fixtures/un_bib.xml')
83
96
  => #<RelatonUn::UnBibliographicItem:0x007fdc5e7ab678
@@ -85,7 +98,7 @@ RelatonUn::XMLParser.from_xml File.read('spec/fixtures/un_bib.xml')
85
98
  ----
86
99
 
87
100
  === Create bibliographic item from YAML
88
- [source]
101
+ [source,ruby]
89
102
  ----
90
103
  hash = YAML.load_file 'spec/fixtures/un_bib.yaml'
91
104
  => {"id"=>"TRADE/CEFACT/2004/32",
@@ -88,7 +88,7 @@
88
88
  <text/>
89
89
  </element>
90
90
  </define>
91
- <define name="LocalizedString">
91
+ <define name="LocalizedString1">
92
92
  <optional>
93
93
  <!-- multiple languages and scripts possible: comma delimit them if so -->
94
94
  <attribute name="language"/>
@@ -98,6 +98,16 @@
98
98
  </optional>
99
99
  <text/>
100
100
  </define>
101
+ <define name="LocalizedString">
102
+ <choice>
103
+ <ref name="LocalizedString1"/>
104
+ <oneOrMore>
105
+ <element name="variant">
106
+ <ref name="LocalizedString1"/>
107
+ </element>
108
+ </oneOrMore>
109
+ </choice>
110
+ </define>
101
111
  <!--
102
112
  Unlike UML, change type to format: type is overloaded
103
113
  Would be need if plain were default value and could omit the attribute
@@ -121,7 +131,7 @@
121
131
  </optional>
122
132
  <ref name="LocalizedStringOrXsAny"/>
123
133
  </define>
124
- <define name="LocalizedStringOrXsAny">
134
+ <define name="LocalizedStringOrXsAny1">
125
135
  <optional>
126
136
  <!-- multiple languages and scripts possible: comma delimit them if so -->
127
137
  <attribute name="language"/>
@@ -136,6 +146,16 @@
136
146
  </choice>
137
147
  </oneOrMore>
138
148
  </define>
149
+ <define name="LocalizedStringOrXsAny">
150
+ <choice>
151
+ <ref name="LocalizedStringOrXsAny1"/>
152
+ <oneOrMore>
153
+ <element name="variant">
154
+ <ref name="LocalizedStringOrXsAny1"/>
155
+ </element>
156
+ </oneOrMore>
157
+ </choice>
158
+ </define>
139
159
  <define name="contributor">
140
160
  <element name="contributor">
141
161
  <zeroOrMore>
@@ -512,7 +532,7 @@
512
532
  </define>
513
533
  <define name="LocalityType">
514
534
  <data type="string">
515
- <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>
516
536
  </data>
517
537
  </define>
518
538
  <define name="referenceFrom">
@@ -641,9 +661,9 @@
641
661
  <optional>
642
662
  <ref name="status"/>
643
663
  </optional>
644
- <optional>
664
+ <zeroOrMore>
645
665
  <ref name="copyright"/>
646
- </optional>
666
+ </zeroOrMore>
647
667
  <zeroOrMore>
648
668
  <ref name="docrelation"/>
649
669
  </zeroOrMore>
@@ -1001,7 +1021,17 @@
1001
1021
  <optional>
1002
1022
  <ref name="to"/>
1003
1023
  </optional>
1004
- <ref name="owner"/>
1024
+ <oneOrMore>
1025
+ <ref name="owner"/>
1026
+ </oneOrMore>
1027
+ <optional>
1028
+ <ref name="copyright_scope"/>
1029
+ </optional>
1030
+ </element>
1031
+ </define>
1032
+ <define name="copyright_scope">
1033
+ <element name="scope">
1034
+ <text/>
1005
1035
  </element>
1006
1036
  </define>
1007
1037
  <define name="from">
@@ -42,8 +42,11 @@
42
42
  </define>
43
43
  <define name="xref">
44
44
  <element name="xref">
45
+ <!-- attribute target { xsd:IDREF }, -->
45
46
  <attribute name="target">
46
- <data type="IDREF"/>
47
+ <data type="string">
48
+ <param name="pattern">\i\c*|\c+#\c+</param>
49
+ </data>
47
50
  </attribute>
48
51
  <optional>
49
52
  <attribute name="type">
@@ -53,9 +56,101 @@
53
56
  <optional>
54
57
  <attribute name="alt"/>
55
58
  </optional>
59
+ <optional>
60
+ <attribute name="case">
61
+ <choice>
62
+ <value>capital</value>
63
+ <value>lowercase</value>
64
+ </choice>
65
+ </attribute>
66
+ </optional>
67
+ <optional>
68
+ <attribute name="droploc">
69
+ <data type="boolean"/>
70
+ </attribute>
71
+ </optional>
56
72
  <text/>
57
73
  </element>
58
74
  </define>
75
+ <define name="ul">
76
+ <element name="ul">
77
+ <attribute name="id">
78
+ <data type="ID"/>
79
+ </attribute>
80
+ <optional>
81
+ <attribute name="keep-with-next">
82
+ <data type="boolean"/>
83
+ </attribute>
84
+ </optional>
85
+ <optional>
86
+ <attribute name="keep-lines-together">
87
+ <data type="boolean"/>
88
+ </attribute>
89
+ </optional>
90
+ <oneOrMore>
91
+ <ref name="li"/>
92
+ </oneOrMore>
93
+ <zeroOrMore>
94
+ <ref name="note"/>
95
+ </zeroOrMore>
96
+ </element>
97
+ </define>
98
+ <define name="ol">
99
+ <element name="ol">
100
+ <attribute name="id">
101
+ <data type="ID"/>
102
+ </attribute>
103
+ <optional>
104
+ <attribute name="keep-with-next">
105
+ <data type="boolean"/>
106
+ </attribute>
107
+ </optional>
108
+ <optional>
109
+ <attribute name="keep-lines-together">
110
+ <data type="boolean"/>
111
+ </attribute>
112
+ </optional>
113
+ <attribute name="type">
114
+ <choice>
115
+ <value>roman</value>
116
+ <value>alphabet</value>
117
+ <value>arabic</value>
118
+ <value>roman_upper</value>
119
+ <value>alphabet_upper</value>
120
+ </choice>
121
+ </attribute>
122
+ <oneOrMore>
123
+ <ref name="li"/>
124
+ </oneOrMore>
125
+ <zeroOrMore>
126
+ <ref name="note"/>
127
+ </zeroOrMore>
128
+ </element>
129
+ </define>
130
+ <define name="dl">
131
+ <element name="dl">
132
+ <attribute name="id">
133
+ <data type="ID"/>
134
+ </attribute>
135
+ <optional>
136
+ <attribute name="keep-with-next">
137
+ <data type="boolean"/>
138
+ </attribute>
139
+ </optional>
140
+ <optional>
141
+ <attribute name="keep-lines-together">
142
+ <data type="boolean"/>
143
+ </attribute>
144
+ </optional>
145
+ <oneOrMore>
146
+ <ref name="dt"/>
147
+ <ref name="dd"/>
148
+ </oneOrMore>
149
+ <zeroOrMore>
150
+ <ref name="note"/>
151
+ </zeroOrMore>
152
+ </element>
153
+ </define>
59
154
  <define name="example">
60
155
  <element name="example">
61
156
  <attribute name="id">
@@ -69,6 +164,19 @@
69
164
  <optional>
70
165
  <attribute name="subsequence"/>
71
166
  </optional>
167
+ <optional>
168
+ <attribute name="number"/>
169
+ </optional>
170
+ <optional>
171
+ <attribute name="keep-with-next">
172
+ <data type="boolean"/>
173
+ </attribute>
174
+ </optional>
175
+ <optional>
176
+ <attribute name="keep-lines-together">
177
+ <data type="boolean"/>
178
+ </attribute>
179
+ </optional>
72
180
  <optional>
73
181
  <ref name="tname"/>
74
182
  </optional>
@@ -89,6 +197,296 @@
89
197
  </zeroOrMore>
90
198
  </element>
91
199
  </define>
200
+ <define name="table">
201
+ <element name="table">
202
+ <attribute name="id">
203
+ <data type="ID"/>
204
+ </attribute>
205
+ <optional>
206
+ <attribute name="unnumbered">
207
+ <data type="boolean"/>
208
+ </attribute>
209
+ </optional>
210
+ <optional>
211
+ <attribute name="number"/>
212
+ </optional>
213
+ <optional>
214
+ <attribute name="subsequence"/>
215
+ </optional>
216
+ <optional>
217
+ <attribute name="alt"/>
218
+ </optional>
219
+ <optional>
220
+ <attribute name="summary"/>
221
+ </optional>
222
+ <optional>
223
+ <attribute name="uri">
224
+ <data type="anyURI"/>
225
+ </attribute>
226
+ </optional>
227
+ <optional>
228
+ <attribute name="keep-with-next">
229
+ <data type="boolean"/>
230
+ </attribute>
231
+ </optional>
232
+ <optional>
233
+ <attribute name="keep-lines-together">
234
+ <data type="boolean"/>
235
+ </attribute>
236
+ </optional>
237
+ <optional>
238
+ <ref name="tname"/>
239
+ </optional>
240
+ <optional>
241
+ <ref name="thead"/>
242
+ </optional>
243
+ <ref name="tbody"/>
244
+ <optional>
245
+ <ref name="tfoot"/>
246
+ </optional>
247
+ <zeroOrMore>
248
+ <ref name="table-note"/>
249
+ </zeroOrMore>
250
+ <optional>
251
+ <ref name="dl"/>
252
+ </optional>
253
+ </element>
254
+ </define>
255
+ <define name="figure">
256
+ <element name="figure">
257
+ <attribute name="id">
258
+ <data type="ID"/>
259
+ </attribute>
260
+ <optional>
261
+ <attribute name="unnumbered">
262
+ <data type="boolean"/>
263
+ </attribute>
264
+ </optional>
265
+ <optional>
266
+ <attribute name="number"/>
267
+ </optional>
268
+ <optional>
269
+ <attribute name="subsequence"/>
270
+ </optional>
271
+ <optional>
272
+ <attribute name="keep-with-next">
273
+ <data type="boolean"/>
274
+ </attribute>
275
+ </optional>
276
+ <optional>
277
+ <attribute name="keep-lines-together">
278
+ <data type="boolean"/>
279
+ </attribute>
280
+ </optional>
281
+ <optional>
282
+ <attribute name="class"/>
283
+ </optional>
284
+ <optional>
285
+ <ref name="source"/>
286
+ </optional>
287
+ <optional>
288
+ <ref name="tname"/>
289
+ </optional>
290
+ <choice>
291
+ <ref name="image"/>
292
+ <ref name="video"/>
293
+ <ref name="audio"/>
294
+ <ref name="pre"/>
295
+ <oneOrMore>
296
+ <ref name="paragraph-with-footnote"/>
297
+ </oneOrMore>
298
+ <zeroOrMore>
299
+ <ref name="figure"/>
300
+ </zeroOrMore>
301
+ </choice>
302
+ <zeroOrMore>
303
+ <ref name="fn"/>
304
+ </zeroOrMore>
305
+ <optional>
306
+ <ref name="dl"/>
307
+ </optional>
308
+ <zeroOrMore>
309
+ <ref name="note"/>
310
+ </zeroOrMore>
311
+ </element>
312
+ </define>
313
+ <define name="sourcecode">
314
+ <element name="sourcecode">
315
+ <attribute name="id">
316
+ <data type="ID"/>
317
+ </attribute>
318
+ <optional>
319
+ <attribute name="unnumbered">
320
+ <data type="boolean"/>
321
+ </attribute>
322
+ </optional>
323
+ <optional>
324
+ <attribute name="number"/>
325
+ </optional>
326
+ <optional>
327
+ <attribute name="subsequence"/>
328
+ </optional>
329
+ <optional>
330
+ <attribute name="keep-with-next">
331
+ <data type="boolean"/>
332
+ </attribute>
333
+ </optional>
334
+ <optional>
335
+ <attribute name="keep-lines-together">
336
+ <data type="boolean"/>
337
+ </attribute>
338
+ </optional>
339
+ <optional>
340
+ <attribute name="lang"/>
341
+ </optional>
342
+ <optional>
343
+ <ref name="tname"/>
344
+ </optional>
345
+ <oneOrMore>
346
+ <choice>
347
+ <text/>
348
+ <ref name="callout"/>
349
+ </choice>
350
+ </oneOrMore>
351
+ <zeroOrMore>
352
+ <ref name="annotation"/>
353
+ </zeroOrMore>
354
+ <zeroOrMore>
355
+ <ref name="note"/>
356
+ </zeroOrMore>
357
+ </element>
358
+ </define>
359
+ <define name="formula">
360
+ <element name="formula">
361
+ <attribute name="id">
362
+ <data type="ID"/>
363
+ </attribute>
364
+ <optional>
365
+ <attribute name="unnumbered">
366
+ <data type="boolean"/>
367
+ </attribute>
368
+ </optional>
369
+ <optional>
370
+ <attribute name="number"/>
371
+ </optional>
372
+ <optional>
373
+ <attribute name="subsequence"/>
374
+ </optional>
375
+ <optional>
376
+ <attribute name="keep-with-next">
377
+ <data type="boolean"/>
378
+ </attribute>
379
+ </optional>
380
+ <optional>
381
+ <attribute name="keep-lines-together">
382
+ <data type="boolean"/>
383
+ </attribute>
384
+ </optional>
385
+ <optional>
386
+ <attribute name="inequality">
387
+ <data type="boolean"/>
388
+ </attribute>
389
+ </optional>
390
+ <ref name="stem"/>
391
+ <optional>
392
+ <ref name="dl"/>
393
+ </optional>
394
+ <zeroOrMore>
395
+ <ref name="note"/>
396
+ </zeroOrMore>
397
+ </element>
398
+ </define>
399
+ <define name="ParagraphType">
400
+ <attribute name="id">
401
+ <data type="ID"/>
402
+ </attribute>
403
+ <optional>
404
+ <attribute name="align">
405
+ <ref name="Alignments"/>
406
+ </attribute>
407
+ </optional>
408
+ <optional>
409
+ <attribute name="keep-with-next">
410
+ <data type="boolean"/>
411
+ </attribute>
412
+ </optional>
413
+ <optional>
414
+ <attribute name="keep-lines-together">
415
+ <data type="boolean"/>
416
+ </attribute>
417
+ </optional>
418
+ <zeroOrMore>
419
+ <ref name="TextElement"/>
420
+ </zeroOrMore>
421
+ <zeroOrMore>
422
+ <ref name="note"/>
423
+ </zeroOrMore>
424
+ </define>
425
+ <define name="paragraph-with-footnote">
426
+ <element name="p">
427
+ <attribute name="id">
428
+ <data type="ID"/>
429
+ </attribute>
430
+ <optional>
431
+ <attribute name="align">
432
+ <ref name="Alignments"/>
433
+ </attribute>
434
+ </optional>
435
+ <optional>
436
+ <attribute name="keep-with-next">
437
+ <data type="boolean"/>
438
+ </attribute>
439
+ </optional>
440
+ <optional>
441
+ <attribute name="keep-lines-together">
442
+ <data type="boolean"/>
443
+ </attribute>
444
+ </optional>
445
+ <zeroOrMore>
446
+ <choice>
447
+ <ref name="TextElement"/>
448
+ <ref name="fn"/>
449
+ </choice>
450
+ </zeroOrMore>
451
+ <zeroOrMore>
452
+ <ref name="note"/>
453
+ </zeroOrMore>
454
+ </element>
455
+ </define>
456
+ <define name="quote">
457
+ <element name="quote">
458
+ <attribute name="id">
459
+ <data type="ID"/>
460
+ </attribute>
461
+ <optional>
462
+ <attribute name="alignment">
463
+ <ref name="Alignments"/>
464
+ </attribute>
465
+ </optional>
466
+ <optional>
467
+ <attribute name="keep-with-next">
468
+ <data type="boolean"/>
469
+ </attribute>
470
+ </optional>
471
+ <optional>
472
+ <attribute name="keep-lines-together">
473
+ <data type="boolean"/>
474
+ </attribute>
475
+ </optional>
476
+ <optional>
477
+ <ref name="quote-source"/>
478
+ </optional>
479
+ <optional>
480
+ <ref name="quote-author"/>
481
+ </optional>
482
+ <oneOrMore>
483
+ <ref name="paragraph-with-footnote"/>
484
+ </oneOrMore>
485
+ <zeroOrMore>
486
+ <ref name="note"/>
487
+ </zeroOrMore>
488
+ </element>
489
+ </define>
92
490
  <define name="BibDataExtensionType">
93
491
  <ref name="doctype"/>
94
492
  <optional>
@@ -157,6 +555,30 @@
157
555
  <attribute name="id">
158
556
  <data type="ID"/>
159
557
  </attribute>
558
+ <optional>
559
+ <attribute name="unnumbered">
560
+ <data type="boolean"/>
561
+ </attribute>
562
+ </optional>
563
+ <optional>
564
+ <attribute name="number"/>
565
+ </optional>
566
+ <optional>
567
+ <attribute name="subsequence"/>
568
+ </optional>
569
+ <optional>
570
+ <attribute name="keep-with-next">
571
+ <data type="boolean"/>
572
+ </attribute>
573
+ </optional>
574
+ <optional>
575
+ <attribute name="keep-lines-together">
576
+ <data type="boolean"/>
577
+ </attribute>
578
+ </optional>
579
+ <optional>
580
+ <attribute name="type"/>
581
+ </optional>
160
582
  <oneOrMore>
161
583
  <choice>
162
584
  <ref name="paragraph"/>
@@ -164,6 +586,8 @@
164
586
  <ref name="ol"/>
165
587
  <ref name="dl"/>
166
588
  <ref name="formula"/>
589
+ <ref name="quote"/>
590
+ <ref name="sourcecode"/>
167
591
  </choice>
168
592
  </oneOrMore>
169
593
  </element>
@@ -247,6 +671,16 @@
247
671
  </choice>
248
672
  </attribute>
249
673
  </optional>
674
+ <optional>
675
+ <attribute name="valign">
676
+ <choice>
677
+ <value>top</value>
678
+ <value>middle</value>
679
+ <value>bottom</value>
680
+ <value>baseline</value>
681
+ </choice>
682
+ </attribute>
683
+ </optional>
250
684
  <choice>
251
685
  <zeroOrMore>
252
686
  <choice>
@@ -283,6 +717,16 @@
283
717
  </choice>
284
718
  </attribute>
285
719
  </optional>
720
+ <optional>
721
+ <attribute name="valign">
722
+ <choice>
723
+ <value>top</value>
724
+ <value>middle</value>
725
+ <value>bottom</value>
726
+ <value>baseline</value>
727
+ </choice>
728
+ </attribute>
729
+ </optional>
286
730
  <choice>
287
731
  <zeroOrMore>
288
732
  <choice>
@@ -441,7 +885,7 @@
441
885
  <oneOrMore>
442
886
  <choice>
443
887
  <ref name="content"/>
444
- <ref name="preface_abstract"/>
888
+ <ref name="abstract"/>
445
889
  <ref name="foreword"/>
446
890
  <ref name="introduction"/>
447
891
  <ref name="acknowledgements"/>
@@ -508,6 +952,9 @@
508
952
  <optional>
509
953
  <attribute name="script"/>
510
954
  </optional>
955
+ <optional>
956
+ <attribute name="type"/>
957
+ </optional>
511
958
  <optional>
512
959
  <attribute name="obligation">
513
960
  <choice>
@@ -547,9 +994,6 @@
547
994
  </define>
548
995
  <define name="content-subsection">
549
996
  <element name="clause">
550
- <optional>
551
- <attribute name="type"/>
552
- </optional>
553
997
  <ref name="Content-Section"/>
554
998
  </element>
555
999
  </define>
@@ -578,6 +1022,9 @@
578
1022
  </choice>
579
1023
  </attribute>
580
1024
  </optional>
1025
+ <optional>
1026
+ <attribute name="type"/>
1027
+ </optional>
581
1028
  <optional>
582
1029
  <ref name="section-title"/>
583
1030
  </optional>
@@ -597,9 +1044,6 @@
597
1044
  </define>
598
1045
  <define name="clause">
599
1046
  <element name="clause">
600
- <optional>
601
- <attribute name="type"/>
602
- </optional>
603
1047
  <ref name="Clause-Section"/>
604
1048
  </element>
605
1049
  </define>
@@ -628,18 +1072,24 @@
628
1072
  </choice>
629
1073
  </attribute>
630
1074
  </optional>
1075
+ <optional>
1076
+ <attribute name="type"/>
1077
+ </optional>
631
1078
  <optional>
632
1079
  <ref name="section-title"/>
633
1080
  </optional>
634
1081
  <group>
635
- <group>
636
- <zeroOrMore>
637
- <ref name="BasicBlock"/>
638
- </zeroOrMore>
639
- <zeroOrMore>
640
- <ref name="note"/>
641
- </zeroOrMore>
642
- </group>
1082
+ <choice>
1083
+ <group>
1084
+ <zeroOrMore>
1085
+ <ref name="BasicBlock"/>
1086
+ </zeroOrMore>
1087
+ <zeroOrMore>
1088
+ <ref name="note"/>
1089
+ </zeroOrMore>
1090
+ </group>
1091
+ <ref name="amend"/>
1092
+ </choice>
643
1093
  <zeroOrMore>
644
1094
  <choice>
645
1095
  <ref name="clause-subsection"/>
@@ -766,6 +1216,9 @@
766
1216
  <optional>
767
1217
  <attribute name="script"/>
768
1218
  </optional>
1219
+ <optional>
1220
+ <attribute name="type"/>
1221
+ </optional>
769
1222
  <optional>
770
1223
  <attribute name="obligation">
771
1224
  <choice>
@@ -902,7 +1355,36 @@
902
1355
  <attribute name="id">
903
1356
  <data type="ID"/>
904
1357
  </attribute>
905
- <ref name="paragraph"/>
1358
+ <optional>
1359
+ <attribute name="unnumbered">
1360
+ <data type="boolean"/>
1361
+ </attribute>
1362
+ </optional>
1363
+ <optional>
1364
+ <attribute name="number"/>
1365
+ </optional>
1366
+ <optional>
1367
+ <attribute name="subsequence"/>
1368
+ </optional>
1369
+ <optional>
1370
+ <attribute name="keep-with-next">
1371
+ <data type="boolean"/>
1372
+ </attribute>
1373
+ </optional>
1374
+ <optional>
1375
+ <attribute name="keep-lines-together">
1376
+ <data type="boolean"/>
1377
+ </attribute>
1378
+ </optional>
1379
+ <oneOrMore>
1380
+ <choice>
1381
+ <ref name="paragraph"/>
1382
+ <ref name="ul"/>
1383
+ <ref name="ol"/>
1384
+ <ref name="dl"/>
1385
+ <ref name="formula"/>
1386
+ </choice>
1387
+ </oneOrMore>
906
1388
  </element>
907
1389
  </define>
908
1390
  <define name="termexample">
@@ -1004,11 +1486,6 @@
1004
1486
  </optional>
1005
1487
  </element>
1006
1488
  </define>
1007
- <define name="preface_abstract">
1008
- <element name="abstract">
1009
- <ref name="Basic-Section"/>
1010
- </element>
1011
- </define>
1012
1489
  <define name="term-clause">
1013
1490
  <element name="clause">
1014
1491
  <optional>
@@ -1058,4 +1535,79 @@
1058
1535
  <ref name="CitationType"/>
1059
1536
  </element>
1060
1537
  </define>
1538
+ <define name="amend">
1539
+ <element name="amend">
1540
+ <optional>
1541
+ <attribute name="id">
1542
+ <data type="ID"/>
1543
+ </attribute>
1544
+ </optional>
1545
+ <attribute name="change">
1546
+ <choice>
1547
+ <value>add</value>
1548
+ <value>modify</value>
1549
+ <value>delete</value>
1550
+ </choice>
1551
+ </attribute>
1552
+ <optional>
1553
+ <attribute name="path"/>
1554
+ </optional>
1555
+ <optional>
1556
+ <attribute name="path_end"/>
1557
+ </optional>
1558
+ <optional>
1559
+ <attribute name="title"/>
1560
+ </optional>
1561
+ <optional>
1562
+ <element name="location">
1563
+ <zeroOrMore>
1564
+ <ref name="locality"/>
1565
+ </zeroOrMore>
1566
+ </element>
1567
+ </optional>
1568
+ <zeroOrMore>
1569
+ <ref name="autonumber"/>
1570
+ </zeroOrMore>
1571
+ <optional>
1572
+ <element name="description">
1573
+ <zeroOrMore>
1574
+ <ref name="BasicBlock"/>
1575
+ </zeroOrMore>
1576
+ </element>
1577
+ </optional>
1578
+ <optional>
1579
+ <element name="newcontent">
1580
+ <zeroOrMore>
1581
+ <ref name="BasicBlock"/>
1582
+ </zeroOrMore>
1583
+ </element>
1584
+ </optional>
1585
+ <optional>
1586
+ <element name="description">
1587
+ <zeroOrMore>
1588
+ <ref name="BasicBlock"/>
1589
+ </zeroOrMore>
1590
+ </element>
1591
+ </optional>
1592
+ </element>
1593
+ </define>
1594
+ <define name="autonumber">
1595
+ <element name="autonumber">
1596
+ <attribute name="type">
1597
+ <choice>
1598
+ <value>requirement</value>
1599
+ <value>recommendation</value>
1600
+ <value>permission</value>
1601
+ <value>table</value>
1602
+ <value>figure</value>
1603
+ <value>admonition</value>
1604
+ <value>formula</value>
1605
+ <value>sourcecode</value>
1606
+ <value>example</value>
1607
+ <value>note</value>
1608
+ </choice>
1609
+ </attribute>
1610
+ <text/>
1611
+ </element>
1612
+ </define>
1061
1613
  </grammar>