metanorma-jis 0.6.0 → 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: 6a97d43bcc7cfe72372d3ba002193451b0702bddd5ff2a5c7dee75a5a7c61085
4
- data.tar.gz: 340ccc61aca2bd7ecac371b64e9a7dcf87ea5bf0f6bbb8ef9606240a1fae6e73
3
+ metadata.gz: 98094992cf3a869d5f3c7f263bdfb907ef647773965782d3204be741ba15e68f
4
+ data.tar.gz: 48c5da92c8d9d12ece725eaadd2544b0196a2d149f2e67c92f17df9ddc60f027
5
5
  SHA512:
6
- metadata.gz: 19f570ff8e6d5b5eef3efe3bf8c7ffe4798eb6fa3d65ab7e868c3f46bab997c647e96825cd1e107d8c6db631d64807fc5f57b75432e5c3809720d1a4d88920cc
7
- data.tar.gz: 6c363bc9e2a13c536de107822eae3b623bf00987fa7b6697011c5147bb1b3b0e32fed170d984b3e316efed2ef2cbaba901e90f5c14727036a16a5c52ffc2ff87
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
 
@@ -21,7 +21,7 @@ module IsoDoc
21
21
  # use Japanese ordinals for era years
22
22
  def japanese_date(date)
23
23
  date.nil? and return date
24
- d = date.split(/-/).map(&:to_i)
24
+ d = date.split("-").map(&:to_i)
25
25
  time = Date.new(*d)
26
26
  yr = japanese_year(time)
27
27
  case d.size
@@ -86,7 +86,7 @@
86
86
  <fo:region-end region-name="right-region" extent="22mm"/>
87
87
  </fo:simple-page-master>
88
88
 
89
- <fo:simple-page-master master-name="cover-page_2024" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
89
+ <fo:simple-page-master master-name="cover-page_vertical_layout" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
90
90
  <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
91
91
  fo:region-body/@margin-top = left margin
92
92
  fo:region-body/@margin-bottom = right margin
@@ -170,7 +170,7 @@
170
170
  <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
171
171
  </fo:simple-page-master>
172
172
 
173
- <fo:page-sequence-master master-name="document_toc">
173
+ <fo:page-sequence-master master-name="toc">
174
174
  <fo:repeatable-page-master-alternatives>
175
175
  <fo:conditional-page-master-reference page-position="first" master-reference="first_page_toc"/>
176
176
  <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
@@ -179,7 +179,7 @@
179
179
  </fo:page-sequence-master>
180
180
 
181
181
  <xsl:if test="1 = 3">
182
- <fo:simple-page-master master-name="document_toc_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
182
+ <fo:simple-page-master master-name="toc_vertical_layout" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
183
183
  <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
184
184
  fo:region-body/@margin-top = left margin
185
185
  fo:region-body/@margin-bottom = right margin
@@ -195,7 +195,7 @@
195
195
  </fo:simple-page-master>
196
196
  </xsl:if>
197
197
 
198
- <fo:simple-page-master master-name="document_toc_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
198
+ <fo:simple-page-master master-name="toc_vertical_layout" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
199
199
  <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
200
200
  fo:region-body/@margin-top = left margin
201
201
  fo:region-body/@margin-bottom = right margin
@@ -210,7 +210,7 @@
210
210
  <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
211
211
  </fo:simple-page-master>
212
212
 
213
- <fo:page-sequence-master master-name="document_preface">
213
+ <fo:page-sequence-master master-name="preface">
214
214
  <fo:repeatable-page-master-alternatives>
215
215
  <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
216
216
  <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
@@ -232,7 +232,7 @@
232
232
  </fo:repeatable-page-master-alternatives>
233
233
  </fo:page-sequence-master>
234
234
 
235
- <fo:simple-page-master master-name="document_2024" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
235
+ <fo:simple-page-master master-name="document_vertical_layout" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
236
236
  <xsl:if test="$isGenerateTableIF = 'true'">
237
237
  <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
238
238
  <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
@@ -255,7 +255,7 @@
255
255
  <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
256
256
  </fo:simple-page-master>
257
257
 
258
- <fo:simple-page-master master-name="document_2024_page" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
258
+ <fo:simple-page-master master-name="document_vertical_layout_page" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
259
259
  <xsl:if test="$isGenerateTableIF = 'true'">
260
260
  <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
261
261
  <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
@@ -277,7 +277,7 @@
277
277
  <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/> <!-- background-color="blue" -->
278
278
  <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
279
279
  </fo:simple-page-master>
280
- <fo:simple-page-master master-name="document_2024_last" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
280
+ <fo:simple-page-master master-name="document_vertical_layout_last" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
281
281
  <xsl:if test="$isGenerateTableIF = 'true'">
282
282
  <xsl:attribute name="page-width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
283
283
  <xsl:attribute name="page-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
@@ -307,10 +307,10 @@
307
307
  <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/> <!-- background-color="red" -->
308
308
  </fo:simple-page-master>
309
309
 
310
- <fo:page-sequence-master master-name="document_2024_with_last">
310
+ <fo:page-sequence-master master-name="document_vertical_layout_with_last">
311
311
  <fo:repeatable-page-master-alternatives>
312
- <fo:conditional-page-master-reference page-position="last" master-reference="document_2024_last"/>
313
- <fo:conditional-page-master-reference page-position="any" master-reference="document_2024_page"/>
312
+ <fo:conditional-page-master-reference page-position="last" master-reference="document_vertical_layout_last"/>
313
+ <fo:conditional-page-master-reference page-position="any" master-reference="document_vertical_layout_page"/>
314
314
  </fo:repeatable-page-master-alternatives>
315
315
  </fo:page-sequence-master>
316
316
 
@@ -377,7 +377,7 @@
377
377
  </fo:repeatable-page-master-alternatives>
378
378
  </fo:page-sequence-master>
379
379
 
380
- <fo:simple-page-master master-name="back-page_2024" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
380
+ <fo:simple-page-master master-name="back-page" page-width="{$pageWidthA5}mm" page-height="{$pageHeightA5}mm">
381
381
  <!-- Note (for writing-mode="tb-rl", may be due the update for support 'tb-rl' mode):
382
382
  fo:region-body/@margin-top = left margin
383
383
  fo:region-body/@margin-bottom = right margin
@@ -547,10 +547,10 @@
547
547
 
548
548
  <xsl:choose>
549
549
  <xsl:when test="self::mn:clause and @type = 'toc'">
550
- <fo:page-sequence master-reference="document_toc" force-page-count="no-force">
550
+ <fo:page-sequence master-reference="toc" force-page-count="no-force">
551
551
 
552
552
  <xsl:if test="$vertical_layout = 'true'">
553
- <xsl:attribute name="master-reference">document_toc_2024</xsl:attribute>
553
+ <xsl:attribute name="master-reference">toc_vertical_layout</xsl:attribute>
554
554
  <xsl:attribute name="format">一</xsl:attribute>
555
555
  </xsl:if>
556
556
 
@@ -617,10 +617,10 @@
617
617
 
618
618
  <xsl:if test="$paged_xml_preface/mn:page and count($paged_xml_preface/mn:page/*) != 0">
619
619
  <!-- Preface pages -->
620
- <fo:page-sequence master-reference="document_preface" force-page-count="no-force">
620
+ <fo:page-sequence master-reference="preface" force-page-count="no-force">
621
621
 
622
622
  <xsl:if test="$vertical_layout = 'true'">
623
- <xsl:attribute name="master-reference">document_2024</xsl:attribute>
623
+ <xsl:attribute name="master-reference">document_vertical_layout</xsl:attribute>
624
624
  <xsl:attribute name="format">一</xsl:attribute>
625
625
  </xsl:if>
626
626
 
@@ -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>
@@ -679,7 +679,7 @@
679
679
  <xsl:if test="not($vertical_layout = 'true') and not($doctype = 'technical-specification')">
680
680
 
681
681
  <!-- Document type rendering -->
682
- <fo:page-sequence master-reference="document_preface" force-page-count="no-force">
682
+ <fo:page-sequence master-reference="preface" force-page-count="no-force">
683
683
  <xsl:call-template name="insertHeaderFooter">
684
684
  <xsl:with-param name="docidentifier" select="$docidentifier"/>
685
685
  <xsl:with-param name="copyrightText" select="$copyrightText"/>
@@ -779,9 +779,9 @@
779
779
 
780
780
  <xsl:choose>
781
781
  <xsl:when test="$vertical_layout = 'true'">
782
- <xsl:attribute name="master-reference">document_2024</xsl:attribute>
782
+ <xsl:attribute name="master-reference">document_vertical_layout</xsl:attribute>
783
783
  <xsl:if test="position() = last()">
784
- <xsl:attribute name="master-reference">document_2024_with_last</xsl:attribute>
784
+ <xsl:attribute name="master-reference">document_vertical_layout_with_last</xsl:attribute>
785
785
  </xsl:if>
786
786
 
787
787
  <xsl:attribute name="format">一</xsl:attribute>
@@ -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'">
@@ -996,7 +994,7 @@
996
994
  <xsl:variable name="copyrightText"><xsl:call-template name="get_copyrightText"/></xsl:variable>
997
995
  <xsl:choose>
998
996
  <xsl:when test="$vertical_layout = 'true'">
999
- <xsl:call-template name="insertCoverPage2024">
997
+ <xsl:call-template name="insertCoverPageVerticalLayout">
1000
998
  <xsl:with-param name="num" select="$num"/>
1001
999
  <xsl:with-param name="docidentifier_jis" select="$docidentifier_JIS"/>
1002
1000
  </xsl:call-template>
@@ -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>
@@ -1319,7 +1300,7 @@
1319
1300
  </xsl:variable>
1320
1301
  <xsl:variable name="i18n_JIS" select="normalize-space($i18n_JIS_)"/>
1321
1302
 
1322
- <xsl:template name="insertCoverPage2024">
1303
+ <xsl:template name="insertCoverPageVerticalLayout">
1323
1304
  <xsl:param name="num"/>
1324
1305
  <xsl:param name="docidentifier_jis"/>
1325
1306
 
@@ -1327,7 +1308,7 @@
1327
1308
  <xsl:variable name="docidentifier_number" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$1')"/>
1328
1309
  <xsl:variable name="docidentifier_year" select="java:replaceAll(java:java.lang.String.new($docidentifier_jis), '^(.*)(:)(.*)$', '$3')"/>
1329
1310
 
1330
- <fo:page-sequence master-reference="cover-page_2024" force-page-count="no-force">
1311
+ <fo:page-sequence master-reference="cover-page_vertical_layout" force-page-count="no-force">
1331
1312
 
1332
1313
  <!-- <xsl:variable name="cover_page_background_1_value" select="normalize-space(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:color-cover-page-background-1)"/>
1333
1314
  <xsl:variable name="cover_page_background_1_">
@@ -1501,7 +1482,7 @@
1501
1482
 
1502
1483
  </fo:flow>
1503
1484
  </fo:page-sequence>
1504
- </xsl:template> <!-- insertCoverPage2024 -->
1485
+ </xsl:template> <!-- insertCoverPageVerticalLayout -->
1505
1486
 
1506
1487
  <xsl:template name="back-page">
1507
1488
  <xsl:param name="num"/>
@@ -1509,7 +1490,7 @@
1509
1490
  <xsl:if test="$isGenerateTableIF = 'false'">
1510
1491
  <xsl:if test="$vertical_layout = 'true'">
1511
1492
 
1512
- <fo:page-sequence master-reference="back-page_2024" force-page-count="no-force" font-family="Noto Serif JP" font-weight="500">
1493
+ <fo:page-sequence master-reference="back-page" force-page-count="no-force" font-family="Noto Serif JP" font-weight="500">
1513
1494
 
1514
1495
  <fo:static-content flow-name="header">
1515
1496
  <xsl:variable name="presentation_metadata_image_name">
@@ -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>
@@ -10703,6 +10684,16 @@
10703
10684
  </xsl:variable>
10704
10685
  <xsl:variable name="quot">"</xsl:variable>
10705
10686
  <xsl:variable name="styles_">
10687
+ <!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
10688
+ <xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
10689
+ <style name="border-top">none</style>
10690
+ <style name="border-right">none</style>
10691
+ <style name="border-left">none</style>
10692
+ <style name="border-bottom">none</style>
10693
+ <style name="color">inherit</style>
10694
+ <style name="background-color">transparent</style>
10695
+ </xsl:if>
10696
+
10706
10697
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
10707
10698
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
10708
10699
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
@@ -12745,7 +12736,10 @@
12745
12736
 
12746
12737
  <xsl:template match="mn:note" name="note">
12747
12738
  <xsl:call-template name="setNamedDestination"/>
12748
- <fo:block id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
12739
+ <fo:block xsl:use-attribute-sets="note-style" role="SKIP">
12740
+ <xsl:if test="not(parent::mn:references)">
12741
+ <xsl:copy-of select="@id"/>
12742
+ </xsl:if>
12749
12743
  <xsl:call-template name="setBlockSpanAll"/>
12750
12744
 
12751
12745
  <xsl:call-template name="refine_note-style"/>
@@ -15392,7 +15386,7 @@
15392
15386
 
15393
15387
  <xsl:template name="insertFootnoteSeparatorCommon">
15394
15388
  <xsl:param name="leader_length">30%</xsl:param>
15395
- <fo:static-content flow-name="xsl-footnote-separator">
15389
+ <fo:static-content flow-name="xsl-footnote-separator" role="artifact">
15396
15390
  <fo:block>
15397
15391
  <fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
15398
15392
  </fo:block>
@@ -15628,8 +15622,8 @@
15628
15622
  </xsl:template> <!-- bibitem -->
15629
15623
 
15630
15624
  <!-- Bibliography (non-normative references) -->
15631
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
15632
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
15625
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
15626
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
15633
15627
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
15634
15628
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
15635
15629
  <xsl:call-template name="setNamedDestination"/>
@@ -15681,7 +15675,7 @@
15681
15675
  </fo:list-item>
15682
15676
  </xsl:otherwise>
15683
15677
  </xsl:choose>
15684
- <xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]">
15678
+ <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
15685
15679
  <xsl:with-param name="skip">false</xsl:with-param>
15686
15680
  </xsl:apply-templates>
15687
15681
  </xsl:template>
@@ -15701,8 +15695,25 @@
15701
15695
  </fo:inline>
15702
15696
  <xsl:apply-templates select="mn:formattedref"/>
15703
15697
 
15698
+ <xsl:call-template name="processBibliographyNote"/>
15704
15699
  </xsl:template> <!-- processBibitem (bibitem) -->
15705
15700
 
15701
+ <xsl:template name="processBibliographyNote">
15702
+ <xsl:if test="self::mn:note">
15703
+ <xsl:variable name="note_node">
15704
+ <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
15705
+ <xsl:copy> <!-- skip @id -->
15706
+ <xsl:copy-of select="node()"/>
15707
+ </xsl:copy>
15708
+ </xsl:element>
15709
+ </xsl:variable>
15710
+ <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
15711
+ <xsl:call-template name="note"/>
15712
+ </xsl:for-each> -->
15713
+ <xsl:call-template name="note"/>
15714
+ </xsl:if>
15715
+ </xsl:template>
15716
+
15706
15717
  <xsl:template match="mn:title" mode="title">
15707
15718
  <fo:inline><xsl:apply-templates/></fo:inline>
15708
15719
  </xsl:template>
@@ -16248,6 +16259,87 @@
16248
16259
  <!-- End Form's elements processing -->
16249
16260
  <!-- =================== -->
16250
16261
 
16262
+ <xsl:attribute-set name="toc-style">
16263
+ </xsl:attribute-set>
16264
+
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>
16272
+ </xsl:template>
16273
+
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>
16278
+ </xsl:attribute-set>
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
+ <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>
16293
+ </xsl:attribute-set> <!-- toc-title-page-style -->
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
+
16307
+ <xsl:attribute-set name="toc-item-block-style">
16308
+ </xsl:attribute-set>
16309
+
16310
+ <xsl:template name="refine_toc-item-block-style">
16311
+ </xsl:template>
16312
+
16313
+ <xsl:attribute-set name="toc-item-style">
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>
16317
+ </xsl:attribute-set> <!-- END: toc-item-style -->
16318
+
16319
+ <xsl:template name="refine_toc-item-style">
16320
+ </xsl:template> <!-- END: refine_toc-item-style -->
16321
+
16322
+ <xsl:attribute-set name="toc-leader-style">
16323
+ <xsl:attribute name="leader-pattern">dots</xsl:attribute>
16324
+ </xsl:attribute-set> <!-- END: toc-leader-style -->
16325
+
16326
+ <xsl:attribute-set name="toc-pagenumber-style">
16327
+ </xsl:attribute-set>
16328
+
16329
+ <!-- List of Figures, Tables -->
16330
+ <xsl:attribute-set name="toc-listof-title-style">
16331
+ </xsl:attribute-set>
16332
+
16333
+ <xsl:template name="refine_toc-listof-title-style">
16334
+ </xsl:template>
16335
+
16336
+ <xsl:attribute-set name="toc-listof-item-block-style">
16337
+ </xsl:attribute-set>
16338
+
16339
+ <xsl:attribute-set name="toc-listof-item-style">
16340
+ <xsl:attribute name="role">TOCI</xsl:attribute>
16341
+ </xsl:attribute-set>
16342
+
16251
16343
  <xsl:template name="processPrefaceSectionsDefault_Contents">
16252
16344
  <xsl:variable name="nodes_preface_">
16253
16345
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -16585,7 +16677,7 @@
16585
16677
  </xsl:if>
16586
16678
 
16587
16679
  <xsl:for-each select="$contents_nodes/mnx:doc">
16588
- <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">
16589
16681
  <xsl:if test="@bundle = 'true'">
16590
16682
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
16591
16683
  </xsl:if>
@@ -16619,7 +16711,7 @@
16619
16711
  </xsl:choose>
16620
16712
  </fo:bookmark-title>
16621
16713
 
16622
- <xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
16714
+ <xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
16623
16715
 
16624
16716
  <xsl:call-template name="insertFigureBookmarks">
16625
16717
  <xsl:with-param name="contents" select="mnx:contents"/>
@@ -4,18 +4,26 @@ module IsoDoc
4
4
  def table_title_parse(node, out); end
5
5
 
6
6
  def table_attrs(node)
7
- style = node["style"] || "border-collapse:collapse;" \
8
- "mso-table-anchor-horizontal:column;mso-table-overlap:never;" \
9
- "border:none;mso-padding-alt: " \
10
- "0cm 5.4pt 0cm 5.4pt;mso-border-insideh:none;" \
11
- "mso-border-insidev:none;"
7
+ style = table_attrs_style(node, node["class"])
8
+ klass = node.text.length > 4000 ? "MsoTableGridBig" : "MsoTableGrid"
9
+ node["plain"] == "true" and klass = nil
12
10
  { id: node["id"], title: node["alt"],
13
11
  summary: node["summary"], width: node["width"],
14
- class: (node.text.length > 4000 ? "MsoTableGridBig" : "MsoTableGrid"),
12
+ class: klass,
15
13
  style: style,
16
14
  border: 0, cellspacing: 0, cellpadding: 0 }
17
15
  end
18
16
 
17
+ def table_attrs_style(node, _klass)
18
+ style = node["style"]
19
+ node["plain"] == "true" or style ||= "border-collapse:collapse;" \
20
+ "mso-table-anchor-horizontal:column;mso-table-overlap:never;" \
21
+ "border:none;mso-padding-alt: " \
22
+ "0cm 5.4pt 0cm 5.4pt;mso-border-insideh:none;" \
23
+ "mso-border-insidev:none;"
24
+ style
25
+ end
26
+
19
27
  def make_tr_attr_style(cell, row, rowmax, totalrows, opt)
20
28
  top = row.zero? ? "#{SW1} 1.5pt;" : "none;"
21
29
  bottom = "#{SW1} #{rowmax >= totalrows ? '1.5' : '1.0'}pt;"
@@ -31,16 +39,16 @@ module IsoDoc
31
39
  end
32
40
 
33
41
  def new_fullcolspan_row(table, tfoot)
34
- # how many columns in the table?
35
- cols = 0
42
+ cols = 0 # how many columns in the table?
36
43
  table.at(".//tr").xpath("./td | ./th").each do |td|
37
44
  cols += (td["colspan"] ? td["colspan"].to_i : 1)
38
45
  end
39
- style = "border-top:0pt;mso-border-top-alt:0pt;" \
46
+ table["class"].nil? or # plain table
47
+ style = "style='border-top:0pt;mso-border-top-alt:0pt;" \
40
48
  "border-bottom:#{SW1} 1.5pt;mso-border-bottom-alt:#{SW1} 1.5pt;" \
41
49
  "border-left:#{SW1} 1.5pt;mso-border-left-alt:#{SW1} 1.5pt;" \
42
- "border-right:#{SW1} 1.5pt;mso-border-right-alt:#{SW1} 1.5pt;"
43
- tfoot.add_child("<tr><td colspan='#{cols}' style='#{style}'/></tr>")
50
+ "border-right:#{SW1} 1.5pt;mso-border-right-alt:#{SW1} 1.5pt;'"
51
+ tfoot.add_child("<tr><td colspan='#{cols}' #{style}/></tr>")
44
52
  tfoot.xpath(".//td").last
45
53
  end
46
54
  end
@@ -198,14 +198,14 @@ Applicable to modify and delete</a:documentation>
198
198
  </zeroOrMore>
199
199
  </element>
200
200
  </optional>
201
- <optional>
201
+ <zeroOrMore>
202
202
  <element name="description">
203
- <a:documentation>Description of the change described in this block</a:documentation>
204
- <zeroOrMore>
203
+ <a:documentation>Description(s) of the change described in this block</a:documentation>
204
+ <oneOrMore>
205
205
  <ref name="BasicBlock"/>
206
- </zeroOrMore>
206
+ </oneOrMore>
207
207
  </element>
208
- </optional>
208
+ </zeroOrMore>
209
209
  <optional>
210
210
  <element name="newcontent">
211
211
  <a:documentation>New content to be added to the document; applicable to add and modify</a:documentation>
@@ -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"/>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!-- VERSION v2.0.8 -->
3
+ <!-- VERSION v2.1.0 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -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">
@@ -735,6 +683,12 @@ titlecase, or lowercase</a:documentation>
735
683
  <ref name="BlockAttributes"/>
736
684
  </define>
737
685
  <define name="TableAttributes" combine="interleave">
686
+ <optional>
687
+ <attribute name="plain">
688
+ <a:documentation>Render as a plain attribute, with no shading or borders</a:documentation>
689
+ <data type="boolean"/>
690
+ </attribute>
691
+ </optional>
738
692
  <optional>
739
693
  <attribute name="width">
740
694
  <a:documentation>Width of the table block in rendering</a:documentation>
@@ -1088,7 +1042,6 @@ That concept may be defined as a term within the current document, or it may be
1088
1042
  <zeroOrMore>
1089
1043
  <choice>
1090
1044
  <ref name="PureTextElement"/>
1091
- <ref name="stem"/>
1092
1045
  <ref name="index"/>
1093
1046
  <ref name="index-xref"/>
1094
1047
  </choice>
@@ -1101,7 +1054,6 @@ That concept may be defined as a term within the current document, or it may be
1101
1054
  <zeroOrMore>
1102
1055
  <choice>
1103
1056
  <ref name="PureTextElement"/>
1104
- <ref name="stem"/>
1105
1057
  <ref name="index"/>
1106
1058
  <ref name="index-xref"/>
1107
1059
  </choice>
@@ -2019,10 +1971,7 @@ used in document amendments</a:documentation>
2019
1971
  <element name="name">
2020
1972
  <a:documentation>The symbolic form of the designation</a:documentation>
2021
1973
  <oneOrMore>
2022
- <choice>
2023
- <ref name="PureTextElement"/>
2024
- <ref name="stem"/>
2025
- </choice>
1974
+ <ref name="PureTextElement"/>
2026
1975
  </oneOrMore>
2027
1976
  </element>
2028
1977
  </element>
@@ -2075,7 +2024,6 @@ used in document amendments</a:documentation>
2075
2024
  <zeroOrMore>
2076
2025
  <choice>
2077
2026
  <ref name="PureTextElement"/>
2078
- <ref name="stem"/>
2079
2027
  <ref name="index"/>
2080
2028
  <ref name="index-xref"/>
2081
2029
  </choice>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Jis
3
- VERSION = "0.6.0".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.0
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-05 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
  - - ">="