metanorma-bipm 2.7.8 → 2.7.9
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 +3 -2
- data/lib/isodoc/bipm/bipm.guide.xsl +3 -2
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +3 -2
- data/lib/isodoc/bipm/bipm.rapport.xsl +3 -2
- data/lib/isodoc/bipm/jcgm.standard.xsl +21 -15
- data/lib/metanorma/bipm/biblio.rng +4 -4
- data/lib/metanorma/bipm/cleanup.rb +13 -0
- data/lib/metanorma/bipm/front.rb +14 -16
- data/lib/metanorma/bipm/isodoc.rng +27 -10
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4391b8e761aaee7f40ab6fc3fe9465f7c251c2d7aa8873abb01df8f63d5e9cae
|
|
4
|
+
data.tar.gz: 71fb81970289cd893c44ec4beab4b24d9ec8c80b1387c9d66cb85e5ca4181ae9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 164b0452a5341a0156336f53df049032d36ac55e2c7c6586a73daa6a003b4120f9fc82bad477dc4c066c5a99f67dc00d108fcb79518a2adb48e1dae968ccb260
|
|
7
|
+
data.tar.gz: e90b2f2c7f8b54f9c62277a59fb1972e6132a1501b4406f4af83326bb9a02924f9684a9e456199180c02ad88347e327c4b37839c0b85988cc6e08350aa63c767
|
|
@@ -14072,10 +14072,10 @@
|
|
|
14072
14072
|
<!-- END Admonition -->
|
|
14073
14073
|
<!-- ================ -->
|
|
14074
14074
|
|
|
14075
|
-
<xsl:attribute-set name="
|
|
14075
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
14076
14076
|
</xsl:attribute-set>
|
|
14077
14077
|
|
|
14078
|
-
<xsl:template name="
|
|
14078
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
14079
14079
|
</xsl:template>
|
|
14080
14080
|
|
|
14081
14081
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -16188,6 +16188,7 @@
|
|
|
16188
16188
|
<!-- ===================================== -->
|
|
16189
16189
|
|
|
16190
16190
|
<xsl:attribute-set name="annex-title-style">
|
|
16191
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
16191
16192
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
16192
16193
|
|
|
16193
16194
|
<xsl:template name="refine_annex-title-style">
|
|
@@ -14072,10 +14072,10 @@
|
|
|
14072
14072
|
<!-- END Admonition -->
|
|
14073
14073
|
<!-- ================ -->
|
|
14074
14074
|
|
|
14075
|
-
<xsl:attribute-set name="
|
|
14075
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
14076
14076
|
</xsl:attribute-set>
|
|
14077
14077
|
|
|
14078
|
-
<xsl:template name="
|
|
14078
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
14079
14079
|
</xsl:template>
|
|
14080
14080
|
|
|
14081
14081
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -16188,6 +16188,7 @@
|
|
|
16188
16188
|
<!-- ===================================== -->
|
|
16189
16189
|
|
|
16190
16190
|
<xsl:attribute-set name="annex-title-style">
|
|
16191
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
16191
16192
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
16192
16193
|
|
|
16193
16194
|
<xsl:template name="refine_annex-title-style">
|
|
@@ -14072,10 +14072,10 @@
|
|
|
14072
14072
|
<!-- END Admonition -->
|
|
14073
14073
|
<!-- ================ -->
|
|
14074
14074
|
|
|
14075
|
-
<xsl:attribute-set name="
|
|
14075
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
14076
14076
|
</xsl:attribute-set>
|
|
14077
14077
|
|
|
14078
|
-
<xsl:template name="
|
|
14078
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
14079
14079
|
</xsl:template>
|
|
14080
14080
|
|
|
14081
14081
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -16188,6 +16188,7 @@
|
|
|
16188
16188
|
<!-- ===================================== -->
|
|
16189
16189
|
|
|
16190
16190
|
<xsl:attribute-set name="annex-title-style">
|
|
16191
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
16191
16192
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
16192
16193
|
|
|
16193
16194
|
<xsl:template name="refine_annex-title-style">
|
|
@@ -14072,10 +14072,10 @@
|
|
|
14072
14072
|
<!-- END Admonition -->
|
|
14073
14073
|
<!-- ================ -->
|
|
14074
14074
|
|
|
14075
|
-
<xsl:attribute-set name="
|
|
14075
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
14076
14076
|
</xsl:attribute-set>
|
|
14077
14077
|
|
|
14078
|
-
<xsl:template name="
|
|
14078
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
14079
14079
|
</xsl:template>
|
|
14080
14080
|
|
|
14081
14081
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -16188,6 +16188,7 @@
|
|
|
16188
16188
|
<!-- ===================================== -->
|
|
16189
16189
|
|
|
16190
16190
|
<xsl:attribute-set name="annex-title-style">
|
|
16191
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
16191
16192
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
16192
16193
|
|
|
16193
16194
|
<xsl:template name="refine_annex-title-style">
|
|
@@ -11975,10 +11975,10 @@
|
|
|
11975
11975
|
<!-- END Admonition -->
|
|
11976
11976
|
<!-- ================ -->
|
|
11977
11977
|
|
|
11978
|
-
<xsl:attribute-set name="
|
|
11978
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
11979
11979
|
</xsl:attribute-set>
|
|
11980
11980
|
|
|
11981
|
-
<xsl:template name="
|
|
11981
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
11982
11982
|
</xsl:template>
|
|
11983
11983
|
|
|
11984
11984
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -14042,6 +14042,13 @@
|
|
|
14042
14042
|
<!-- ===================================== -->
|
|
14043
14043
|
|
|
14044
14044
|
<xsl:attribute-set name="annex-title-style">
|
|
14045
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
14046
|
+
<xsl:attribute name="font-size">15pt</xsl:attribute>
|
|
14047
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
14048
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
14049
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
14050
|
+
<xsl:attribute name="space-after">30pt</xsl:attribute>
|
|
14051
|
+
<xsl:attribute name="line-height">130%</xsl:attribute>
|
|
14045
14052
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
14046
14053
|
|
|
14047
14054
|
<xsl:template name="refine_annex-title-style">
|
|
@@ -14088,11 +14095,6 @@
|
|
|
14088
14095
|
<xsl:call-template name="getLevel"/>
|
|
14089
14096
|
</xsl:variable>
|
|
14090
14097
|
|
|
14091
|
-
<xsl:if test="$level = 1">
|
|
14092
|
-
<xsl:if test="parent::mn:annex">
|
|
14093
|
-
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
14094
|
-
</xsl:if>
|
|
14095
|
-
</xsl:if>
|
|
14096
14098
|
<xsl:if test="$level = 2">
|
|
14097
14099
|
<xsl:attribute name="font-size">11.5pt</xsl:attribute>
|
|
14098
14100
|
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
|
@@ -14111,10 +14113,7 @@
|
|
|
14111
14113
|
<xsl:attribute name="font-size">15pt</xsl:attribute>
|
|
14112
14114
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
|
14113
14115
|
</xsl:if>
|
|
14114
|
-
|
|
14115
|
-
<xsl:attribute name="font-size">15pt</xsl:attribute>
|
|
14116
|
-
<xsl:attribute name="space-after">30pt</xsl:attribute>
|
|
14117
|
-
</xsl:if>
|
|
14116
|
+
|
|
14118
14117
|
<xsl:if test="$element-name = 'fo:inline'">
|
|
14119
14118
|
<xsl:attribute name="padding-right">
|
|
14120
14119
|
<xsl:choose>
|
|
@@ -14123,11 +14122,18 @@
|
|
|
14123
14122
|
</xsl:choose>
|
|
14124
14123
|
</xsl:attribute>
|
|
14125
14124
|
</xsl:if>
|
|
14126
|
-
<xsl:if test="parent::mn:annex"
|
|
14127
|
-
<xsl:
|
|
14128
|
-
|
|
14125
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
14126
|
+
<xsl:variable name="annex_title_styles">
|
|
14127
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
14128
|
+
</xsl:variable>
|
|
14129
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
14130
|
+
</xsl:if>
|
|
14131
|
+
<xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
|
|
14132
|
+
<xsl:variable name="bibliography_title_styles">
|
|
14133
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
14134
|
+
</xsl:variable>
|
|
14135
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
14129
14136
|
</xsl:if>
|
|
14130
|
-
|
|
14131
14137
|
<!-- $namespace = 'jcgm' -->
|
|
14132
14138
|
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
14133
14139
|
</xsl:template> <!-- refine_title-style -->
|
|
@@ -690,7 +690,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
|
|
|
690
690
|
<define name="CitationType">
|
|
691
691
|
<attribute name="bibitemid">
|
|
692
692
|
<a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
|
|
693
|
-
<
|
|
693
|
+
<ref name="IdRefType"/>
|
|
694
694
|
</attribute>
|
|
695
695
|
<choice>
|
|
696
696
|
<zeroOrMore>
|
|
@@ -1296,17 +1296,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
|
1296
1296
|
</define>
|
|
1297
1297
|
<define name="validityBegins">
|
|
1298
1298
|
<element name="validityBegins">
|
|
1299
|
-
<ref name="
|
|
1299
|
+
<ref name="ISO8601DateTime"/>
|
|
1300
1300
|
</element>
|
|
1301
1301
|
</define>
|
|
1302
1302
|
<define name="validityEnds">
|
|
1303
1303
|
<element name="validityEnds">
|
|
1304
|
-
<ref name="
|
|
1304
|
+
<ref name="ISO8601DateTime"/>
|
|
1305
1305
|
</element>
|
|
1306
1306
|
</define>
|
|
1307
1307
|
<define name="validityRevision">
|
|
1308
1308
|
<element name="revision">
|
|
1309
|
-
<ref name="
|
|
1309
|
+
<ref name="ISO8601DateTime"/>
|
|
1310
1310
|
</element>
|
|
1311
1311
|
</define>
|
|
1312
1312
|
<define name="TypedTitleString">
|
|
@@ -72,6 +72,19 @@ module Metanorma
|
|
|
72
72
|
p = parts["annexid"] and ret += ".#{p}"
|
|
73
73
|
id.children = "#{id.text}#{ret}"
|
|
74
74
|
end
|
|
75
|
+
|
|
76
|
+
def sections_variant_title_cleanup(xml)
|
|
77
|
+
path = section_containers.map { |x| "./ancestor::#{x}" }.join(" | ")
|
|
78
|
+
xml.xpath("//p[@variant_title]").each do |p|
|
|
79
|
+
p.name = "variant-title"
|
|
80
|
+
p.delete("variant_title")
|
|
81
|
+
p.xpath("(#{path})[last()]").each do |sect|
|
|
82
|
+
p.remove
|
|
83
|
+
(ins = sect.at("./title") and ins.next = p) or
|
|
84
|
+
sect.add_first_child(p)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
75
88
|
end
|
|
76
89
|
end
|
|
77
90
|
end
|
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.4 -->
|
|
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">
|
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.9
|
|
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-
|
|
11
|
+
date: 2025-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|