metanorma-jis 0.6.1 → 0.6.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: 3ae16550b824fa8a0e98d33676ab83e93c32e3de519ef3c52e86347e49c29600
4
- data.tar.gz: 806341c51894e499f46055434f1d2130fe7d2b502c9e6673c5c8cb85e43aa671
3
+ metadata.gz: 98094992cf3a869d5f3c7f263bdfb907ef647773965782d3204be741ba15e68f
4
+ data.tar.gz: 48c5da92c8d9d12ece725eaadd2544b0196a2d149f2e67c92f17df9ddc60f027
5
5
  SHA512:
6
- metadata.gz: becd76f3e3b7260b8fdb012d8e1c56c419de280a63c054f8ff63d3dd7048cd657dc66a96c153e0e3f553d61bc9890586496ce0ada3edf8c015a477f3aea6a0d5
7
- data.tar.gz: 27c9e90f4a68fcd56fd423ada507489a401ef74c707674f0dbc964a614018aefeb0f6f7d3895d42b7536978dbf7ef132b5cde09ea371d7e9ad2f86e28430fbdf
6
+ metadata.gz: 29c6303271559325fc30a8e0cc4e491496a553f5fb95939109ba971b90f677c215dc7ce5b5f7fe6bad4c1b1e56baffd2e866d39859f0211efd688711fbab0817
7
+ data.tar.gz: 7c137347ce3dc90fd92e5f697d2687205ab9711e29662fc3ad213b1c426ad8b3db354c11c9899ce380028593dfab1a08653f810e167fdbf9f62e9184ecfdeeff
data/README.adoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-jis.svg["Gem Version", link="https://rubygems.org/gems/metanorma-jis"]
4
4
  image:https://github.com/metanorma/metanorma-jis/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-jis/actions?workflow=rake"]
5
- image:https://codeclimate.com/github/metanorma/metanorma-jis/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-jis"]
5
+ // image:https://codeclimate.com/github/metanorma/metanorma-jis/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-jis"]
6
6
  image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-jis.svg["Pull Requests", link="https://github.com/metanorma/metanorma-jis/pulls"]
7
7
  image:https://img.shields.io/github/commits-since/metanorma/metanorma-jis/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-jis/releases"]
8
8
 
@@ -628,7 +628,7 @@
628
628
  <xsl:attribute name="initial-page-number">1</xsl:attribute>
629
629
  </xsl:if>
630
630
 
631
- <fo:static-content flow-name="xsl-footnote-separator">
631
+ <fo:static-content flow-name="xsl-footnote-separator" role="artifact">
632
632
  <fo:block text-align="center" margin-bottom="6pt">
633
633
  <fo:leader leader-pattern="rule" leader-length="80mm"/>
634
634
  </fo:block>
@@ -803,11 +803,9 @@
803
803
  </xsl:otherwise>
804
804
  </xsl:choose>
805
805
 
806
- <fo:static-content flow-name="xsl-footnote-separator">
807
- <fo:block>
808
- <fo:leader leader-pattern="rule" leader-length="15%"/>
809
- </fo:block>
810
- </fo:static-content>
806
+ <xsl:call-template name="insertFootnoteSeparatorCommon">
807
+ <xsl:with-param name="leader_length">15%</xsl:with-param>
808
+ </xsl:call-template>
811
809
 
812
810
  <xsl:variable name="section_title">
813
811
  <xsl:if test="$isCommentary = 'true'">
@@ -1037,18 +1035,14 @@
1037
1035
  <fo:inline><xsl:if test="not($vertical_layout = 'true')"><xsl:attribute name="font-family">IPAexGothic</xsl:attribute></xsl:if>:</fo:inline>
1038
1036
  </xsl:template>
1039
1037
 
1040
- <xsl:template match="mn:preface/mn:clause[@type = 'toc']" priority="4">
1038
+ <xsl:template match="mn:preface/mn:clause[@type = 'toc']" name="toc" priority="4">
1041
1039
  <xsl:param name="num"/>
1042
1040
  <xsl:apply-templates/>
1043
1041
  <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
1044
1042
  <!-- fill ToC -->
1045
1043
  <fo:block role="TOC">
1046
- <xsl:if test="not($vertical_layout = 'true') and not($lang = 'en')">
1047
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
1048
- </xsl:if>
1049
- <xsl:if test="$vertical_layout = 'true'">
1050
- <xsl:attribute name="font-size">10.5pt</xsl:attribute>
1051
- </xsl:if>
1044
+
1045
+ <xsl:call-template name="refine_toc-style"/>
1052
1046
 
1053
1047
  <xsl:if test="$updated_contents_xml/mnx:doc[@num = $num]//mnx:item[@display = 'true']">
1054
1048
  <xsl:for-each select="$updated_contents_xml/mnx:doc[@num = $num]//mnx:item[@display = 'true'][@level &lt;= $toc_level or @type='figure' or @type = 'table']">
@@ -1117,18 +1111,11 @@
1117
1111
  </xsl:template>
1118
1112
 
1119
1113
  <xsl:template match="mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
1120
- <fo:block text-align="center" font-size="14pt" margin-top="8.5mm">
1121
- <xsl:if test="not($vertical_layout = 'true')">
1122
- <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
1123
- </xsl:if>
1114
+ <fo:block xsl:use-attribute-sets="toc-title-style">
1115
+
1116
+ <xsl:call-template name="refine_toc-title-style"/>
1117
+
1124
1118
  <xsl:if test="$vertical_layout = 'true'">
1125
- <xsl:attribute name="text-align">left</xsl:attribute>
1126
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1127
- <!-- <xsl:attribute name="margin-top">26mm</xsl:attribute> -->
1128
- <!-- Contents -->
1129
- <!-- <xsl:call-template name="getLocalizedString">
1130
- <xsl:with-param name="key">table_of_contents</xsl:with-param>
1131
- </xsl:call-template> -->
1132
1119
  <fo:marker marker-class-name="section_title">
1133
1120
  <xsl:variable name="section_title_"><xsl:apply-templates/></xsl:variable>
1134
1121
  <xsl:variable name="section_title" select="translate($section_title_, ' ', '')"/>
@@ -1139,16 +1126,10 @@
1139
1126
  </xsl:if>
1140
1127
  <xsl:apply-templates/>
1141
1128
  </fo:block>
1142
- <fo:block text-align="right" margin-top="10mm">
1143
- <xsl:if test="not($vertical_layout = 'true')">
1144
- <xsl:attribute name="font-family">IPAexMincho</xsl:attribute>
1145
- <xsl:attribute name="font-size">8pt</xsl:attribute>
1146
- </xsl:if>
1147
- <xsl:if test="$vertical_layout = 'true'">
1148
- <xsl:attribute name="font-size">10.5pt</xsl:attribute>
1149
- <xsl:attribute name="margin-top">1mm</xsl:attribute>
1150
- <xsl:attribute name="margin-bottom">6mm</xsl:attribute>
1151
- </xsl:if>
1129
+ <fo:block xsl:use-attribute-sets="toc-title-page-style">
1130
+
1131
+ <xsl:call-template name="refine_toc-title-page-style"/>
1132
+
1152
1133
  <!-- Page -->
1153
1134
  <xsl:call-template name="getLocalizedString">
1154
1135
  <xsl:with-param name="key">locality.page</xsl:with-param>
@@ -1157,7 +1138,7 @@
1157
1138
  </xsl:template>
1158
1139
 
1159
1140
  <xsl:template name="insertTocItem">
1160
- <fo:block text-align-last="justify" role="SKIP">
1141
+ <fo:block xsl:use-attribute-sets="toc-item-style">
1161
1142
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{normalize-space(mnx:title)}">
1162
1143
  <fo:inline>
1163
1144
  <xsl:if test="$vertical_layout = 'true'">
@@ -1166,7 +1147,7 @@
1166
1147
  <xsl:apply-templates select="mnx:title"/>
1167
1148
  </fo:inline>
1168
1149
  <fo:inline keep-together.within-line="always">
1169
- <fo:leader leader-pattern="dots">
1150
+ <fo:leader xsl:use-attribute-sets="toc-leader-style">
1170
1151
  <xsl:if test="$vertical_layout = 'true'">
1171
1152
  <xsl:attribute name="leader-pattern">rule</xsl:attribute>
1172
1153
  <xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
@@ -1594,7 +1575,7 @@
1594
1575
  <xsl:param name="copyrightText"/>
1595
1576
  <fo:page-sequence master-reference="document" force-page-count="no-force">
1596
1577
 
1597
- <fo:static-content flow-name="xsl-footnote-separator">
1578
+ <fo:static-content flow-name="xsl-footnote-separator" role="artifact">
1598
1579
  <fo:block text-align="center" margin-bottom="6pt">
1599
1580
  <fo:leader leader-pattern="rule" leader-length="80mm" rule-style="solid" rule-thickness="0.3pt"/>
1600
1581
  </fo:block>
@@ -15405,7 +15386,7 @@
15405
15386
 
15406
15387
  <xsl:template name="insertFootnoteSeparatorCommon">
15407
15388
  <xsl:param name="leader_length">30%</xsl:param>
15408
- <fo:static-content flow-name="xsl-footnote-separator">
15389
+ <fo:static-content flow-name="xsl-footnote-separator" role="artifact">
15409
15390
  <fo:block>
15410
15391
  <fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
15411
15392
  </fo:block>
@@ -16282,14 +16263,47 @@
16282
16263
  </xsl:attribute-set>
16283
16264
 
16284
16265
  <xsl:template name="refine_toc-style">
16266
+ <xsl:if test="not($vertical_layout = 'true') and not($lang = 'en')">
16267
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
16268
+ </xsl:if>
16269
+ <xsl:if test="$vertical_layout = 'true'">
16270
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
16271
+ </xsl:if>
16285
16272
  </xsl:template>
16286
16273
 
16287
16274
  <xsl:attribute-set name="toc-title-style">
16275
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
16276
+ <xsl:attribute name="text-align">center</xsl:attribute>
16277
+ <xsl:attribute name="margin-top">8.5mm</xsl:attribute>
16288
16278
  </xsl:attribute-set>
16289
16279
 
16280
+ <xsl:template name="refine_toc-title-style">
16281
+ <xsl:if test="not($vertical_layout = 'true')">
16282
+ <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
16283
+ </xsl:if>
16284
+ <xsl:if test="$vertical_layout = 'true'">
16285
+ <xsl:attribute name="text-align">left</xsl:attribute>
16286
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
16287
+ </xsl:if>
16288
+ </xsl:template>
16289
+
16290
16290
  <xsl:attribute-set name="toc-title-page-style">
16291
+ <xsl:attribute name="text-align">right</xsl:attribute>
16292
+ <xsl:attribute name="margin-top">10mm</xsl:attribute>
16291
16293
  </xsl:attribute-set> <!-- toc-title-page-style -->
16292
16294
 
16295
+ <xsl:template name="refine_toc-title-page-style">
16296
+ <xsl:if test="not($vertical_layout = 'true')">
16297
+ <xsl:attribute name="font-family">IPAexMincho</xsl:attribute>
16298
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
16299
+ </xsl:if>
16300
+ <xsl:if test="$vertical_layout = 'true'">
16301
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
16302
+ <xsl:attribute name="margin-top">1mm</xsl:attribute>
16303
+ <xsl:attribute name="margin-bottom">6mm</xsl:attribute>
16304
+ </xsl:if>
16305
+ </xsl:template>
16306
+
16293
16307
  <xsl:attribute-set name="toc-item-block-style">
16294
16308
  </xsl:attribute-set>
16295
16309
 
@@ -16298,12 +16312,15 @@
16298
16312
 
16299
16313
  <xsl:attribute-set name="toc-item-style">
16300
16314
  <xsl:attribute name="role">TOCI</xsl:attribute>
16315
+ <xsl:attribute name="text-align-last">justify</xsl:attribute>
16316
+ <xsl:attribute name="role">SKIP</xsl:attribute>
16301
16317
  </xsl:attribute-set> <!-- END: toc-item-style -->
16302
16318
 
16303
16319
  <xsl:template name="refine_toc-item-style">
16304
16320
  </xsl:template> <!-- END: refine_toc-item-style -->
16305
16321
 
16306
16322
  <xsl:attribute-set name="toc-leader-style">
16323
+ <xsl:attribute name="leader-pattern">dots</xsl:attribute>
16307
16324
  </xsl:attribute-set> <!-- END: toc-leader-style -->
16308
16325
 
16309
16326
  <xsl:attribute-set name="toc-pagenumber-style">
@@ -16313,6 +16330,9 @@
16313
16330
  <xsl:attribute-set name="toc-listof-title-style">
16314
16331
  </xsl:attribute-set>
16315
16332
 
16333
+ <xsl:template name="refine_toc-listof-title-style">
16334
+ </xsl:template>
16335
+
16316
16336
  <xsl:attribute-set name="toc-listof-item-block-style">
16317
16337
  </xsl:attribute-set>
16318
16338
 
@@ -16657,7 +16677,7 @@
16657
16677
  </xsl:if>
16658
16678
 
16659
16679
  <xsl:for-each select="$contents_nodes/mnx:doc">
16660
- <fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
16680
+ <fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
16661
16681
  <xsl:if test="@bundle = 'true'">
16662
16682
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
16663
16683
  </xsl:if>
@@ -16691,7 +16711,7 @@
16691
16711
  </xsl:choose>
16692
16712
  </fo:bookmark-title>
16693
16713
 
16694
- <xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
16714
+ <xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
16695
16715
 
16696
16716
  <xsl:call-template name="insertFigureBookmarks">
16697
16717
  <xsl:with-param name="contents" select="mnx:contents"/>
@@ -1291,13 +1291,13 @@ Restricted recursively to contain only other such inline elements with no identi
1291
1291
  <ref name="pure_strike"/>
1292
1292
  <ref name="pure_smallcap"/>
1293
1293
  <ref name="br"/>
1294
+ <ref name="stem"/>
1294
1295
  </choice>
1295
1296
  </define>
1296
1297
  <define name="NestedTextElement">
1297
1298
  <a:documentation>Contents of TextElement tags: leaves out tags that should occur only at top level of block: bookmark image hr pagebreak</a:documentation>
1298
1299
  <choice>
1299
1300
  <ref name="PureTextElement"/>
1300
- <ref name="stem"/>
1301
1301
  <ref name="eref"/>
1302
1302
  <ref name="xref"/>
1303
1303
  <ref name="hyperlink"/>
@@ -42,36 +42,6 @@ All IdRefType instances point not to `@id` in Semantic XML, which is the Content
42
42
  but to `@anchor`, the user-supplied cross-reference</a:documentation>
43
43
  <text/>
44
44
  </define>
45
- <define name="index-primary">
46
- <element name="primary">
47
- <oneOrMore>
48
- <choice>
49
- <ref name="PureTextElement"/>
50
- <ref name="stem"/>
51
- </choice>
52
- </oneOrMore>
53
- </element>
54
- </define>
55
- <define name="index-secondary">
56
- <element name="secondary">
57
- <oneOrMore>
58
- <choice>
59
- <ref name="PureTextElement"/>
60
- <ref name="stem"/>
61
- </choice>
62
- </oneOrMore>
63
- </element>
64
- </define>
65
- <define name="index-tertiary">
66
- <element name="tertiary">
67
- <oneOrMore>
68
- <choice>
69
- <ref name="PureTextElement"/>
70
- <ref name="stem"/>
71
- </choice>
72
- </oneOrMore>
73
- </element>
74
- </define>
75
45
  <define name="review">
76
46
  <a:documentation>Generalise BasicDoc element from just review comments, to general annotations;
77
47
  the type attribute defaults to `review` for reviews</a:documentation>
@@ -592,28 +562,6 @@ normative or informative references, some split references into sections organiz
592
562
  </oneOrMore>
593
563
  </element>
594
564
  </define>
595
- <define name="sub">
596
- <a:documentation>Subscript text. Corresponds to HTML `sub</a:documentation>
597
- <element name="sub">
598
- <zeroOrMore>
599
- <choice>
600
- <ref name="PureTextElement"/>
601
- <ref name="stem"/>
602
- </choice>
603
- </zeroOrMore>
604
- </element>
605
- </define>
606
- <define name="sup">
607
- <a:documentation>Superscript text. Corresponds to HTML `sup`</a:documentation>
608
- <element name="sup">
609
- <zeroOrMore>
610
- <choice>
611
- <ref name="PureTextElement"/>
612
- <ref name="stem"/>
613
- </choice>
614
- </zeroOrMore>
615
- </element>
616
- </define>
617
565
  <define name="pagebreak">
618
566
  <a:documentation>Page break. Only applicable in paged layouts (e.g. PDF, Word), and not flow layouts (e.g. HTML)</a:documentation>
619
567
  <element name="pagebreak">
@@ -1094,7 +1042,6 @@ That concept may be defined as a term within the current document, or it may be
1094
1042
  <zeroOrMore>
1095
1043
  <choice>
1096
1044
  <ref name="PureTextElement"/>
1097
- <ref name="stem"/>
1098
1045
  <ref name="index"/>
1099
1046
  <ref name="index-xref"/>
1100
1047
  </choice>
@@ -1107,7 +1054,6 @@ That concept may be defined as a term within the current document, or it may be
1107
1054
  <zeroOrMore>
1108
1055
  <choice>
1109
1056
  <ref name="PureTextElement"/>
1110
- <ref name="stem"/>
1111
1057
  <ref name="index"/>
1112
1058
  <ref name="index-xref"/>
1113
1059
  </choice>
@@ -2025,10 +1971,7 @@ used in document amendments</a:documentation>
2025
1971
  <element name="name">
2026
1972
  <a:documentation>The symbolic form of the designation</a:documentation>
2027
1973
  <oneOrMore>
2028
- <choice>
2029
- <ref name="PureTextElement"/>
2030
- <ref name="stem"/>
2031
- </choice>
1974
+ <ref name="PureTextElement"/>
2032
1975
  </oneOrMore>
2033
1976
  </element>
2034
1977
  </element>
@@ -2081,7 +2024,6 @@ used in document amendments</a:documentation>
2081
2024
  <zeroOrMore>
2082
2025
  <choice>
2083
2026
  <ref name="PureTextElement"/>
2084
- <ref name="stem"/>
2085
2027
  <ref name="index"/>
2086
2028
  <ref name="index-xref"/>
2087
2029
  </choice>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Jis
3
- VERSION = "0.6.1".freeze
3
+ VERSION = "0.6.2".freeze
4
4
  end
5
5
  end
6
6
 
@@ -47,5 +47,5 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency "simplecov", "~> 0.15"
48
48
  spec.add_development_dependency "timecop", "~> 0.9"
49
49
  spec.add_development_dependency "webmock"
50
- spec.add_development_dependency "xml-c14n"
50
+ spec.add_development_dependency "canon"
51
51
  end
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: 0.6.1
4
+ version: 0.6.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: 2025-07-21 00:00:00.000000000 Z
11
+ date: 2025-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: japanese_calendar
@@ -235,7 +235,7 @@ dependencies:
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
237
  - !ruby/object:Gem::Dependency
238
- name: xml-c14n
238
+ name: canon
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - ">="