metanorma-jis 1.0.6 → 1.0.7
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/lib/isodoc/jis/jis.international-standard.xsl +115 -9
- data/lib/metanorma/jis/version.rb +1 -1
- data/metanorma-jis.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: 9264a84cbb934b379ad2cee784fadbeec0b01e850daf28f4b67a8ba8c5668502
|
|
4
|
+
data.tar.gz: 210ea73f892f813acec0b10bc01326eaeaa5cea7e6060ab6b736b34f21c33b5c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3de4b8aa200abf1c3b5c6cd1ad9a0387a19e6921f26223511130640cd6b414d19681d7abe698987dacc1d2e9f52dd6bb1a8ad8dafc4ed1092f6ca56875a47c51
|
|
7
|
+
data.tar.gz: db5922a87e7c4a4ae87b147b03d6f3e5ede56c4109c0a43fc87ab4e3779ca4c8505846708e09d050620b71128916fc3a1646c8ebeabe0f33dcc89c7ae9850d38
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
|
|
6
6
|
|
|
7
|
+
<xsl:key name="kid" match="*" use="@id"/>
|
|
8
|
+
|
|
7
9
|
<xsl:variable name="debug">false</xsl:variable>
|
|
8
10
|
|
|
9
11
|
<!-- <xsl:variable name="isIgnoreComplexScripts">true</xsl:variable> -->
|
|
@@ -1017,6 +1019,7 @@
|
|
|
1017
1019
|
<xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
|
|
1018
1020
|
<!-- fill ToC -->
|
|
1019
1021
|
<fo:block role="TOC">
|
|
1022
|
+
<xsl:copy-of select="@id"/>
|
|
1020
1023
|
|
|
1021
1024
|
<xsl:call-template name="refine_toc-style"/>
|
|
1022
1025
|
|
|
@@ -1822,6 +1825,7 @@
|
|
|
1822
1825
|
</xsl:template>
|
|
1823
1826
|
|
|
1824
1827
|
<xsl:template match="mn:preface/mn:clause" priority="3">
|
|
1828
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
1825
1829
|
<fo:block>
|
|
1826
1830
|
<xsl:call-template name="setId"/>
|
|
1827
1831
|
<xsl:call-template name="addReviewHelper"/>
|
|
@@ -1880,11 +1884,23 @@
|
|
|
1880
1884
|
<!-- to space-before Foreword -->
|
|
1881
1885
|
<xsl:if test="@ancestor = 'foreword' and $level = '1'"><fo:block/></xsl:if>
|
|
1882
1886
|
|
|
1887
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
1888
|
+
|
|
1883
1889
|
<xsl:variable name="title_styles"><styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles></xsl:variable>
|
|
1884
1890
|
|
|
1885
1891
|
<xsl:choose>
|
|
1886
1892
|
<xsl:when test="@inline-header = 'true' and following-sibling::*[1][self::mn:p]">
|
|
1887
1893
|
<fo:block role="H{$level}">
|
|
1894
|
+
<fo:inline>
|
|
1895
|
+
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
1896
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
|
1897
|
+
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
|
|
1898
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1899
|
+
</xsl:if>
|
|
1900
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
1901
|
+
<xsl:apply-templates/>
|
|
1902
|
+
</fo:inline>
|
|
1903
|
+
<fo:inline padding-right="4mm"> </fo:inline>
|
|
1888
1904
|
<xsl:for-each select="following-sibling::*[1][self::mn:p]">
|
|
1889
1905
|
<xsl:call-template name="paragraph">
|
|
1890
1906
|
<xsl:with-param name="inline-header">true</xsl:with-param>
|
|
@@ -1969,6 +1985,8 @@
|
|
|
1969
1985
|
|
|
1970
1986
|
</xsl:if>
|
|
1971
1987
|
|
|
1988
|
+
<xsl:call-template name="setIDforNamedDestinationInline"/>
|
|
1989
|
+
|
|
1972
1990
|
<xsl:choose>
|
|
1973
1991
|
<xsl:when test="$vertical_layout = 'true'">
|
|
1974
1992
|
<!-- <xsl:call-template name="extractTitle"/> -->
|
|
@@ -2015,6 +2033,7 @@
|
|
|
2015
2033
|
<!-- ============================= -->
|
|
2016
2034
|
|
|
2017
2035
|
<xsl:template match="mn:term" priority="2">
|
|
2036
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
2018
2037
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
|
2019
2038
|
<xsl:if test="$vertical_layout = 'true'">
|
|
2020
2039
|
<xsl:attribute name="letter-spacing">1mm</xsl:attribute>
|
|
@@ -2027,12 +2046,14 @@
|
|
|
2027
2046
|
</xsl:template>
|
|
2028
2047
|
|
|
2029
2048
|
<xsl:template match="mn:introduction">
|
|
2049
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
2030
2050
|
<fo:block id="{@id}">
|
|
2031
2051
|
<xsl:apply-templates/>
|
|
2032
2052
|
</fo:block>
|
|
2033
2053
|
</xsl:template>
|
|
2034
2054
|
|
|
2035
2055
|
<xsl:template match="mn:annex" priority="2">
|
|
2056
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
2036
2057
|
<fo:block id="{@id}">
|
|
2037
2058
|
</fo:block>
|
|
2038
2059
|
<xsl:apply-templates/>
|
|
@@ -2051,7 +2072,14 @@
|
|
|
2051
2072
|
<xsl:otherwise>
|
|
2052
2073
|
|
|
2053
2074
|
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
|
2054
|
-
<xsl:variable name="element-name">
|
|
2075
|
+
<xsl:variable name="element-name">
|
|
2076
|
+
<xsl:choose>
|
|
2077
|
+
<xsl:when test="preceding-sibling::*[1][self::mn:fmt-title]/@inline-header = 'true'">fo:inline</xsl:when>
|
|
2078
|
+
<xsl:otherwise>fo:block</xsl:otherwise>
|
|
2079
|
+
</xsl:choose>
|
|
2080
|
+
</xsl:variable>
|
|
2081
|
+
|
|
2082
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
2055
2083
|
|
|
2056
2084
|
<xsl:variable name="p_styles">
|
|
2057
2085
|
<styles xsl:use-attribute-sets="p-style">
|
|
@@ -6346,6 +6374,46 @@
|
|
|
6346
6374
|
</xsl:template>
|
|
6347
6375
|
|
|
6348
6376
|
<xsl:template name="addNamedDestinationAttribute">
|
|
6377
|
+
<xsl:variable name="docnum"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
6378
|
+
<xsl:variable name="caption_label" select="translate(normalize-space(.//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
6379
|
+
|
|
6380
|
+
<xsl:variable name="named_dest_">
|
|
6381
|
+
<xsl:choose>
|
|
6382
|
+
<xsl:when test="count(ancestor::mn:figure) > 1"/> <!-- prevent id 'a)' -->
|
|
6383
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample or ancestor::mn:admonition"/>
|
|
6384
|
+
<xsl:when test="$caption_label = '' and parent::mn:foreword">
|
|
6385
|
+
<xsl:variable name="foreword_number"><xsl:number count="mn:foreword" level="any"/></xsl:variable>
|
|
6386
|
+
<xsl:if test="$foreword_number = 1">Foreword</xsl:if>
|
|
6387
|
+
</xsl:when>
|
|
6388
|
+
<xsl:when test="$caption_label = '' and parent::mn:introduction">
|
|
6389
|
+
<xsl:variable name="introduction_number"><xsl:number count="mn:introduction" level="any"/></xsl:variable>
|
|
6390
|
+
<xsl:if test="$introduction_number = 1">Introduction</xsl:if>
|
|
6391
|
+
</xsl:when>
|
|
6392
|
+
<xsl:when test="$caption_label = ''"/>
|
|
6393
|
+
<xsl:when test="../@unnumbered = 'true'"/>
|
|
6394
|
+
<xsl:when test="normalize-space(java:matches(java:java.lang.String.new($caption_label), '[\x21-\xFF]+')) = 'false'"/>
|
|
6395
|
+
<!-- 1.1 in Appendix 1 -->
|
|
6396
|
+
<xsl:otherwise>
|
|
6397
|
+
<xsl:if test="ancestor::mn:annex and string(number(substring($caption_label, 1, 1))) != 'NaN'">
|
|
6398
|
+
<xsl:variable name="annex_caption_label" select="translate(normalize-space(ancestor::mn:annex[1]/mn:fmt-title//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
6399
|
+
<xsl:value-of select="concat($annex_caption_label, '_')"/>
|
|
6400
|
+
</xsl:if>
|
|
6401
|
+
<xsl:if test="parent::mn:formula">Formula</xsl:if>
|
|
6402
|
+
<xsl:value-of select="$caption_label"/>
|
|
6403
|
+
</xsl:otherwise>
|
|
6404
|
+
</xsl:choose>
|
|
6405
|
+
</xsl:variable>
|
|
6406
|
+
<xsl:variable name="named_dest" select="normalize-space($named_dest_)"/>
|
|
6407
|
+
<xsl:if test="$named_dest != ''">
|
|
6408
|
+
<xsl:variable name="named_dest_doc_">
|
|
6409
|
+
<xsl:value-of select="$named_dest"/>
|
|
6410
|
+
<xsl:if test="$docnum != '1'">_<xsl:value-of select="$docnum"/></xsl:if>
|
|
6411
|
+
</xsl:variable>
|
|
6412
|
+
<xsl:variable name="named_dest_doc" select="normalize-space($named_dest_doc_)"/>
|
|
6413
|
+
<xsl:if test="not(key('kid', $named_dest_doc))"> <!-- if element with id '$named_dest_doc' doesn't exist in the document -->
|
|
6414
|
+
<xsl:attribute name="named_dest"><xsl:value-of select="normalize-space($named_dest_doc)"/></xsl:attribute>
|
|
6415
|
+
</xsl:if>
|
|
6416
|
+
</xsl:if>
|
|
6349
6417
|
</xsl:template>
|
|
6350
6418
|
|
|
6351
6419
|
<xsl:template match="mn:fmt-name" mode="update_xml_step1">
|
|
@@ -7381,9 +7449,11 @@
|
|
|
7381
7449
|
</xsl:template>
|
|
7382
7450
|
|
|
7383
7451
|
<xsl:template match="mn:feedback-statement//mn:p">
|
|
7452
|
+
<xsl:param name="skip_id">false</xsl:param>
|
|
7384
7453
|
<xsl:param name="margin"/>
|
|
7385
7454
|
<!-- process in the template 'paragraph' -->
|
|
7386
7455
|
<xsl:call-template name="paragraph">
|
|
7456
|
+
<xsl:with-param name="skip_id" select="$skip_id"/>
|
|
7387
7457
|
<xsl:with-param name="margin" select="$margin"/>
|
|
7388
7458
|
</xsl:call-template>
|
|
7389
7459
|
</xsl:template>
|
|
@@ -13886,7 +13956,12 @@
|
|
|
13886
13956
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
|
13887
13957
|
<xsl:call-template name="setNamedDestination"/>
|
|
13888
13958
|
<fo:block id="{@id}">
|
|
13889
|
-
<
|
|
13959
|
+
<fo:block role="SKIP">
|
|
13960
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
|
13961
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
13962
|
+
</xsl:for-each>
|
|
13963
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
13964
|
+
</fo:block>
|
|
13890
13965
|
</fo:block>
|
|
13891
13966
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
13892
13967
|
</xsl:template>
|
|
@@ -16561,7 +16636,7 @@
|
|
|
16561
16636
|
</xsl:variable>
|
|
16562
16637
|
|
|
16563
16638
|
<xsl:template name="index-pages">
|
|
16564
|
-
<xsl:
|
|
16639
|
+
<xsl:param name="num"/>
|
|
16565
16640
|
|
|
16566
16641
|
<xsl:variable name="docid">
|
|
16567
16642
|
<xsl:call-template name="getDocumentId"/>
|
|
@@ -18498,6 +18573,15 @@
|
|
|
18498
18573
|
</xsl:if>
|
|
18499
18574
|
</xsl:template>
|
|
18500
18575
|
|
|
18576
|
+
<!-- debug templates -->
|
|
18577
|
+
<xsl:template name="debug_contents">
|
|
18578
|
+
<xsl:if test="$debug = 'true'">
|
|
18579
|
+
<redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
|
|
18580
|
+
<xsl:copy-of select="$contents"/>
|
|
18581
|
+
</redirect:write>
|
|
18582
|
+
</xsl:if>
|
|
18583
|
+
</xsl:template>
|
|
18584
|
+
|
|
18501
18585
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
18502
18586
|
<xsl:param name="num"/>
|
|
18503
18587
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
@@ -19732,14 +19816,18 @@
|
|
|
19732
19816
|
</xsl:template>
|
|
19733
19817
|
|
|
19734
19818
|
<xsl:template name="setIDforNamedDestination">
|
|
19735
|
-
<xsl:if test="
|
|
19736
|
-
<xsl:
|
|
19819
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
19820
|
+
<xsl:if test="@named_dest">
|
|
19821
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
|
19822
|
+
</xsl:if>
|
|
19737
19823
|
</xsl:if>
|
|
19738
19824
|
</xsl:template>
|
|
19739
19825
|
|
|
19740
19826
|
<xsl:template name="setIDforNamedDestinationInline">
|
|
19741
|
-
<xsl:if test="
|
|
19742
|
-
<
|
|
19827
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
19828
|
+
<xsl:if test="@named_dest">
|
|
19829
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
|
19830
|
+
</xsl:if>
|
|
19743
19831
|
</xsl:if>
|
|
19744
19832
|
</xsl:template>
|
|
19745
19833
|
|
|
@@ -19749,7 +19837,7 @@
|
|
|
19749
19837
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
19750
19838
|
<fox:destination internal-destination="{@id}"/>
|
|
19751
19839
|
</xsl:if>
|
|
19752
|
-
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
|
19840
|
+
<xsl:for-each select=". | mn:fmt-title[1] | mn:fmt-name[1]">
|
|
19753
19841
|
<xsl:if test="@named_dest">
|
|
19754
19842
|
<fox:destination internal-destination="{@named_dest}"/>
|
|
19755
19843
|
</xsl:if>
|
|
@@ -19757,6 +19845,12 @@
|
|
|
19757
19845
|
</xsl:if>
|
|
19758
19846
|
</xsl:template>
|
|
19759
19847
|
|
|
19848
|
+
<xsl:template name="copyParagraphId">
|
|
19849
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
19850
|
+
<xsl:copy-of select="@id"/>
|
|
19851
|
+
</xsl:if>
|
|
19852
|
+
</xsl:template>
|
|
19853
|
+
|
|
19760
19854
|
<xsl:template name="add-letter-spacing">
|
|
19761
19855
|
<xsl:param name="text"/>
|
|
19762
19856
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
|
@@ -19979,7 +20073,7 @@
|
|
|
19979
20073
|
<xsl:template name="insertCoverPageFullImage">
|
|
19980
20074
|
<xsl:param name="name">coverpage-image</xsl:param>
|
|
19981
20075
|
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
|
|
19982
|
-
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
20076
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
|
|
19983
20077
|
<fo:flow flow-name="xsl-region-body">
|
|
19984
20078
|
<xsl:call-template name="insertBackgroundPageImage">
|
|
19985
20079
|
<xsl:with-param name="number" select="position()"/>
|
|
@@ -20443,6 +20537,18 @@
|
|
|
20443
20537
|
</xsl:attribute>
|
|
20444
20538
|
</xsl:template>
|
|
20445
20539
|
|
|
20540
|
+
<xsl:template name="insert_firstpage_id">
|
|
20541
|
+
<xsl:param name="num"/>
|
|
20542
|
+
<fo:wrapper role="artifact">
|
|
20543
|
+
<fo:block-container absolute-position="fixed" top="1mm">
|
|
20544
|
+
<xsl:if test="$num = 1">
|
|
20545
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
20546
|
+
</xsl:if>
|
|
20547
|
+
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
20548
|
+
</fo:block-container>
|
|
20549
|
+
</fo:wrapper>
|
|
20550
|
+
</xsl:template>
|
|
20551
|
+
|
|
20446
20552
|
<xsl:template name="getCharByCodePoint">
|
|
20447
20553
|
<xsl:param name="codepoint"/>
|
|
20448
20554
|
<xsl:param name="radix">16</xsl:param>
|
data/metanorma-jis.gemspec
CHANGED
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
32
32
|
|
|
33
33
|
spec.add_dependency "japanese_calendar", "~> 0"
|
|
34
|
-
spec.add_dependency "metanorma-iso", "~> 3.
|
|
34
|
+
spec.add_dependency "metanorma-iso", "~> 3.4.0"
|
|
35
35
|
spec.add_dependency "pubid"
|
|
36
36
|
|
|
37
37
|
spec.add_development_dependency "debug"
|
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.0.
|
|
4
|
+
version: 1.0.7
|
|
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-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: japanese_calendar
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 3.
|
|
33
|
+
version: 3.4.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 3.
|
|
40
|
+
version: 3.4.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: pubid
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|