metanorma-bipm 2.7.8 → 2.7.10
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 +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +28 -279
- data/lib/isodoc/bipm/bipm.guide.xsl +28 -279
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +28 -279
- data/lib/isodoc/bipm/bipm.rapport.xsl +28 -279
- data/lib/isodoc/bipm/html/html_bipm_titlepage.html +7 -8
- data/lib/isodoc/bipm/html/htmlstyle.css +7 -0
- data/lib/isodoc/bipm/html/htmlstyle.scss +7 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_bipm.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_ccauv.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_ccem.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_ccl.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_ccm.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_ccpr.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_ccqm.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_ccri.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_cct.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_cctf.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_ccu.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_cgpm.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_cipm-mra.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_full.svg +1 -0
- data/lib/isodoc/bipm/html/logo/bipm-logo_jcgm.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_A_e.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_A_e_deltanu.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_K_k.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_K_k_h_deltanu.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_cd_Kcd.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_cd_Kcd_h_deltanu.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_full.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_kg_h.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_kg_h_c_deltanu.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_m_c.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_m_c_deltanu.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_mol_NA.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-constants_s_deltanu.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-units_a.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-units_cd.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-units_full.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-units_k.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-units_kg.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-units_m.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-units_mol.svg +1 -0
- data/lib/isodoc/bipm/html/si-aspect/si-circle-units_s.svg +1 -0
- data/lib/isodoc/bipm/init.rb +5 -3
- data/lib/isodoc/bipm/jcgm.standard.xsl +26 -17
- data/lib/isodoc/bipm/metadata.rb +10 -11
- data/lib/isodoc/bipm/presentation_biblio.rb +58 -6
- data/lib/metanorma/bipm/biblio.rng +18 -8
- data/lib/metanorma/bipm/cleanup.rb +13 -0
- data/lib/metanorma/bipm/converter.rb +1 -13
- data/lib/metanorma/bipm/front.rb +14 -16
- data/lib/metanorma/bipm/isodoc.rng +27 -10
- data/lib/metanorma/bipm/log.rb +5 -1
- data/lib/metanorma/bipm/validate.rb +63 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma.yml +0 -1
- metadata +39 -15
- data/lib/isodoc/bipm/html/si-aspect/A_e.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/A_e_deltanu.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/K_k.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/K_k_deltanu_h.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/cd_Kcd.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/cd_Kcd_h_deltanu.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/full.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/kg_h.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/kg_h_c_deltanu.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/m_c.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/m_c_deltanu.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/mol_NA.png +0 -0
- data/lib/isodoc/bipm/html/si-aspect/s_deltanu.png +0 -0
|
@@ -2,6 +2,7 @@ require "metanorma/standoc/converter"
|
|
|
2
2
|
require "metanorma/generic/converter"
|
|
3
3
|
require_relative "front"
|
|
4
4
|
require_relative "cleanup"
|
|
5
|
+
require_relative "validate"
|
|
5
6
|
|
|
6
7
|
module Metanorma
|
|
7
8
|
module Bipm
|
|
@@ -77,19 +78,6 @@ module Metanorma
|
|
|
77
78
|
super
|
|
78
79
|
end
|
|
79
80
|
|
|
80
|
-
def committee_validate(xml)
|
|
81
|
-
committees = Array(configuration&.committees) || return
|
|
82
|
-
committees.empty? and return
|
|
83
|
-
xml.xpath("//bibdata/contributor[role/description = 'committee']/organization/subdivision[@type = 'Committee']/name").each do |c|
|
|
84
|
-
committees.include? c.text or
|
|
85
|
-
@log.add("BIPM_1", nil, params: [c.text])
|
|
86
|
-
end
|
|
87
|
-
xml.xpath("//bibdata/contributor[role/description = 'committee']/organization/subdivision[@type = 'Committee']/identifier[not(@type = 'full')]").each do |c|
|
|
88
|
-
committees.include? c.text or
|
|
89
|
-
@log.add("BIPM_1", nil, params: [c.text])
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
|
|
93
81
|
def document(node)
|
|
94
82
|
@jcgm = node.attr("committee-acronym") == "JCGM"
|
|
95
83
|
super
|
data/lib/metanorma/bipm/front.rb
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
module Metanorma
|
|
2
2
|
module Bipm
|
|
3
3
|
class Converter < Metanorma::Generic::Converter
|
|
4
|
-
def contrib_committee_subdiv(xml,
|
|
5
|
-
contributors_committees_filter_empty?(
|
|
6
|
-
xml.subdivision **attr_code(type:
|
|
7
|
-
subtype:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
committee[:abbr] and o.abbreviation committee[:abbr]
|
|
14
|
-
committee[:ident] and o.identifier committee[:ident]
|
|
4
|
+
def contrib_committee_subdiv(xml, comm)
|
|
5
|
+
contributors_committees_filter_empty?(comm) and return
|
|
6
|
+
xml.subdivision **attr_code(type: comm[:subdivtype],
|
|
7
|
+
subtype: comm[:type]) do |o|
|
|
8
|
+
add_noko_elem(o, "name", comm[:name])
|
|
9
|
+
add_noko_elem(o, "name", comm[:name_en], language: "en")
|
|
10
|
+
add_noko_elem(o, "name", comm[:name_fr], language: "fr")
|
|
11
|
+
add_noko_elem(o, "abbreviation", comm[:abbr])
|
|
12
|
+
add_noko_elem(o, "identifier", comm[:ident])
|
|
15
13
|
end
|
|
16
14
|
end
|
|
17
15
|
|
|
@@ -68,11 +66,11 @@ module Metanorma
|
|
|
68
66
|
def relation_supersedes_self1(xml, date, edition, draft)
|
|
69
67
|
xml.relation type: "supersedes" do |r|
|
|
70
68
|
r.bibitem do |b|
|
|
71
|
-
date
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
add_noko_elem(b, "date", date,
|
|
70
|
+
type: edition ? "published" : "circulated")
|
|
71
|
+
add_noko_elem(b, "edition", edition)
|
|
74
72
|
draft and b.version do |v|
|
|
75
|
-
v
|
|
73
|
+
add_noko_elem(v, "draft", draft)
|
|
76
74
|
end
|
|
77
75
|
end
|
|
78
76
|
end
|
|
@@ -85,7 +83,7 @@ module Metanorma
|
|
|
85
83
|
role = "editor"
|
|
86
84
|
end
|
|
87
85
|
xml.role type: role.downcase do |d|
|
|
88
|
-
d << desc
|
|
86
|
+
d << desc # can be empty
|
|
89
87
|
end
|
|
90
88
|
end
|
|
91
89
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
3
|
-
<!-- VERSION v2.1.
|
|
3
|
+
<!-- VERSION v2.1.5 -->
|
|
4
4
|
|
|
5
5
|
<!--
|
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
|
@@ -905,15 +905,32 @@ titlecase, or lowercase</a:documentation>
|
|
|
905
905
|
</element>
|
|
906
906
|
</define>
|
|
907
907
|
<define name="image" combine="choice">
|
|
908
|
-
<
|
|
909
|
-
<
|
|
910
|
-
|
|
911
|
-
<
|
|
912
|
-
|
|
913
|
-
<
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
908
|
+
<choice>
|
|
909
|
+
<element name="image">
|
|
910
|
+
<ref name="RequiredId"/>
|
|
911
|
+
<ref name="ImageAttributes"/>
|
|
912
|
+
<optional>
|
|
913
|
+
<element name="svg">
|
|
914
|
+
<a:documentation>Allow svg in image/svg, for consistency</a:documentation>
|
|
915
|
+
<oneOrMore>
|
|
916
|
+
<choice>
|
|
917
|
+
<text/>
|
|
918
|
+
<ref name="AnyElement"/>
|
|
919
|
+
</choice>
|
|
920
|
+
</oneOrMore>
|
|
921
|
+
</element>
|
|
922
|
+
</optional>
|
|
923
|
+
</element>
|
|
924
|
+
<element name="svg">
|
|
925
|
+
<a:documentation>Add svg mark up to image</a:documentation>
|
|
926
|
+
<oneOrMore>
|
|
927
|
+
<choice>
|
|
928
|
+
<text/>
|
|
929
|
+
<ref name="AnyElement"/>
|
|
930
|
+
</choice>
|
|
931
|
+
</oneOrMore>
|
|
932
|
+
</element>
|
|
933
|
+
</choice>
|
|
917
934
|
</define>
|
|
918
935
|
<define name="ParagraphFnBody" combine="interleave">
|
|
919
936
|
<ref name="BlockSource">
|
data/lib/metanorma/bipm/log.rb
CHANGED
|
@@ -5,7 +5,11 @@ module Metanorma
|
|
|
5
5
|
# rubocop:disable Naming/VariableNumber
|
|
6
6
|
"BIPM_1": { category: "Document Attributes",
|
|
7
7
|
error: "%s is not a recognised committee",
|
|
8
|
-
severity:
|
|
8
|
+
severity: 1 },
|
|
9
|
+
|
|
10
|
+
"BIPM_2": { category: "Document Attributes",
|
|
11
|
+
error: "%s is not a recognised si-aspect",
|
|
12
|
+
severity: 1 },
|
|
9
13
|
}.freeze
|
|
10
14
|
# rubocop:enable Naming/VariableNumber
|
|
11
15
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
module Metanorma
|
|
2
|
+
module Bipm
|
|
3
|
+
class Converter < Metanorma::Generic::Converter
|
|
4
|
+
COMMITTEE_XPATH =
|
|
5
|
+
"//bibdata/contributor[role/description = 'committee']/organization/" \
|
|
6
|
+
"subdivision[@type = 'Committee']".freeze
|
|
7
|
+
|
|
8
|
+
def committee_validate(xml)
|
|
9
|
+
committees = committees_list or return
|
|
10
|
+
xml.xpath("#{COMMITTEE_XPATH}/name").each do |c|
|
|
11
|
+
committees.include? c.text or
|
|
12
|
+
@log.add("BIPM_1", nil, params: [c.text])
|
|
13
|
+
end
|
|
14
|
+
xml.xpath("#{COMMITTEE_XPATH}/identifier[not(@type = 'full')]")
|
|
15
|
+
.each do |c|
|
|
16
|
+
committees.include? c.text or
|
|
17
|
+
@log.add("BIPM_1", nil, params: [c.text])
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def committees_list
|
|
22
|
+
committees = Array(configuration&.committees) or return
|
|
23
|
+
committees.empty? and return
|
|
24
|
+
committees
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def bibdata_validate(doc)
|
|
28
|
+
super
|
|
29
|
+
si_aspect_validate(doc)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
SI_ASPECT_VALUES = %w(
|
|
33
|
+
A_e_deltanu
|
|
34
|
+
A_e
|
|
35
|
+
cd_Kcd_h_deltanu
|
|
36
|
+
cd_Kcd
|
|
37
|
+
full
|
|
38
|
+
K_k_deltanu_h
|
|
39
|
+
K_k
|
|
40
|
+
kg_h_c_deltanu
|
|
41
|
+
kg_h
|
|
42
|
+
m_c_deltanu
|
|
43
|
+
m_c
|
|
44
|
+
mol_NA
|
|
45
|
+
units_A
|
|
46
|
+
units_cd
|
|
47
|
+
units_full
|
|
48
|
+
units_K
|
|
49
|
+
units_kg
|
|
50
|
+
units_m
|
|
51
|
+
units_mol
|
|
52
|
+
units_s
|
|
53
|
+
).freeze
|
|
54
|
+
|
|
55
|
+
def si_aspect_validate(doc)
|
|
56
|
+
doc.xpath("//bibdata/ext/si-aspect").each do |x|
|
|
57
|
+
SI_ASPECT_VALUES.include?(x.text) or
|
|
58
|
+
@log.add("BIPM_2", nil, params: [x.text])
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
data/metanorma.yml
CHANGED
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: 2.7.
|
|
4
|
+
version: 2.7.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|
|
@@ -262,19 +262,42 @@ files:
|
|
|
262
262
|
- lib/isodoc/bipm/html/htmlstyle.css
|
|
263
263
|
- lib/isodoc/bipm/html/htmlstyle.scss
|
|
264
264
|
- lib/isodoc/bipm/html/logo.png
|
|
265
|
-
- lib/isodoc/bipm/html/
|
|
266
|
-
- lib/isodoc/bipm/html/
|
|
267
|
-
- lib/isodoc/bipm/html/
|
|
268
|
-
- lib/isodoc/bipm/html/
|
|
269
|
-
- lib/isodoc/bipm/html/
|
|
270
|
-
- lib/isodoc/bipm/html/
|
|
271
|
-
- lib/isodoc/bipm/html/
|
|
272
|
-
- lib/isodoc/bipm/html/
|
|
273
|
-
- lib/isodoc/bipm/html/
|
|
274
|
-
- lib/isodoc/bipm/html/
|
|
275
|
-
- lib/isodoc/bipm/html/
|
|
276
|
-
- lib/isodoc/bipm/html/
|
|
277
|
-
- lib/isodoc/bipm/html/
|
|
265
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_bipm.svg
|
|
266
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_ccauv.svg
|
|
267
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_ccem.svg
|
|
268
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_ccl.svg
|
|
269
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_ccm.svg
|
|
270
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_ccpr.svg
|
|
271
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_ccqm.svg
|
|
272
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_ccri.svg
|
|
273
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_cct.svg
|
|
274
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_cctf.svg
|
|
275
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_ccu.svg
|
|
276
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_cgpm.svg
|
|
277
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_cipm-mra.svg
|
|
278
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_full.svg
|
|
279
|
+
- lib/isodoc/bipm/html/logo/bipm-logo_jcgm.svg
|
|
280
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_A_e.svg
|
|
281
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_A_e_deltanu.svg
|
|
282
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_K_k.svg
|
|
283
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_K_k_h_deltanu.svg
|
|
284
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_cd_Kcd.svg
|
|
285
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_cd_Kcd_h_deltanu.svg
|
|
286
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_full.svg
|
|
287
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_kg_h.svg
|
|
288
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_kg_h_c_deltanu.svg
|
|
289
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_m_c.svg
|
|
290
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_m_c_deltanu.svg
|
|
291
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_mol_NA.svg
|
|
292
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-constants_s_deltanu.svg
|
|
293
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-units_a.svg
|
|
294
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-units_cd.svg
|
|
295
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-units_full.svg
|
|
296
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-units_k.svg
|
|
297
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-units_kg.svg
|
|
298
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-units_m.svg
|
|
299
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-units_mol.svg
|
|
300
|
+
- lib/isodoc/bipm/html/si-aspect/si-circle-units_s.svg
|
|
278
301
|
- lib/isodoc/bipm/html_convert.rb
|
|
279
302
|
- lib/isodoc/bipm/i18n-en.yaml
|
|
280
303
|
- lib/isodoc/bipm/i18n-fr.yaml
|
|
@@ -306,6 +329,7 @@ files:
|
|
|
306
329
|
- lib/metanorma/bipm/processor.rb
|
|
307
330
|
- lib/metanorma/bipm/relaton-bipm.rng
|
|
308
331
|
- lib/metanorma/bipm/reqt.rng
|
|
332
|
+
- lib/metanorma/bipm/validate.rb
|
|
309
333
|
- lib/metanorma/bipm/version.rb
|
|
310
334
|
- lib/relaton/render/citations.rb
|
|
311
335
|
- lib/relaton/render/config.yml
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|