metanorma-csa 2.5.8 → 2.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1793ac3d69165ef65b75c3335772eb0d20a831a0a272b465de26a8f6309792ec
4
- data.tar.gz: 82f1aa2d5daf29108eef624c6eae872fa21487d882110c4c00adef481477dfd8
3
+ metadata.gz: 859ea727ec45f594154547a82297ec730729ff335ce4bbea879a11b619645fab
4
+ data.tar.gz: d92b84bb21d28e151b00c89c03ad1d790b5075f2cb8731be377738c9a2da8bc3
5
5
  SHA512:
6
- metadata.gz: 4b725ce592f60e79ddc83ea38052e4ab7da4906c8052fca65857f511528897df9829815a689a4be7b56847aac6168952a40e9ddb0532b9b4b9fc8769ade3c32b
7
- data.tar.gz: 7c2359eae44d5cca40401bdb9689b2a5a03a06339641be8f85f147d603e625fc0350bb051e57eb2cf03059f717a1f9e6f5bb94156da4b9d1a4df2bddbd5c9e83
6
+ metadata.gz: 8ff2397de738f3d640f66660b20d63bfd8eaf3e4ae40d4b9b37d075abd2e76a2c21cdc29c6dd19cd85fcd92d36321630cfdfaf4a1156b2e6977518ae154bd636
7
+ data.tar.gz: a183ebb02c9b3aa02dd629a1b3bb99c15720d4a8dd3003a0dc38ff2053c8be6d4db9be1f5979b5dddb0c45b1df8a2aea63994bb82a4e5050043d5c30d469ca33
@@ -222,7 +222,7 @@
222
222
  </xsl:variable>
223
223
 
224
224
  <xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface -->
225
- <xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//image or .//svg]">
225
+ <xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
226
226
  <fo:page-sequence master-reference="document" format="1" force-page-count="no-force">
227
227
 
228
228
  <xsl:attribute name="master-reference">
@@ -3922,7 +3922,9 @@
3922
3922
  <fo:block role="SKIP">
3923
3923
 
3924
3924
  <xsl:if test="$isGenerateTableIF = 'true'">
3925
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
3925
+
3926
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
3927
+
3926
3928
  </xsl:if>
3927
3929
 
3928
3930
  <xsl:apply-templates/>
@@ -4941,7 +4943,17 @@
4941
4943
  <xsl:call-template name="refine_dt-cell-style"/>
4942
4944
 
4943
4945
  <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
4944
- <xsl:copy-of select="@id"/>
4946
+
4947
+ <xsl:choose>
4948
+ <xsl:when test="$isGenerateTableIF = 'true'">
4949
+
4950
+ <xsl:copy-of select="@id"/>
4951
+
4952
+ </xsl:when>
4953
+ <xsl:otherwise>
4954
+ <xsl:copy-of select="@id"/>
4955
+ </xsl:otherwise>
4956
+ </xsl:choose>
4945
4957
 
4946
4958
  <xsl:if test="normalize-space($key_iso) = 'true'">
4947
4959
  <xsl:attribute name="margin-top">0</xsl:attribute>
@@ -4973,7 +4985,9 @@
4973
4985
  <fo:block role="SKIP">
4974
4986
 
4975
4987
  <xsl:if test="$isGenerateTableIF = 'true'">
4976
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4988
+
4989
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4990
+
4977
4991
  </xsl:if>
4978
4992
 
4979
4993
  <xsl:choose>
@@ -6213,6 +6227,14 @@
6213
6227
  </xsl:for-each>
6214
6228
  </xsl:variable>
6215
6229
 
6230
+ <!-- <xsl:if test="$debug = 'true'">
6231
+ <redirect:write file="{generate-id()}_words_with_width_sorted.xml">
6232
+ <td_text><xsl:copy-of select="$td_text"/></td_text>
6233
+ <words_with_width><xsl:copy-of select="$words_with_width"/></words_with_width>
6234
+ <xsl:copy-of select="$words_with_width_sorted"/>
6235
+ </redirect:write>
6236
+ </xsl:if> -->
6237
+
6216
6238
  <xsl:variable name="words">
6217
6239
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6218
6240
  <word>
@@ -6338,6 +6360,7 @@
6338
6360
  <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
6339
6361
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
6340
6362
  <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
6363
+ <xsl:if test="ancestor::*[local-name() = 'font_en_vertical']"><tag>font_en_vertical</tag></xsl:if>
6341
6364
  </tags>
6342
6365
  </xsl:template>
6343
6366
  <!-- =============================== -->
@@ -6878,7 +6901,16 @@
6878
6901
  </xsl:when>
6879
6902
  <xsl:otherwise>
6880
6903
  <!-- output text from <link>text</link> -->
6881
- <xsl:apply-templates/>
6904
+ <xsl:choose>
6905
+ <xsl:when test="starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.')">
6906
+ <xsl:call-template name="add-zero-spaces-link-java">
6907
+ <xsl:with-param name="text" select="."/>
6908
+ </xsl:call-template>
6909
+ </xsl:when>
6910
+ <xsl:otherwise>
6911
+ <xsl:apply-templates/>
6912
+ </xsl:otherwise>
6913
+ </xsl:choose>
6882
6914
  </xsl:otherwise>
6883
6915
  </xsl:choose>
6884
6916
  </fo:basic-link>
@@ -7521,16 +7553,29 @@
7521
7553
  <xsl:template name="getImageSrc">
7522
7554
  <xsl:choose>
7523
7555
  <xsl:when test="not(starts-with(@src, 'data:'))">
7556
+ <xsl:call-template name="getImageSrcExternal"/>
7557
+ </xsl:when>
7558
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
7559
+ </xsl:choose>
7560
+ </xsl:template>
7561
+
7562
+ <xsl:template name="getImageSrcExternal">
7563
+ <xsl:choose>
7564
+ <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
7565
+ <xsl:value-of select="@src"/>
7566
+ </xsl:when>
7567
+ <xsl:otherwise>
7568
+ <xsl:variable name="src_with_basepath" select="concat($basepath, @src)"/>
7569
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($src_with_basepath)))"/>
7524
7570
  <xsl:choose>
7525
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
7526
- <xsl:value-of select="@src"/>
7571
+ <xsl:when test="$file_exists = 'true'">
7572
+ <xsl:value-of select="$src_with_basepath"/>
7527
7573
  </xsl:when>
7528
7574
  <xsl:otherwise>
7529
- <xsl:value-of select="concat($basepath, @src)"/>
7575
+ <xsl:value-of select="@src"/>
7530
7576
  </xsl:otherwise>
7531
7577
  </xsl:choose>
7532
- </xsl:when>
7533
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
7578
+ </xsl:otherwise>
7534
7579
  </xsl:choose>
7535
7580
  </xsl:template>
7536
7581
 
@@ -7578,14 +7623,8 @@
7578
7623
  <xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
7579
7624
  </xsl:when>
7580
7625
  <xsl:when test="not(starts-with(@src, 'data:'))">
7581
- <xsl:choose>
7582
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
7583
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
7584
- </xsl:when>
7585
- <xsl:otherwise>
7586
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
7587
- </xsl:otherwise>
7588
- </xsl:choose>
7626
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
7627
+ <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
7589
7628
  </xsl:when>
7590
7629
  <xsl:otherwise>
7591
7630
  <xsl:value-of select="@src"/>
@@ -7606,16 +7645,8 @@
7606
7645
  </svg>
7607
7646
  </xsl:when>
7608
7647
  <xsl:when test="not(starts-with(@src, 'data:'))">
7609
- <xsl:variable name="src">
7610
- <xsl:choose>
7611
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
7612
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
7613
- </xsl:when>
7614
- <xsl:otherwise>
7615
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
7616
- </xsl:otherwise>
7617
- </xsl:choose>
7618
- </xsl:variable>
7648
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
7649
+ <xsl:variable name="src" select="concat('url(file:///', $src_external, ')')"/>
7619
7650
  <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
7620
7651
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
7621
7652
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
@@ -11711,7 +11742,9 @@
11711
11742
  <xsl:template name="add_id">
11712
11743
  <xsl:if test="not(@id)">
11713
11744
  <!-- add @id - first element with @id plus '_element_name' -->
11714
- <xsl:attribute name="id"><xsl:value-of select="(.//*[@id])[1]/@id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
11745
+ <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
11746
+ <xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
11747
+ <xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
11715
11748
  </xsl:if>
11716
11749
  </xsl:template>
11717
11750
 
@@ -13016,6 +13049,7 @@
13016
13049
  <xsl:param name="formatted">false</xsl:param>
13017
13050
  <xsl:param name="lang"/>
13018
13051
  <xsl:param name="returnEmptyIfNotFound">false</xsl:param>
13052
+ <xsl:param name="bibdata_updated"/>
13019
13053
 
13020
13054
  <xsl:variable name="curr_lang">
13021
13055
  <xsl:choose>
@@ -13029,6 +13063,9 @@
13029
13063
 
13030
13064
  <xsl:variable name="data_value">
13031
13065
  <xsl:choose>
13066
+ <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
13067
+ <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
13068
+ </xsl:when>
13032
13069
  <xsl:when test="$formatted = 'true'">
13033
13070
  <xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
13034
13071
  </xsl:when>
@@ -13200,14 +13237,8 @@
13200
13237
  <xsl:value-of select="$src"/>
13201
13238
  </xsl:when>
13202
13239
  <xsl:otherwise>
13203
- <xsl:choose>
13204
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
13205
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
13206
- </xsl:when>
13207
- <xsl:otherwise>
13208
- <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
13209
- </xsl:otherwise>
13210
- </xsl:choose>
13240
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
13241
+ <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
13211
13242
  </xsl:otherwise>
13212
13243
  </xsl:choose>
13213
13244
  </xsl:template>
@@ -13229,15 +13260,23 @@
13229
13260
  <!-- END: insert cover page image -->
13230
13261
 
13231
13262
  <!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
13263
+ <xsl:variable name="regex_ja_spec_half_width_">
13264
+ \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
13265
+ \u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
13266
+ \u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
13267
+ \u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
13268
+ \uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
13269
+ \uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
13270
+ \u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
13271
+ \u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
13272
+ </xsl:variable>
13273
+ <xsl:variable name="regex_ja_spec_half_width" select="translate(normalize-space($regex_ja_spec_half_width_), ' ', '')"/>
13232
13274
  <xsl:variable name="regex_ja_spec_">[
13233
13275
  <!-- Rotate 90° clockwise -->
13234
- \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
13276
+ <xsl:value-of select="$regex_ja_spec_half_width"/>
13235
13277
  \uFF08 <!-- U+FF08 FULLWIDTH LEFT PARENTHESIS (() -->
13236
- \u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
13237
13278
  \uFF09 <!-- U+FF09 FULLWIDTH RIGHT PARENTHESIS ()) -->
13238
- \u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
13239
13279
  \uFF5B <!-- U+FF5B FULLWIDTH LEFT CURLY BRACKET ({) -->
13240
- \u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
13241
13280
  \uFF5D <!-- U+FF5D FULLWIDTH RIGHT CURLY BRACKET (}) -->
13242
13281
  \u3014 <!-- U+3014 LEFT TORTOISE SHELL BRACKET (〔) -->
13243
13282
  \u3015 <!-- U+3015 RIGHT TORTOISE SHELL BRACKET (〕) -->
@@ -13245,21 +13284,16 @@
13245
13284
  \u3011 <!-- U+3011 RIGHT BLACK LENTICULAR BRACKET (】) -->
13246
13285
  \u300A <!-- U+300A LEFT DOUBLE ANGLE BRACKET (《) -->
13247
13286
  \u300B <!-- U+300B RIGHT DOUBLE ANGLE BRACKET (》) -->
13248
- \uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
13249
13287
  \u300C <!-- U+300C LEFT CORNER BRACKET (「) -->
13250
- \uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
13251
13288
  \u300D <!-- U+300D RIGHT CORNER BRACKET (」) -->
13252
13289
  \u300E <!-- U+300E LEFT WHITE CORNER BRACKET (『) -->
13253
13290
  \u300F <!-- U+300F RIGHT WHITE CORNER BRACKET (』) -->
13254
- \u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
13255
13291
  \uFF3B <!-- U+FF3B FULLWIDTH LEFT SQUARE BRACKET ([) -->
13256
- \u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
13257
13292
  \uFF3D <!-- U+FF3D FULLWIDTH RIGHT SQUARE BRACKET (]) -->
13258
13293
  \u3008 <!-- U+3008 LEFT ANGLE BRACKET (〈) -->
13259
13294
  \u3009 <!-- U+3009 RIGHT ANGLE BRACKET (〉) -->
13260
13295
  \u3016 <!-- U+3016 LEFT WHITE LENTICULAR BRACKET (〖) -->
13261
13296
  \u3017 <!-- U+3017 RIGHT WHITE LENTICULAR BRACKET (〗) -->
13262
-
13263
13297
  \u301A <!-- U+301A LEFT WHITE SQUARE BRACKET (〚) -->
13264
13298
  \u301B <!-- U+301B RIGHT WHITE SQUARE BRACKET (〛) -->
13265
13299
  \u301C <!-- U+301C WAVE DASH (〜) -->
@@ -13291,6 +13325,7 @@
13291
13325
  <xsl:variable name="regex_ja_spec"><xsl:value-of select="translate(normalize-space($regex_ja_spec_), ' ', '')"/></xsl:variable>
13292
13326
  <xsl:template name="insertVerticalChar">
13293
13327
  <xsl:param name="str"/>
13328
+ <xsl:param name="char_prev"/>
13294
13329
  <xsl:param name="writing-mode">lr-tb</xsl:param>
13295
13330
  <xsl:param name="reference-orientation">90</xsl:param>
13296
13331
  <xsl:param name="add_zero_width_space">false</xsl:param>
@@ -13300,53 +13335,99 @@
13300
13335
  </xsl:when>
13301
13336
  <xsl:otherwise>
13302
13337
  <xsl:if test="string-length($str) &gt; 0">
13303
- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/>
13338
+
13339
+ <!-- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/> -->
13304
13340
  <xsl:variable name="char" select="substring($str,1,1)"/>
13305
- <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
13306
- <xsl:if test="normalize-space($writing-mode) != ''">
13307
- <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
13308
- <xsl:attribute name="reference-orientation">90</xsl:attribute>
13309
- </xsl:if>
13310
- <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
13311
- <xsl:attribute name="reference-orientation">0</xsl:attribute>
13312
- </xsl:if>
13313
- <xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
13314
- <!-- Rotate 180°:
13315
- U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
13316
- U+3002 IDEOGRAPHIC FULL STOP (。)
13317
- U+FE52 SMALL FULL STOP (﹒)
13318
- U+FF0E FULLWIDTH FULL STOP ()
13319
- -->
13320
- <xsl:attribute name="reference-orientation">-90</xsl:attribute>
13321
- </xsl:if>
13322
- <fo:block-container width="1em">
13323
- <fo:block line-height="1em">
13324
- <xsl:choose>
13325
- <xsl:when test="$horizontal_mode = 'true'">
13326
- <xsl:value-of select="$str"/>
13327
- </xsl:when>
13328
- <xsl:otherwise>
13341
+ <xsl:variable name="char_next" select="substring($str,2,1)"/>
13342
+
13343
+ <xsl:variable name="char_half_width" select="normalize-space(java:matches(java:java.lang.String.new($char), concat('([', $regex_ja_spec_half_width, ']{1,})')))"/>
13344
+
13345
+ <xsl:choose>
13346
+ <xsl:when test="$char_half_width = 'true'">
13347
+ <fo:inline>
13348
+ <xsl:attribute name="baseline-shift">7%</xsl:attribute>
13349
+ <xsl:value-of select="$char"/>
13350
+ </fo:inline>
13351
+ </xsl:when>
13352
+ <xsl:otherwise>
13353
+ <!-- namespace-uri(ancestor::*[local-name() = 'title']) != '' to skip title from $contents -->
13354
+ <xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_prev = '' and ../preceding-sibling::node())">
13355
+ <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13356
+ </xsl:if>
13357
+ <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP" text-align-last="center">
13358
+ <xsl:if test="normalize-space($writing-mode) != ''">
13359
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
13360
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
13361
+ </xsl:if>
13362
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
13363
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
13364
+ </xsl:if>
13365
+ <xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
13366
+ <!-- Rotate 180°:
13367
+ U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
13368
+ U+3002 IDEOGRAPHIC FULL STOP (。)
13369
+ U+FE52 SMALL FULL STOP (﹒)
13370
+ U+FF0E FULLWIDTH FULL STOP (.)
13371
+ -->
13372
+ <xsl:attribute name="reference-orientation">-90</xsl:attribute>
13373
+ </xsl:if>
13374
+ <fo:block-container width="1em" role="SKIP"><!-- border="0.5pt solid blue" -->
13375
+ <fo:block line-height="1em" role="SKIP">
13376
+ <!-- <xsl:choose>
13377
+ <xsl:when test="$horizontal_mode = 'true'">
13378
+ <xsl:value-of select="$str"/>
13379
+ </xsl:when>
13380
+ <xsl:otherwise>
13381
+ <xsl:value-of select="$char"/>
13382
+ </xsl:otherwise>
13383
+ </xsl:choose> -->
13329
13384
  <xsl:value-of select="$char"/>
13330
- </xsl:otherwise>
13331
- </xsl:choose>
13332
- </fo:block>
13333
- </fo:block-container>
13334
- </fo:inline-container>
13335
- <xsl:if test="$add_zero_width_space = 'true' and ($char = ',' or $char = '.' or $char = ' ' or $char = '·' or $char = ')' or $char = ']' or $char = '}')"><xsl:value-of select="$zero_width_space"/></xsl:if>
13336
-
13337
- <xsl:if test="$horizontal_mode = 'false'">
13338
- <xsl:call-template name="insertVerticalChar">
13339
- <xsl:with-param name="str" select="substring($str, 2)"/>
13340
- <xsl:with-param name="writing-mode" select="$writing-mode"/>
13341
- <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
13342
- <xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
13343
- </xsl:call-template>
13344
- </xsl:if>
13385
+ </fo:block>
13386
+ </fo:block-container>
13387
+ </fo:inline-container>
13388
+ <xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_next != '' or ../following-sibling::node())">
13389
+ <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
13390
+ </xsl:if>
13391
+ </xsl:otherwise>
13392
+ </xsl:choose>
13393
+
13394
+ <xsl:if test="$add_zero_width_space = 'true' and ($char = ',' or $char = '.' or $char = ' ' or $char = '·' or $char = ')' or $char = ']' or $char = '}' or $char = '/')"><xsl:value-of select="$zero_width_space"/></xsl:if>
13395
+ <!-- <xsl:if test="$horizontal_mode = 'false'"> -->
13396
+ <xsl:call-template name="insertVerticalChar">
13397
+ <xsl:with-param name="str" select="substring($str, 2)"/>
13398
+ <xsl:with-param name="char_prev" select="$char"/>
13399
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
13400
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
13401
+ <xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
13402
+ </xsl:call-template>
13403
+ <!-- </xsl:if> -->
13345
13404
  </xsl:if>
13346
13405
  </xsl:otherwise>
13347
13406
  </xsl:choose>
13348
13407
  </xsl:template>
13349
13408
 
13409
+ <xsl:template name="insertHorizontalChars">
13410
+ <xsl:param name="str"/>
13411
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
13412
+ <xsl:param name="reference-orientation">90</xsl:param>
13413
+ <xsl:param name="add_zero_width_space">false</xsl:param>
13414
+ <xsl:choose>
13415
+ <xsl:otherwise>
13416
+ <fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm" role="SKIP">
13417
+ <xsl:if test="normalize-space($writing-mode) != ''">
13418
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
13419
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
13420
+ </xsl:if>
13421
+ <fo:block-container width="1em" role="SKIP"> <!-- border="0.5pt solid green" -->
13422
+ <fo:block line-height="1em" role="SKIP">
13423
+ <xsl:value-of select="$str"/>
13424
+ </fo:block>
13425
+ </fo:block-container>
13426
+ </fo:inline-container>
13427
+ </xsl:otherwise>
13428
+ </xsl:choose>
13429
+ </xsl:template>
13430
+
13350
13431
  <xsl:template name="number-to-words">
13351
13432
  <xsl:param name="number"/>
13352
13433
  <xsl:param name="first"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "2.5.8".freeze
3
+ VERSION = "2.5.9".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.8
4
+ version: 2.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-10 00:00:00.000000000 Z
11
+ date: 2024-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic