metanorma-ieee 1.7.1.pre.alpha.2 → 1.7.2

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: 0e30d6f56faebc7392e2ca7d50266967e648063e663dae3bf002f94607bd2578
4
- data.tar.gz: 5c204ca32f700274f9e0bf644eefef4edbb0343d2fa26dafb4d4f1952e7c44fe
3
+ metadata.gz: d58e0bedc3b61221224ec9eb38a220d5ba3266c196b28314488d83a6699ddb41
4
+ data.tar.gz: 8e90070593ab7add6299ef6f2a8abddacfe6cec23863978b911bd238d111e8ce
5
5
  SHA512:
6
- metadata.gz: 20f745193c3494845fd55736ba6e0c41d090dad80d51888fbf97d33539ede637404372761b5f48165db9a0be093e391f267b48222fe6a2819aef75f1357f0500
7
- data.tar.gz: ea6ff96790320afefb6e7e6e4d0c7cc18588d5cfc3501c8833316fa56b001b600469b6a153733f6c22cc57efcd0304c15d664ff0940415344f743451b77c0834
6
+ metadata.gz: 9c7be18476b196110805846ecceb41dcfbeddefb3c2dbb8c481ac8f016adfd5d47481b24a5f7f4feab4fd44254d6fae34846ac02b93cd4aee8ef8c6159513e7a
7
+ data.tar.gz: f56a089eb2635e0a2e86940e8f8ebbe58d4c1930eb3ef431fd27ccbfd88971a9a2d32016f8a1185cce451d6602bce7e0c17321ca5b32fc35e6b2fe2beb45ea14
data/Gemfile CHANGED
@@ -1,8 +1,9 @@
1
1
  source "https://rubygems.org"
2
- gem "relaton-render", "= 3.0.0.pre.alpha.43" # canonical ieee-sa pack; delta merge, edition precedence, named ieee_* rules
3
- # the lockfile is not tracked; without an exact pin CI floats the monogem
4
- # to newer alphas whose rendering differs, flipping fixture baselines
5
- gem "relaton", "~> 3.0.0.pre.alpha" # prerelease line: alpha.17 carries the singular_tolerance declarations
2
+ gem "relaton-render", "~> 3.0" # canonical ieee-sa pack; delta merge, edition precedence, named ieee_* rules
3
+ gem "relaton", "~> 3.0" # 3.0.0 final carries the singular_tolerance declarations
4
+ # parsanol 1.3.123 is the current pubid-compatible line (pubid pins ~> 1.3.12x);
5
+ # 1.3.123 restores the 1.3.121 binding behaviour (parsanol#421).
6
+ gem "parsanol", "~> 1.3.123" # pubid ~> 2.0.3 requires the 1.3.12x line; 1.3.123 carries the JIS binding fix (parsanol#421)
6
7
  # leptris 1.9.359 drops Leptris::XML::Declaration#to_xml (blocks_spec);
7
8
  # 1.9.356 is the last rendering-green line until leptris restores it
8
9
 
@@ -11,24 +12,18 @@ git_source(:github) { |repo| "https://github.com/#{repo}" }
11
12
  gemspec
12
13
  gem "metanorma-mirror", "~> 1.0"
13
14
 
14
- # TEMPORARY: cross-PR branch pins so CI can resolve the in-flight
15
- # metanorma-standoc namespace rename (Metanorma::Standoc::Document)
16
- # and the pubid-2 / relaton-bib 2.2 / metanorma-document 0.5 chain.
17
- # Revert each pin once the corresponding PR merges:
18
- # - https://github.com/metanorma/metanorma-standoc/pull/1232
19
- # - https://github.com/metanorma/metanorma-document/pull/45
20
- gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
15
+ gem "metanorma-standoc", "~> 3.5.1.pre.alpha" # Standoc::Document rename
21
16
  # released plugin-lutaml 0.7.50 dropped the preprocessor names standoc
22
17
  # registers (LutamlDataPreprocessor); main carries them (generic#133)
23
18
  gem "metanorma-plugin-lutaml", github: "metanorma/metanorma-plugin-lutaml", branch: "main"
24
- gem "metanorma-document", github: "metanorma/metanorma-document", branch: "main" # TEMPORARY audit chain
25
- gem "isodoc", github: "metanorma/isodoc", branch: "main" # merged as #825
19
+ gem "metanorma-document", "~> 0.5.2.pre.alpha"
20
+ gem "isodoc", "~> 3.7.4.pre.alpha"
26
21
  gem "relaton-bib", "2.2.0.pre.alpha.1"
27
- gem "pubid", github: "pubid/pubid", branch: "main"
22
+ gem "pubid", "~> 2.0"
28
23
 
29
24
  eval_gemfile("Gemfile.devel") rescue nil
30
25
  gem "metanorma-iso", github: "metanorma/metanorma-iso", branch: "main"
31
- gem "metanorma-core", github: "metanorma/metanorma-core", branch: "feat/flavor-table" # TEMPORARY audit chain
26
+ gem "metanorma-core", "~> 0.2.5.pre.alpha" # published flavor/taste table (metanorma-core#18)
32
27
  # moxml 0.5.138's leptris adapter references Leptris::XML::Declaration,
33
28
  # which only exists in leptris 1.9.359 (the to_xml regression pair,
34
29
  # leptris#1733); pin the coherent 1.9.356-era moxml line
@@ -12,6 +12,23 @@
12
12
  <!-- mandatory variable -->
13
13
  <xsl:variable name="debug">false</xsl:variable>
14
14
 
15
+ <xsl:variable name="variables_">
16
+ <xsl:for-each select="//mn:metanorma">
17
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
18
+
19
+ <xsl:variable name="current_document">
20
+ <xsl:copy-of select="."/>
21
+ </xsl:variable>
22
+
23
+ <xsl:for-each select="xalan:nodeset($current_document)">
24
+ <mnx:doc num="{$num}">
25
+
26
+ </mnx:doc>
27
+ </xsl:for-each>
28
+ </xsl:for-each>
29
+ </xsl:variable>
30
+ <xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
31
+
15
32
  <!-- mandatory variable -->
16
33
  <xsl:variable name="contents_">
17
34
  <xsl:variable name="bundle" select="count(//mn:metanorma) &gt; 1"/>
@@ -19303,6 +19320,23 @@
19303
19320
  </xsl:choose>
19304
19321
  </xsl:template>
19305
19322
 
19323
+ <xsl:template name="getVariable">
19324
+ <xsl:param name="variable"/>
19325
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19326
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19327
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19328
+ <xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
19329
+ </xsl:template>
19330
+
19331
+ <!-- get variable value with the internal elements(nodes), e.g. formatting -->
19332
+ <xsl:template name="getVariableCopyOf">
19333
+ <xsl:param name="variable"/>
19334
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19335
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19336
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19337
+ <xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
19338
+ </xsl:template>
19339
+
19306
19340
  <!-- ============================================= -->
19307
19341
  <!-- mode="print_as_xml", for debug purposes -->
19308
19342
  <!-- ============================================= -->
@@ -12,6 +12,23 @@
12
12
  <!-- mandatory variable -->
13
13
  <xsl:variable name="debug">false</xsl:variable>
14
14
 
15
+ <xsl:variable name="variables_">
16
+ <xsl:for-each select="//mn:metanorma">
17
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
18
+
19
+ <xsl:variable name="current_document">
20
+ <xsl:copy-of select="."/>
21
+ </xsl:variable>
22
+
23
+ <xsl:for-each select="xalan:nodeset($current_document)">
24
+ <mnx:doc num="{$num}">
25
+
26
+ </mnx:doc>
27
+ </xsl:for-each>
28
+ </xsl:for-each>
29
+ </xsl:variable>
30
+ <xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
31
+
15
32
  <!-- mandatory variable -->
16
33
  <xsl:variable name="contents_">
17
34
  <xsl:variable name="bundle" select="count(//mn:metanorma) &gt; 1"/>
@@ -19303,6 +19320,23 @@
19303
19320
  </xsl:choose>
19304
19321
  </xsl:template>
19305
19322
 
19323
+ <xsl:template name="getVariable">
19324
+ <xsl:param name="variable"/>
19325
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19326
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19327
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19328
+ <xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
19329
+ </xsl:template>
19330
+
19331
+ <!-- get variable value with the internal elements(nodes), e.g. formatting -->
19332
+ <xsl:template name="getVariableCopyOf">
19333
+ <xsl:param name="variable"/>
19334
+ <!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
19335
+ in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
19336
+ <xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
19337
+ <xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
19338
+ </xsl:template>
19339
+
19306
19340
  <!-- ============================================= -->
19307
19341
  <!-- mode="print_as_xml", for debug purposes -->
19308
19342
  <!-- ============================================= -->
@@ -69,14 +69,30 @@ module Metanorma
69
69
  normative_dated_refs(root)
70
70
  end
71
71
 
72
- # Style manual 12.3.1
72
+ # Style manual 12.3.1. A reference that names a stage ("ISO/IEC/IEEE
73
+ # FDIS 42010") is sufficient identification on its own: staged documents
74
+ # have no publication date, and the stage is how the in-progress
75
+ # citation identifies itself (relaton-iso#120).
73
76
  def normative_dated_refs(root)
74
77
  root.xpath("//references[@normative = 'true']/bibitem").each do |b|
78
+ next if staged_reference?(b)
79
+
75
80
  b.at(".//date") or
76
81
  @log.add("IEEE_10", b, params: [b.at("./@anchor")&.text])
77
82
  end
78
83
  end
79
84
 
85
+ ISO_STAGE_ABBREVIATIONS =
86
+ %w(PWI NP NWIP DP WD AWI preCD PreCD CD CDV DIS FDIS Fpr PRF DAM).freeze
87
+
88
+ def staged_reference?(bibitem)
89
+ bibitem.xpath(".//docidentifier").any? do |d|
90
+ ISO_STAGE_ABBREVIATIONS.any? do |st|
91
+ d.text.match?(/(?<=[\s\/])#{st}(?=[\s\/.:-]|$)/)
92
+ end
93
+ end
94
+ end
95
+
80
96
  def list_validate(doc)
81
97
  listcount_validate(doc)
82
98
  listdepth_validate(doc)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ieee
3
- VERSION = "1.7.1.pre.alpha.2".freeze
3
+ VERSION = "1.7.2".freeze
4
4
  end
5
5
  end
@@ -27,10 +27,9 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_dependency "metanorma-standoc", ">= 3.4.2" # audit chain
29
29
  spec.add_dependency "mnconvert", "~> 1.20"
30
- spec.add_dependency "pubid", "~> 2.0"
30
+ spec.add_dependency "pubid", "~> 2.0.3"
31
31
 
32
32
  spec.add_development_dependency "debug"
33
- spec.add_development_dependency "equivalent-xml", "~> 0.6"
34
33
  spec.add_development_dependency "guard", "~> 2.14"
35
34
  spec.add_development_dependency "guard-rspec", "~> 4.7"
36
35
  spec.add_development_dependency "openssl"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1.pre.alpha.2
4
+ version: 1.7.2
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-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.0'
47
+ version: 2.0.3
48
48
  type: :runtime
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: '2.0'
54
+ version: 2.0.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: debug
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: equivalent-xml
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.6'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.6'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: guard
85
71
  requirement: !ruby/object:Gem::Requirement