metanorma-iec 2.5.9 → 2.5.10

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: 5d0becaffcc3cd620e5f2b1d87977bb658288535432eec52e4a63ee7f06b3977
4
- data.tar.gz: 531a8328fbe227e5f9a948d7acc09404bd6a16ace11baf9dabc91d2662147252
3
+ metadata.gz: 377a97d5152785fc4d78b5020b3a4f7a377f1ecffe98ded9da290644a6a43a43
4
+ data.tar.gz: 1e9c8b5ec23a5994ad9614b4bc70f8b9e17dd45fe60135450a85ebfd0a2b90e4
5
5
  SHA512:
6
- metadata.gz: 7e5a09441f37e50e32afd63f558898e95c3da2e5fb1f03cea2ee50cbc7d06fca1b466b6b5cee2dca750da5597923378d675476aa56e5a70d8b2a9c247657a0ba
7
- data.tar.gz: eec7c45f07955eccc9e66433fdbcecf490840f357ca6fe327d7e1e457f75ecf545a889cc537d652f3e899d2404b1998f559bf28be44087f1ce37003049afd642
6
+ metadata.gz: d29a964bc22ca2df50b19b4fbb157138a70eeca0a2875d93a16d3476c308a4c51c09aa8b1f6ab99c51af4857a24d08905241aed15a1b610316fc873859563c3c
7
+ data.tar.gz: 146f19269c143da797305d34b55700c7456813f1d054e0b4c51dd9dd27898dd0b8e70c3bde5a81f183c84f1b53a6652430823e641e4f2e95cc8e8f22791af881
@@ -1411,7 +1411,7 @@
1411
1411
  <xsl:template name="insertPrefacepages">
1412
1412
  <xsl:param name="num"/>
1413
1413
 
1414
- <xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//image or .//svg]">
1414
+ <xsl:for-each select=".//*[local-name() = 'page_sequence'][parent::*[local-name() = 'preface']][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
1415
1415
 
1416
1416
  <fo:page-sequence master-reference="document" format="1" force-page-count="no-force">
1417
1417
 
@@ -1444,7 +1444,7 @@
1444
1444
  <xsl:param name="lang" select="'en'"/>
1445
1445
  <!-- BODY -->
1446
1446
 
1447
- <xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//image or .//svg]">
1447
+ <xsl:for-each select=".//*[local-name() = 'page_sequence'][not(parent::*[local-name() = 'preface'])][normalize-space() != '' or .//*[local-name() = 'image'] or .//*[local-name() = 'svg']]">
1448
1448
 
1449
1449
  <fo:page-sequence master-reference="document" force-page-count="no-force">
1450
1450
 
@@ -5594,7 +5594,9 @@
5594
5594
  <fo:block role="SKIP">
5595
5595
 
5596
5596
  <xsl:if test="$isGenerateTableIF = 'true'">
5597
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5597
+
5598
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
5599
+
5598
5600
  </xsl:if>
5599
5601
 
5600
5602
  <xsl:apply-templates/>
@@ -6627,7 +6629,17 @@
6627
6629
  <xsl:call-template name="refine_dt-cell-style"/>
6628
6630
 
6629
6631
  <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
6630
- <xsl:copy-of select="@id"/>
6632
+
6633
+ <xsl:choose>
6634
+ <xsl:when test="$isGenerateTableIF = 'true'">
6635
+
6636
+ <xsl:copy-of select="@id"/>
6637
+
6638
+ </xsl:when>
6639
+ <xsl:otherwise>
6640
+ <xsl:copy-of select="@id"/>
6641
+ </xsl:otherwise>
6642
+ </xsl:choose>
6631
6643
 
6632
6644
  <xsl:if test="normalize-space($key_iso) = 'true'">
6633
6645
  <xsl:attribute name="margin-top">0</xsl:attribute>
@@ -6659,7 +6671,9 @@
6659
6671
  <fo:block role="SKIP">
6660
6672
 
6661
6673
  <xsl:if test="$isGenerateTableIF = 'true'">
6662
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6674
+
6675
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6676
+
6663
6677
  </xsl:if>
6664
6678
 
6665
6679
  <xsl:choose>
@@ -7970,6 +7984,14 @@
7970
7984
  </xsl:for-each>
7971
7985
  </xsl:variable>
7972
7986
 
7987
+ <!-- <xsl:if test="$debug = 'true'">
7988
+ <redirect:write file="{generate-id()}_words_with_width_sorted.xml">
7989
+ <td_text><xsl:copy-of select="$td_text"/></td_text>
7990
+ <words_with_width><xsl:copy-of select="$words_with_width"/></words_with_width>
7991
+ <xsl:copy-of select="$words_with_width_sorted"/>
7992
+ </redirect:write>
7993
+ </xsl:if> -->
7994
+
7973
7995
  <xsl:variable name="words">
7974
7996
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
7975
7997
  <word>
@@ -8095,6 +8117,7 @@
8095
8117
  <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
8096
8118
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
8097
8119
  <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
8120
+ <xsl:if test="ancestor::*[local-name() = 'font_en_vertical']"><tag>font_en_vertical</tag></xsl:if>
8098
8121
  </tags>
8099
8122
  </xsl:template>
8100
8123
  <!-- =============================== -->
@@ -8635,7 +8658,16 @@
8635
8658
  </xsl:when>
8636
8659
  <xsl:otherwise>
8637
8660
  <!-- output text from <link>text</link> -->
8638
- <xsl:apply-templates/>
8661
+ <xsl:choose>
8662
+ <xsl:when test="starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.')">
8663
+ <xsl:call-template name="add-zero-spaces-link-java">
8664
+ <xsl:with-param name="text" select="."/>
8665
+ </xsl:call-template>
8666
+ </xsl:when>
8667
+ <xsl:otherwise>
8668
+ <xsl:apply-templates/>
8669
+ </xsl:otherwise>
8670
+ </xsl:choose>
8639
8671
  </xsl:otherwise>
8640
8672
  </xsl:choose>
8641
8673
  </fo:basic-link>
@@ -9276,16 +9308,29 @@
9276
9308
  <xsl:template name="getImageSrc">
9277
9309
  <xsl:choose>
9278
9310
  <xsl:when test="not(starts-with(@src, 'data:'))">
9311
+ <xsl:call-template name="getImageSrcExternal"/>
9312
+ </xsl:when>
9313
+ <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
9314
+ </xsl:choose>
9315
+ </xsl:template>
9316
+
9317
+ <xsl:template name="getImageSrcExternal">
9318
+ <xsl:choose>
9319
+ <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
9320
+ <xsl:value-of select="@src"/>
9321
+ </xsl:when>
9322
+ <xsl:otherwise>
9323
+ <xsl:variable name="src_with_basepath" select="concat($basepath, @src)"/>
9324
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($src_with_basepath)))"/>
9279
9325
  <xsl:choose>
9280
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
9281
- <xsl:value-of select="@src"/>
9326
+ <xsl:when test="$file_exists = 'true'">
9327
+ <xsl:value-of select="$src_with_basepath"/>
9282
9328
  </xsl:when>
9283
9329
  <xsl:otherwise>
9284
- <xsl:value-of select="concat($basepath, @src)"/>
9330
+ <xsl:value-of select="@src"/>
9285
9331
  </xsl:otherwise>
9286
9332
  </xsl:choose>
9287
- </xsl:when>
9288
- <xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
9333
+ </xsl:otherwise>
9289
9334
  </xsl:choose>
9290
9335
  </xsl:template>
9291
9336
 
@@ -9333,14 +9378,8 @@
9333
9378
  <xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
9334
9379
  </xsl:when>
9335
9380
  <xsl:when test="not(starts-with(@src, 'data:'))">
9336
- <xsl:choose>
9337
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
9338
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
9339
- </xsl:when>
9340
- <xsl:otherwise>
9341
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
9342
- </xsl:otherwise>
9343
- </xsl:choose>
9381
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
9382
+ <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
9344
9383
  </xsl:when>
9345
9384
  <xsl:otherwise>
9346
9385
  <xsl:value-of select="@src"/>
@@ -9361,16 +9400,8 @@
9361
9400
  </svg>
9362
9401
  </xsl:when>
9363
9402
  <xsl:when test="not(starts-with(@src, 'data:'))">
9364
- <xsl:variable name="src">
9365
- <xsl:choose>
9366
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
9367
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
9368
- </xsl:when>
9369
- <xsl:otherwise>
9370
- <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
9371
- </xsl:otherwise>
9372
- </xsl:choose>
9373
- </xsl:variable>
9403
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
9404
+ <xsl:variable name="src" select="concat('url(file:///', $src_external, ')')"/>
9374
9405
  <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
9375
9406
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
9376
9407
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
@@ -13512,7 +13543,9 @@
13512
13543
  <xsl:template name="add_id">
13513
13544
  <xsl:if test="not(@id)">
13514
13545
  <!-- add @id - first element with @id plus '_element_name' -->
13515
- <xsl:attribute name="id"><xsl:value-of select="(.//*[@id])[1]/@id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
13546
+ <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
13547
+ <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>
13548
+ <xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
13516
13549
  </xsl:if>
13517
13550
  </xsl:template>
13518
13551
 
@@ -14444,7 +14477,14 @@
14444
14477
  <xsl:variable name="title">
14445
14478
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
14446
14479
 
14447
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
14480
+ <xsl:choose>
14481
+ <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
14482
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
14483
+ </xsl:when>
14484
+ <xsl:otherwise>
14485
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
14486
+ </xsl:otherwise>
14487
+ </xsl:choose>
14448
14488
 
14449
14489
  </xsl:for-each>
14450
14490
  </xsl:variable>
@@ -14817,6 +14857,7 @@
14817
14857
  <xsl:param name="formatted">false</xsl:param>
14818
14858
  <xsl:param name="lang"/>
14819
14859
  <xsl:param name="returnEmptyIfNotFound">false</xsl:param>
14860
+ <xsl:param name="bibdata_updated"/>
14820
14861
 
14821
14862
  <xsl:variable name="curr_lang">
14822
14863
  <xsl:choose>
@@ -14830,6 +14871,9 @@
14830
14871
 
14831
14872
  <xsl:variable name="data_value">
14832
14873
  <xsl:choose>
14874
+ <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
14875
+ <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
14876
+ </xsl:when>
14833
14877
  <xsl:when test="$formatted = 'true'">
14834
14878
  <xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
14835
14879
  </xsl:when>
@@ -15001,14 +15045,8 @@
15001
15045
  <xsl:value-of select="$src"/>
15002
15046
  </xsl:when>
15003
15047
  <xsl:otherwise>
15004
- <xsl:choose>
15005
- <xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
15006
- <xsl:value-of select="concat('url(file:///', @src, ')')"/>
15007
- </xsl:when>
15008
- <xsl:otherwise>
15009
- <xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
15010
- </xsl:otherwise>
15011
- </xsl:choose>
15048
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
15049
+ <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
15012
15050
  </xsl:otherwise>
15013
15051
  </xsl:choose>
15014
15052
  </xsl:template>
@@ -15030,15 +15068,23 @@
15030
15068
  <!-- END: insert cover page image -->
15031
15069
 
15032
15070
  <!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
15071
+ <xsl:variable name="regex_ja_spec_half_width_">
15072
+ \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
15073
+ \u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
15074
+ \u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
15075
+ \u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
15076
+ \uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
15077
+ \uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
15078
+ \u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
15079
+ \u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
15080
+ </xsl:variable>
15081
+ <xsl:variable name="regex_ja_spec_half_width" select="translate(normalize-space($regex_ja_spec_half_width_), ' ', '')"/>
15033
15082
  <xsl:variable name="regex_ja_spec_">[
15034
15083
  <!-- Rotate 90° clockwise -->
15035
- \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
15084
+ <xsl:value-of select="$regex_ja_spec_half_width"/>
15036
15085
  \uFF08 <!-- U+FF08 FULLWIDTH LEFT PARENTHESIS (() -->
15037
- \u0029 <!-- U+0029 RIGHT PARENTHESIS ()) -->
15038
15086
  \uFF09 <!-- U+FF09 FULLWIDTH RIGHT PARENTHESIS ()) -->
15039
- \u007B <!-- U+007B LEFT CURLY BRACKET ({) -->
15040
15087
  \uFF5B <!-- U+FF5B FULLWIDTH LEFT CURLY BRACKET ({) -->
15041
- \u007D <!-- U+007D RIGHT CURLY BRACKET (}) -->
15042
15088
  \uFF5D <!-- U+FF5D FULLWIDTH RIGHT CURLY BRACKET (}) -->
15043
15089
  \u3014 <!-- U+3014 LEFT TORTOISE SHELL BRACKET (〔) -->
15044
15090
  \u3015 <!-- U+3015 RIGHT TORTOISE SHELL BRACKET (〕) -->
@@ -15046,21 +15092,16 @@
15046
15092
  \u3011 <!-- U+3011 RIGHT BLACK LENTICULAR BRACKET (】) -->
15047
15093
  \u300A <!-- U+300A LEFT DOUBLE ANGLE BRACKET (《) -->
15048
15094
  \u300B <!-- U+300B RIGHT DOUBLE ANGLE BRACKET (》) -->
15049
- \uFF62 <!-- U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) -->
15050
15095
  \u300C <!-- U+300C LEFT CORNER BRACKET (「) -->
15051
- \uFF63 <!-- U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」) -->
15052
15096
  \u300D <!-- U+300D RIGHT CORNER BRACKET (」) -->
15053
15097
  \u300E <!-- U+300E LEFT WHITE CORNER BRACKET (『) -->
15054
15098
  \u300F <!-- U+300F RIGHT WHITE CORNER BRACKET (』) -->
15055
- \u005B <!-- U+005B LEFT SQUARE BRACKET ([) -->
15056
15099
  \uFF3B <!-- U+FF3B FULLWIDTH LEFT SQUARE BRACKET ([) -->
15057
- \u005D <!-- U+005D RIGHT SQUARE BRACKET (]) -->
15058
15100
  \uFF3D <!-- U+FF3D FULLWIDTH RIGHT SQUARE BRACKET (]) -->
15059
15101
  \u3008 <!-- U+3008 LEFT ANGLE BRACKET (〈) -->
15060
15102
  \u3009 <!-- U+3009 RIGHT ANGLE BRACKET (〉) -->
15061
15103
  \u3016 <!-- U+3016 LEFT WHITE LENTICULAR BRACKET (〖) -->
15062
15104
  \u3017 <!-- U+3017 RIGHT WHITE LENTICULAR BRACKET (〗) -->
15063
-
15064
15105
  \u301A <!-- U+301A LEFT WHITE SQUARE BRACKET (〚) -->
15065
15106
  \u301B <!-- U+301B RIGHT WHITE SQUARE BRACKET (〛) -->
15066
15107
  \u301C <!-- U+301C WAVE DASH (〜) -->
@@ -15092,6 +15133,7 @@
15092
15133
  <xsl:variable name="regex_ja_spec"><xsl:value-of select="translate(normalize-space($regex_ja_spec_), ' ', '')"/></xsl:variable>
15093
15134
  <xsl:template name="insertVerticalChar">
15094
15135
  <xsl:param name="str"/>
15136
+ <xsl:param name="char_prev"/>
15095
15137
  <xsl:param name="writing-mode">lr-tb</xsl:param>
15096
15138
  <xsl:param name="reference-orientation">90</xsl:param>
15097
15139
  <xsl:param name="add_zero_width_space">false</xsl:param>
@@ -15101,53 +15143,99 @@
15101
15143
  </xsl:when>
15102
15144
  <xsl:otherwise>
15103
15145
  <xsl:if test="string-length($str) &gt; 0">
15104
- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/>
15146
+
15147
+ <!-- <xsl:variable name="horizontal_mode" select="normalize-space(ancestor::*[local-name() = 'span'][@class = 'horizontal'] and 1 = 1)"/> -->
15105
15148
  <xsl:variable name="char" select="substring($str,1,1)"/>
15106
- <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">
15107
- <xsl:if test="normalize-space($writing-mode) != ''">
15108
- <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
15109
- <xsl:attribute name="reference-orientation">90</xsl:attribute>
15110
- </xsl:if>
15111
- <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
15112
- <xsl:attribute name="reference-orientation">0</xsl:attribute>
15113
- </xsl:if>
15114
- <xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
15115
- <!-- Rotate 180°:
15116
- U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
15117
- U+3002 IDEOGRAPHIC FULL STOP (。)
15118
- U+FE52 SMALL FULL STOP (﹒)
15119
- U+FF0E FULLWIDTH FULL STOP ()
15120
- -->
15121
- <xsl:attribute name="reference-orientation">-90</xsl:attribute>
15122
- </xsl:if>
15123
- <fo:block-container width="1em">
15124
- <fo:block line-height="1em">
15125
- <xsl:choose>
15126
- <xsl:when test="$horizontal_mode = 'true'">
15127
- <xsl:value-of select="$str"/>
15128
- </xsl:when>
15129
- <xsl:otherwise>
15149
+ <xsl:variable name="char_next" select="substring($str,2,1)"/>
15150
+
15151
+ <xsl:variable name="char_half_width" select="normalize-space(java:matches(java:java.lang.String.new($char), concat('([', $regex_ja_spec_half_width, ']{1,})')))"/>
15152
+
15153
+ <xsl:choose>
15154
+ <xsl:when test="$char_half_width = 'true'">
15155
+ <fo:inline>
15156
+ <xsl:attribute name="baseline-shift">7%</xsl:attribute>
15157
+ <xsl:value-of select="$char"/>
15158
+ </fo:inline>
15159
+ </xsl:when>
15160
+ <xsl:otherwise>
15161
+ <!-- namespace-uri(ancestor::*[local-name() = 'title']) != '' to skip title from $contents -->
15162
+ <xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_prev = '' and ../preceding-sibling::node())">
15163
+ <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
15164
+ </xsl:if>
15165
+ <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">
15166
+ <xsl:if test="normalize-space($writing-mode) != ''">
15167
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
15168
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
15169
+ </xsl:if>
15170
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
15171
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
15172
+ </xsl:if>
15173
+ <xsl:if test="$char = '゜' or $char = '。' or $char = '﹒' or $char = '.'">
15174
+ <!-- Rotate 180°:
15175
+ U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK (゜)
15176
+ U+3002 IDEOGRAPHIC FULL STOP (。)
15177
+ U+FE52 SMALL FULL STOP (﹒)
15178
+ U+FF0E FULLWIDTH FULL STOP (.)
15179
+ -->
15180
+ <xsl:attribute name="reference-orientation">-90</xsl:attribute>
15181
+ </xsl:if>
15182
+ <fo:block-container width="1em" role="SKIP"><!-- border="0.5pt solid blue" -->
15183
+ <fo:block line-height="1em" role="SKIP">
15184
+ <!-- <xsl:choose>
15185
+ <xsl:when test="$horizontal_mode = 'true'">
15186
+ <xsl:value-of select="$str"/>
15187
+ </xsl:when>
15188
+ <xsl:otherwise>
15189
+ <xsl:value-of select="$char"/>
15190
+ </xsl:otherwise>
15191
+ </xsl:choose> -->
15130
15192
  <xsl:value-of select="$char"/>
15131
- </xsl:otherwise>
15132
- </xsl:choose>
15133
- </fo:block>
15134
- </fo:block-container>
15135
- </fo:inline-container>
15136
- <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>
15137
-
15138
- <xsl:if test="$horizontal_mode = 'false'">
15139
- <xsl:call-template name="insertVerticalChar">
15140
- <xsl:with-param name="str" select="substring($str, 2)"/>
15141
- <xsl:with-param name="writing-mode" select="$writing-mode"/>
15142
- <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
15143
- <xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
15144
- </xsl:call-template>
15145
- </xsl:if>
15193
+ </fo:block>
15194
+ </fo:block-container>
15195
+ </fo:inline-container>
15196
+ <xsl:if test="namespace-uri(ancestor::*[local-name() = 'title']) != '' and ($char_next != '' or ../following-sibling::node())">
15197
+ <fo:inline padding-left="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
15198
+ </xsl:if>
15199
+ </xsl:otherwise>
15200
+ </xsl:choose>
15201
+
15202
+ <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>
15203
+ <!-- <xsl:if test="$horizontal_mode = 'false'"> -->
15204
+ <xsl:call-template name="insertVerticalChar">
15205
+ <xsl:with-param name="str" select="substring($str, 2)"/>
15206
+ <xsl:with-param name="char_prev" select="$char"/>
15207
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
15208
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
15209
+ <xsl:with-param name="add_zero_width_space" select="$add_zero_width_space"/>
15210
+ </xsl:call-template>
15211
+ <!-- </xsl:if> -->
15146
15212
  </xsl:if>
15147
15213
  </xsl:otherwise>
15148
15214
  </xsl:choose>
15149
15215
  </xsl:template>
15150
15216
 
15217
+ <xsl:template name="insertHorizontalChars">
15218
+ <xsl:param name="str"/>
15219
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
15220
+ <xsl:param name="reference-orientation">90</xsl:param>
15221
+ <xsl:param name="add_zero_width_space">false</xsl:param>
15222
+ <xsl:choose>
15223
+ <xsl:otherwise>
15224
+ <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">
15225
+ <xsl:if test="normalize-space($writing-mode) != ''">
15226
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
15227
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
15228
+ </xsl:if>
15229
+ <fo:block-container width="1em" role="SKIP"> <!-- border="0.5pt solid green" -->
15230
+ <fo:block line-height="1em" role="SKIP">
15231
+ <xsl:value-of select="$str"/>
15232
+ </fo:block>
15233
+ </fo:block-container>
15234
+ </fo:inline-container>
15235
+ </xsl:otherwise>
15236
+ </xsl:choose>
15237
+ </xsl:template>
15238
+
15151
15239
  <xsl:template name="number-to-words">
15152
15240
  <xsl:param name="number"/>
15153
15241
  <xsl:param name="first"/>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.5.9".freeze
3
+ VERSION = "2.5.10".freeze
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.9
4
+ version: 2.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
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-iso