metanorma-un 0.7.4 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -401,9 +401,9 @@
401
401
  <choice>
402
402
  <!-- iso191606 TODO -->
403
403
  <group>
404
- <oneOrMore>
404
+ <zeroOrMore>
405
405
  <ref name="street"/>
406
- </oneOrMore>
406
+ </zeroOrMore>
407
407
  <ref name="city"/>
408
408
  <optional>
409
409
  <ref name="state"/>
File without changes
@@ -1,9 +1,9 @@
1
1
  require "asciidoctor"
2
- require "asciidoctor/standoc/converter"
2
+ require "metanorma/standoc/converter"
3
3
  require "fileutils"
4
4
  require_relative "validate"
5
5
 
6
- module Asciidoctor
6
+ module Metanorma
7
7
  module UN
8
8
  class Converter < Standoc::Converter
9
9
  XML_ROOT_TAG = "un-standard".freeze
@@ -32,6 +32,56 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="index">
36
+ <element name="index">
37
+ <optional>
38
+ <attribute name="to">
39
+ <data type="IDREF"/>
40
+ </attribute>
41
+ </optional>
42
+ <element name="primary">
43
+ <oneOrMore>
44
+ <choice>
45
+ <ref name="PureTextElement"/>
46
+ <ref name="stem"/>
47
+ </choice>
48
+ </oneOrMore>
49
+ </element>
50
+ <optional>
51
+ <element name="secondary">
52
+ <oneOrMore>
53
+ <choice>
54
+ <ref name="PureTextElement"/>
55
+ <ref name="stem"/>
56
+ </choice>
57
+ </oneOrMore>
58
+ </element>
59
+ </optional>
60
+ <optional>
61
+ <element name="tertiary">
62
+ <oneOrMore>
63
+ <choice>
64
+ <ref name="PureTextElement"/>
65
+ <ref name="stem"/>
66
+ </choice>
67
+ </oneOrMore>
68
+ </element>
69
+ </optional>
70
+ </element>
71
+ </define>
72
+ <define name="bibitem">
73
+ <element name="bibitem">
74
+ <attribute name="id">
75
+ <data type="ID"/>
76
+ </attribute>
77
+ <optional>
78
+ <attribute name="hidden">
79
+ <data type="boolean"/>
80
+ </attribute>
81
+ </optional>
82
+ <ref name="BibliographicItem"/>
83
+ </element>
84
+ </define>
35
85
  <define name="section-title">
36
86
  <element name="title">
37
87
  <zeroOrMore>
@@ -690,6 +740,7 @@
690
740
  <ref name="terms"/>
691
741
  <ref name="term-clause"/>
692
742
  <ref name="definitions"/>
743
+ <ref name="floating-title"/>
693
744
  </choice>
694
745
  </oneOrMore>
695
746
  </element>
@@ -1013,6 +1064,26 @@
1013
1064
  </zeroOrMore>
1014
1065
  </element>
1015
1066
  </define>
1067
+ <define name="sub">
1068
+ <element name="sub">
1069
+ <zeroOrMore>
1070
+ <choice>
1071
+ <ref name="PureTextElement"/>
1072
+ <ref name="stem"/>
1073
+ </choice>
1074
+ </zeroOrMore>
1075
+ </element>
1076
+ </define>
1077
+ <define name="sup">
1078
+ <element name="sup">
1079
+ <zeroOrMore>
1080
+ <choice>
1081
+ <ref name="PureTextElement"/>
1082
+ <ref name="stem"/>
1083
+ </choice>
1084
+ </zeroOrMore>
1085
+ </element>
1086
+ </define>
1016
1087
  <define name="pagebreak">
1017
1088
  <element name="pagebreak">
1018
1089
  <optional>
@@ -1680,6 +1751,7 @@
1680
1751
  <ref name="clause-subsection"/>
1681
1752
  <ref name="terms"/>
1682
1753
  <ref name="definitions"/>
1754
+ <ref name="floating-title"/>
1683
1755
  </choice>
1684
1756
  </oneOrMore>
1685
1757
  </choice>
@@ -1722,6 +1794,7 @@
1722
1794
  <ref name="terms"/>
1723
1795
  <ref name="definitions"/>
1724
1796
  <ref name="references"/>
1797
+ <ref name="floating-title"/>
1725
1798
  </choice>
1726
1799
  </zeroOrMore>
1727
1800
  </group>
@@ -1973,7 +2046,11 @@
1973
2046
  </optional>
1974
2047
  <element name="name">
1975
2048
  <zeroOrMore>
1976
- <ref name="PureTextElement"/>
2049
+ <choice>
2050
+ <ref name="PureTextElement"/>
2051
+ <ref name="stem"/>
2052
+ <ref name="index"/>
2053
+ </choice>
1977
2054
  </zeroOrMore>
1978
2055
  </element>
1979
2056
  <optional>
@@ -1987,7 +2064,7 @@
1987
2064
  </element>
1988
2065
  </optional>
1989
2066
  <optional>
1990
- <element name="grammar-info">
2067
+ <element name="grammar">
1991
2068
  <ref name="Grammar"/>
1992
2069
  </element>
1993
2070
  </optional>
@@ -2196,7 +2273,18 @@
2196
2273
  <ref name="MultilingualRenderingType"/>
2197
2274
  </attribute>
2198
2275
  </optional>
2199
- <ref name="paragraph"/>
2276
+ <oneOrMore>
2277
+ <choice>
2278
+ <ref name="formula"/>
2279
+ <ref name="ul"/>
2280
+ <ref name="ol"/>
2281
+ <ref name="dl"/>
2282
+ <ref name="quote"/>
2283
+ <ref name="sourcecode"/>
2284
+ <ref name="paragraph"/>
2285
+ <ref name="figure"/>
2286
+ </choice>
2287
+ </oneOrMore>
2200
2288
  </element>
2201
2289
  </define>
2202
2290
  <define name="termsource">
@@ -2530,4 +2618,17 @@
2530
2618
  </oneOrMore>
2531
2619
  </element>
2532
2620
  </define>
2621
+ <define name="floating-title">
2622
+ <element name="floating-title">
2623
+ <attribute name="id">
2624
+ <data type="ID"/>
2625
+ </attribute>
2626
+ <attribute name="depth">
2627
+ <data type="int"/>
2628
+ </attribute>
2629
+ <zeroOrMore>
2630
+ <ref name="TextElement"/>
2631
+ </zeroOrMore>
2632
+ </element>
2633
+ </define>
2533
2634
  </grammar>
File without changes
@@ -96,7 +96,10 @@
96
96
  <define name="sections">
97
97
  <element name="sections">
98
98
  <oneOrMore>
99
- <ref name="clause"/>
99
+ <choice>
100
+ <ref name="clause"/>
101
+ <ref name="floating-title"/>
102
+ </choice>
100
103
  </oneOrMore>
101
104
  </element>
102
105
  </define>
@@ -186,6 +189,7 @@
186
189
  <ref name="clause-subsection"/>
187
190
  <ref name="terms"/>
188
191
  <ref name="definitions"/>
192
+ <ref name="floating-title"/>
189
193
  </choice>
190
194
  </zeroOrMore>
191
195
  </group>
@@ -233,6 +237,7 @@
233
237
  <ref name="terms"/>
234
238
  <ref name="definitions"/>
235
239
  <ref name="references"/>
240
+ <ref name="floating-title"/>
236
241
  </choice>
237
242
  </zeroOrMore>
238
243
  </group>
@@ -1,4 +1,4 @@
1
- module Asciidoctor
1
+ module Metanorma
2
2
  module UN
3
3
  class Converter < Standoc::Converter
4
4
  def content_validate(doc)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.7.4".freeze
3
+ VERSION = "0.8.2".freeze
4
4
  end
5
5
  end
data/lib/metanorma/un.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "metanorma/un/processor"
2
2
  require "metanorma/un/input"
3
3
  require "metanorma/un/version"
4
+ require "metanorma/un/converter"
4
5
 
5
6
  module Metanorma
6
7
  module UN
data/lib/metanorma-un.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require "metanorma/un"
2
2
  require "asciidoctor"
3
- require "asciidoctor/un"
4
3
  require "isodoc/un"
5
4
 
6
5
  if defined? Metanorma
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency "roman-numerals"
31
31
  spec.add_dependency "twitter_cldr"
32
32
 
33
- spec.add_dependency "metanorma-standoc", "~> 1.11.0"
33
+ spec.add_dependency "metanorma-standoc", "~> 2.0.0"
34
34
 
35
35
  spec.add_development_dependency "debug"
36
36
  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.7.4
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-13 00:00:00.000000000 Z
11
+ date: 2022-01-22 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: 1.11.0
61
+ version: 2.0.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: 1.11.0
68
+ version: 2.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: debug
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -228,15 +228,6 @@ files:
228
228
  - bin/console
229
229
  - bin/rspec
230
230
  - bin/setup
231
- - lib/asciidoctor/un.rb
232
- - lib/asciidoctor/un/basicdoc.rng
233
- - lib/asciidoctor/un/biblio.rng
234
- - lib/asciidoctor/un/boilerplate.xml
235
- - lib/asciidoctor/un/converter.rb
236
- - lib/asciidoctor/un/isodoc.rng
237
- - lib/asciidoctor/un/reqt.rng
238
- - lib/asciidoctor/un/un.rng
239
- - lib/asciidoctor/un/validate.rb
240
231
  - lib/isodoc/un.rb
241
232
  - lib/isodoc/un/base_convert.rb
242
233
  - lib/isodoc/un/html/header.html
@@ -269,8 +260,16 @@ files:
269
260
  - lib/metanorma-un.rb
270
261
  - lib/metanorma/un.rb
271
262
  - lib/metanorma/un/UN_emblem_blue.svg
263
+ - lib/metanorma/un/basicdoc.rng
264
+ - lib/metanorma/un/biblio.rng
265
+ - lib/metanorma/un/boilerplate.xml
266
+ - lib/metanorma/un/converter.rb
272
267
  - lib/metanorma/un/input.rb
268
+ - lib/metanorma/un/isodoc.rng
273
269
  - lib/metanorma/un/processor.rb
270
+ - lib/metanorma/un/reqt.rng
271
+ - lib/metanorma/un/un.rng
272
+ - lib/metanorma/un/validate.rb
274
273
  - lib/metanorma/un/version.rb
275
274
  - metanorma-unece.gemspec
276
275
  homepage: https://github.com/metanorma/metanorma-un
@@ -1,7 +0,0 @@
1
- require "asciidoctor/un/converter"
2
-
3
- module Asciidoctor
4
- module UN
5
-
6
- end
7
- end