metanorma-mpfa 0.7.0 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 592004772a07c932bec0911cdced10525f60adbb36dbfe833850db766b11c61b
4
- data.tar.gz: c1cfa762a4068aaa3f60b0db2d00fbe2916a942f4c8c85591735a4494e67a15b
3
+ metadata.gz: f1856ecde5c7f52e4b8287bb3540ab3aebf463c08b80d90cf39b65f8fa3628d6
4
+ data.tar.gz: a185cb883f506cf8a609a836e3192643dcaf5e7ccaabe96b458709fc68e59fc0
5
5
  SHA512:
6
- metadata.gz: 0efcb81771ac2398695d9ff3c8af9c805051eb5bc971a0b8dd11f0baab20e32f3c5993f6fed7d340adde70bad2910866761183f2e776e91c241466ccf027c8cc
7
- data.tar.gz: 4aa88bc3e88dc9ae904d4c77958a1e0423ca05df9c7f2977ad88440662de8da476b64eadc93c3a12df2b2b93bf3415345d5a87e3525461ea97fd54f4f6311bf8
6
+ metadata.gz: c79d6153c881b5e9c7328c2ab44b4405492b48388b756fafe8ae359001873f2fed8d4059f25cd5b06b630465e80f50f447ecdec1742474067a804dfcadbe1975
7
+ data.tar.gz: 7edd6a6ce865b9bb0e993953e9606a16ae666d2c3eb656267183c75a14348a943cf7b6cffee5f9b98f7ffc46ad1c0db36cfc6c8c78cbcf0f47d5ca08a962a73f
@@ -9,7 +9,6 @@ require_relative "./validate"
9
9
 
10
10
  module Asciidoctor
11
11
  module MPFA
12
-
13
12
  # A {Converter} implementation that generates MPFD output, and a document
14
13
  # schema encapsulation of the document for validation
15
14
  #
@@ -25,13 +24,14 @@ module Asciidoctor
25
24
 
26
25
  def metadata_committee(node, xml)
27
26
  return unless node.attr("committee")
27
+
28
28
  xml.editorialgroup do |a|
29
29
  a.committee node.attr("committee"),
30
- **attr_code(type: node.attr("committee-type"))
30
+ **attr_code(type: node.attr("committee-type"))
31
31
  i = 2
32
- while node.attr("committee_#{i}") do
32
+ while node.attr("committee_#{i}")
33
33
  a.committee node.attr("committee_#{i}"),
34
- **attr_code(type: node.attr("committee-type_#{i}"))
34
+ **attr_code(type: node.attr("committee-type_#{i}"))
35
35
  i += 1
36
36
  end
37
37
  end
@@ -42,7 +42,7 @@ module Asciidoctor
42
42
  xml.docnumber { |i| i << node.attr("docnumber") }
43
43
  end
44
44
 
45
- def title_validate(root)
45
+ def title_validate(_root)
46
46
  nil
47
47
  end
48
48
 
@@ -52,11 +52,14 @@ module Asciidoctor
52
52
  end
53
53
 
54
54
  def outputs(node, ret)
55
- File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
56
- presentation_xml_converter(node).convert(@filename + ".xml")
57
- html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
58
- doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
59
- pdf_converter(node)&.convert(@filename + ".presentation.xml", nil, false, "#{@filename}.pdf")
55
+ File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
56
+ presentation_xml_converter(node).convert("#{@filename}.xml")
57
+ html_converter(node).convert("#{@filename}.presentation.xml", nil,
58
+ false, "#{@filename}.html")
59
+ doc_converter(node).convert("#{@filename}.presentation.xml", nil,
60
+ false, "#{@filename}.doc")
61
+ pdf_converter(node)&.convert("#{@filename}.presentation.xml", nil,
62
+ false, "#{@filename}.pdf")
60
63
  end
61
64
 
62
65
  def validate(doc)
@@ -65,8 +68,8 @@ module Asciidoctor
65
68
  File.join(File.dirname(__FILE__), "mpfd.rng"))
66
69
  end
67
70
 
68
- def style(n, t)
69
- return
71
+ def style(_n, _t)
72
+ nil
70
73
  end
71
74
 
72
75
  def presentation_xml_converter(node)
@@ -83,7 +86,8 @@ module Asciidoctor
83
86
 
84
87
  def pdf_converter(node)
85
88
  return if node.attr("no-pdf")
86
- IsoDoc::MPFA::PdfConvert.new(doc_extract_attributes(node))
89
+
90
+ IsoDoc::MPFA::PdfConvert.new(pdf_extract_attributes(node))
87
91
  end
88
92
  end
89
93
  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>
@@ -1946,7 +1977,7 @@
1946
1977
  </zeroOrMore>
1947
1978
  </element>
1948
1979
  <optional>
1949
- <element name="abbreviationType">
1980
+ <element name="abbreviation-type">
1950
1981
  <ref name="AbbreviationType"/>
1951
1982
  </element>
1952
1983
  </optional>
@@ -1956,7 +1987,7 @@
1956
1987
  </element>
1957
1988
  </optional>
1958
1989
  <optional>
1959
- <element name="grammarInfo">
1990
+ <element name="grammar-info">
1960
1991
  <ref name="Grammar"/>
1961
1992
  </element>
1962
1993
  </optional>
@@ -1983,6 +2014,11 @@
1983
2014
  <ref name="GrammarGender"/>
1984
2015
  </element>
1985
2016
  </zeroOrMore>
2017
+ <zeroOrMore>
2018
+ <element name="number">
2019
+ <ref name="GrammarNumber"/>
2020
+ </element>
2021
+ </zeroOrMore>
1986
2022
  <optional>
1987
2023
  <element name="isPreposition">
1988
2024
  <data type="boolean"/>
@@ -2014,7 +2050,7 @@
2014
2050
  </element>
2015
2051
  </optional>
2016
2052
  <zeroOrMore>
2017
- <element name="grammarvalue">
2053
+ <element name="grammar-value">
2018
2054
  <text/>
2019
2055
  </element>
2020
2056
  </zeroOrMore>
@@ -2027,6 +2063,13 @@
2027
2063
  <value>common</value>
2028
2064
  </choice>
2029
2065
  </define>
2066
+ <define name="GrammarNumber">
2067
+ <choice>
2068
+ <value>singular</value>
2069
+ <value>dual</value>
2070
+ <value>plural</value>
2071
+ </choice>
2072
+ </define>
2030
2073
  <define name="termdomain">
2031
2074
  <element name="domain">
2032
2075
  <oneOrMore>
@@ -2041,13 +2084,6 @@
2041
2084
  </oneOrMore>
2042
2085
  </element>
2043
2086
  </define>
2044
- <define name="termusage">
2045
- <element name="usageinfo">
2046
- <oneOrMore>
2047
- <ref name="BasicBlock"/>
2048
- </oneOrMore>
2049
- </element>
2050
- </define>
2051
2087
  <define name="termdefinition">
2052
2088
  <element name="definition">
2053
2089
  <choice>
@@ -2061,9 +2097,17 @@
2061
2097
  </element>
2062
2098
  </define>
2063
2099
  <define name="verbaldefinition">
2064
- <element name="verbaldefinition">
2100
+ <element name="verbal-definition">
2065
2101
  <oneOrMore>
2066
- <ref name="paragraph"/>
2102
+ <choice>
2103
+ <ref name="paragraph"/>
2104
+ <ref name="dl"/>
2105
+ <ref name="ol"/>
2106
+ <ref name="ul"/>
2107
+ <ref name="table"/>
2108
+ <ref name="figure"/>
2109
+ <ref name="formula"/>
2110
+ </choice>
2067
2111
  </oneOrMore>
2068
2112
  <zeroOrMore>
2069
2113
  <ref name="termsource"/>
@@ -2071,7 +2115,7 @@
2071
2115
  </element>
2072
2116
  </define>
2073
2117
  <define name="nonverbalrep">
2074
- <element name="nonverbalrepresentation">
2118
+ <element name="non-verbal-representation">
2075
2119
  <oneOrMore>
2076
2120
  <choice>
2077
2121
  <ref name="table"/>
@@ -2163,6 +2207,12 @@
2163
2207
  <value>modified</value>
2164
2208
  </choice>
2165
2209
  </attribute>
2210
+ <attribute name="type">
2211
+ <choice>
2212
+ <value>authoritative</value>
2213
+ <value>lineage</value>
2214
+ </choice>
2215
+ </attribute>
2166
2216
  <ref name="origin"/>
2167
2217
  <optional>
2168
2218
  <ref name="modification"/>
@@ -608,10 +608,12 @@ h3 {
608
608
  font-size: 1.1em;
609
609
  font-weight: 100; }
610
610
 
611
- .TermNum, .Terms, .AltTerms {
612
- color: #301907;
611
+ .TermNum {
613
612
  font-weight: 100; }
614
613
 
614
+ .TermNum, .Terms, .AltTerms {
615
+ color: #301907; }
616
+
615
617
  h2.TermNum {
616
618
  font-size: 0.9em;
617
619
  line-height: 1em;
@@ -277,9 +277,12 @@ h3 {
277
277
  font-weight: 100;
278
278
  }
279
279
 
280
+ .TermNum {
281
+ font-weight: 100;
282
+ }
283
+
280
284
  .TermNum, .Terms, .AltTerms {
281
285
  color: #301907;
282
- font-weight: 100;
283
286
  }
284
287
 
285
288
  h2.TermNum {
@@ -309,7 +309,6 @@ p.Terms, li.Terms, div.Terms {
309
309
  mso-fareast-font-family: {{headerfont}};
310
310
  mso-bidi-font-family: {{headerfont}};
311
311
  mso-ansi-language: EN-GB;
312
- font-weight: bold;
313
312
  mso-bidi-font-weight: normal; }
314
313
 
315
314
  p.AltTerms, li.AltTerms, div.AltTerms {
@@ -296,7 +296,6 @@ p.Terms, li.Terms, div.Terms
296
296
  mso-fareast-font-family:$headerfont;
297
297
  mso-bidi-font-family:$headerfont;
298
298
  mso-ansi-language:EN-GB;
299
- font-weight:bold;
300
299
  mso-bidi-font-weight:normal;}
301
300
  p.AltTerms, li.AltTerms, div.AltTerms
302
301
  {mso-style-name:"AltTerm\(s\)";
@@ -17,7 +17,6 @@ $('#toggle').on('click', function(){
17
17
  else {
18
18
  $('nav').show();
19
19
  $('nav').animate({ 'left': '0px' }, 'slow');
20
- $('.container').animate({ 'padding-left': '360px' }, 'slow');
21
20
  }
22
21
  });
23
22
  </script>