metanorma-ribose 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: 4610f907d3022077b5cc2a16f0d05228c3e805bc7dc191b5133a681a1bf8d2d3
4
- data.tar.gz: 63cecb2f77af07422987f3b09591045c243d0207b76f8fdbba752e27fc146c21
3
+ metadata.gz: c2ce34357fcbe779b956860fb3d3da2ebca0f0a709520854f213f7bfd156f771
4
+ data.tar.gz: dc2499f9ac4065e5587d87cdbd23213de19be6520bcf256eaf1b389225f156dd
5
5
  SHA512:
6
- metadata.gz: c15a22c66e48ae6ae92525dc682e40c10e7cee5a4a98111e244e5dd3d60dbb7c08c77b95f0d2a1f6b448124f89e8b21a497cc142fcc2b413c6122014d4b08a07
7
- data.tar.gz: ba2a58f12b20d3b513e128b9cf0f82f0ba65516a283d33b31f4ef6c26254e9ec271040c4dcb074365feff3289fbf4bdb2989054cb5edea01b70871ce9a24e9e6
6
+ metadata.gz: 2ec6784ba3c09413d4fa57fd359e1a65831a80092d79728c8a1a25eb678e92b118334ae3d0bc72d80da8f9b437a4d6b5ead1e8c915dcb368c9449d66da616256
7
+ data.tar.gz: a22da98d2becdb55928d9fbd7fd12516e4f74cf41c44dfc8971ce49a2262fe37c45a11a2651080ada49604e42222931d51dff3fb819d79317873d1d6e36697e3
@@ -461,7 +461,7 @@
461
461
 
462
462
  <xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface -->
463
463
 
464
- <xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//image or .//svg]">
464
+ <xsl:for-each select=".//*[local-name() = 'page_sequence'][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
465
465
 
466
466
  <fo:page-sequence master-reference="document" force-page-count="no-force">
467
467
 
@@ -4690,7 +4690,9 @@
4690
4690
  <fo:block role="SKIP">
4691
4691
 
4692
4692
  <xsl:if test="$isGenerateTableIF = 'true'">
4693
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4693
+
4694
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4695
+
4694
4696
  </xsl:if>
4695
4697
 
4696
4698
  <xsl:apply-templates/>
@@ -5712,7 +5714,17 @@
5712
5714
  <xsl:call-template name="refine_dt-cell-style"/>
5713
5715
 
5714
5716
  <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
5715
- <xsl:copy-of select="@id"/>
5717
+
5718
+ <xsl:choose>
5719
+ <xsl:when test="$isGenerateTableIF = 'true'">
5720
+
5721
+ <xsl:copy-of select="@id"/>
5722
+
5723
+ </xsl:when>
5724
+ <xsl:otherwise>
5725
+ <xsl:copy-of select="@id"/>
5726
+ </xsl:otherwise>
5727
+ </xsl:choose>
5716
5728
 
5717
5729
  <xsl:if test="normalize-space($key_iso) = 'true'">
5718
5730
  <xsl:attribute name="margin-top">0</xsl:attribute>
@@ -5744,7 +5756,9 @@
5744
5756
  <fo:block role="SKIP">
5745
5757
 
5746
5758
  <xsl:if test="$isGenerateTableIF = 'true'">
5747
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5759
+
5760
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5761
+
5748
5762
  </xsl:if>
5749
5763
 
5750
5764
  <xsl:choose>
@@ -6992,6 +7006,14 @@
6992
7006
  </xsl:for-each>
6993
7007
  </xsl:variable>
6994
7008
 
7009
+ <!-- <xsl:if test="$debug = 'true'">
7010
+ <redirect:write file="{generate-id()}_words_with_width_sorted.xml">
7011
+ <td_text><xsl:copy-of select="$td_text"/></td_text>
7012
+ <words_with_width><xsl:copy-of select="$words_with_width"/></words_with_width>
7013
+ <xsl:copy-of select="$words_with_width_sorted"/>
7014
+ </redirect:write>
7015
+ </xsl:if> -->
7016
+
6995
7017
  <xsl:variable name="words">
6996
7018
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6997
7019
  <word>
@@ -7117,6 +7139,7 @@
7117
7139
  <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
7118
7140
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
7119
7141
  <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
7142
+ <xsl:if test="ancestor::*[local-name() = 'font_en_vertical']"><tag>font_en_vertical</tag></xsl:if>
7120
7143
  </tags>
7121
7144
  </xsl:template>
7122
7145
  <!-- =============================== -->
@@ -7657,7 +7680,16 @@
7657
7680
  </xsl:when>
7658
7681
  <xsl:otherwise>
7659
7682
  <!-- output text from <link>text</link> -->
7660
- <xsl:apply-templates/>
7683
+ <xsl:choose>
7684
+ <xsl:when test="starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.')">
7685
+ <xsl:call-template name="add-zero-spaces-link-java">
7686
+ <xsl:with-param name="text" select="."/>
7687
+ </xsl:call-template>
7688
+ </xsl:when>
7689
+ <xsl:otherwise>
7690
+ <xsl:apply-templates/>
7691
+ </xsl:otherwise>
7692
+ </xsl:choose>
7661
7693
  </xsl:otherwise>
7662
7694
  </xsl:choose>
7663
7695
  </fo:basic-link>
@@ -8297,16 +8329,29 @@
8297
8329
  <xsl:template name="getImageSrc">
8298
8330
  <xsl:choose>
8299
8331
  <xsl:when test="not(starts-with(@src, 'data:'))">
8332
+ <xsl:call-template name="getImageSrcExternal"/>
8333
+ </xsl:when>
8334
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
8335
+ </xsl:choose>
8336
+ </xsl:template>
8337
+
8338
+ <xsl:template name="getImageSrcExternal">
8339
+ <xsl:choose>
8340
+ <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
8341
+ <xsl:value-of select="@src"/>
8342
+ </xsl:when>
8343
+ <xsl:otherwise>
8344
+ <xsl:variable name="src_with_basepath" select="concat($basepath, @src)"/>
8345
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($src_with_basepath)))"/>
8300
8346
  <xsl:choose>
8301
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
8302
- <xsl:value-of select="@src"/>
8347
+ <xsl:when test="$file_exists = 'true'">
8348
+ <xsl:value-of select="$src_with_basepath"/>
8303
8349
  </xsl:when>
8304
8350
  <xsl:otherwise>
8305
- <xsl:value-of select="concat($basepath, @src)"/>
8351
+ <xsl:value-of select="@src"/>
8306
8352
  </xsl:otherwise>
8307
8353
  </xsl:choose>
8308
- </xsl:when>
8309
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
8354
+ </xsl:otherwise>
8310
8355
  </xsl:choose>
8311
8356
  </xsl:template>
8312
8357
 
@@ -8354,14 +8399,8 @@
8354
8399
  <xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
8355
8400
  </xsl:when>
8356
8401
  <xsl:when test="not(starts-with(@src, 'data:'))">
8357
- <xsl:choose>
8358
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
8359
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
8360
- </xsl:when>
8361
- <xsl:otherwise>
8362
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
8363
- </xsl:otherwise>
8364
- </xsl:choose>
8402
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
8403
+ <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
8365
8404
  </xsl:when>
8366
8405
  <xsl:otherwise>
8367
8406
  <xsl:value-of select="@src"/>
@@ -8382,16 +8421,8 @@
8382
8421
  </svg>
8383
8422
  </xsl:when>
8384
8423
  <xsl:when test="not(starts-with(@src, 'data:'))">
8385
- <xsl:variable name="src">
8386
- <xsl:choose>
8387
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
8388
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
8389
- </xsl:when>
8390
- <xsl:otherwise>
8391
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
8392
- </xsl:otherwise>
8393
- </xsl:choose>
8394
- </xsl:variable>
8424
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
8425
+ <xsl:variable name="src" select="concat('url(file:///', $src_external, ')')"/>
8395
8426
  <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
8396
8427
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
8397
8428
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
@@ -12509,7 +12540,9 @@
12509
12540
  <xsl:template name="add_id">
12510
12541
  <xsl:if test="not(@id)">
12511
12542
  <!-- add @id - first element with @id plus '_element_name' -->
12512
- <xsl:attribute name="id"><xsl:value-of select="(.//*[@id])[1]/@id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
12543
+ <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
12544
+ <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>
12545
+ <xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
12513
12546
  </xsl:if>
12514
12547
  </xsl:template>
12515
12548
 
@@ -13814,6 +13847,7 @@
13814
13847
  <xsl:param name="formatted">false</xsl:param>
13815
13848
  <xsl:param name="lang"/>
13816
13849
  <xsl:param name="returnEmptyIfNotFound">false</xsl:param>
13850
+ <xsl:param name="bibdata_updated"/>
13817
13851
 
13818
13852
  <xsl:variable name="curr_lang">
13819
13853
  <xsl:choose>
@@ -13827,6 +13861,9 @@
13827
13861
 
13828
13862
  <xsl:variable name="data_value">
13829
13863
  <xsl:choose>
13864
+ <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
13865
+ <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
13866
+ </xsl:when>
13830
13867
  <xsl:when test="$formatted = 'true'">
13831
13868
  <xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
13832
13869
  </xsl:when>
@@ -13998,14 +14035,8 @@
13998
14035
  <xsl:value-of select="$src"/>
13999
14036
  </xsl:when>
14000
14037
  <xsl:otherwise>
14001
- <xsl:choose>
14002
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
14003
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
14004
- </xsl:when>
14005
- <xsl:otherwise>
14006
- <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
14007
- </xsl:otherwise>
14008
- </xsl:choose>
14038
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
14039
+ <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
14009
14040
  </xsl:otherwise>
14010
14041
  </xsl:choose>
14011
14042
  </xsl:template>
@@ -14027,15 +14058,23 @@
14027
14058
  <!-- END: insert cover page image -->
14028
14059
 
14029
14060
  <!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
14061
+ <xsl:variable name="regex_ja_spec_half_width_">
14062
+ \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
14063
+ \u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
14064
+ \u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
14065
+ \u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
14066
+ \uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
14067
+ \uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
14068
+ \u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
14069
+ \u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
14070
+ </xsl:variable>
14071
+ <xsl:variable name="regex_ja_spec_half_width" select="translate(normalize-space($regex_ja_spec_half_width_), ' ', '')"/>
14030
14072
  <xsl:variable name="regex_ja_spec_">[
14031
14073
  <!-- Rotate 90° clockwise -->
14032
- \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
14074
+ <xsl:value-of select="$regex_ja_spec_half_width"/>
14033
14075
  \uFF08 <!-- U+FF08 FULLWIDTH LEFT PARENTHESIS (() -->
14034
- \u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
14035
14076
  \uFF09 <!-- U+FF09 FULLWIDTH RIGHT PARENTHESIS ()) -->
14036
- \u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
14037
14077
  \uFF5B <!-- U+FF5B FULLWIDTH LEFT CURLY BRACKET ({) -->
14038
- \u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
14039
14078
  \uFF5D <!-- U+FF5D FULLWIDTH RIGHT CURLY BRACKET (}) -->
14040
14079
  \u3014 <!-- U+3014 LEFT TORTOISE SHELL BRACKET (〔) -->
14041
14080
  \u3015 <!-- U+3015 RIGHT TORTOISE SHELL BRACKET (〕) -->
@@ -14043,21 +14082,16 @@
14043
14082
  \u3011 <!-- U+3011 RIGHT BLACK LENTICULAR BRACKET (】) -->
14044
14083
  \u300A <!-- U+300A LEFT DOUBLE ANGLE BRACKET (《) -->
14045
14084
  \u300B <!-- U+300B RIGHT DOUBLE ANGLE BRACKET (》) -->
14046
- \uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
14047
14085
  \u300C <!-- U+300C LEFT CORNER BRACKET (「) -->
14048
- \uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
14049
14086
  \u300D <!-- U+300D RIGHT CORNER BRACKET (」) -->
14050
14087
  \u300E <!-- U+300E LEFT WHITE CORNER BRACKET (『) -->
14051
14088
  \u300F <!-- U+300F RIGHT WHITE CORNER BRACKET (』) -->
14052
- \u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
14053
14089
  \uFF3B <!-- U+FF3B FULLWIDTH LEFT SQUARE BRACKET ([) -->
14054
- \u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
14055
14090
  \uFF3D <!-- U+FF3D FULLWIDTH RIGHT SQUARE BRACKET (]) -->
14056
14091
  \u3008 <!-- U+3008 LEFT ANGLE BRACKET (〈) -->
14057
14092
  \u3009 <!-- U+3009 RIGHT ANGLE BRACKET (〉) -->
14058
14093
  \u3016 <!-- U+3016 LEFT WHITE LENTICULAR BRACKET (〖) -->
14059
14094
  \u3017 <!-- U+3017 RIGHT WHITE LENTICULAR BRACKET (〗) -->
14060
-
14061
14095
  \u301A <!-- U+301A LEFT WHITE SQUARE BRACKET (〚) -->
14062
14096
  \u301B <!-- U+301B RIGHT WHITE SQUARE BRACKET (〛) -->
14063
14097
  \u301C <!-- U+301C WAVE DASH (〜) -->
@@ -14089,6 +14123,7 @@
14089
14123
  <xsl:variable name="regex_ja_spec"><xsl:value-of select="translate(normalize-space($regex_ja_spec_), ' ', '')"/></xsl:variable>
14090
14124
  <xsl:template name="insertVerticalChar">
14091
14125
  <xsl:param name="str"/>
14126
+ <xsl:param name="char_prev"/>
14092
14127
  <xsl:param name="writing-mode">lr-tb</xsl:param>
14093
14128
  <xsl:param name="reference-orientation">90</xsl:param>
14094
14129
  <xsl:param name="add_zero_width_space">false</xsl:param>
@@ -14098,53 +14133,99 @@
14098
14133
  </xsl:when>
14099
14134
  <xsl:otherwise>
14100
14135
  <xsl:if test="string-length($str) &gt; 0">
14101
- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/>
14136
+
14137
+ <!-- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/> -->
14102
14138
  <xsl:variable name="char" select="substring($str,1,1)"/>
14103
- <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">
14104
- <xsl:if test="normalize-space($writing-mode) != ''">
14105
- <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
14106
- <xsl:attribute name="reference-orientation">90</xsl:attribute>
14107
- </xsl:if>
14108
- <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
14109
- <xsl:attribute name="reference-orientation">0</xsl:attribute>
14110
- </xsl:if>
14111
- <xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
14112
- <!-- Rotate 180°:
14113
- U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
14114
- U+3002 IDEOGRAPHIC FULL STOP (。)
14115
- U+FE52 SMALL FULL STOP (﹒)
14116
- U+FF0E FULLWIDTH FULL STOP ()
14117
- -->
14118
- <xsl:attribute name="reference-orientation">-90</xsl:attribute>
14119
- </xsl:if>
14120
- <fo:block-container width="1em">
14121
- <fo:block line-height="1em">
14122
- <xsl:choose>
14123
- <xsl:when test="$horizontal_mode = 'true'">
14124
- <xsl:value-of select="$str"/>
14125
- </xsl:when>
14126
- <xsl:otherwise>
14139
+ <xsl:variable name="char_next" select="substring($str,2,1)"/>
14140
+
14141
+ <xsl:variable name="char_half_width" select="normalize-space(java:matches(java:java.lang.String.new($char), concat('([', $regex_ja_spec_half_width, ']{1,})')))"/>
14142
+
14143
+ <xsl:choose>
14144
+ <xsl:when test="$char_half_width = 'true'">
14145
+ <fo:inline>
14146
+ <xsl:attribute name="baseline-shift">7%</xsl:attribute>
14147
+ <xsl:value-of select="$char"/>
14148
+ </fo:inline>
14149
+ </xsl:when>
14150
+ <xsl:otherwise>
14151
+ <!-- namespace-uri(ancestor::*[local-name() = 'title']) != '' to skip title from $contents -->
14152
+ <xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_prev = '' and ../preceding-sibling::node())">
14153
+ <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14154
+ </xsl:if>
14155
+ <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">
14156
+ <xsl:if test="normalize-space($writing-mode) != ''">
14157
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
14158
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
14159
+ </xsl:if>
14160
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
14161
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
14162
+ </xsl:if>
14163
+ <xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
14164
+ <!-- Rotate 180°:
14165
+ U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
14166
+ U+3002 IDEOGRAPHIC FULL STOP (。)
14167
+ U+FE52 SMALL FULL STOP (﹒)
14168
+ U+FF0E FULLWIDTH FULL STOP (.)
14169
+ -->
14170
+ <xsl:attribute name="reference-orientation">-90</xsl:attribute>
14171
+ </xsl:if>
14172
+ <fo:block-container width="1em" role="SKIP"><!-- border="0.5pt solid blue" -->
14173
+ <fo:block line-height="1em" role="SKIP">
14174
+ <!-- <xsl:choose>
14175
+ <xsl:when test="$horizontal_mode = 'true'">
14176
+ <xsl:value-of select="$str"/>
14177
+ </xsl:when>
14178
+ <xsl:otherwise>
14179
+ <xsl:value-of select="$char"/>
14180
+ </xsl:otherwise>
14181
+ </xsl:choose> -->
14127
14182
  <xsl:value-of select="$char"/>
14128
- </xsl:otherwise>
14129
- </xsl:choose>
14130
- </fo:block>
14131
- </fo:block-container>
14132
- </fo:inline-container>
14133
- <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>
14134
-
14135
- <xsl:if test="$horizontal_mode = 'false'">
14136
- <xsl:call-template name="insertVerticalChar">
14137
- <xsl:with-param name="str" select="substring($str, 2)"/>
14138
- <xsl:with-param name="writing-mode" select="$writing-mode"/>
14139
- <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
14140
- <xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
14141
- </xsl:call-template>
14142
- </xsl:if>
14183
+ </fo:block>
14184
+ </fo:block-container>
14185
+ </fo:inline-container>
14186
+ <xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_next != '' or ../following-sibling::node())">
14187
+ <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
14188
+ </xsl:if>
14189
+ </xsl:otherwise>
14190
+ </xsl:choose>
14191
+
14192
+ <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>
14193
+ <!-- <xsl:if test="$horizontal_mode = 'false'"> -->
14194
+ <xsl:call-template name="insertVerticalChar">
14195
+ <xsl:with-param name="str" select="substring($str, 2)"/>
14196
+ <xsl:with-param name="char_prev" select="$char"/>
14197
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
14198
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
14199
+ <xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
14200
+ </xsl:call-template>
14201
+ <!-- </xsl:if> -->
14143
14202
  </xsl:if>
14144
14203
  </xsl:otherwise>
14145
14204
  </xsl:choose>
14146
14205
  </xsl:template>
14147
14206
 
14207
+ <xsl:template name="insertHorizontalChars">
14208
+ <xsl:param name="str"/>
14209
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
14210
+ <xsl:param name="reference-orientation">90</xsl:param>
14211
+ <xsl:param name="add_zero_width_space">false</xsl:param>
14212
+ <xsl:choose>
14213
+ <xsl:otherwise>
14214
+ <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">
14215
+ <xsl:if test="normalize-space($writing-mode) != ''">
14216
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
14217
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
14218
+ </xsl:if>
14219
+ <fo:block-container width="1em" role="SKIP"> <!-- border="0.5pt solid green" -->
14220
+ <fo:block line-height="1em" role="SKIP">
14221
+ <xsl:value-of select="$str"/>
14222
+ </fo:block>
14223
+ </fo:block-container>
14224
+ </fo:inline-container>
14225
+ </xsl:otherwise>
14226
+ </xsl:choose>
14227
+ </xsl:template>
14228
+
14148
14229
  <xsl:template name="number-to-words">
14149
14230
  <xsl:param name="number"/>
14150
14231
  <xsl:param name="first"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
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-ribose
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