metanorma-ieee 1.7.1.pre.alpha.2 → 1.7.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: 0e30d6f56faebc7392e2ca7d50266967e648063e663dae3bf002f94607bd2578
4
- data.tar.gz: 5c204ca32f700274f9e0bf644eefef4edbb0343d2fa26dafb4d4f1952e7c44fe
3
+ metadata.gz: bf52a2416428449f19a97ad26779b1446a88f1f7f1ab834bcebffe2086c9c8ed
4
+ data.tar.gz: 9e73830d72b4a253060d04a46ba682b06caeb098cd4dc3d42c6b04ad142a56aa
5
5
  SHA512:
6
- metadata.gz: 20f745193c3494845fd55736ba6e0c41d090dad80d51888fbf97d33539ede637404372761b5f48165db9a0be093e391f267b48222fe6a2819aef75f1357f0500
7
- data.tar.gz: ea6ff96790320afefb6e7e6e4d0c7cc18588d5cfc3501c8833316fa56b001b600469b6a153733f6c22cc57efcd0304c15d664ff0940415344f743451b77c0834
6
+ metadata.gz: 3ab2d5a3ca859267fa9840a88e46daad56d7f9549c68da436f07cf0169b747d80939c495fe6e40cdfc5e574cb13e854178e216ffa739dd5e163a82bfe7a1a104
7
+ data.tar.gz: 072a5e424ff161dacc372a7cb77bbc96fb106ef176088c9b637ab78e73d1d90b2dc7e1936aa9ad16d1cc70257e251fbfe5ccd0357c2df06f15694b3aa754cd48
data/Gemfile CHANGED
@@ -1,8 +1,12 @@
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.110 shipped the v2 named-tree dialect as the default: every
5
+ # uncaptured rule reference surfaces as a capture, so pubid parses plain
6
+ # references as per-atom lists ("ISO 8888" -> {number: "[{digit:..."}},
7
+ # "Unknown parameter type: space"). The v2 migration is pubid-side work in
8
+ # flight; pin the last classic-dialect release until it lands (parsanol#352).
9
+ gem "parsanol", "1.3.109"
6
10
  # leptris 1.9.359 drops Leptris::XML::Declaration#to_xml (blocks_spec);
7
11
  # 1.9.356 is the last rendering-green line until leptris restores it
8
12
 
@@ -11,24 +15,18 @@ git_source(:github) { |repo| "https://github.com/#{repo}" }
11
15
  gemspec
12
16
  gem "metanorma-mirror", "~> 1.0"
13
17
 
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"
18
+ gem "metanorma-standoc", "~> 3.5.1.pre.alpha" # Standoc::Document rename
21
19
  # released plugin-lutaml 0.7.50 dropped the preprocessor names standoc
22
20
  # registers (LutamlDataPreprocessor); main carries them (generic#133)
23
21
  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
22
+ gem "metanorma-document", "~> 0.5.2.pre.alpha"
23
+ gem "isodoc", "~> 3.7.4.pre.alpha"
26
24
  gem "relaton-bib", "2.2.0.pre.alpha.1"
27
- gem "pubid", github: "pubid/pubid", branch: "main"
25
+ gem "pubid", "~> 2.0"
28
26
 
29
27
  eval_gemfile("Gemfile.devel") rescue nil
30
28
  gem "metanorma-iso", github: "metanorma/metanorma-iso", branch: "main"
31
- gem "metanorma-core", github: "metanorma/metanorma-core", branch: "feat/flavor-table" # TEMPORARY audit chain
29
+ gem "metanorma-core", "~> 0.2.5.pre.alpha" # published flavor/taste table (metanorma-core#18)
32
30
  # moxml 0.5.138's leptris adapter references Leptris::XML::Declaration,
33
31
  # which only exists in leptris 1.9.359 (the to_xml regression pair,
34
32
  # 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.1".freeze
4
4
  end
5
5
  end
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.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-standoc