metanorma-ieee 1.7.1.pre.alpha.1 → 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 +4 -4
- data/Gemfile +13 -15
- data/lib/isodoc/ieee/ieee.amendment.xsl +37 -1
- data/lib/isodoc/ieee/ieee.standard.xsl +37 -1
- data/lib/metanorma/ieee/validate.rb +17 -1
- data/lib/metanorma/ieee/version.rb +1 -1
- data/metanorma-ieee.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf52a2416428449f19a97ad26779b1446a88f1f7f1ab834bcebffe2086c9c8ed
|
|
4
|
+
data.tar.gz: 9e73830d72b4a253060d04a46ba682b06caeb098cd4dc3d42c6b04ad142a56aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
4
|
-
#
|
|
5
|
-
|
|
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
|
-
|
|
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",
|
|
25
|
-
gem "isodoc",
|
|
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",
|
|
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",
|
|
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) > 1"/>
|
|
@@ -2135,7 +2152,9 @@
|
|
|
2135
2152
|
<xsl:call-template name="getName"/>
|
|
2136
2153
|
</xsl:variable>
|
|
2137
2154
|
<xsl:variable name="variant_title">
|
|
2138
|
-
<xsl:
|
|
2155
|
+
<xsl:if test="not(self::mn:annex)">
|
|
2156
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
2157
|
+
</xsl:if>
|
|
2139
2158
|
</xsl:variable>
|
|
2140
2159
|
|
|
2141
2160
|
<xsl:variable name="root">
|
|
@@ -19301,6 +19320,23 @@
|
|
|
19301
19320
|
</xsl:choose>
|
|
19302
19321
|
</xsl:template>
|
|
19303
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
|
+
|
|
19304
19340
|
<!-- ============================================= -->
|
|
19305
19341
|
<!-- mode="print_as_xml", for debug purposes -->
|
|
19306
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) > 1"/>
|
|
@@ -2135,7 +2152,9 @@
|
|
|
2135
2152
|
<xsl:call-template name="getName"/>
|
|
2136
2153
|
</xsl:variable>
|
|
2137
2154
|
<xsl:variable name="variant_title">
|
|
2138
|
-
<xsl:
|
|
2155
|
+
<xsl:if test="not(self::mn:annex)">
|
|
2156
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
2157
|
+
</xsl:if>
|
|
2139
2158
|
</xsl:variable>
|
|
2140
2159
|
|
|
2141
2160
|
<xsl:variable name="root">
|
|
@@ -19301,6 +19320,23 @@
|
|
|
19301
19320
|
</xsl:choose>
|
|
19302
19321
|
</xsl:template>
|
|
19303
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
|
+
|
|
19304
19340
|
<!-- ============================================= -->
|
|
19305
19341
|
<!-- mode="print_as_xml", for debug purposes -->
|
|
19306
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)
|
data/metanorma-ieee.gemspec
CHANGED
|
@@ -27,7 +27,7 @@ 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"
|
|
31
31
|
|
|
32
32
|
spec.add_development_dependency "debug"
|
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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
|
|
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-
|
|
11
|
+
date: 2026-10-29 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'
|
|
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'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: debug
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|