metanorma-bipm 2.9.1.pre.alpha.3 → 2.9.1

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: 7dd01bb2e3107ca55cbe1ff57e8291b6e2478cb5570887b0b2e200a6bf0847ad
4
- data.tar.gz: b0e2189f71bab7fa692b3f19096da99ffb188936383acb8eb10e7759662bd48e
3
+ metadata.gz: cc86b90c3d20a5ec5324f5246e2f97e7598f3a5e16bdf20d9323cdc16f42c0e9
4
+ data.tar.gz: 295f7931d976cde598d7753c6429fa3b01e03f2b7a3dfc3c510b692617496e82
5
5
  SHA512:
6
- metadata.gz: 28b6d8f203f384ce47bf1a099dd12c38bee9f8a6e4584bb1efc939f5988cb04edb475667508008c68867aa2434d5beaa34e699e49b8e1cf322166bd0737cb744
7
- data.tar.gz: 8da59a8327496f3b87aff5511d59a6ddd09e3fbfa821bf9518295b62bc8de83f68b09bec78e76c87146271bb56f11e2de83e1547f0e6ed6964dab39dc0a12b8a
6
+ metadata.gz: 78ddd80b595e729fe0640d624d03ee8c6a9edca3c47b2d6de292eeae43561fdcc0e895cb902d2c95393ef3002e616da1d3a7f8bf2e9b8f1e4cbb04e4a79f9956
7
+ data.tar.gz: 28815a2cbdb568d7b31d03cad408157def081ebaf9ee61f16259c1e0f6931f70c11473554c65dcc99c9b926f5ead394357e94e34aabba6a598293908f5e9e52a
data/Gemfile CHANGED
@@ -2,14 +2,14 @@ Encoding.default_external = Encoding::UTF_8
2
2
  Encoding.default_internal = Encoding::UTF_8
3
3
 
4
4
  source "https://rubygems.org"
5
- gem "relaton-render", "~> 3.0.0.pre.alpha" # # bipm_* named rules; size and page %-templates, github: "metanorma/relaton-render", branch: "main"
6
- gem "pubid", "~> 2.0.0.pre.alpha" # # relaton 3 monogem pairs with pubid 2
7
- gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main" # Standoc::Document split + relaton 3 allowance
8
- gem "metanorma-utils", github: "metanorma/metanorma-utils", branch: "main" # Metanorma::Utils::GcBudget API, unreleased
5
+ gem "relaton-render", "~> 3.0" # bipm_* named rules; size and page %-templates
6
+ gem "pubid", "~> 2.0" # relaton 3 pairs with pubid 2
7
+ gem "metanorma-standoc", "~> 3.5.1.pre.alpha" # Standoc::Document split + relaton 3 allowance
8
+ gem "metanorma-utils", "~> 2.0" # Metanorma::Utils::GcBudget API
9
9
  gem "metanorma-plugin-lutaml", github: "metanorma/metanorma-plugin-lutaml", branch: "main" # LutamlDataPreprocessor, unreleased
10
10
  gem "metanorma-iso", github: "metanorma/metanorma-iso", branch: "main" # CitationStyle port, unreleased
11
- gem "metanorma-document", github: "metanorma/metanorma-document", branch: "main" # TEMPORARY audit chain
12
- gem "isodoc", github: "metanorma/isodoc", branch: "main" # relaton-render range #846
11
+ gem "metanorma-document", "~> 0.5.2.pre.alpha"
12
+ gem "isodoc", "~> 3.7.4.pre.alpha" # relaton-render range #846
13
13
  gem "metanorma-core", github: "metanorma/metanorma-core", branch: "main" # TEMPORARY audit chain (flavor root naming)
14
14
  git_source(:github) { |repo| "https://github.com/#{repo}" }
15
15
 
@@ -25,6 +25,23 @@
25
25
 
26
26
  <xsl:variable name="root-element" select="local-name(/*)"/>
27
27
 
28
+ <xsl:variable name="variables_">
29
+ <xsl:for-each select="//mn:metanorma">
30
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
31
+
32
+ <xsl:variable name="current_document">
33
+ <xsl:copy-of select="."/>
34
+ </xsl:variable>
35
+
36
+ <xsl:for-each select="xalan:nodeset($current_document)">
37
+ <mnx:doc num="{$num}">
38
+
39
+ </mnx:doc>
40
+ </xsl:for-each>
41
+ </xsl:for-each>
42
+ </xsl:variable>
43
+ <xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
44
+
28
45
  <xsl:variable name="contents_">
29
46
  <xsl:choose>
30
47
  <xsl:when test="$root-element = 'metanorma-collection'">
@@ -19229,6 +19246,23 @@
19229
19246
  </xsl:choose>
19230
19247
  </xsl:template>
19231
19248
 
19249
+ <xsl:template name="getVariable">
19250
+ <xsl:param name="variable"/>
19251
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19252
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19253
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19254
+ <xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
19255
+ </xsl:template>
19256
+
19257
+ <!-- get variable value with the internal elements(nodes), e.g. formatting -->
19258
+ <xsl:template name="getVariableCopyOf">
19259
+ <xsl:param name="variable"/>
19260
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19261
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19262
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19263
+ <xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
19264
+ </xsl:template>
19265
+
19232
19266
  <!-- ============================================= -->
19233
19267
  <!-- mode="print_as_xml", for debug purposes -->
19234
19268
  <!-- ============================================= -->
@@ -25,6 +25,23 @@
25
25
 
26
26
  <xsl:variable name="root-element" select="local-name(/*)"/>
27
27
 
28
+ <xsl:variable name="variables_">
29
+ <xsl:for-each select="//mn:metanorma">
30
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
31
+
32
+ <xsl:variable name="current_document">
33
+ <xsl:copy-of select="."/>
34
+ </xsl:variable>
35
+
36
+ <xsl:for-each select="xalan:nodeset($current_document)">
37
+ <mnx:doc num="{$num}">
38
+
39
+ </mnx:doc>
40
+ </xsl:for-each>
41
+ </xsl:for-each>
42
+ </xsl:variable>
43
+ <xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
44
+
28
45
  <xsl:variable name="contents_">
29
46
  <xsl:choose>
30
47
  <xsl:when test="$root-element = 'metanorma-collection'">
@@ -19229,6 +19246,23 @@
19229
19246
  </xsl:choose>
19230
19247
  </xsl:template>
19231
19248
 
19249
+ <xsl:template name="getVariable">
19250
+ <xsl:param name="variable"/>
19251
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19252
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19253
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19254
+ <xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
19255
+ </xsl:template>
19256
+
19257
+ <!-- get variable value with the internal elements(nodes), e.g. formatting -->
19258
+ <xsl:template name="getVariableCopyOf">
19259
+ <xsl:param name="variable"/>
19260
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19261
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19262
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19263
+ <xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
19264
+ </xsl:template>
19265
+
19232
19266
  <!-- ============================================= -->
19233
19267
  <!-- mode="print_as_xml", for debug purposes -->
19234
19268
  <!-- ============================================= -->
@@ -25,6 +25,23 @@
25
25
 
26
26
  <xsl:variable name="root-element" select="local-name(/*)"/>
27
27
 
28
+ <xsl:variable name="variables_">
29
+ <xsl:for-each select="//mn:metanorma">
30
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
31
+
32
+ <xsl:variable name="current_document">
33
+ <xsl:copy-of select="."/>
34
+ </xsl:variable>
35
+
36
+ <xsl:for-each select="xalan:nodeset($current_document)">
37
+ <mnx:doc num="{$num}">
38
+
39
+ </mnx:doc>
40
+ </xsl:for-each>
41
+ </xsl:for-each>
42
+ </xsl:variable>
43
+ <xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
44
+
28
45
  <xsl:variable name="contents_">
29
46
  <xsl:choose>
30
47
  <xsl:when test="$root-element = 'metanorma-collection'">
@@ -19229,6 +19246,23 @@
19229
19246
  </xsl:choose>
19230
19247
  </xsl:template>
19231
19248
 
19249
+ <xsl:template name="getVariable">
19250
+ <xsl:param name="variable"/>
19251
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19252
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19253
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19254
+ <xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
19255
+ </xsl:template>
19256
+
19257
+ <!-- get variable value with the internal elements(nodes), e.g. formatting -->
19258
+ <xsl:template name="getVariableCopyOf">
19259
+ <xsl:param name="variable"/>
19260
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19261
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19262
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19263
+ <xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
19264
+ </xsl:template>
19265
+
19232
19266
  <!-- ============================================= -->
19233
19267
  <!-- mode="print_as_xml", for debug purposes -->
19234
19268
  <!-- ============================================= -->
@@ -25,6 +25,23 @@
25
25
 
26
26
  <xsl:variable name="root-element" select="local-name(/*)"/>
27
27
 
28
+ <xsl:variable name="variables_">
29
+ <xsl:for-each select="//mn:metanorma">
30
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
31
+
32
+ <xsl:variable name="current_document">
33
+ <xsl:copy-of select="."/>
34
+ </xsl:variable>
35
+
36
+ <xsl:for-each select="xalan:nodeset($current_document)">
37
+ <mnx:doc num="{$num}">
38
+
39
+ </mnx:doc>
40
+ </xsl:for-each>
41
+ </xsl:for-each>
42
+ </xsl:variable>
43
+ <xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
44
+
28
45
  <xsl:variable name="contents_">
29
46
  <xsl:choose>
30
47
  <xsl:when test="$root-element = 'metanorma-collection'">
@@ -19229,6 +19246,23 @@
19229
19246
  </xsl:choose>
19230
19247
  </xsl:template>
19231
19248
 
19249
+ <xsl:template name="getVariable">
19250
+ <xsl:param name="variable"/>
19251
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19252
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19253
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19254
+ <xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
19255
+ </xsl:template>
19256
+
19257
+ <!-- get variable value with the internal elements(nodes), e.g. formatting -->
19258
+ <xsl:template name="getVariableCopyOf">
19259
+ <xsl:param name="variable"/>
19260
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19261
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19262
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19263
+ <xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
19264
+ </xsl:template>
19265
+
19232
19266
  <!-- ============================================= -->
19233
19267
  <!-- mode="print_as_xml", for debug purposes -->
19234
19268
  <!-- ============================================= -->
@@ -90,6 +90,23 @@
90
90
 
91
91
  <xsl:variable name="docnumber" select="(//mn:metanorma)[1]/mn:bibdata/mn:docnumber"/>
92
92
 
93
+ <xsl:variable name="variables_">
94
+ <xsl:for-each select="//mn:metanorma">
95
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
96
+
97
+ <xsl:variable name="current_document">
98
+ <xsl:copy-of select="."/>
99
+ </xsl:variable>
100
+
101
+ <xsl:for-each select="xalan:nodeset($current_document)">
102
+ <mnx:doc num="{$num}">
103
+
104
+ </mnx:doc>
105
+ </xsl:for-each>
106
+ </xsl:for-each>
107
+ </xsl:variable>
108
+ <xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
109
+
93
110
  <!-- Example:
94
111
  <item level="1" id="Foreword" display="true">Foreword</item>
95
112
  <item id="term-script" display="false">3.2</item>
@@ -17204,6 +17221,23 @@
17204
17221
  </xsl:choose>
17205
17222
  </xsl:template>
17206
17223
 
17224
+ <xsl:template name="getVariable">
17225
+ <xsl:param name="variable"/>
17226
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
17227
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
17228
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
17229
+ <xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
17230
+ </xsl:template>
17231
+
17232
+ <!-- get variable value with the internal elements(nodes), e.g. formatting -->
17233
+ <xsl:template name="getVariableCopyOf">
17234
+ <xsl:param name="variable"/>
17235
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
17236
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
17237
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
17238
+ <xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
17239
+ </xsl:template>
17240
+
17207
17241
  <!-- ============================================= -->
17208
17242
  <!-- mode="print_as_xml", for debug purposes -->
17209
17243
  <!-- ============================================= -->
@@ -8,16 +8,26 @@ module Metanorma
8
8
  def committee_validate(xml)
9
9
  committees = committees_list or return
10
10
  xml.xpath("#{COMMITTEE_XPATH}/name").each do |c|
11
- committees.include? c.text or
11
+ committee_known?(committees, c.text) or
12
12
  @log.add("BIPM_1", nil, params: [c.text])
13
13
  end
14
14
  xml.xpath("#{COMMITTEE_XPATH}/identifier[not(@type = 'full')]")
15
15
  .each do |c|
16
- committees.include? c.text or
16
+ committee_known?(committees, c.text) or
17
17
  @log.add("BIPM_1", nil, params: [c.text])
18
18
  end
19
19
  end
20
20
 
21
+ # configuration.committees now carries Committee models (plain
22
+ # metanorma.yml strings are normalized by
23
+ # Metanorma::Generic::Configuration#committees=); match against the
24
+ # model's code and full name rather than the raw objects
25
+ def committee_known?(committees, text)
26
+ committees.any? do |c|
27
+ [c.code, c.full_name].compact.map(&:to_s).include?(text)
28
+ end
29
+ end
30
+
21
31
  def committees_list
22
32
  committees = Array(configuration&.committees) or return
23
33
  committees.empty? and return
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Bipm
3
- VERSION = "2.9.1.pre.alpha.3".freeze
3
+ VERSION = "2.9.1".freeze
4
4
  end
5
5
  end
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.9.1.pre.alpha.3
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-27 00:00:00.000000000 Z
11
+ date: 2026-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic