metanorma-un 0.10.3 → 0.10.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -522,7 +522,6 @@
522
522
  <value>tip</value>
523
523
  <value>important</value>
524
524
  <value>caution</value>
525
- <value>statement</value>
526
525
  </choice>
527
526
  </define>
528
527
  <define name="figure">
@@ -216,6 +216,9 @@
216
216
  <optional>
217
217
  <ref name="fullname"/>
218
218
  </optional>
219
+ <zeroOrMore>
220
+ <ref name="credential"/>
221
+ </zeroOrMore>
219
222
  <zeroOrMore>
220
223
  <ref name="affiliation"/>
221
224
  </zeroOrMore>
@@ -232,6 +235,11 @@
232
235
  <ref name="FullNameType"/>
233
236
  </element>
234
237
  </define>
238
+ <define name="credential">
239
+ <element name="credential">
240
+ <text/>
241
+ </element>
242
+ </define>
235
243
  <define name="FullNameType">
236
244
  <choice>
237
245
  <group>
@@ -305,7 +313,9 @@
305
313
  <zeroOrMore>
306
314
  <ref name="affiliationdescription"/>
307
315
  </zeroOrMore>
308
- <ref name="organization"/>
316
+ <optional>
317
+ <ref name="organization"/>
318
+ </optional>
309
319
  </element>
310
320
  </define>
311
321
  <define name="affiliationname">
@@ -36,13 +36,12 @@ module Metanorma
36
36
 
37
37
  def title(node, xml)
38
38
  ["en"].each do |lang|
39
- xml.title **{ type: "main", language: lang,
40
- format: "text/plain" } do |t|
39
+ xml.title type: "main", language: lang, format: "text/plain" do |t|
41
40
  t << (asciidoc_sub(node.attr("title")) || node.title)
42
41
  end
43
42
  node.attr("subtitle") and
44
- xml.title **{ type: "subtitle", language: lang,
45
- format: "text/plain" } do |t|
43
+ xml.title type: "subtitle", language: lang,
44
+ format: "text/plain" do |t|
46
45
  t << asciidoc_sub(node.attr("subtitle"))
47
46
  end
48
47
  end
@@ -55,6 +54,7 @@ module Metanorma
55
54
  .stage_abbr(docstatus)
56
55
  dn = "#{dn}(#{abbr})" unless abbr.empty?
57
56
  end
57
+ id = node.attr("docidentifier") and dn = id
58
58
  xml.docidentifier { |i| i << dn }
59
59
  xml.docnumber { |i| i << node.attr("docnumber") }
60
60
  end
@@ -179,7 +179,7 @@ module Metanorma
179
179
  end
180
180
 
181
181
  def no_number_subheadings(xmldoc)
182
- xmldoc.xpath("//sections/clause | "\
182
+ xmldoc.xpath("//sections/clause | " \
183
183
  "//sections/definitions | //annex").each do |s|
184
184
  s.xpath(".//clause | .//definitions").each do |c|
185
185
  c["unnumbered"] = true
@@ -66,6 +66,7 @@
66
66
  <value>caution</value>
67
67
  <value>statement</value>
68
68
  <value>editorial</value>
69
+ <value>box</value>
69
70
  </choice>
70
71
  </define>
71
72
  <define name="index">
@@ -219,24 +220,7 @@
219
220
  <attribute name="id">
220
221
  <data type="ID"/>
221
222
  </attribute>
222
- <optional>
223
- <attribute name="keep-with-next">
224
- <data type="boolean"/>
225
- </attribute>
226
- </optional>
227
- <optional>
228
- <attribute name="keep-lines-together">
229
- <data type="boolean"/>
230
- </attribute>
231
- </optional>
232
- <optional>
233
- <attribute name="tag"/>
234
- </optional>
235
- <optional>
236
- <attribute name="multilingual-rendering">
237
- <ref name="MultilingualRenderingType"/>
238
- </attribute>
239
- </optional>
223
+ <ref name="BlockAttributes"/>
240
224
  <optional>
241
225
  <ref name="tname"/>
242
226
  </optional>
@@ -253,24 +237,7 @@
253
237
  <attribute name="id">
254
238
  <data type="ID"/>
255
239
  </attribute>
256
- <optional>
257
- <attribute name="keep-with-next">
258
- <data type="boolean"/>
259
- </attribute>
260
- </optional>
261
- <optional>
262
- <attribute name="keep-lines-together">
263
- <data type="boolean"/>
264
- </attribute>
265
- </optional>
266
- <optional>
267
- <attribute name="tag"/>
268
- </optional>
269
- <optional>
270
- <attribute name="multilingual-rendering">
271
- <ref name="MultilingualRenderingType"/>
272
- </attribute>
273
- </optional>
240
+ <ref name="BlockAttributes"/>
274
241
  <optional>
275
242
  <attribute name="type">
276
243
  <choice>
@@ -298,29 +265,12 @@
298
265
  <attribute name="id">
299
266
  <data type="ID"/>
300
267
  </attribute>
301
- <optional>
302
- <attribute name="keep-with-next">
303
- <data type="boolean"/>
304
- </attribute>
305
- </optional>
306
- <optional>
307
- <attribute name="keep-lines-together">
308
- <data type="boolean"/>
309
- </attribute>
310
- </optional>
268
+ <ref name="BlockAttributes"/>
311
269
  <optional>
312
270
  <attribute name="key">
313
271
  <data type="boolean"/>
314
272
  </attribute>
315
273
  </optional>
316
- <optional>
317
- <attribute name="tag"/>
318
- </optional>
319
- <optional>
320
- <attribute name="multilingual-rendering">
321
- <ref name="MultilingualRenderingType"/>
322
- </attribute>
323
- </optional>
324
274
  <optional>
325
275
  <ref name="tname"/>
326
276
  </optional>
@@ -361,24 +311,7 @@
361
311
  <optional>
362
312
  <attribute name="number"/>
363
313
  </optional>
364
- <optional>
365
- <attribute name="keep-with-next">
366
- <data type="boolean"/>
367
- </attribute>
368
- </optional>
369
- <optional>
370
- <attribute name="keep-lines-together">
371
- <data type="boolean"/>
372
- </attribute>
373
- </optional>
374
- <optional>
375
- <attribute name="tag"/>
376
- </optional>
377
- <optional>
378
- <attribute name="multilingual-rendering">
379
- <ref name="MultilingualRenderingType"/>
380
- </attribute>
381
- </optional>
314
+ <ref name="BlockAttributes"/>
382
315
  <optional>
383
316
  <ref name="tname"/>
384
317
  </optional>
@@ -426,27 +359,10 @@
426
359
  <data type="anyURI"/>
427
360
  </attribute>
428
361
  </optional>
429
- <optional>
430
- <attribute name="keep-with-next">
431
- <data type="boolean"/>
432
- </attribute>
433
- </optional>
434
- <optional>
435
- <attribute name="keep-lines-together">
436
- <data type="boolean"/>
437
- </attribute>
438
- </optional>
439
362
  <optional>
440
363
  <attribute name="width"/>
441
364
  </optional>
442
- <optional>
443
- <attribute name="tag"/>
444
- </optional>
445
- <optional>
446
- <attribute name="multilingual-rendering">
447
- <ref name="MultilingualRenderingType"/>
448
- </attribute>
449
- </optional>
365
+ <ref name="BlockAttributes"/>
450
366
  <optional>
451
367
  <ref name="colgroup"/>
452
368
  </optional>
@@ -484,27 +400,10 @@
484
400
  <optional>
485
401
  <attribute name="subsequence"/>
486
402
  </optional>
487
- <optional>
488
- <attribute name="keep-with-next">
489
- <data type="boolean"/>
490
- </attribute>
491
- </optional>
492
- <optional>
493
- <attribute name="keep-lines-together">
494
- <data type="boolean"/>
495
- </attribute>
496
- </optional>
497
403
  <optional>
498
404
  <attribute name="class"/>
499
405
  </optional>
500
- <optional>
501
- <attribute name="tag"/>
502
- </optional>
503
- <optional>
504
- <attribute name="multilingual-rendering">
505
- <ref name="MultilingualRenderingType"/>
506
- </attribute>
507
- </optional>
406
+ <ref name="BlockAttributes"/>
508
407
  <optional>
509
408
  <ref name="source"/>
510
409
  </optional>
@@ -550,27 +449,10 @@
550
449
  <optional>
551
450
  <attribute name="subsequence"/>
552
451
  </optional>
553
- <optional>
554
- <attribute name="keep-with-next">
555
- <data type="boolean"/>
556
- </attribute>
557
- </optional>
558
- <optional>
559
- <attribute name="keep-lines-together">
560
- <data type="boolean"/>
561
- </attribute>
562
- </optional>
563
452
  <optional>
564
453
  <attribute name="lang"/>
565
454
  </optional>
566
- <optional>
567
- <attribute name="tag"/>
568
- </optional>
569
- <optional>
570
- <attribute name="multilingual-rendering">
571
- <ref name="MultilingualRenderingType"/>
572
- </attribute>
573
- </optional>
455
+ <ref name="BlockAttributes"/>
574
456
  <optional>
575
457
  <attribute name="linenums">
576
458
  <data type="boolean"/>
@@ -609,29 +491,12 @@
609
491
  <optional>
610
492
  <attribute name="subsequence"/>
611
493
  </optional>
612
- <optional>
613
- <attribute name="keep-with-next">
614
- <data type="boolean"/>
615
- </attribute>
616
- </optional>
617
- <optional>
618
- <attribute name="keep-lines-together">
619
- <data type="boolean"/>
620
- </attribute>
621
- </optional>
622
494
  <optional>
623
495
  <attribute name="inequality">
624
496
  <data type="boolean"/>
625
497
  </attribute>
626
498
  </optional>
627
- <optional>
628
- <attribute name="tag"/>
629
- </optional>
630
- <optional>
631
- <attribute name="multilingual-rendering">
632
- <ref name="MultilingualRenderingType"/>
633
- </attribute>
634
- </optional>
499
+ <ref name="BlockAttributes"/>
635
500
  <ref name="stem"/>
636
501
  <optional>
637
502
  <ref name="dl"/>
@@ -650,27 +515,7 @@
650
515
  <ref name="Alignments"/>
651
516
  </attribute>
652
517
  </optional>
653
- <optional>
654
- <attribute name="keep-with-next">
655
- <data type="boolean"/>
656
- </attribute>
657
- </optional>
658
- <optional>
659
- <attribute name="keep-lines-together">
660
- <data type="boolean"/>
661
- </attribute>
662
- </optional>
663
- <optional>
664
- <attribute name="tag"/>
665
- </optional>
666
- <optional>
667
- <attribute name="type"/>
668
- </optional>
669
- <optional>
670
- <attribute name="multilingual-rendering">
671
- <ref name="MultilingualRenderingType"/>
672
- </attribute>
673
- </optional>
518
+ <ref name="BlockAttributes"/>
674
519
  <zeroOrMore>
675
520
  <ref name="TextElement"/>
676
521
  </zeroOrMore>
@@ -688,27 +533,10 @@
688
533
  <ref name="Alignments"/>
689
534
  </attribute>
690
535
  </optional>
691
- <optional>
692
- <attribute name="keep-with-next">
693
- <data type="boolean"/>
694
- </attribute>
695
- </optional>
696
- <optional>
697
- <attribute name="keep-lines-together">
698
- <data type="boolean"/>
699
- </attribute>
700
- </optional>
701
- <optional>
702
- <attribute name="tag"/>
703
- </optional>
704
536
  <optional>
705
537
  <attribute name="type"/>
706
538
  </optional>
707
- <optional>
708
- <attribute name="multilingual-rendering">
709
- <ref name="MultilingualRenderingType"/>
710
- </attribute>
711
- </optional>
539
+ <ref name="BlockAttributes"/>
712
540
  <zeroOrMore>
713
541
  <choice>
714
542
  <ref name="TextElement"/>
@@ -730,24 +558,7 @@
730
558
  <ref name="Alignments"/>
731
559
  </attribute>
732
560
  </optional>
733
- <optional>
734
- <attribute name="keep-with-next">
735
- <data type="boolean"/>
736
- </attribute>
737
- </optional>
738
- <optional>
739
- <attribute name="keep-lines-together">
740
- <data type="boolean"/>
741
- </attribute>
742
- </optional>
743
- <optional>
744
- <attribute name="tag"/>
745
- </optional>
746
- <optional>
747
- <attribute name="multilingual-rendering">
748
- <ref name="MultilingualRenderingType"/>
749
- </attribute>
750
- </optional>
561
+ <ref name="BlockAttributes"/>
751
562
  <optional>
752
563
  <ref name="quote-source"/>
753
564
  </optional>
@@ -827,27 +638,9 @@
827
638
  <optional>
828
639
  <attribute name="subsequence"/>
829
640
  </optional>
830
- <optional>
831
- <attribute name="keep-with-next">
832
- <data type="boolean"/>
833
- </attribute>
834
- </optional>
835
- <optional>
836
- <attribute name="keep-lines-together">
837
- <data type="boolean"/>
838
- </attribute>
839
- </optional>
840
641
  <optional>
841
642
  <attribute name="type"/>
842
643
  </optional>
843
- <optional>
844
- <attribute name="tag"/>
845
- </optional>
846
- <optional>
847
- <attribute name="multilingual-rendering">
848
- <ref name="MultilingualRenderingType"/>
849
- </attribute>
850
- </optional>
851
644
  <optional>
852
645
  <attribute name="coverpage">
853
646
  <data type="boolean"/>
@@ -858,6 +651,7 @@
858
651
  <data type="boolean"/>
859
652
  </attribute>
860
653
  </optional>
654
+ <ref name="BlockAttributes"/>
861
655
  <oneOrMore>
862
656
  <choice>
863
657
  <ref name="paragraph"/>
@@ -1331,14 +1125,7 @@
1331
1125
  <optional>
1332
1126
  <attribute name="class"/>
1333
1127
  </optional>
1334
- <optional>
1335
- <attribute name="tag"/>
1336
- </optional>
1337
- <optional>
1338
- <attribute name="multilingual-rendering">
1339
- <ref name="MultilingualRenderingType"/>
1340
- </attribute>
1341
- </optional>
1128
+ <ref name="BlockAttributes"/>
1342
1129
  <zeroOrMore>
1343
1130
  <choice>
1344
1131
  <ref name="TextElement"/>
@@ -1577,6 +1364,9 @@
1577
1364
  <zeroOrMore>
1578
1365
  <ref name="indexsect"/>
1579
1366
  </zeroOrMore>
1367
+ <optional>
1368
+ <ref name="colophon"/>
1369
+ </optional>
1580
1370
  </element>
1581
1371
  </define>
1582
1372
  <define name="misccontainer">
@@ -1599,6 +1389,13 @@
1599
1389
  </oneOrMore>
1600
1390
  </element>
1601
1391
  </define>
1392
+ <define name="colophon">
1393
+ <element name="colophon">
1394
+ <oneOrMore>
1395
+ <ref name="content"/>
1396
+ </oneOrMore>
1397
+ </element>
1398
+ </define>
1602
1399
  <define name="foreword">
1603
1400
  <element name="foreword">
1604
1401
  <ref name="Content-Section"/>
@@ -1897,7 +1694,10 @@
1897
1694
  </zeroOrMore>
1898
1695
  <choice>
1899
1696
  <oneOrMore>
1900
- <ref name="term"/>
1697
+ <choice>
1698
+ <ref name="term"/>
1699
+ <ref name="terms"/>
1700
+ </choice>
1901
1701
  </oneOrMore>
1902
1702
  <group>
1903
1703
  <zeroOrMore>
@@ -1923,14 +1723,7 @@
1923
1723
  <optional>
1924
1724
  <attribute name="script"/>
1925
1725
  </optional>
1926
- <optional>
1927
- <attribute name="tag"/>
1928
- </optional>
1929
- <optional>
1930
- <attribute name="multilingual-rendering">
1931
- <ref name="MultilingualRenderingType"/>
1932
- </attribute>
1933
- </optional>
1726
+ <ref name="BlockAttributes"/>
1934
1727
  <oneOrMore>
1935
1728
  <ref name="preferred"/>
1936
1729
  </oneOrMore>
@@ -2271,24 +2064,7 @@
2271
2064
  <optional>
2272
2065
  <attribute name="subsequence"/>
2273
2066
  </optional>
2274
- <optional>
2275
- <attribute name="keep-with-next">
2276
- <data type="boolean"/>
2277
- </attribute>
2278
- </optional>
2279
- <optional>
2280
- <attribute name="keep-lines-together">
2281
- <data type="boolean"/>
2282
- </attribute>
2283
- </optional>
2284
- <optional>
2285
- <attribute name="tag"/>
2286
- </optional>
2287
- <optional>
2288
- <attribute name="multilingual-rendering">
2289
- <ref name="MultilingualRenderingType"/>
2290
- </attribute>
2291
- </optional>
2067
+ <ref name="BlockAttributes"/>
2292
2068
  <oneOrMore>
2293
2069
  <choice>
2294
2070
  <ref name="paragraph"/>
@@ -2305,24 +2081,7 @@
2305
2081
  <attribute name="id">
2306
2082
  <data type="ID"/>
2307
2083
  </attribute>
2308
- <optional>
2309
- <attribute name="keep-with-next">
2310
- <data type="boolean"/>
2311
- </attribute>
2312
- </optional>
2313
- <optional>
2314
- <attribute name="keep-lines-together">
2315
- <data type="boolean"/>
2316
- </attribute>
2317
- </optional>
2318
- <optional>
2319
- <attribute name="tag"/>
2320
- </optional>
2321
- <optional>
2322
- <attribute name="multilingual-rendering">
2323
- <ref name="MultilingualRenderingType"/>
2324
- </attribute>
2325
- </optional>
2084
+ <ref name="BlockAttributes"/>
2326
2085
  <oneOrMore>
2327
2086
  <choice>
2328
2087
  <ref name="formula"/>
@@ -2449,14 +2208,7 @@
2449
2208
  <optional>
2450
2209
  <attribute name="title"/>
2451
2210
  </optional>
2452
- <optional>
2453
- <attribute name="tag"/>
2454
- </optional>
2455
- <optional>
2456
- <attribute name="multilingual-rendering">
2457
- <ref name="MultilingualRenderingType"/>
2458
- </attribute>
2459
- </optional>
2211
+ <ref name="BlockAttributes"/>
2460
2212
  <optional>
2461
2213
  <element name="location">
2462
2214
  <zeroOrMore>
@@ -2516,14 +2268,7 @@
2516
2268
  </define>
2517
2269
  <define name="imagemap">
2518
2270
  <element name="imagemap">
2519
- <optional>
2520
- <attribute name="tag"/>
2521
- </optional>
2522
- <optional>
2523
- <attribute name="multilingual-rendering">
2524
- <ref name="MultilingualRenderingType"/>
2525
- </attribute>
2526
- </optional>
2271
+ <ref name="BlockAttributes"/>
2527
2272
  <ref name="figure"/>
2528
2273
  <zeroOrMore>
2529
2274
  <element name="area">
@@ -2569,14 +2314,7 @@
2569
2314
  </define>
2570
2315
  <define name="svgmap">
2571
2316
  <element name="svgmap">
2572
- <optional>
2573
- <attribute name="tag"/>
2574
- </optional>
2575
- <optional>
2576
- <attribute name="multilingual-rendering">
2577
- <ref name="MultilingualRenderingType"/>
2578
- </attribute>
2579
- </optional>
2317
+ <ref name="BlockAttributes"/>
2580
2318
  <ref name="figure"/>
2581
2319
  <zeroOrMore>
2582
2320
  <element name="target">
@@ -2683,6 +2421,29 @@
2683
2421
  </oneOrMore>
2684
2422
  </element>
2685
2423
  </define>
2424
+ <define name="BlockAttributes">
2425
+ <optional>
2426
+ <attribute name="keep-with-next">
2427
+ <data type="boolean"/>
2428
+ </attribute>
2429
+ </optional>
2430
+ <optional>
2431
+ <attribute name="keep-lines-together">
2432
+ <data type="boolean"/>
2433
+ </attribute>
2434
+ </optional>
2435
+ <optional>
2436
+ <attribute name="tag"/>
2437
+ </optional>
2438
+ <optional>
2439
+ <attribute name="multilingual-rendering">
2440
+ <ref name="MultilingualRenderingType"/>
2441
+ </attribute>
2442
+ </optional>
2443
+ <optional>
2444
+ <attribute name="columns"/>
2445
+ </optional>
2446
+ </define>
2686
2447
  <start>
2687
2448
  <ref name="standard-document"/>
2688
2449
  </start>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.10.3".freeze
3
+ VERSION = "0.10.5".freeze
4
4
  end
5
5
  end
data/metanorma-un.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency "roman-numerals"
32
32
  spec.add_dependency "twitter_cldr"
33
33
 
34
- spec.add_dependency "metanorma-standoc", "~> 2.3.0"
34
+ spec.add_dependency "metanorma-standoc", "~> 2.4.0"
35
35
 
36
36
  spec.add_development_dependency "debug"
37
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.10.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-24 00:00:00.000000000 Z
11
+ date: 2023-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.3.0
61
+ version: 2.4.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.3.0
68
+ version: 2.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: debug
71
71
  requirement: !ruby/object:Gem::Requirement