metanorma-jis 1.2.1.pre.alpha.2 → 1.2.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 +4 -4
- data/Gemfile.devel +2 -0
- data/Gemfile.lock +19 -21
- data/lib/isodoc/jis/jis.international-standard.xsl +34 -0
- data/lib/metanorma/jis/converter.rb +5 -0
- data/lib/metanorma/jis/processor.rb +5 -1
- data/lib/metanorma/jis/version.rb +1 -1
- data/lib/metanorma-jis.rb +6 -0
- data/metanorma-jis.gemspec +1 -2
- metadata +6 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd1068e4455581545c77308891f4845f9734104bd5654788cb83862b89254bf6
|
|
4
|
+
data.tar.gz: ef9f13f91df97ee1badaded8eaf718806ac2393b96443c411c69a8339d75bc92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc5a4abe6b33868343f0752a8f84d31bfbe5ff6cd405e2359f0569e860e78a504538f94dd42649139c509eb8159c6a0bd62b15a56aa0811858c203ea7a39162c
|
|
7
|
+
data.tar.gz: 3ee9c7a0eaebcb6400cca7f6f99139c8ae322d2c541557775e0d03612b70d8e406a08bea0b14ee55a4f5b8301d7f26106890bb9b617b10a44aed9329791d1095
|
data/Gemfile.devel
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
gem "svg_conform", "0.2.4" # bridge: 0.2.5 pushed with a broken compact index (APIResponseMismatchError) — drop when a corrected push lands
|
|
2
|
+
gem "parsanol", "1.3.114" # bridge: pubid 2.0.1 grammars carry the mode header alias removed in parsanol 1.3.113+ — drop at pubid PARG edition 2
|
data/Gemfile.lock
CHANGED
|
@@ -23,7 +23,7 @@ GIT
|
|
|
23
23
|
PATH
|
|
24
24
|
remote: .
|
|
25
25
|
specs:
|
|
26
|
-
metanorma-jis (1.2.
|
|
26
|
+
metanorma-jis (1.2.2)
|
|
27
27
|
japanese_calendar (~> 0)
|
|
28
28
|
liquid (~> 5.4)
|
|
29
29
|
metanorma-iso (>= 3.4.2)
|
|
@@ -172,8 +172,6 @@ GEM
|
|
|
172
172
|
fontisan
|
|
173
173
|
leptris (~> 1.9.362)
|
|
174
174
|
libpng (~> 1.6)
|
|
175
|
-
equivalent-xml (0.6.0)
|
|
176
|
-
nokogiri (>= 1.4.3)
|
|
177
175
|
erb (6.0.7)
|
|
178
176
|
expressir (2.4.44)
|
|
179
177
|
base64 (>= 0.1.0)
|
|
@@ -651,15 +649,15 @@ GEM
|
|
|
651
649
|
bigdecimal (>= 3.0)
|
|
652
650
|
paint (2.3.0)
|
|
653
651
|
parallel (1.28.0)
|
|
654
|
-
parsanol (1.3.
|
|
652
|
+
parsanol (1.3.114)
|
|
655
653
|
rb_sys (~> 0.9.39)
|
|
656
|
-
parsanol (1.3.
|
|
657
|
-
parsanol (1.3.
|
|
658
|
-
parsanol (1.3.
|
|
659
|
-
parsanol (1.3.
|
|
654
|
+
parsanol (1.3.114-aarch64-linux)
|
|
655
|
+
parsanol (1.3.114-arm64-darwin)
|
|
656
|
+
parsanol (1.3.114-x64-mingw-ucrt)
|
|
657
|
+
parsanol (1.3.114-x64-mingw32)
|
|
660
658
|
rb_sys (~> 0.9.39)
|
|
661
|
-
parsanol (1.3.
|
|
662
|
-
parsanol (1.3.
|
|
659
|
+
parsanol (1.3.114-x86_64-darwin)
|
|
660
|
+
parsanol (1.3.114-x86_64-linux)
|
|
663
661
|
parser (3.3.12.0)
|
|
664
662
|
ast (~> 2.4.1)
|
|
665
663
|
racc
|
|
@@ -1043,9 +1041,8 @@ PLATFORMS
|
|
|
1043
1041
|
x86_64-linux
|
|
1044
1042
|
|
|
1045
1043
|
DEPENDENCIES
|
|
1046
|
-
canon
|
|
1044
|
+
canon (~> 0.3)
|
|
1047
1045
|
debug
|
|
1048
|
-
equivalent-xml (~> 0.6)
|
|
1049
1046
|
guard (~> 2.14)
|
|
1050
1047
|
guard-rspec (~> 4.7)
|
|
1051
1048
|
iev (~> 0.3.0)
|
|
@@ -1059,6 +1056,7 @@ DEPENDENCIES
|
|
|
1059
1056
|
metanorma-standoc (~> 3.5.1.pre.alpha)
|
|
1060
1057
|
metanorma-utils (~> 2.0)
|
|
1061
1058
|
openssl
|
|
1059
|
+
parsanol (= 1.3.114)
|
|
1062
1060
|
pubid (~> 2.0)
|
|
1063
1061
|
rake (~> 13.0)
|
|
1064
1062
|
relaton-render (~> 3.0)
|
|
@@ -1067,6 +1065,7 @@ DEPENDENCIES
|
|
|
1067
1065
|
rubocop-performance
|
|
1068
1066
|
sassc-embedded (~> 1)
|
|
1069
1067
|
simplecov (~> 0.15)
|
|
1068
|
+
svg_conform (= 0.2.4)
|
|
1070
1069
|
timecop (~> 0.9)
|
|
1071
1070
|
webmock
|
|
1072
1071
|
|
|
@@ -1119,7 +1118,6 @@ CHECKSUMS
|
|
|
1119
1118
|
emf (0.2.0-x86_64-darwin) sha256=1c447c202335b91d66ec422646326a27e2a3329bf8d15e4dd5aa9dbe14ca8ad1
|
|
1120
1119
|
emf (0.2.0-x86_64-linux-gnu) sha256=393f7d558034e924379246ca3be9ac7e1293d4cb975ff6992f87256dd7cfb7a7
|
|
1121
1120
|
emfsvg (0.1.3) sha256=5a8444997a557efbd6a967c66f95f21e2e837b53f6dda5f07a8bec817e830565
|
|
1122
|
-
equivalent-xml (0.6.0) sha256=8919761efa848ad0846369ff8be1f646b17e5061698c4867b09829000cc3f487
|
|
1123
1121
|
erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
|
|
1124
1122
|
expressir (2.4.44) sha256=f6252e3b1886265fb569e7bc879da5f2fc5305863ee8f22dd617c47cf355b5ea
|
|
1125
1123
|
expressir (2.4.44-aarch64-linux) sha256=e0b49db7b11d7dc766aae292cbe6e235e9bb2c7d40cebd85fea821bac9c5643a
|
|
@@ -1208,7 +1206,7 @@ CHECKSUMS
|
|
|
1208
1206
|
metanorma-core (0.2.5.pre.alpha.1) sha256=6097e11ead9907850da0160afd9b5e03a4226324eba5afc14e97fe8a6c49ec69
|
|
1209
1207
|
metanorma-document (0.5.2.pre.alpha.2) sha256=7f035f37fed887ec78d06eb7c79097c669f589c639799d6fecbe2ea47b6e7601
|
|
1210
1208
|
metanorma-iso (3.5.1.pre.alpha.3)
|
|
1211
|
-
metanorma-jis (1.2.
|
|
1209
|
+
metanorma-jis (1.2.2)
|
|
1212
1210
|
metanorma-mirror (1.0.0)
|
|
1213
1211
|
metanorma-mko (1.1.1) sha256=4c8fb55b485b49341c28cad0e862889e5d3855547adf21accce627714a35a41a
|
|
1214
1212
|
metanorma-plugin-asciichem (0.1.4) sha256=47711680f202c60f9f698b721e1df3c3e6dcb1b9d6683cb1edcef84d6cda61a8
|
|
@@ -1252,13 +1250,13 @@ CHECKSUMS
|
|
|
1252
1250
|
ox (2.14.29) sha256=206736d5a8dade9dca10cf72022bc157ad6ca3eecaba3853918426ed88e12dc2
|
|
1253
1251
|
paint (2.3.0) sha256=327d623e4038619d5bd99ae5db07973859cd78400c7f0329eea283cef8e83be5
|
|
1254
1252
|
parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970
|
|
1255
|
-
parsanol (1.3.
|
|
1256
|
-
parsanol (1.3.
|
|
1257
|
-
parsanol (1.3.
|
|
1258
|
-
parsanol (1.3.
|
|
1259
|
-
parsanol (1.3.
|
|
1260
|
-
parsanol (1.3.
|
|
1261
|
-
parsanol (1.3.
|
|
1253
|
+
parsanol (1.3.114) sha256=0f41c7a3914627f3f5080f8e5094aa6316a22d9f3aec91bd3a7a80ce000f7b94
|
|
1254
|
+
parsanol (1.3.114-aarch64-linux) sha256=777f61fa6dbad9ef8d4027c2130ba5dfdbec284c0e82016169bb3f8f8a6c388d
|
|
1255
|
+
parsanol (1.3.114-arm64-darwin) sha256=1a2334e6201eac44dfe6b61a01b5ecd945fbb0123b480037c296aaf0c18ff9ce
|
|
1256
|
+
parsanol (1.3.114-x64-mingw-ucrt) sha256=3de15997f1bb21082709c8382d42731bd1d300920bd9dc6e6bec94cc5136b3ea
|
|
1257
|
+
parsanol (1.3.114-x64-mingw32) sha256=c55b6bf4db15af8f0b0eee2946648398fc531b54c4712ea00302ff5d4ec85c2b
|
|
1258
|
+
parsanol (1.3.114-x86_64-darwin) sha256=0726d5adbcfde9f02d9a1fed05fb7e270786258265a853098a85d138e4c3128a
|
|
1259
|
+
parsanol (1.3.114-x86_64-linux) sha256=e51f4209bb68f18d4913836c4483ea23f403f76219c19b678966bb01c023d67f
|
|
1262
1260
|
parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
|
|
1263
1261
|
parslet (2.0.0) sha256=d45130695d39b43d7e6a91f4d2ec66b388a8d822bae38de9b4de9a5fbde1f606
|
|
1264
1262
|
plane1converter (0.0.1) sha256=86c5dd19ba46c013c0e1780499657702a21d75e05611275714db2dc3773703a9
|
|
@@ -20,6 +20,23 @@
|
|
|
20
20
|
</xsl:variable>
|
|
21
21
|
<xsl:variable name="numbers_japanese" select="xalan:nodeset($numbers_japanese_)"/>
|
|
22
22
|
|
|
23
|
+
<xsl:variable name="variables_">
|
|
24
|
+
<xsl:for-each select="//mn:metanorma">
|
|
25
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
26
|
+
|
|
27
|
+
<xsl:variable name="current_document">
|
|
28
|
+
<xsl:copy-of select="."/>
|
|
29
|
+
</xsl:variable>
|
|
30
|
+
|
|
31
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
32
|
+
<mnx:doc num="{$num}">
|
|
33
|
+
|
|
34
|
+
</mnx:doc>
|
|
35
|
+
</xsl:for-each>
|
|
36
|
+
</xsl:for-each>
|
|
37
|
+
</xsl:variable>
|
|
38
|
+
<xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
|
|
39
|
+
|
|
23
40
|
<xsl:variable name="contents_">
|
|
24
41
|
<xsl:variable name="bundle" select="count(//mn:metanorma) > 1"/>
|
|
25
42
|
|
|
@@ -21093,6 +21110,23 @@
|
|
|
21093
21110
|
</xsl:choose>
|
|
21094
21111
|
</xsl:template>
|
|
21095
21112
|
|
|
21113
|
+
<xsl:template name="getVariable">
|
|
21114
|
+
<xsl:param name="variable"/>
|
|
21115
|
+
<!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
|
|
21116
|
+
in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
|
|
21117
|
+
<xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
|
|
21118
|
+
<xsl:value-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]"/>
|
|
21119
|
+
</xsl:template>
|
|
21120
|
+
|
|
21121
|
+
<!-- get variable value with the internal elements(nodes), e.g. formatting -->
|
|
21122
|
+
<xsl:template name="getVariableCopyOf">
|
|
21123
|
+
<xsl:param name="variable"/>
|
|
21124
|
+
<!-- Note: need insert <xsl:variable name="setVariable" select="java:org.metanorma.fop.global.Variables.setVariable('num', $num)"/> before
|
|
21125
|
+
in the iteration <xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma"> -->
|
|
21126
|
+
<xsl:variable name="num" select="number(java:org.metanorma.fop.global.Variables.getVariable('num'))"/>
|
|
21127
|
+
<xsl:copy-of select="$variables/mnx:doc[@num = $num]/*[local-name() = $variable]/node()"/>
|
|
21128
|
+
</xsl:template>
|
|
21129
|
+
|
|
21096
21130
|
<!-- ============================================= -->
|
|
21097
21131
|
<!-- mode="print_as_xml", for debug purposes -->
|
|
21098
21132
|
<!-- ============================================= -->
|
|
@@ -7,6 +7,11 @@ module Metanorma
|
|
|
7
7
|
XML_ROOT_TAG = "jis-standard".freeze
|
|
8
8
|
XML_NAMESPACE = "https://www.metanorma.org/ns/jis".freeze
|
|
9
9
|
|
|
10
|
+
# Registration side effect: Asciidoctor resolves the converter
|
|
11
|
+
# for the `backend: :jis` document attribute through the global
|
|
12
|
+
# registry built here, before this class is ever referenced by
|
|
13
|
+
# name. lib/metanorma-jis.rb force-loads this file for that
|
|
14
|
+
# reason; see the comment there.
|
|
10
15
|
register_for "jis"
|
|
11
16
|
|
|
12
17
|
def init_i18n(node)
|
|
@@ -49,7 +49,11 @@ module Metanorma
|
|
|
49
49
|
IsoDoc::Jis::HtmlConvert.new(options)
|
|
50
50
|
.convert(inname, xml, nil, outname)
|
|
51
51
|
when :docx
|
|
52
|
-
|
|
52
|
+
# The compile's pooled path passes xml=nil with the presentation
|
|
53
|
+
# XML path as inname (IsoDoc convention: read it yourself); the
|
|
54
|
+
# Adapter takes content, so bridge the two here.
|
|
55
|
+
content = xml || File.read(inname, encoding: "utf-8")
|
|
56
|
+
::IsoDoc::Jis::Docx::Adapter.new.convert(content, outname)
|
|
53
57
|
when :pdf
|
|
54
58
|
IsoDoc::Jis::PdfConvert.new(options)
|
|
55
59
|
.convert(inname, xml, nil, outname)
|
data/lib/metanorma-jis.rb
CHANGED
|
@@ -2,6 +2,12 @@ require "asciidoctor" unless defined? Asciidoctor::Converter
|
|
|
2
2
|
require "metanorma-core"
|
|
3
3
|
require "metanorma-iso"
|
|
4
4
|
require "metanorma/jis"
|
|
5
|
+
# Force-load: `register_for "jis"` (inside) must run before any
|
|
6
|
+
# Asciidoctor.load with backend :jis. The autoload in metanorma/jis.rb
|
|
7
|
+
# never fires on its own — nothing references the constant first — so
|
|
8
|
+
# bare FlavorLoader paths (e.g. `metanorma site generate`) crashed with
|
|
9
|
+
# "missing converter for backend 'jis'".
|
|
10
|
+
require "metanorma/jis/converter"
|
|
5
11
|
require "isodoc/jis"
|
|
6
12
|
|
|
7
13
|
if defined? Metanorma::Registry
|
data/metanorma-jis.gemspec
CHANGED
|
@@ -36,9 +36,8 @@ Gem::Specification.new do |spec|
|
|
|
36
36
|
spec.add_dependency "pubid"
|
|
37
37
|
spec.add_dependency "uniword", "~> 1.5"
|
|
38
38
|
|
|
39
|
-
spec.add_development_dependency "canon"# , "= 0.2.3"
|
|
40
39
|
spec.add_development_dependency "debug"
|
|
41
|
-
spec.add_development_dependency "
|
|
40
|
+
spec.add_development_dependency "canon", "~> 0.3"
|
|
42
41
|
spec.add_development_dependency "guard", "~> 2.14"
|
|
43
42
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
|
44
43
|
spec.add_development_dependency "iev", "~> 0.3.0"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-jis
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: japanese_calendar
|
|
@@ -80,20 +80,6 @@ dependencies:
|
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '1.5'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: canon
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - ">="
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0'
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - ">="
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '0'
|
|
97
83
|
- !ruby/object:Gem::Dependency
|
|
98
84
|
name: debug
|
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -109,19 +95,19 @@ dependencies:
|
|
|
109
95
|
- !ruby/object:Gem::Version
|
|
110
96
|
version: '0'
|
|
111
97
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
98
|
+
name: canon
|
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
|
114
100
|
requirements:
|
|
115
101
|
- - "~>"
|
|
116
102
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0.
|
|
103
|
+
version: '0.3'
|
|
118
104
|
type: :development
|
|
119
105
|
prerelease: false
|
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
107
|
requirements:
|
|
122
108
|
- - "~>"
|
|
123
109
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0.
|
|
110
|
+
version: '0.3'
|
|
125
111
|
- !ruby/object:Gem::Dependency
|
|
126
112
|
name: guard
|
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -307,6 +293,7 @@ files:
|
|
|
307
293
|
- CLAUDE.md
|
|
308
294
|
- CODE_OF_CONDUCT.md
|
|
309
295
|
- Gemfile
|
|
296
|
+
- Gemfile.devel
|
|
310
297
|
- Gemfile.lock
|
|
311
298
|
- LICENSE
|
|
312
299
|
- README.adoc
|