metanorma-m3aawg 1.8.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
File without changes
File without changes
@@ -1,9 +1,9 @@
1
- require "asciidoctor/standoc/converter"
2
- require 'asciidoctor/generic/converter'
1
+ require "metanorma/standoc/converter"
2
+ require "metanorma/generic/converter"
3
3
 
4
- module Asciidoctor
4
+ module Metanorma
5
5
  module M3AAWG
6
- class Converter < Asciidoctor::Generic::Converter
6
+ class Converter < Metanorma::Generic::Converter
7
7
  XML_ROOT_TAG = "m3d-standard".freeze
8
8
  XML_NAMESPACE = "https://www.metanorma.org/ns/m3d".freeze
9
9
 
@@ -11,19 +11,20 @@ module Asciidoctor
11
11
 
12
12
  def metadata_committee(node, xml)
13
13
  return unless node.attr("technical-committee")
14
+
14
15
  xml.editorialgroup do |a|
15
16
  a.committee node.attr("technical-committee"),
16
- **attr_code(type: node.attr("technical-committee-type"))
17
+ **attr_code(type: node.attr("technical-committee-type"))
17
18
  i = 2
18
- while node.attr("technical-committee_#{i}") do
19
+ while node.attr("technical-committee_#{i}")
19
20
  a.committee node.attr("technical-committee_#{i}"),
20
- **attr_code(type: node.attr("technical-committee-type_#{i}"))
21
+ **attr_code(type: node.attr("technical-committee-type_#{i}"))
21
22
  i += 1
22
23
  end
23
24
  end
24
25
  end
25
26
 
26
- def configuration
27
+ def configuration
27
28
  Metanorma::M3AAWG.configuration
28
29
  end
29
30
 
@@ -33,11 +34,14 @@ module Asciidoctor
33
34
  end
34
35
 
35
36
  def outputs(node, ret)
36
- File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
37
- presentation_xml_converter(node).convert(@filename + ".xml")
38
- html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
39
- doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
40
- pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
37
+ File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
38
+ presentation_xml_converter(node).convert("#{@filename}.xml")
39
+ html_converter(node).convert("#{@filename}.presentation.xml", nil,
40
+ false, "#{@filename}.html")
41
+ doc_converter(node).convert("#{@filename}.presentation.xml", nil,
42
+ false, "#{@filename}.doc")
43
+ pdf_converter(node)&.convert("#{@filename}.presentation.xml", nil,
44
+ false, "#{@filename}.pdf")
41
45
  end
42
46
 
43
47
  def sections_cleanup(xml)
@@ -62,7 +66,7 @@ module Asciidoctor
62
66
  def pdf_converter(node)
63
67
  return nil if node.attr("no-pdf")
64
68
 
65
- IsoDoc::M3AAWG::PdfConvert.new(doc_extract_attributes(node))
69
+ IsoDoc::M3AAWG::PdfConvert.new(pdf_extract_attributes(node))
66
70
  end
67
71
  end
68
72
  end
@@ -58,7 +58,7 @@
58
58
  <attribute name="alt"/>
59
59
  </optional>
60
60
  <optional>
61
- <attribute name="updatetype">
61
+ <attribute name="update-type">
62
62
  <data type="boolean"/>
63
63
  </attribute>
64
64
  </optional>
@@ -1796,6 +1796,20 @@
1796
1796
  <data type="ID"/>
1797
1797
  </attribute>
1798
1798
  </optional>
1799
+ <optional>
1800
+ <attribute name="language"/>
1801
+ </optional>
1802
+ <optional>
1803
+ <attribute name="script"/>
1804
+ </optional>
1805
+ <optional>
1806
+ <attribute name="tag"/>
1807
+ </optional>
1808
+ <optional>
1809
+ <attribute name="multilingual-rendering">
1810
+ <ref name="MultilingualRenderingType"/>
1811
+ </attribute>
1812
+ </optional>
1799
1813
  <oneOrMore>
1800
1814
  <ref name="preferred"/>
1801
1815
  </oneOrMore>
@@ -1814,9 +1828,6 @@
1814
1828
  <optional>
1815
1829
  <ref name="termsubject"/>
1816
1830
  </optional>
1817
- <optional>
1818
- <ref name="termusage"/>
1819
- </optional>
1820
1831
  <oneOrMore>
1821
1832
  <ref name="termdefinition"/>
1822
1833
  </oneOrMore>
@@ -1880,17 +1891,37 @@
1880
1891
  </attribute>
1881
1892
  </optional>
1882
1893
  <optional>
1883
- <attribute name="geographicArea"/>
1894
+ <attribute name="geographic-area"/>
1884
1895
  </optional>
1885
1896
  <choice>
1886
1897
  <ref name="expression_designation"/>
1887
1898
  <ref name="letter_symbol_designation"/>
1888
1899
  <ref name="graphical_symbol_designation"/>
1889
1900
  </choice>
1901
+ <optional>
1902
+ <ref name="fieldofapplication"/>
1903
+ </optional>
1904
+ <optional>
1905
+ <ref name="usageinfo"/>
1906
+ </optional>
1890
1907
  <zeroOrMore>
1891
1908
  <ref name="termsource"/>
1892
1909
  </zeroOrMore>
1893
1910
  </define>
1911
+ <define name="fieldofapplication">
1912
+ <element name="field-of-application">
1913
+ <oneOrMore>
1914
+ <ref name="PureTextElement"/>
1915
+ </oneOrMore>
1916
+ </element>
1917
+ </define>
1918
+ <define name="usageinfo">
1919
+ <element name="usage-info">
1920
+ <oneOrMore>
1921
+ <ref name="PureTextElement"/>
1922
+ </oneOrMore>
1923
+ </element>
1924
+ </define>
1894
1925
  <define name="letter_symbol_designation">
1895
1926
  <element name="letter-symbol">
1896
1927
  <optional>
@@ -1942,11 +1973,15 @@
1942
1973
  </optional>
1943
1974
  <element name="name">
1944
1975
  <zeroOrMore>
1945
- <ref name="PureTextElement"/>
1976
+ <choice>
1977
+ <ref name="PureTextElement"/>
1978
+ <ref name="stem"/>
1979
+ <ref name="index"/>
1980
+ </choice>
1946
1981
  </zeroOrMore>
1947
1982
  </element>
1948
1983
  <optional>
1949
- <element name="abbreviationType">
1984
+ <element name="abbreviation-type">
1950
1985
  <ref name="AbbreviationType"/>
1951
1986
  </element>
1952
1987
  </optional>
@@ -1956,7 +1991,7 @@
1956
1991
  </element>
1957
1992
  </optional>
1958
1993
  <optional>
1959
- <element name="grammarInfo">
1994
+ <element name="grammar">
1960
1995
  <ref name="Grammar"/>
1961
1996
  </element>
1962
1997
  </optional>
@@ -1983,6 +2018,11 @@
1983
2018
  <ref name="GrammarGender"/>
1984
2019
  </element>
1985
2020
  </zeroOrMore>
2021
+ <zeroOrMore>
2022
+ <element name="number">
2023
+ <ref name="GrammarNumber"/>
2024
+ </element>
2025
+ </zeroOrMore>
1986
2026
  <optional>
1987
2027
  <element name="isPreposition">
1988
2028
  <data type="boolean"/>
@@ -2014,7 +2054,7 @@
2014
2054
  </element>
2015
2055
  </optional>
2016
2056
  <zeroOrMore>
2017
- <element name="grammarvalue">
2057
+ <element name="grammar-value">
2018
2058
  <text/>
2019
2059
  </element>
2020
2060
  </zeroOrMore>
@@ -2027,6 +2067,13 @@
2027
2067
  <value>common</value>
2028
2068
  </choice>
2029
2069
  </define>
2070
+ <define name="GrammarNumber">
2071
+ <choice>
2072
+ <value>singular</value>
2073
+ <value>dual</value>
2074
+ <value>plural</value>
2075
+ </choice>
2076
+ </define>
2030
2077
  <define name="termdomain">
2031
2078
  <element name="domain">
2032
2079
  <oneOrMore>
@@ -2041,13 +2088,6 @@
2041
2088
  </oneOrMore>
2042
2089
  </element>
2043
2090
  </define>
2044
- <define name="termusage">
2045
- <element name="usageinfo">
2046
- <oneOrMore>
2047
- <ref name="BasicBlock"/>
2048
- </oneOrMore>
2049
- </element>
2050
- </define>
2051
2091
  <define name="termdefinition">
2052
2092
  <element name="definition">
2053
2093
  <choice>
@@ -2061,13 +2101,16 @@
2061
2101
  </element>
2062
2102
  </define>
2063
2103
  <define name="verbaldefinition">
2064
- <element name="verbaldefinition">
2104
+ <element name="verbal-definition">
2065
2105
  <oneOrMore>
2066
2106
  <choice>
2067
2107
  <ref name="paragraph"/>
2068
2108
  <ref name="dl"/>
2069
2109
  <ref name="ol"/>
2070
2110
  <ref name="ul"/>
2111
+ <ref name="table"/>
2112
+ <ref name="figure"/>
2113
+ <ref name="formula"/>
2071
2114
  </choice>
2072
2115
  </oneOrMore>
2073
2116
  <zeroOrMore>
@@ -2076,7 +2119,7 @@
2076
2119
  </element>
2077
2120
  </define>
2078
2121
  <define name="nonverbalrep">
2079
- <element name="nonverbalrepresentation">
2122
+ <element name="non-verbal-representation">
2080
2123
  <oneOrMore>
2081
2124
  <choice>
2082
2125
  <ref name="table"/>
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "1.8.2".freeze
3
+ VERSION = "2.0.0".freeze
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  require "asciidoctor" unless defined? Asciidoctor::Converter
2
- require_relative "asciidoctor/m3aawg/converter"
2
+ require_relative "metanorma/m3aawg/converter"
3
3
  require_relative "isodoc/m3aawg/html_convert"
4
4
  require_relative "isodoc/m3aawg/word_convert"
5
5
  require_relative "isodoc/m3aawg/pdf_convert"
@@ -31,9 +31,9 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency "htmlentities", "~> 4.3.4"
32
32
  spec.add_dependency "thread_safe"
33
33
 
34
- spec.add_dependency "metanorma-generic", "~> 1.11.0"
34
+ spec.add_dependency "metanorma-generic", "~> 2.0.0"
35
35
 
36
- spec.add_development_dependency "byebug", "~> 9.1"
36
+ spec.add_development_dependency "debug"
37
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
38
38
  spec.add_development_dependency "guard", "~> 2.14"
39
39
  spec.add_development_dependency "guard-rspec", "~> 4.7"
data/metanorma.yml CHANGED
@@ -9,7 +9,7 @@ html_monospacefont: '"Space Mono",monospace'
9
9
  html_normalfontsize: "15px"
10
10
  html_footnotefontsize: "0.9em"
11
11
  i18nyaml: lib/isodoc/m3aawg/i18n-en.yaml
12
- validate_rng_file: lib/asciidoctor/m3aawg/m3d.rng
12
+ validate_rng_file: lib/metanorma/m3aawg/m3d.rng
13
13
  htmlcoverpage: lib/isodoc/m3aawg/html/html_m3d_titlepage.html
14
14
  htmlintropage: lib/isodoc/m3aawg/html/html_m3d_intro.html
15
15
  htmlstylesheet: lib/isodoc/m3aawg/html/htmlstyle.scss
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3aawg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 2.0.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: 2021-11-15 00:00:00.000000000 Z
11
+ date: 2022-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.11.0
47
+ version: 2.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.11.0
54
+ version: 2.0.0
55
55
  - !ruby/object:Gem::Dependency
56
- name: byebug
56
+ name: debug
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '9.1'
61
+ version: '0'
62
62
  type: :development
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: '9.1'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: equivalent-xml
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -216,14 +216,6 @@ files:
216
216
  - bin/console
217
217
  - bin/rspec
218
218
  - bin/setup
219
- - lib/asciidoctor/m3aawg.rb
220
- - lib/asciidoctor/m3aawg/basicdoc.rng
221
- - lib/asciidoctor/m3aawg/biblio.rng
222
- - lib/asciidoctor/m3aawg/boilerplate.xml
223
- - lib/asciidoctor/m3aawg/converter.rb
224
- - lib/asciidoctor/m3aawg/isodoc.rng
225
- - lib/asciidoctor/m3aawg/m3d.rng
226
- - lib/asciidoctor/m3aawg/reqt.rng
227
219
  - lib/isodoc/m3aawg/base_convert.rb
228
220
  - lib/isodoc/m3aawg/html/dots-w@2x.png
229
221
  - lib/isodoc/m3aawg/html/dots@2x.png
@@ -254,7 +246,14 @@ files:
254
246
  - lib/isodoc/m3aawg/xref.rb
255
247
  - lib/metanorma-m3aawg.rb
256
248
  - lib/metanorma/m3aawg.rb
249
+ - lib/metanorma/m3aawg/basicdoc.rng
250
+ - lib/metanorma/m3aawg/biblio.rng
251
+ - lib/metanorma/m3aawg/boilerplate.xml
252
+ - lib/metanorma/m3aawg/converter.rb
253
+ - lib/metanorma/m3aawg/isodoc.rng
254
+ - lib/metanorma/m3aawg/m3d.rng
257
255
  - lib/metanorma/m3aawg/processor.rb
256
+ - lib/metanorma/m3aawg/reqt.rng
258
257
  - lib/metanorma/m3aawg/version.rb
259
258
  - metanorma-m3d.gemspec
260
259
  - metanorma.yml
@@ -277,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
276
  - !ruby/object:Gem::Version
278
277
  version: '0'
279
278
  requirements: []
280
- rubygems_version: 3.2.22
279
+ rubygems_version: 3.2.32
281
280
  signing_key:
282
281
  specification_version: 4
283
282
  summary: metanorma-m3d lets you write M3AAWG Documents in AsciiDoc.
@@ -1,5 +0,0 @@
1
- module Asciidoctor
2
- module M3AAWG
3
- # Your code goes here...
4
- end
5
- end