metanorma-bipm 1.2.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +4 -32
- data/.gitignore +2 -0
- data/bin/console +1 -1
- data/lib/isodoc/bipm/base_convert.rb +4 -13
- data/lib/isodoc/bipm/bipm.brochure.xsl +653 -253
- data/lib/isodoc/bipm/bipm.guide.xsl +653 -253
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +653 -253
- data/lib/isodoc/bipm/bipm.rapport.xsl +653 -253
- data/lib/isodoc/bipm/html/htmlstyle.css +24 -13
- data/lib/isodoc/bipm/html/htmlstyle.scss +15 -12
- data/lib/isodoc/bipm/html/scripts.html +0 -1
- data/lib/isodoc/bipm/jcgm.standard.xsl +586 -330
- data/lib/isodoc/bipm/presentation_xml_convert.rb +13 -2
- data/lib/{asciidoctor → metanorma}/bipm/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/bipm/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/bipm/bipm.rng +2 -0
- data/lib/{asciidoctor → metanorma}/bipm/boilerplate-en.xml +0 -0
- data/lib/{asciidoctor → metanorma}/bipm/boilerplate-fr.xml +0 -0
- data/lib/{asciidoctor → metanorma}/bipm/boilerplate-jcgm-en.xml +0 -0
- data/lib/{asciidoctor → metanorma}/bipm/converter.rb +5 -5
- data/lib/{asciidoctor → metanorma}/bipm/isodoc.rng +90 -18
- data/lib/{asciidoctor → metanorma}/bipm/reqt.rng +0 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- data/lib/metanorma/bipm.rb +1 -0
- data/lib/metanorma-bipm.rb +0 -1
- data/metanorma-bipm.gemspec +3 -3
- data/metanorma.yml +3 -3
- metadata +21 -22
- data/lib/asciidoctor/bipm.rb +0 -8
@@ -71,11 +71,11 @@ module IsoDoc
|
|
71
71
|
unless name = node.at(ns("./#{elem}[not(@type = 'quoted')]"))
|
72
72
|
return if node.at(ns("./#{elem}[@type = 'quoted']"))
|
73
73
|
|
74
|
-
node.children.empty? and node.add_child("<#{elem}></#{elem}>") or
|
74
|
+
(node.children.empty? and node.add_child("<#{elem}></#{elem}>")) or
|
75
75
|
node.children.first.previous = "<#{elem}></#{elem}>"
|
76
76
|
name = node.children.first
|
77
77
|
end
|
78
|
-
if name.children.empty? then name.add_child(number)
|
78
|
+
if name.children.empty? then name.add_child(cleanup_entities(number))
|
79
79
|
else (name.children.first.previous = "#{number}#{delim}")
|
80
80
|
end
|
81
81
|
end
|
@@ -250,6 +250,17 @@ module IsoDoc
|
|
250
250
|
end
|
251
251
|
end
|
252
252
|
|
253
|
+
def termsource1(elem)
|
254
|
+
while elem&.next_element&.name == "termsource"
|
255
|
+
elem << "; #{elem.next_element.remove.children.to_xml}"
|
256
|
+
end
|
257
|
+
elem.children = l10n("[#{@i18n.source} #{elem.children.to_xml.strip}]")
|
258
|
+
end
|
259
|
+
|
260
|
+
def bibliography_bibitem_number_skip(bibitem)
|
261
|
+
super || @xrefs.klass.standard?(bibitem)
|
262
|
+
end
|
263
|
+
|
253
264
|
include Init
|
254
265
|
end
|
255
266
|
end
|
File without changes
|
File without changes
|
@@ -110,6 +110,7 @@
|
|
110
110
|
<ref name="clause-subsection"/>
|
111
111
|
<ref name="terms"/>
|
112
112
|
<ref name="definitions"/>
|
113
|
+
<ref name="floating-title"/>
|
113
114
|
</choice>
|
114
115
|
</zeroOrMore>
|
115
116
|
</group>
|
@@ -157,6 +158,7 @@
|
|
157
158
|
<ref name="terms"/>
|
158
159
|
<ref name="definitions"/>
|
159
160
|
<ref name="references"/>
|
161
|
+
<ref name="floating-title"/>
|
160
162
|
</choice>
|
161
163
|
</zeroOrMore>
|
162
164
|
</group>
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require "
|
2
|
-
require "
|
1
|
+
require "metanorma/standoc/converter"
|
2
|
+
require "metanorma/generic/converter"
|
3
3
|
|
4
|
-
module
|
4
|
+
module Metanorma
|
5
5
|
module BIPM
|
6
|
-
class Converter <
|
6
|
+
class Converter < Metanorma::Generic::Converter
|
7
7
|
register_for "bipm"
|
8
8
|
|
9
9
|
def configuration
|
@@ -240,7 +240,7 @@ module Asciidoctor
|
|
240
240
|
def pdf_converter(node)
|
241
241
|
return nil if node.attr("no-pdf")
|
242
242
|
|
243
|
-
IsoDoc::BIPM::PdfConvert.new(
|
243
|
+
IsoDoc::BIPM::PdfConvert.new(pdf_extract_attributes(node))
|
244
244
|
end
|
245
245
|
end
|
246
246
|
end
|
@@ -32,6 +32,19 @@
|
|
32
32
|
<ref name="DocumentType"/>
|
33
33
|
</element>
|
34
34
|
</define>
|
35
|
+
<define name="bibitem">
|
36
|
+
<element name="bibitem">
|
37
|
+
<attribute name="id">
|
38
|
+
<data type="ID"/>
|
39
|
+
</attribute>
|
40
|
+
<optional>
|
41
|
+
<attribute name="hidden">
|
42
|
+
<data type="boolean"/>
|
43
|
+
</attribute>
|
44
|
+
</optional>
|
45
|
+
<ref name="BibliographicItem"/>
|
46
|
+
</element>
|
47
|
+
</define>
|
35
48
|
<define name="section-title">
|
36
49
|
<element name="title">
|
37
50
|
<zeroOrMore>
|
@@ -58,7 +71,7 @@
|
|
58
71
|
<attribute name="alt"/>
|
59
72
|
</optional>
|
60
73
|
<optional>
|
61
|
-
<attribute name="
|
74
|
+
<attribute name="update-type">
|
62
75
|
<data type="boolean"/>
|
63
76
|
</attribute>
|
64
77
|
</optional>
|
@@ -690,6 +703,7 @@
|
|
690
703
|
<ref name="terms"/>
|
691
704
|
<ref name="term-clause"/>
|
692
705
|
<ref name="definitions"/>
|
706
|
+
<ref name="floating-title"/>
|
693
707
|
</choice>
|
694
708
|
</oneOrMore>
|
695
709
|
</element>
|
@@ -1680,6 +1694,7 @@
|
|
1680
1694
|
<ref name="clause-subsection"/>
|
1681
1695
|
<ref name="terms"/>
|
1682
1696
|
<ref name="definitions"/>
|
1697
|
+
<ref name="floating-title"/>
|
1683
1698
|
</choice>
|
1684
1699
|
</oneOrMore>
|
1685
1700
|
</choice>
|
@@ -1722,6 +1737,7 @@
|
|
1722
1737
|
<ref name="terms"/>
|
1723
1738
|
<ref name="definitions"/>
|
1724
1739
|
<ref name="references"/>
|
1740
|
+
<ref name="floating-title"/>
|
1725
1741
|
</choice>
|
1726
1742
|
</zeroOrMore>
|
1727
1743
|
</group>
|
@@ -1796,6 +1812,20 @@
|
|
1796
1812
|
<data type="ID"/>
|
1797
1813
|
</attribute>
|
1798
1814
|
</optional>
|
1815
|
+
<optional>
|
1816
|
+
<attribute name="language"/>
|
1817
|
+
</optional>
|
1818
|
+
<optional>
|
1819
|
+
<attribute name="script"/>
|
1820
|
+
</optional>
|
1821
|
+
<optional>
|
1822
|
+
<attribute name="tag"/>
|
1823
|
+
</optional>
|
1824
|
+
<optional>
|
1825
|
+
<attribute name="multilingual-rendering">
|
1826
|
+
<ref name="MultilingualRenderingType"/>
|
1827
|
+
</attribute>
|
1828
|
+
</optional>
|
1799
1829
|
<oneOrMore>
|
1800
1830
|
<ref name="preferred"/>
|
1801
1831
|
</oneOrMore>
|
@@ -1814,9 +1844,6 @@
|
|
1814
1844
|
<optional>
|
1815
1845
|
<ref name="termsubject"/>
|
1816
1846
|
</optional>
|
1817
|
-
<optional>
|
1818
|
-
<ref name="termusage"/>
|
1819
|
-
</optional>
|
1820
1847
|
<oneOrMore>
|
1821
1848
|
<ref name="termdefinition"/>
|
1822
1849
|
</oneOrMore>
|
@@ -1880,17 +1907,37 @@
|
|
1880
1907
|
</attribute>
|
1881
1908
|
</optional>
|
1882
1909
|
<optional>
|
1883
|
-
<attribute name="
|
1910
|
+
<attribute name="geographic-area"/>
|
1884
1911
|
</optional>
|
1885
1912
|
<choice>
|
1886
1913
|
<ref name="expression_designation"/>
|
1887
1914
|
<ref name="letter_symbol_designation"/>
|
1888
1915
|
<ref name="graphical_symbol_designation"/>
|
1889
1916
|
</choice>
|
1917
|
+
<optional>
|
1918
|
+
<ref name="fieldofapplication"/>
|
1919
|
+
</optional>
|
1920
|
+
<optional>
|
1921
|
+
<ref name="usageinfo"/>
|
1922
|
+
</optional>
|
1890
1923
|
<zeroOrMore>
|
1891
1924
|
<ref name="termsource"/>
|
1892
1925
|
</zeroOrMore>
|
1893
1926
|
</define>
|
1927
|
+
<define name="fieldofapplication">
|
1928
|
+
<element name="field-of-application">
|
1929
|
+
<oneOrMore>
|
1930
|
+
<ref name="PureTextElement"/>
|
1931
|
+
</oneOrMore>
|
1932
|
+
</element>
|
1933
|
+
</define>
|
1934
|
+
<define name="usageinfo">
|
1935
|
+
<element name="usage-info">
|
1936
|
+
<oneOrMore>
|
1937
|
+
<ref name="PureTextElement"/>
|
1938
|
+
</oneOrMore>
|
1939
|
+
</element>
|
1940
|
+
</define>
|
1894
1941
|
<define name="letter_symbol_designation">
|
1895
1942
|
<element name="letter-symbol">
|
1896
1943
|
<optional>
|
@@ -1942,11 +1989,15 @@
|
|
1942
1989
|
</optional>
|
1943
1990
|
<element name="name">
|
1944
1991
|
<zeroOrMore>
|
1945
|
-
<
|
1992
|
+
<choice>
|
1993
|
+
<ref name="PureTextElement"/>
|
1994
|
+
<ref name="stem"/>
|
1995
|
+
<ref name="index"/>
|
1996
|
+
</choice>
|
1946
1997
|
</zeroOrMore>
|
1947
1998
|
</element>
|
1948
1999
|
<optional>
|
1949
|
-
<element name="
|
2000
|
+
<element name="abbreviation-type">
|
1950
2001
|
<ref name="AbbreviationType"/>
|
1951
2002
|
</element>
|
1952
2003
|
</optional>
|
@@ -1956,7 +2007,7 @@
|
|
1956
2007
|
</element>
|
1957
2008
|
</optional>
|
1958
2009
|
<optional>
|
1959
|
-
<element name="
|
2010
|
+
<element name="grammar">
|
1960
2011
|
<ref name="Grammar"/>
|
1961
2012
|
</element>
|
1962
2013
|
</optional>
|
@@ -1983,6 +2034,11 @@
|
|
1983
2034
|
<ref name="GrammarGender"/>
|
1984
2035
|
</element>
|
1985
2036
|
</zeroOrMore>
|
2037
|
+
<zeroOrMore>
|
2038
|
+
<element name="number">
|
2039
|
+
<ref name="GrammarNumber"/>
|
2040
|
+
</element>
|
2041
|
+
</zeroOrMore>
|
1986
2042
|
<optional>
|
1987
2043
|
<element name="isPreposition">
|
1988
2044
|
<data type="boolean"/>
|
@@ -2014,7 +2070,7 @@
|
|
2014
2070
|
</element>
|
2015
2071
|
</optional>
|
2016
2072
|
<zeroOrMore>
|
2017
|
-
<element name="
|
2073
|
+
<element name="grammar-value">
|
2018
2074
|
<text/>
|
2019
2075
|
</element>
|
2020
2076
|
</zeroOrMore>
|
@@ -2027,6 +2083,13 @@
|
|
2027
2083
|
<value>common</value>
|
2028
2084
|
</choice>
|
2029
2085
|
</define>
|
2086
|
+
<define name="GrammarNumber">
|
2087
|
+
<choice>
|
2088
|
+
<value>singular</value>
|
2089
|
+
<value>dual</value>
|
2090
|
+
<value>plural</value>
|
2091
|
+
</choice>
|
2092
|
+
</define>
|
2030
2093
|
<define name="termdomain">
|
2031
2094
|
<element name="domain">
|
2032
2095
|
<oneOrMore>
|
@@ -2041,13 +2104,6 @@
|
|
2041
2104
|
</oneOrMore>
|
2042
2105
|
</element>
|
2043
2106
|
</define>
|
2044
|
-
<define name="termusage">
|
2045
|
-
<element name="usageinfo">
|
2046
|
-
<oneOrMore>
|
2047
|
-
<ref name="BasicBlock"/>
|
2048
|
-
</oneOrMore>
|
2049
|
-
</element>
|
2050
|
-
</define>
|
2051
2107
|
<define name="termdefinition">
|
2052
2108
|
<element name="definition">
|
2053
2109
|
<choice>
|
@@ -2061,13 +2117,16 @@
|
|
2061
2117
|
</element>
|
2062
2118
|
</define>
|
2063
2119
|
<define name="verbaldefinition">
|
2064
|
-
<element name="
|
2120
|
+
<element name="verbal-definition">
|
2065
2121
|
<oneOrMore>
|
2066
2122
|
<choice>
|
2067
2123
|
<ref name="paragraph"/>
|
2068
2124
|
<ref name="dl"/>
|
2069
2125
|
<ref name="ol"/>
|
2070
2126
|
<ref name="ul"/>
|
2127
|
+
<ref name="table"/>
|
2128
|
+
<ref name="figure"/>
|
2129
|
+
<ref name="formula"/>
|
2071
2130
|
</choice>
|
2072
2131
|
</oneOrMore>
|
2073
2132
|
<zeroOrMore>
|
@@ -2076,7 +2135,7 @@
|
|
2076
2135
|
</element>
|
2077
2136
|
</define>
|
2078
2137
|
<define name="nonverbalrep">
|
2079
|
-
<element name="
|
2138
|
+
<element name="non-verbal-representation">
|
2080
2139
|
<oneOrMore>
|
2081
2140
|
<choice>
|
2082
2141
|
<ref name="table"/>
|
@@ -2491,4 +2550,17 @@
|
|
2491
2550
|
</oneOrMore>
|
2492
2551
|
</element>
|
2493
2552
|
</define>
|
2553
|
+
<define name="floating-title">
|
2554
|
+
<element name="floating-title">
|
2555
|
+
<attribute name="id">
|
2556
|
+
<data type="ID"/>
|
2557
|
+
</attribute>
|
2558
|
+
<attribute name="depth">
|
2559
|
+
<data type="int"/>
|
2560
|
+
</attribute>
|
2561
|
+
<zeroOrMore>
|
2562
|
+
<ref name="TextElement"/>
|
2563
|
+
</zeroOrMore>
|
2564
|
+
</element>
|
2565
|
+
</define>
|
2494
2566
|
</grammar>
|
File without changes
|
data/lib/metanorma/bipm.rb
CHANGED
data/lib/metanorma-bipm.rb
CHANGED
data/metanorma-bipm.gemspec
CHANGED
@@ -26,10 +26,10 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.require_paths = ["lib"]
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
28
28
|
|
29
|
-
spec.add_dependency "metanorma-generic", "~>
|
30
|
-
spec.add_dependency "metanorma-iso", "~>
|
29
|
+
spec.add_dependency "metanorma-generic", "~> 2.0.0"
|
30
|
+
spec.add_dependency "metanorma-iso", "~> 2.0.0"
|
31
31
|
|
32
|
-
spec.add_development_dependency "
|
32
|
+
spec.add_development_dependency "debug"
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
34
34
|
spec.add_development_dependency "guard", "~> 2.14"
|
35
35
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
data/metanorma.yml
CHANGED
@@ -14,14 +14,14 @@ logo_path: lib/isodoc/bipm/html/logo.png
|
|
14
14
|
i18nyaml:
|
15
15
|
en: lib/isodoc/bipm/i18n-en.yaml
|
16
16
|
fr: lib/isodoc/bipm/i18n-fr.yaml
|
17
|
-
validate_rng_file: lib/
|
17
|
+
validate_rng_file: lib/metanorma/bipm/bipm.rng
|
18
18
|
htmlcoverpage: lib/isodoc/bipm/html/html_bipm_titlepage.html
|
19
19
|
htmlintropage: lib/isodoc/bipm/html/html_bipm_intro.html
|
20
20
|
htmlstylesheet: lib/isodoc/bipm/html/htmlstyle.scss
|
21
21
|
scripts: lib/isodoc/bipm/html/scripts.html
|
22
22
|
boilerplate:
|
23
|
-
en: lib/
|
24
|
-
fr: lib/
|
23
|
+
en: lib/metanorma/bipm/boilerplate-en.xml
|
24
|
+
fr: lib/metanorma/bipm/boilerplate-fr.xml
|
25
25
|
published_stages:
|
26
26
|
- in-force
|
27
27
|
- retired
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
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:
|
11
|
+
date: 2022-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: metanorma-iso
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: debug
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
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: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: equivalent-xml
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,16 +200,6 @@ files:
|
|
200
200
|
- bin/console
|
201
201
|
- bin/rspec
|
202
202
|
- bin/setup
|
203
|
-
- lib/asciidoctor/bipm.rb
|
204
|
-
- lib/asciidoctor/bipm/basicdoc.rng
|
205
|
-
- lib/asciidoctor/bipm/biblio.rng
|
206
|
-
- lib/asciidoctor/bipm/bipm.rng
|
207
|
-
- lib/asciidoctor/bipm/boilerplate-en.xml
|
208
|
-
- lib/asciidoctor/bipm/boilerplate-fr.xml
|
209
|
-
- lib/asciidoctor/bipm/boilerplate-jcgm-en.xml
|
210
|
-
- lib/asciidoctor/bipm/converter.rb
|
211
|
-
- lib/asciidoctor/bipm/isodoc.rng
|
212
|
-
- lib/asciidoctor/bipm/reqt.rng
|
213
203
|
- lib/isodoc/bipm.rb
|
214
204
|
- lib/isodoc/bipm/base_convert.rb
|
215
205
|
- lib/isodoc/bipm/bipm.brochure.xsl
|
@@ -248,7 +238,16 @@ files:
|
|
248
238
|
- lib/isodoc/bipm/xref.rb
|
249
239
|
- lib/metanorma-bipm.rb
|
250
240
|
- lib/metanorma/bipm.rb
|
241
|
+
- lib/metanorma/bipm/basicdoc.rng
|
242
|
+
- lib/metanorma/bipm/biblio.rng
|
243
|
+
- lib/metanorma/bipm/bipm.rng
|
244
|
+
- lib/metanorma/bipm/boilerplate-en.xml
|
245
|
+
- lib/metanorma/bipm/boilerplate-fr.xml
|
246
|
+
- lib/metanorma/bipm/boilerplate-jcgm-en.xml
|
247
|
+
- lib/metanorma/bipm/converter.rb
|
248
|
+
- lib/metanorma/bipm/isodoc.rng
|
251
249
|
- lib/metanorma/bipm/processor.rb
|
250
|
+
- lib/metanorma/bipm/reqt.rng
|
252
251
|
- lib/metanorma/bipm/version.rb
|
253
252
|
- metanorma-bipm.gemspec
|
254
253
|
- metanorma.yml
|
@@ -271,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
270
|
- !ruby/object:Gem::Version
|
272
271
|
version: '0'
|
273
272
|
requirements: []
|
274
|
-
rubygems_version: 3.2.
|
273
|
+
rubygems_version: 3.2.32
|
275
274
|
signing_key:
|
276
275
|
specification_version: 4
|
277
276
|
summary: metanorma-bipm lets you write BIPM standards in Metanorma.
|