metanorma-jis 0.6.1 → 0.6.3
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/README.adoc +1 -1
- data/lib/isodoc/jis/jis.international-standard.xsl +169 -69
- data/lib/metanorma/jis/basicdoc.rng +1 -1
- data/lib/metanorma/jis/biblio-standoc.rng +0 -49
- data/lib/metanorma/jis/biblio.rng +11 -1
- data/lib/metanorma/jis/isodoc.rng +7 -60
- data/lib/metanorma/jis/relaton-jis.rng +0 -42
- data/lib/metanorma/jis/version.rb +1 -1
- data/metanorma-jis.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d87816ed39455d53723bb89d3d1f8c1b5fdf45cc5002db2fe73dc021fb0ef4b
|
4
|
+
data.tar.gz: 768fb228c83267bbe0d213334a8c7b344e4a744d7c147164463999edc6bd725a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aad42a639546e5ba15e3d718629fc693d9261853b1512febf3fb5925bf819dc7ac86bf9efa95a2c7e2a7e49cbf926013b8a01f7db1a4c4e1ef19efd3a5e2e6e
|
7
|
+
data.tar.gz: 06cc2959e417a407fa2f7e0e0ab5877f0a7396e78263b15e2829a7ac84f4c6ea029d2b61b7e3ac0223e9c2e6d3c6ce639ade8a72f2710936881d297542db18c5
|
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
|
-
<
|
807
|
-
<
|
808
|
-
|
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
|
-
|
1047
|
-
|
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 <= $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
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
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
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
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
|
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
|
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>
|
@@ -7270,13 +7251,23 @@
|
|
7270
7251
|
<xsl:attribute-set name="copyright-statement-style">
|
7271
7252
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
7272
7253
|
|
7254
|
+
<xsl:template name="refine_copyright-statement-style">
|
7255
|
+
</xsl:template>
|
7256
|
+
|
7273
7257
|
<xsl:attribute-set name="copyright-statement-title-style">
|
7274
7258
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
7275
7259
|
|
7260
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
7261
|
+
</xsl:template>
|
7262
|
+
|
7276
7263
|
<xsl:attribute-set name="copyright-statement-p-style">
|
7277
7264
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
7278
7265
|
|
7279
|
-
|
7266
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
7267
|
+
|
7268
|
+
</xsl:template>
|
7269
|
+
|
7270
|
+
<xsl:attribute-set name="license-statement-style">
|
7280
7271
|
</xsl:attribute-set> <!-- license-statement-style -->
|
7281
7272
|
|
7282
7273
|
<xsl:attribute-set name="license-statement-title-style">
|
@@ -7286,6 +7277,10 @@
|
|
7286
7277
|
<xsl:attribute-set name="license-statement-p-style">
|
7287
7278
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
7288
7279
|
|
7280
|
+
<xsl:template name="refine_license-statement-p-style">
|
7281
|
+
|
7282
|
+
</xsl:template>
|
7283
|
+
|
7289
7284
|
<xsl:attribute-set name="legal-statement-style">
|
7290
7285
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
7291
7286
|
|
@@ -7313,6 +7308,8 @@
|
|
7313
7308
|
<!-- ================================= -->
|
7314
7309
|
<xsl:template match="mn:copyright-statement">
|
7315
7310
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
7311
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
7312
|
+
|
7316
7313
|
<xsl:apply-templates/>
|
7317
7314
|
</fo:block>
|
7318
7315
|
</xsl:template> <!-- copyright-statement -->
|
@@ -8405,7 +8402,7 @@
|
|
8405
8402
|
</xsl:otherwise>
|
8406
8403
|
</xsl:choose>
|
8407
8404
|
</xsl:variable>
|
8408
|
-
<xsl:if test="$key = 'font-family' or
|
8405
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
8409
8406
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
8410
8407
|
</xsl:if>
|
8411
8408
|
<xsl:if test="$key = 'text-indent'">
|
@@ -15405,7 +15402,7 @@
|
|
15405
15402
|
|
15406
15403
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
15407
15404
|
<xsl:param name="leader_length">30%</xsl:param>
|
15408
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
15405
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
15409
15406
|
<fo:block>
|
15410
15407
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
15411
15408
|
</fo:block>
|
@@ -16178,13 +16175,31 @@
|
|
16178
16175
|
<!-- skip here, see the template 'fmt-review-start' -->
|
16179
16176
|
</xsl:when>
|
16180
16177
|
<xsl:otherwise>
|
16181
|
-
|
16182
|
-
|
16183
|
-
|
16184
|
-
|
16178
|
+
<xsl:choose>
|
16179
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
16180
|
+
<fo:block font-size="1pt" line-height="0.1">
|
16181
|
+
<xsl:call-template name="fo_inline_bookmark">
|
16182
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
16183
|
+
</xsl:call-template>
|
16184
|
+
</fo:block>
|
16185
|
+
</xsl:when>
|
16186
|
+
<xsl:otherwise>
|
16187
|
+
<xsl:call-template name="fo_inline_bookmark">
|
16188
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
16189
|
+
</xsl:call-template>
|
16190
|
+
</xsl:otherwise>
|
16191
|
+
</xsl:choose>
|
16185
16192
|
</xsl:otherwise>
|
16186
16193
|
</xsl:choose>
|
16187
16194
|
</xsl:template>
|
16195
|
+
|
16196
|
+
<xsl:template name="fo_inline_bookmark">
|
16197
|
+
<xsl:param name="bookmark_id"/>
|
16198
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
16199
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
16200
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
16201
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
16202
|
+
</xsl:template>
|
16188
16203
|
<!-- =================== -->
|
16189
16204
|
<!-- End of Index processing -->
|
16190
16205
|
<!-- =================== -->
|
@@ -16282,14 +16297,47 @@
|
|
16282
16297
|
</xsl:attribute-set>
|
16283
16298
|
|
16284
16299
|
<xsl:template name="refine_toc-style">
|
16300
|
+
<xsl:if test="not($vertical_layout = 'true') and not($lang = 'en')">
|
16301
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
16302
|
+
</xsl:if>
|
16303
|
+
<xsl:if test="$vertical_layout = 'true'">
|
16304
|
+
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
16305
|
+
</xsl:if>
|
16285
16306
|
</xsl:template>
|
16286
16307
|
|
16287
16308
|
<xsl:attribute-set name="toc-title-style">
|
16309
|
+
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
16310
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
16311
|
+
<xsl:attribute name="margin-top">8.5mm</xsl:attribute>
|
16288
16312
|
</xsl:attribute-set>
|
16289
16313
|
|
16314
|
+
<xsl:template name="refine_toc-title-style">
|
16315
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
16316
|
+
<xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
|
16317
|
+
</xsl:if>
|
16318
|
+
<xsl:if test="$vertical_layout = 'true'">
|
16319
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
16320
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
16321
|
+
</xsl:if>
|
16322
|
+
</xsl:template>
|
16323
|
+
|
16290
16324
|
<xsl:attribute-set name="toc-title-page-style">
|
16325
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
16326
|
+
<xsl:attribute name="margin-top">10mm</xsl:attribute>
|
16291
16327
|
</xsl:attribute-set> <!-- toc-title-page-style -->
|
16292
16328
|
|
16329
|
+
<xsl:template name="refine_toc-title-page-style">
|
16330
|
+
<xsl:if test="not($vertical_layout = 'true')">
|
16331
|
+
<xsl:attribute name="font-family">IPAexMincho</xsl:attribute>
|
16332
|
+
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
16333
|
+
</xsl:if>
|
16334
|
+
<xsl:if test="$vertical_layout = 'true'">
|
16335
|
+
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
16336
|
+
<xsl:attribute name="margin-top">1mm</xsl:attribute>
|
16337
|
+
<xsl:attribute name="margin-bottom">6mm</xsl:attribute>
|
16338
|
+
</xsl:if>
|
16339
|
+
</xsl:template>
|
16340
|
+
|
16293
16341
|
<xsl:attribute-set name="toc-item-block-style">
|
16294
16342
|
</xsl:attribute-set>
|
16295
16343
|
|
@@ -16298,12 +16346,15 @@
|
|
16298
16346
|
|
16299
16347
|
<xsl:attribute-set name="toc-item-style">
|
16300
16348
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
16349
|
+
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
16350
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
16301
16351
|
</xsl:attribute-set> <!-- END: toc-item-style -->
|
16302
16352
|
|
16303
16353
|
<xsl:template name="refine_toc-item-style">
|
16304
16354
|
</xsl:template> <!-- END: refine_toc-item-style -->
|
16305
16355
|
|
16306
16356
|
<xsl:attribute-set name="toc-leader-style">
|
16357
|
+
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
16307
16358
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
16308
16359
|
|
16309
16360
|
<xsl:attribute-set name="toc-pagenumber-style">
|
@@ -16313,6 +16364,9 @@
|
|
16313
16364
|
<xsl:attribute-set name="toc-listof-title-style">
|
16314
16365
|
</xsl:attribute-set>
|
16315
16366
|
|
16367
|
+
<xsl:template name="refine_toc-listof-title-style">
|
16368
|
+
</xsl:template>
|
16369
|
+
|
16316
16370
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
16317
16371
|
</xsl:attribute-set>
|
16318
16372
|
|
@@ -16657,7 +16711,7 @@
|
|
16657
16711
|
</xsl:if>
|
16658
16712
|
|
16659
16713
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
16660
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
16714
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
16661
16715
|
<xsl:if test="@bundle = 'true'">
|
16662
16716
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
16663
16717
|
</xsl:if>
|
@@ -16691,7 +16745,7 @@
|
|
16691
16745
|
</xsl:choose>
|
16692
16746
|
</fo:bookmark-title>
|
16693
16747
|
|
16694
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
16748
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
16695
16749
|
|
16696
16750
|
<xsl:call-template name="insertFigureBookmarks">
|
16697
16751
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -18034,11 +18088,35 @@
|
|
18034
18088
|
|
18035
18089
|
<xsl:template match="mn:svgmap"/>
|
18036
18090
|
|
18091
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
18092
|
+
|
18037
18093
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
18038
18094
|
<xsl:template match="*[local-name() = 'lang_none']">
|
18039
18095
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
18040
18096
|
</xsl:template>
|
18041
18097
|
|
18098
|
+
<xsl:template name="addTagElementT">
|
18099
|
+
<xsl:variable name="title_">
|
18100
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
18101
|
+
</xsl:variable>
|
18102
|
+
<xsl:variable name="title__">
|
18103
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
18104
|
+
<xsl:choose>
|
18105
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
18106
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
18107
|
+
</xsl:choose>
|
18108
|
+
</xsl:for-each>
|
18109
|
+
</xsl:variable>
|
18110
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
18111
|
+
<xsl:if test="$title != ''">
|
18112
|
+
<xsl:attribute name="fox:title">
|
18113
|
+
<xsl:if test="ancestor::mn:sections">
|
18114
|
+
<xsl:text>Section </xsl:text>
|
18115
|
+
</xsl:if>
|
18116
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
18117
|
+
</xsl:if>
|
18118
|
+
</xsl:template>
|
18119
|
+
|
18042
18120
|
<xsl:template name="replaceChar">
|
18043
18121
|
<xsl:param name="text"/>
|
18044
18122
|
<xsl:param name="replace"/>
|
@@ -18829,6 +18907,13 @@
|
|
18829
18907
|
<xsl:with-param name="default" select="$text_align_default"/>
|
18830
18908
|
</xsl:call-template>
|
18831
18909
|
<xsl:call-template name="setKeepAttributes"/>
|
18910
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
18911
|
+
<xsl:variable name="styles">
|
18912
|
+
<xsl:apply-templates select="*[1]"/>
|
18913
|
+
</xsl:variable>
|
18914
|
+
<!-- move attribute line-height from inline to block -->
|
18915
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
18916
|
+
</xsl:if>
|
18832
18917
|
</xsl:template>
|
18833
18918
|
|
18834
18919
|
<xsl:template name="setKeepAttributes">
|
@@ -18854,34 +18939,41 @@
|
|
18854
18939
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
18855
18940
|
<fo:block>
|
18856
18941
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
18857
|
-
|
18858
|
-
|
18859
|
-
|
18860
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
18861
|
-
<xsl:call-template name="getSVG"/>
|
18862
|
-
</fo:instream-foreign-object>
|
18863
|
-
</xsl:when>
|
18864
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
18865
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
18866
|
-
</xsl:when>
|
18867
|
-
<xsl:otherwise> <!-- bitmap image -->
|
18868
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
18869
|
-
<xsl:if test="$coverimage_src != ''">
|
18870
|
-
<xsl:variable name="coverpage">
|
18871
|
-
<xsl:call-template name="getImageURL">
|
18872
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
18873
|
-
</xsl:call-template>
|
18874
|
-
</xsl:variable>
|
18875
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
18876
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
18877
|
-
</xsl:if>
|
18878
|
-
</xsl:otherwise>
|
18879
|
-
</xsl:choose>
|
18942
|
+
|
18943
|
+
<xsl:call-template name="insertPageImage"/>
|
18944
|
+
|
18880
18945
|
</xsl:for-each>
|
18881
18946
|
</fo:block>
|
18882
18947
|
</fo:block-container>
|
18883
18948
|
</xsl:template>
|
18884
18949
|
|
18950
|
+
<xsl:template name="insertPageImage">
|
18951
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
18952
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
18953
|
+
<xsl:choose>
|
18954
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
18955
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
18956
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
18957
|
+
<xsl:call-template name="getSVG"/>
|
18958
|
+
</fo:instream-foreign-object>
|
18959
|
+
</xsl:when>
|
18960
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
18961
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
18962
|
+
</xsl:when>
|
18963
|
+
<xsl:otherwise> <!-- bitmap image -->
|
18964
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
18965
|
+
<xsl:if test="$coverimage_src != ''">
|
18966
|
+
<xsl:variable name="coverpage">
|
18967
|
+
<xsl:call-template name="getImageURL">
|
18968
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
18969
|
+
</xsl:call-template>
|
18970
|
+
</xsl:variable>
|
18971
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
18972
|
+
</xsl:if>
|
18973
|
+
</xsl:otherwise>
|
18974
|
+
</xsl:choose>
|
18975
|
+
</xsl:template>
|
18976
|
+
|
18885
18977
|
<xsl:template name="getImageURL">
|
18886
18978
|
<xsl:param name="src"/>
|
18887
18979
|
<xsl:choose>
|
@@ -19309,6 +19401,14 @@
|
|
19309
19401
|
</xsl:attribute>
|
19310
19402
|
</xsl:template>
|
19311
19403
|
|
19404
|
+
<xsl:template name="getCharByCodePoint">
|
19405
|
+
<xsl:param name="codepoint"/>
|
19406
|
+
<xsl:param name="radix">16</xsl:param>
|
19407
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
19408
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
19409
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
19410
|
+
</xsl:template>
|
19411
|
+
|
19312
19412
|
<xsl:template name="substring-after-last">
|
19313
19413
|
<xsl:param name="value"/>
|
19314
19414
|
<xsl:param name="delimiter"/>
|
@@ -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"/>
|
@@ -76,12 +76,6 @@ from other documents in the same doctype</a:documentation>
|
|
76
76
|
<ref name="flavor">
|
77
77
|
<a:documentation>Flavour of Metanorma used to process this document</a:documentation>
|
78
78
|
</ref>
|
79
|
-
<optional>
|
80
|
-
<ref name="editorialgroup">
|
81
|
-
<a:documentation>Groups associated with the production of the standards document, typically within
|
82
|
-
a standards definition organization</a:documentation>
|
83
|
-
</ref>
|
84
|
-
</optional>
|
85
79
|
<zeroOrMore>
|
86
80
|
<ref name="ics">
|
87
81
|
<a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
|
@@ -130,49 +124,6 @@ a standards definition organization</a:documentation>
|
|
130
124
|
However we prefer not to hardcode it, given ongoing extension.</a:documentation>
|
131
125
|
<text/>
|
132
126
|
</define>
|
133
|
-
<define name="editorialgroup">
|
134
|
-
<a:documentation>A group associated with the production of the standards document, typically within
|
135
|
-
a standards definition organization</a:documentation>
|
136
|
-
<element name="editorialgroup">
|
137
|
-
<oneOrMore>
|
138
|
-
<ref name="technical-committee">
|
139
|
-
<a:documentation>A technical committee associated with the production of the standards document</a:documentation>
|
140
|
-
</ref>
|
141
|
-
</oneOrMore>
|
142
|
-
</element>
|
143
|
-
</define>
|
144
|
-
<define name="technical-committee">
|
145
|
-
<a:documentation>Technical committee associated with the production of a standards document</a:documentation>
|
146
|
-
<element name="technical-committee">
|
147
|
-
<ref name="IsoWorkgroup"/>
|
148
|
-
</element>
|
149
|
-
</define>
|
150
|
-
<define name="IsoWorkgroup">
|
151
|
-
<optional>
|
152
|
-
<attribute name="number">
|
153
|
-
<a:documentation>Numeric identifier of the technical committee</a:documentation>
|
154
|
-
</attribute>
|
155
|
-
</optional>
|
156
|
-
<optional>
|
157
|
-
<attribute name="type">
|
158
|
-
<a:documentation>Type of the technical committee, used in identifying the technical committee</a:documentation>
|
159
|
-
</attribute>
|
160
|
-
</optional>
|
161
|
-
<optional>
|
162
|
-
<attribute name="identifier">
|
163
|
-
<a:documentation>Non-numeric, complete identifier of the technical committee</a:documentation>
|
164
|
-
</attribute>
|
165
|
-
</optional>
|
166
|
-
<optional>
|
167
|
-
<attribute name="prefix">
|
168
|
-
<a:documentation>Disambiguating prefix added to number to form the identifier of the technical committee,
|
169
|
-
typically indicating its type</a:documentation>
|
170
|
-
</attribute>
|
171
|
-
</optional>
|
172
|
-
<text>
|
173
|
-
<a:documentation>Name of the technical committee</a:documentation>
|
174
|
-
</text>
|
175
|
-
</define>
|
176
127
|
<define name="ics">
|
177
128
|
<a:documentation>Classification taken from the International Classification of Standards.
|
178
129
|
ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
|
@@ -242,6 +242,8 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
|
|
242
242
|
</choice>
|
243
243
|
</define>
|
244
244
|
<define name="roledescription">
|
245
|
+
<a:documentation>A more detailed description of the role of the contributor
|
246
|
+
Some descriptions are reserved words; in particular, the editorial committee of a standard has the role description "committee"</a:documentation>
|
245
247
|
<element name="description">
|
246
248
|
<ref name="LocalizedMarkedUpString"/>
|
247
249
|
</element>
|
@@ -443,7 +445,10 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
443
445
|
</oneOrMore>
|
444
446
|
<zeroOrMore>
|
445
447
|
<ref name="subdivision">
|
446
|
-
<a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item
|
448
|
+
<a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item.
|
449
|
+
Multiple subdivisions can be specified for an organization, with no implication of hierarchical
|
450
|
+
relation between them
|
451
|
+
Editorial and advisory groups are represented as consecutive subdivisions of the SDO</a:documentation>
|
447
452
|
</ref>
|
448
453
|
</zeroOrMore>
|
449
454
|
<optional>
|
@@ -485,6 +490,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
485
490
|
<a:documentation>The type of subdivision</a:documentation>
|
486
491
|
</attribute>
|
487
492
|
</optional>
|
493
|
+
<optional>
|
494
|
+
<attribute name="subtype">
|
495
|
+
<a:documentation>The subtype of subdivision; e.g. different types of technical committee</a:documentation>
|
496
|
+
</attribute>
|
497
|
+
</optional>
|
488
498
|
<ref name="OrganizationType">
|
489
499
|
<a:documentation>The subdivision, modelled recursively as an organization</a:documentation>
|
490
500
|
</ref>
|
@@ -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.1.
|
3
|
+
<!-- VERSION v2.1.1 -->
|
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">
|
@@ -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
|
-
<
|
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>
|
@@ -2291,6 +2233,11 @@ used in document amendments</a:documentation>
|
|
2291
2233
|
<ref name="RequiredId"/>
|
2292
2234
|
<ref name="NumberingAttributes"/>
|
2293
2235
|
<ref name="BlockAttributes"/>
|
2236
|
+
<optional>
|
2237
|
+
<attribute name="type">
|
2238
|
+
<a:documentation>Semantic classification of note</a:documentation>
|
2239
|
+
</attribute>
|
2240
|
+
</optional>
|
2294
2241
|
<oneOrMore>
|
2295
2242
|
<choice>
|
2296
2243
|
<a:documentation>Content of the term note</a:documentation>
|
@@ -22,11 +22,6 @@
|
|
22
22
|
</group>
|
23
23
|
</element>
|
24
24
|
</define>
|
25
|
-
<define name="editorialgroup">
|
26
|
-
<element name="editorialgroup">
|
27
|
-
<ref name="ISOProjectGroup"/>
|
28
|
-
</element>
|
29
|
-
</define>
|
30
25
|
</include>
|
31
26
|
<define name="BibDataExtensionType" combine="interleave">
|
32
27
|
<optional>
|
@@ -35,28 +30,6 @@
|
|
35
30
|
</ref>
|
36
31
|
</optional>
|
37
32
|
</define>
|
38
|
-
<define name="ISOProjectGroup">
|
39
|
-
<zeroOrMore>
|
40
|
-
<ref name="agency"/>
|
41
|
-
</zeroOrMore>
|
42
|
-
<oneOrMore>
|
43
|
-
<ref name="technical-committee"/>
|
44
|
-
</oneOrMore>
|
45
|
-
<zeroOrMore>
|
46
|
-
<ref name="subcommittee"/>
|
47
|
-
</zeroOrMore>
|
48
|
-
<zeroOrMore>
|
49
|
-
<ref name="workgroup"/>
|
50
|
-
</zeroOrMore>
|
51
|
-
<optional>
|
52
|
-
<ref name="secretariat"/>
|
53
|
-
</optional>
|
54
|
-
</define>
|
55
|
-
<define name="agency">
|
56
|
-
<element name="agency">
|
57
|
-
<text/>
|
58
|
-
</element>
|
59
|
-
</define>
|
60
33
|
<define name="documentnumber">
|
61
34
|
<element name="project-number">
|
62
35
|
<optional>
|
@@ -92,21 +65,6 @@
|
|
92
65
|
<data type="int"/>
|
93
66
|
</element>
|
94
67
|
</define>
|
95
|
-
<define name="subcommittee">
|
96
|
-
<element name="subcommittee">
|
97
|
-
<ref name="IsoWorkgroup"/>
|
98
|
-
</element>
|
99
|
-
</define>
|
100
|
-
<define name="workgroup">
|
101
|
-
<element name="workgroup">
|
102
|
-
<ref name="IsoWorkgroup"/>
|
103
|
-
</element>
|
104
|
-
</define>
|
105
|
-
<define name="secretariat">
|
106
|
-
<element name="secretariat">
|
107
|
-
<text/>
|
108
|
-
</element>
|
109
|
-
</define>
|
110
68
|
<define name="stagename">
|
111
69
|
<element name="stagename">
|
112
70
|
<optional>
|
data/metanorma-jis.gemspec
CHANGED
@@ -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 "
|
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.
|
4
|
+
version: 0.6.3
|
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-
|
11
|
+
date: 2025-08-18 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:
|
238
|
+
name: canon
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - ">="
|