metanorma-bipm 2.4.4 → 2.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +50 -7
- data/lib/isodoc/bipm/bipm.guide.xsl +50 -7
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +50 -7
- data/lib/isodoc/bipm/bipm.rapport.xsl +50 -7
- data/lib/isodoc/bipm/jcgm.standard.xsl +51 -7
- data/lib/metanorma/bipm/biblio.rng +24 -8
- data/lib/metanorma/bipm/bipm.rng +15 -51
- data/lib/metanorma/bipm/isodoc.rng +67 -55
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6592a6d50612ecdcad85206a712f990e3b7331000757d0ea1cfff641281a91b2
|
4
|
+
data.tar.gz: 6daf81c91bf2ce643bc7bd488fc99c5cb1a68deed8ddfa2bcb51aec52558902b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35169d2b8224ccf4efc95c155db2981714536db84a40a066ee5824cc92e8d06d27f8f24138e6211bbeccc8a7bf238689a79df41ca81e18217fd4a977919ccf1
|
7
|
+
data.tar.gz: 8d2d87d8aa5caf10f3435cfc46005efafa598befeeb7937662d067e3c2a361535e70c6090754ae6f88799d3d2c8f1b80375ed294bfe26a88d6a89ac7c1b20fc9
|
@@ -4116,6 +4116,7 @@
|
|
4116
4116
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
4117
4117
|
<xsl:variable name="hair_space"> </xsl:variable>
|
4118
4118
|
<xsl:variable name="en_dash">–</xsl:variable>
|
4119
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
4119
4120
|
|
4120
4121
|
<xsl:template name="getTitle">
|
4121
4122
|
<xsl:param name="name"/>
|
@@ -4432,6 +4433,10 @@
|
|
4432
4433
|
|
4433
4434
|
</xsl:attribute-set> <!-- example-name-style -->
|
4434
4435
|
|
4436
|
+
<xsl:template name="refine_example-name-style">
|
4437
|
+
|
4438
|
+
</xsl:template>
|
4439
|
+
|
4435
4440
|
<xsl:attribute-set name="example-p-style">
|
4436
4441
|
|
4437
4442
|
</xsl:attribute-set> <!-- example-p-style -->
|
@@ -4446,6 +4451,10 @@
|
|
4446
4451
|
|
4447
4452
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
4448
4453
|
|
4454
|
+
<xsl:template name="refine_termexample-name-style">
|
4455
|
+
|
4456
|
+
</xsl:template>
|
4457
|
+
|
4449
4458
|
<!-- ========================== -->
|
4450
4459
|
<!-- Table styles -->
|
4451
4460
|
<!-- ========================== -->
|
@@ -4662,6 +4671,10 @@
|
|
4662
4671
|
|
4663
4672
|
</xsl:attribute-set> <!-- table-fn-style -->
|
4664
4673
|
|
4674
|
+
<xsl:template name="refine_table-fn-style">
|
4675
|
+
|
4676
|
+
</xsl:template>
|
4677
|
+
|
4665
4678
|
<xsl:attribute-set name="table-fn-number-style">
|
4666
4679
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4667
4680
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -4671,6 +4684,10 @@
|
|
4671
4684
|
|
4672
4685
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
4673
4686
|
|
4687
|
+
<xsl:template name="refine_table-fn-number-style">
|
4688
|
+
|
4689
|
+
</xsl:template>
|
4690
|
+
|
4674
4691
|
<xsl:attribute-set name="fn-container-body-style">
|
4675
4692
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
4676
4693
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -7086,8 +7103,9 @@
|
|
7086
7103
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
7087
7104
|
|
7088
7105
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
7089
|
-
|
7106
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
7090
7107
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
7108
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
7091
7109
|
|
7092
7110
|
<fo:inline font-style="normal">(</fo:inline>
|
7093
7111
|
|
@@ -8234,11 +8252,16 @@
|
|
8234
8252
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
8235
8253
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
8236
8254
|
<xsl:variable name="text" select="."/>
|
8237
|
-
<
|
8255
|
+
<xsl:variable name="ratio_">
|
8256
|
+
0.75
|
8257
|
+
</xsl:variable>
|
8258
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
8259
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
8238
8260
|
<xsl:if test="string-length($text) > 0">
|
8239
8261
|
<xsl:variable name="smallCapsText">
|
8240
8262
|
<xsl:call-template name="recursiveSmallCaps">
|
8241
8263
|
<xsl:with-param name="text" select="$text"/>
|
8264
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
8242
8265
|
</xsl:call-template>
|
8243
8266
|
</xsl:variable>
|
8244
8267
|
<!-- merge neighboring fo:inline -->
|
@@ -8275,12 +8298,13 @@
|
|
8275
8298
|
|
8276
8299
|
<xsl:template name="recursiveSmallCaps">
|
8277
8300
|
<xsl:param name="text"/>
|
8301
|
+
<xsl:param name="ratio"/>
|
8278
8302
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
8279
8303
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
8280
8304
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
8281
8305
|
<xsl:choose>
|
8282
8306
|
<xsl:when test="$char=$upperCase">
|
8283
|
-
<fo:inline font-size="{100 div
|
8307
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
8284
8308
|
<xsl:value-of select="$upperCase"/>
|
8285
8309
|
</fo:inline>
|
8286
8310
|
</xsl:when>
|
@@ -8291,6 +8315,7 @@
|
|
8291
8315
|
<xsl:if test="string-length($text) > 1">
|
8292
8316
|
<xsl:call-template name="recursiveSmallCaps">
|
8293
8317
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
8318
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
8294
8319
|
</xsl:call-template>
|
8295
8320
|
</xsl:if>
|
8296
8321
|
</xsl:template>
|
@@ -8327,6 +8352,9 @@
|
|
8327
8352
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
8328
8353
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
8329
8354
|
</xsl:if>
|
8355
|
+
<xsl:if test="$key = 'text-indent'">
|
8356
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
8357
|
+
</xsl:if>
|
8330
8358
|
</xsl:for-each>
|
8331
8359
|
</xsl:variable>
|
8332
8360
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -9761,6 +9789,11 @@
|
|
9761
9789
|
</xsl:call-template>
|
9762
9790
|
</xsl:template>
|
9763
9791
|
|
9792
|
+
<!-- command between two xref points to non-standard bibitem -->
|
9793
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
|
9794
|
+
<xsl:value-of select="."/>
|
9795
|
+
</xsl:template>
|
9796
|
+
|
9764
9797
|
<!-- ====== -->
|
9765
9798
|
<!-- formula -->
|
9766
9799
|
<!-- ====== -->
|
@@ -10483,6 +10516,8 @@
|
|
10483
10516
|
</xsl:attribute>
|
10484
10517
|
</xsl:template>
|
10485
10518
|
|
10519
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
10520
|
+
|
10486
10521
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
10487
10522
|
<xsl:copy>
|
10488
10523
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -10501,7 +10536,8 @@
|
|
10501
10536
|
|
10502
10537
|
<xsl:attribute name="width">
|
10503
10538
|
<xsl:choose>
|
10504
|
-
|
10539
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
10540
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
10505
10541
|
<xsl:when test="$width != ''">
|
10506
10542
|
<xsl:value-of select="round($width)"/>
|
10507
10543
|
</xsl:when>
|
@@ -10510,7 +10546,8 @@
|
|
10510
10546
|
</xsl:attribute>
|
10511
10547
|
<xsl:attribute name="height">
|
10512
10548
|
<xsl:choose>
|
10513
|
-
|
10549
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
10550
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
10514
10551
|
<xsl:when test="$height != ''">
|
10515
10552
|
<xsl:value-of select="round($height)"/>
|
10516
10553
|
</xsl:when>
|
@@ -10527,7 +10564,7 @@
|
|
10527
10564
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
10528
10565
|
<xsl:attribute name="width">
|
10529
10566
|
<xsl:choose>
|
10530
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
10567
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
10531
10568
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
10532
10569
|
</xsl:choose>
|
10533
10570
|
</xsl:attribute>
|
@@ -10538,7 +10575,7 @@
|
|
10538
10575
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
10539
10576
|
<xsl:attribute name="height">
|
10540
10577
|
<xsl:choose>
|
10541
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
10578
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
10542
10579
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
10543
10580
|
</xsl:choose>
|
10544
10581
|
</xsl:attribute>
|
@@ -12013,6 +12050,7 @@
|
|
12013
12050
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
12014
12051
|
<xsl:if test="normalize-space() != ''">
|
12015
12052
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
12053
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
12016
12054
|
<xsl:apply-templates/>
|
12017
12055
|
</fo:inline>
|
12018
12056
|
</xsl:if>
|
@@ -12163,6 +12201,7 @@
|
|
12163
12201
|
</xsl:when>
|
12164
12202
|
<xsl:otherwise>
|
12165
12203
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
12204
|
+
<xsl:call-template name="refine_example-name-style"/>
|
12166
12205
|
<xsl:apply-templates/>
|
12167
12206
|
</fo:inline>
|
12168
12207
|
</xsl:otherwise>
|
@@ -13375,6 +13414,7 @@
|
|
13375
13414
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
13376
13415
|
|
13377
13416
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
13417
|
+
|
13378
13418
|
<xsl:call-template name="processBibitem"/>
|
13379
13419
|
</fo:block>
|
13380
13420
|
|
@@ -13414,6 +13454,7 @@
|
|
13414
13454
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
13415
13455
|
<xsl:otherwise>
|
13416
13456
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
13457
|
+
|
13417
13458
|
<fo:list-item-label end-indent="label-end()">
|
13418
13459
|
<fo:block role="SKIP">
|
13419
13460
|
<fo:inline role="SKIP">
|
@@ -15179,4 +15220,6 @@
|
|
15179
15220
|
</xsl:if>
|
15180
15221
|
</xsl:template>
|
15181
15222
|
|
15223
|
+
<!-- update -->
|
15224
|
+
|
15182
15225
|
</xsl:stylesheet>
|
@@ -4116,6 +4116,7 @@
|
|
4116
4116
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
4117
4117
|
<xsl:variable name="hair_space"> </xsl:variable>
|
4118
4118
|
<xsl:variable name="en_dash">–</xsl:variable>
|
4119
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
4119
4120
|
|
4120
4121
|
<xsl:template name="getTitle">
|
4121
4122
|
<xsl:param name="name"/>
|
@@ -4432,6 +4433,10 @@
|
|
4432
4433
|
|
4433
4434
|
</xsl:attribute-set> <!-- example-name-style -->
|
4434
4435
|
|
4436
|
+
<xsl:template name="refine_example-name-style">
|
4437
|
+
|
4438
|
+
</xsl:template>
|
4439
|
+
|
4435
4440
|
<xsl:attribute-set name="example-p-style">
|
4436
4441
|
|
4437
4442
|
</xsl:attribute-set> <!-- example-p-style -->
|
@@ -4446,6 +4451,10 @@
|
|
4446
4451
|
|
4447
4452
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
4448
4453
|
|
4454
|
+
<xsl:template name="refine_termexample-name-style">
|
4455
|
+
|
4456
|
+
</xsl:template>
|
4457
|
+
|
4449
4458
|
<!-- ========================== -->
|
4450
4459
|
<!-- Table styles -->
|
4451
4460
|
<!-- ========================== -->
|
@@ -4662,6 +4671,10 @@
|
|
4662
4671
|
|
4663
4672
|
</xsl:attribute-set> <!-- table-fn-style -->
|
4664
4673
|
|
4674
|
+
<xsl:template name="refine_table-fn-style">
|
4675
|
+
|
4676
|
+
</xsl:template>
|
4677
|
+
|
4665
4678
|
<xsl:attribute-set name="table-fn-number-style">
|
4666
4679
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4667
4680
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -4671,6 +4684,10 @@
|
|
4671
4684
|
|
4672
4685
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
4673
4686
|
|
4687
|
+
<xsl:template name="refine_table-fn-number-style">
|
4688
|
+
|
4689
|
+
</xsl:template>
|
4690
|
+
|
4674
4691
|
<xsl:attribute-set name="fn-container-body-style">
|
4675
4692
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
4676
4693
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -7086,8 +7103,9 @@
|
|
7086
7103
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
7087
7104
|
|
7088
7105
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
7089
|
-
|
7106
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
7090
7107
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
7108
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
7091
7109
|
|
7092
7110
|
<fo:inline font-style="normal">(</fo:inline>
|
7093
7111
|
|
@@ -8234,11 +8252,16 @@
|
|
8234
8252
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
8235
8253
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
8236
8254
|
<xsl:variable name="text" select="."/>
|
8237
|
-
<
|
8255
|
+
<xsl:variable name="ratio_">
|
8256
|
+
0.75
|
8257
|
+
</xsl:variable>
|
8258
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
8259
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
8238
8260
|
<xsl:if test="string-length($text) > 0">
|
8239
8261
|
<xsl:variable name="smallCapsText">
|
8240
8262
|
<xsl:call-template name="recursiveSmallCaps">
|
8241
8263
|
<xsl:with-param name="text" select="$text"/>
|
8264
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
8242
8265
|
</xsl:call-template>
|
8243
8266
|
</xsl:variable>
|
8244
8267
|
<!-- merge neighboring fo:inline -->
|
@@ -8275,12 +8298,13 @@
|
|
8275
8298
|
|
8276
8299
|
<xsl:template name="recursiveSmallCaps">
|
8277
8300
|
<xsl:param name="text"/>
|
8301
|
+
<xsl:param name="ratio"/>
|
8278
8302
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
8279
8303
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
8280
8304
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
8281
8305
|
<xsl:choose>
|
8282
8306
|
<xsl:when test="$char=$upperCase">
|
8283
|
-
<fo:inline font-size="{100 div
|
8307
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
8284
8308
|
<xsl:value-of select="$upperCase"/>
|
8285
8309
|
</fo:inline>
|
8286
8310
|
</xsl:when>
|
@@ -8291,6 +8315,7 @@
|
|
8291
8315
|
<xsl:if test="string-length($text) > 1">
|
8292
8316
|
<xsl:call-template name="recursiveSmallCaps">
|
8293
8317
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
8318
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
8294
8319
|
</xsl:call-template>
|
8295
8320
|
</xsl:if>
|
8296
8321
|
</xsl:template>
|
@@ -8327,6 +8352,9 @@
|
|
8327
8352
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
8328
8353
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
8329
8354
|
</xsl:if>
|
8355
|
+
<xsl:if test="$key = 'text-indent'">
|
8356
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
8357
|
+
</xsl:if>
|
8330
8358
|
</xsl:for-each>
|
8331
8359
|
</xsl:variable>
|
8332
8360
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -9761,6 +9789,11 @@
|
|
9761
9789
|
</xsl:call-template>
|
9762
9790
|
</xsl:template>
|
9763
9791
|
|
9792
|
+
<!-- command between two xref points to non-standard bibitem -->
|
9793
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
|
9794
|
+
<xsl:value-of select="."/>
|
9795
|
+
</xsl:template>
|
9796
|
+
|
9764
9797
|
<!-- ====== -->
|
9765
9798
|
<!-- formula -->
|
9766
9799
|
<!-- ====== -->
|
@@ -10483,6 +10516,8 @@
|
|
10483
10516
|
</xsl:attribute>
|
10484
10517
|
</xsl:template>
|
10485
10518
|
|
10519
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
10520
|
+
|
10486
10521
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
10487
10522
|
<xsl:copy>
|
10488
10523
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -10501,7 +10536,8 @@
|
|
10501
10536
|
|
10502
10537
|
<xsl:attribute name="width">
|
10503
10538
|
<xsl:choose>
|
10504
|
-
|
10539
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
10540
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
10505
10541
|
<xsl:when test="$width != ''">
|
10506
10542
|
<xsl:value-of select="round($width)"/>
|
10507
10543
|
</xsl:when>
|
@@ -10510,7 +10546,8 @@
|
|
10510
10546
|
</xsl:attribute>
|
10511
10547
|
<xsl:attribute name="height">
|
10512
10548
|
<xsl:choose>
|
10513
|
-
|
10549
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
10550
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
10514
10551
|
<xsl:when test="$height != ''">
|
10515
10552
|
<xsl:value-of select="round($height)"/>
|
10516
10553
|
</xsl:when>
|
@@ -10527,7 +10564,7 @@
|
|
10527
10564
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
10528
10565
|
<xsl:attribute name="width">
|
10529
10566
|
<xsl:choose>
|
10530
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
10567
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
10531
10568
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
10532
10569
|
</xsl:choose>
|
10533
10570
|
</xsl:attribute>
|
@@ -10538,7 +10575,7 @@
|
|
10538
10575
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
10539
10576
|
<xsl:attribute name="height">
|
10540
10577
|
<xsl:choose>
|
10541
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
10578
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
10542
10579
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
10543
10580
|
</xsl:choose>
|
10544
10581
|
</xsl:attribute>
|
@@ -12013,6 +12050,7 @@
|
|
12013
12050
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
12014
12051
|
<xsl:if test="normalize-space() != ''">
|
12015
12052
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
12053
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
12016
12054
|
<xsl:apply-templates/>
|
12017
12055
|
</fo:inline>
|
12018
12056
|
</xsl:if>
|
@@ -12163,6 +12201,7 @@
|
|
12163
12201
|
</xsl:when>
|
12164
12202
|
<xsl:otherwise>
|
12165
12203
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
12204
|
+
<xsl:call-template name="refine_example-name-style"/>
|
12166
12205
|
<xsl:apply-templates/>
|
12167
12206
|
</fo:inline>
|
12168
12207
|
</xsl:otherwise>
|
@@ -13375,6 +13414,7 @@
|
|
13375
13414
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
13376
13415
|
|
13377
13416
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
13417
|
+
|
13378
13418
|
<xsl:call-template name="processBibitem"/>
|
13379
13419
|
</fo:block>
|
13380
13420
|
|
@@ -13414,6 +13454,7 @@
|
|
13414
13454
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
13415
13455
|
<xsl:otherwise>
|
13416
13456
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
13457
|
+
|
13417
13458
|
<fo:list-item-label end-indent="label-end()">
|
13418
13459
|
<fo:block role="SKIP">
|
13419
13460
|
<fo:inline role="SKIP">
|
@@ -15179,4 +15220,6 @@
|
|
15179
15220
|
</xsl:if>
|
15180
15221
|
</xsl:template>
|
15181
15222
|
|
15223
|
+
<!-- update -->
|
15224
|
+
|
15182
15225
|
</xsl:stylesheet>
|
@@ -4116,6 +4116,7 @@
|
|
4116
4116
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
4117
4117
|
<xsl:variable name="hair_space"> </xsl:variable>
|
4118
4118
|
<xsl:variable name="en_dash">–</xsl:variable>
|
4119
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
4119
4120
|
|
4120
4121
|
<xsl:template name="getTitle">
|
4121
4122
|
<xsl:param name="name"/>
|
@@ -4432,6 +4433,10 @@
|
|
4432
4433
|
|
4433
4434
|
</xsl:attribute-set> <!-- example-name-style -->
|
4434
4435
|
|
4436
|
+
<xsl:template name="refine_example-name-style">
|
4437
|
+
|
4438
|
+
</xsl:template>
|
4439
|
+
|
4435
4440
|
<xsl:attribute-set name="example-p-style">
|
4436
4441
|
|
4437
4442
|
</xsl:attribute-set> <!-- example-p-style -->
|
@@ -4446,6 +4451,10 @@
|
|
4446
4451
|
|
4447
4452
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
4448
4453
|
|
4454
|
+
<xsl:template name="refine_termexample-name-style">
|
4455
|
+
|
4456
|
+
</xsl:template>
|
4457
|
+
|
4449
4458
|
<!-- ========================== -->
|
4450
4459
|
<!-- Table styles -->
|
4451
4460
|
<!-- ========================== -->
|
@@ -4662,6 +4671,10 @@
|
|
4662
4671
|
|
4663
4672
|
</xsl:attribute-set> <!-- table-fn-style -->
|
4664
4673
|
|
4674
|
+
<xsl:template name="refine_table-fn-style">
|
4675
|
+
|
4676
|
+
</xsl:template>
|
4677
|
+
|
4665
4678
|
<xsl:attribute-set name="table-fn-number-style">
|
4666
4679
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4667
4680
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -4671,6 +4684,10 @@
|
|
4671
4684
|
|
4672
4685
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
4673
4686
|
|
4687
|
+
<xsl:template name="refine_table-fn-number-style">
|
4688
|
+
|
4689
|
+
</xsl:template>
|
4690
|
+
|
4674
4691
|
<xsl:attribute-set name="fn-container-body-style">
|
4675
4692
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
4676
4693
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -7086,8 +7103,9 @@
|
|
7086
7103
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
7087
7104
|
|
7088
7105
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
7089
|
-
|
7106
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
7090
7107
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
7108
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
7091
7109
|
|
7092
7110
|
<fo:inline font-style="normal">(</fo:inline>
|
7093
7111
|
|
@@ -8234,11 +8252,16 @@
|
|
8234
8252
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
8235
8253
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
8236
8254
|
<xsl:variable name="text" select="."/>
|
8237
|
-
<
|
8255
|
+
<xsl:variable name="ratio_">
|
8256
|
+
0.75
|
8257
|
+
</xsl:variable>
|
8258
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
8259
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
8238
8260
|
<xsl:if test="string-length($text) > 0">
|
8239
8261
|
<xsl:variable name="smallCapsText">
|
8240
8262
|
<xsl:call-template name="recursiveSmallCaps">
|
8241
8263
|
<xsl:with-param name="text" select="$text"/>
|
8264
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
8242
8265
|
</xsl:call-template>
|
8243
8266
|
</xsl:variable>
|
8244
8267
|
<!-- merge neighboring fo:inline -->
|
@@ -8275,12 +8298,13 @@
|
|
8275
8298
|
|
8276
8299
|
<xsl:template name="recursiveSmallCaps">
|
8277
8300
|
<xsl:param name="text"/>
|
8301
|
+
<xsl:param name="ratio"/>
|
8278
8302
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
8279
8303
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
8280
8304
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
8281
8305
|
<xsl:choose>
|
8282
8306
|
<xsl:when test="$char=$upperCase">
|
8283
|
-
<fo:inline font-size="{100 div
|
8307
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
8284
8308
|
<xsl:value-of select="$upperCase"/>
|
8285
8309
|
</fo:inline>
|
8286
8310
|
</xsl:when>
|
@@ -8291,6 +8315,7 @@
|
|
8291
8315
|
<xsl:if test="string-length($text) > 1">
|
8292
8316
|
<xsl:call-template name="recursiveSmallCaps">
|
8293
8317
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
8318
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
8294
8319
|
</xsl:call-template>
|
8295
8320
|
</xsl:if>
|
8296
8321
|
</xsl:template>
|
@@ -8327,6 +8352,9 @@
|
|
8327
8352
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
8328
8353
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
8329
8354
|
</xsl:if>
|
8355
|
+
<xsl:if test="$key = 'text-indent'">
|
8356
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
8357
|
+
</xsl:if>
|
8330
8358
|
</xsl:for-each>
|
8331
8359
|
</xsl:variable>
|
8332
8360
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -9761,6 +9789,11 @@
|
|
9761
9789
|
</xsl:call-template>
|
9762
9790
|
</xsl:template>
|
9763
9791
|
|
9792
|
+
<!-- command between two xref points to non-standard bibitem -->
|
9793
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
|
9794
|
+
<xsl:value-of select="."/>
|
9795
|
+
</xsl:template>
|
9796
|
+
|
9764
9797
|
<!-- ====== -->
|
9765
9798
|
<!-- formula -->
|
9766
9799
|
<!-- ====== -->
|
@@ -10483,6 +10516,8 @@
|
|
10483
10516
|
</xsl:attribute>
|
10484
10517
|
</xsl:template>
|
10485
10518
|
|
10519
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
10520
|
+
|
10486
10521
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
10487
10522
|
<xsl:copy>
|
10488
10523
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -10501,7 +10536,8 @@
|
|
10501
10536
|
|
10502
10537
|
<xsl:attribute name="width">
|
10503
10538
|
<xsl:choose>
|
10504
|
-
|
10539
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
10540
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
10505
10541
|
<xsl:when test="$width != ''">
|
10506
10542
|
<xsl:value-of select="round($width)"/>
|
10507
10543
|
</xsl:when>
|
@@ -10510,7 +10546,8 @@
|
|
10510
10546
|
</xsl:attribute>
|
10511
10547
|
<xsl:attribute name="height">
|
10512
10548
|
<xsl:choose>
|
10513
|
-
|
10549
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
10550
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
10514
10551
|
<xsl:when test="$height != ''">
|
10515
10552
|
<xsl:value-of select="round($height)"/>
|
10516
10553
|
</xsl:when>
|
@@ -10527,7 +10564,7 @@
|
|
10527
10564
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
10528
10565
|
<xsl:attribute name="width">
|
10529
10566
|
<xsl:choose>
|
10530
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
10567
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
10531
10568
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
10532
10569
|
</xsl:choose>
|
10533
10570
|
</xsl:attribute>
|
@@ -10538,7 +10575,7 @@
|
|
10538
10575
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
10539
10576
|
<xsl:attribute name="height">
|
10540
10577
|
<xsl:choose>
|
10541
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
10578
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
10542
10579
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
10543
10580
|
</xsl:choose>
|
10544
10581
|
</xsl:attribute>
|
@@ -12013,6 +12050,7 @@
|
|
12013
12050
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
12014
12051
|
<xsl:if test="normalize-space() != ''">
|
12015
12052
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
12053
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
12016
12054
|
<xsl:apply-templates/>
|
12017
12055
|
</fo:inline>
|
12018
12056
|
</xsl:if>
|
@@ -12163,6 +12201,7 @@
|
|
12163
12201
|
</xsl:when>
|
12164
12202
|
<xsl:otherwise>
|
12165
12203
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
12204
|
+
<xsl:call-template name="refine_example-name-style"/>
|
12166
12205
|
<xsl:apply-templates/>
|
12167
12206
|
</fo:inline>
|
12168
12207
|
</xsl:otherwise>
|
@@ -13375,6 +13414,7 @@
|
|
13375
13414
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
13376
13415
|
|
13377
13416
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
13417
|
+
|
13378
13418
|
<xsl:call-template name="processBibitem"/>
|
13379
13419
|
</fo:block>
|
13380
13420
|
|
@@ -13414,6 +13454,7 @@
|
|
13414
13454
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
13415
13455
|
<xsl:otherwise>
|
13416
13456
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
13457
|
+
|
13417
13458
|
<fo:list-item-label end-indent="label-end()">
|
13418
13459
|
<fo:block role="SKIP">
|
13419
13460
|
<fo:inline role="SKIP">
|
@@ -15179,4 +15220,6 @@
|
|
15179
15220
|
</xsl:if>
|
15180
15221
|
</xsl:template>
|
15181
15222
|
|
15223
|
+
<!-- update -->
|
15224
|
+
|
15182
15225
|
</xsl:stylesheet>
|