metanorma-iec 2.5.5 → 2.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0def60c7fba66d712bd162183c4085c2ecda4ef3cf89b45f0c5bf45f7c591136
4
- data.tar.gz: 4f00862617ced725fd8a597a1defa7ef46e894b2cd451551ce61bd897efb1cba
3
+ metadata.gz: 78359e2ac02b91e944cc5f6ca43a5f75bb7815bbec9b12095904b7e0b2b03c92
4
+ data.tar.gz: 5aafa118815a882f6d6b77d0d92f8a3810973e1823d244edf8d8aa5a46763df6
5
5
  SHA512:
6
- metadata.gz: 430e64c30a07c13fc4d66afa564a036013568928ad7e83a29d8c60802bfc0ad665bc3a4d9345ab1481d731da89a25f7993be87da1c99cfcf6a7609cf98b9fbd7
7
- data.tar.gz: d60935042f7e8d05196696dedea20260c3ec807994cca127a12e26c1662402aedf90b31755ee22b21624d2782ff1271450fc4397292fbb1984778a2a334322e3
6
+ metadata.gz: 752e4dd0e8170ac2b9d890df5d3a8703cbf76d63c1598df38381a7118129d51bbc75cf1f2b86d00892f35d92df483ff7030b9dfeb3f148135d5b0af48cb24cb8
7
+ data.tar.gz: 056c959058c619cb27330f33a3430ed8b4dcb4ea812381fc4dc9953f088a21b27d85b5a793c09381264082ab292ae1002fa808786df24af3c8c6a4963d39e8ac
@@ -5658,10 +5658,14 @@
5658
5658
  <xsl:variable name="fn_styles">
5659
5659
  <xsl:choose>
5660
5660
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
5661
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"/>
5661
+ <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
5662
+
5663
+ </fn_styles>
5662
5664
  </xsl:when>
5663
5665
  <xsl:otherwise>
5664
- <fn_styles xsl:use-attribute-sets="fn-num-style"/>
5666
+ <fn_styles xsl:use-attribute-sets="fn-num-style">
5667
+
5668
+ </fn_styles>
5665
5669
  </xsl:otherwise>
5666
5670
  </xsl:choose>
5667
5671
  </xsl:variable>
@@ -8607,6 +8611,7 @@
8607
8611
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
8608
8612
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8609
8613
  </xsl:if>
8614
+
8610
8615
  <xsl:if test="parent::*[local-name() = 'add']">
8611
8616
  <xsl:call-template name="append_add-style"/>
8612
8617
  </xsl:if>
@@ -8715,44 +8720,44 @@
8715
8720
 
8716
8721
  <xsl:template match="*[local-name() = 'note']" name="note">
8717
8722
 
8718
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8723
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8719
8724
 
8720
- <xsl:call-template name="setBlockSpanAll"/>
8725
+ <xsl:call-template name="setBlockSpanAll"/>
8721
8726
 
8722
- <xsl:call-template name="refine_note-style"/>
8727
+ <xsl:call-template name="refine_note-style"/>
8723
8728
 
8724
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8729
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8725
8730
 
8726
- <fo:block>
8731
+ <fo:block>
8727
8732
 
8728
- <xsl:call-template name="refine_note_block_style"/>
8733
+ <xsl:call-template name="refine_note_block_style"/>
8729
8734
 
8730
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8735
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8731
8736
 
8732
- <xsl:call-template name="refine_note-name-style"/>
8737
+ <xsl:call-template name="refine_note-name-style"/>
8733
8738
 
8734
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8735
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8736
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8737
- <xsl:call-template name="append_add-style"/>
8738
- </xsl:if>
8739
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8740
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8741
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8742
+ <xsl:call-template name="append_add-style"/>
8743
+ </xsl:if>
8739
8744
 
8740
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8741
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8742
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8743
- <xsl:with-param name="skip">false</xsl:with-param>
8744
- </xsl:apply-templates>
8745
- </xsl:if>
8745
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8746
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8747
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8748
+ <xsl:with-param name="skip">false</xsl:with-param>
8749
+ </xsl:apply-templates>
8750
+ </xsl:if>
8746
8751
 
8747
- <xsl:apply-templates select="*[local-name() = 'name']"/>
8752
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8748
8753
 
8749
- </fo:inline>
8754
+ </fo:inline>
8750
8755
 
8751
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8752
- </fo:block>
8756
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8757
+ </fo:block>
8753
8758
 
8754
- </fo:block-container>
8755
- </fo:block-container>
8759
+ </fo:block-container>
8760
+ </fo:block-container>
8756
8761
 
8757
8762
  </xsl:template>
8758
8763
 
@@ -11175,6 +11180,7 @@
11175
11180
  </xsl:when>
11176
11181
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
11177
11182
  <fo:block xsl:use-attribute-sets="example-name-style">
11183
+
11178
11184
  <xsl:apply-templates/>
11179
11185
  </fo:block>
11180
11186
  </xsl:when>
@@ -11190,6 +11196,7 @@
11190
11196
 
11191
11197
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
11192
11198
  <fo:inline xsl:use-attribute-sets="example-name-style">
11199
+
11193
11200
  <xsl:apply-templates/>
11194
11201
  </fo:inline>
11195
11202
  </xsl:template>
@@ -11564,12 +11571,14 @@
11564
11571
 
11565
11572
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
11566
11573
  <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
11574
+
11567
11575
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
11568
11576
  </fo:block>
11569
11577
  </xsl:if>
11570
11578
 
11571
11579
  <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
11572
11580
  <xsl:call-template name="setStyle_preferred"/>
11581
+
11573
11582
  <xsl:apply-templates/>
11574
11583
  </fo:block>
11575
11584
  </fo:block>
@@ -14527,9 +14536,10 @@
14527
14536
  <xsl:template name="insertBackgroundPageImage">
14528
14537
  <xsl:param name="number">1</xsl:param>
14529
14538
  <xsl:param name="name">coverpage-image</xsl:param>
14539
+ <xsl:param name="suffix"/>
14530
14540
  <xsl:variable name="num" select="number($number)"/>
14531
14541
  <!-- background image -->
14532
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage_{$name}_{$number}_{generate-id()}">
14542
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
14533
14543
  <fo:block>
14534
14544
  <xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
14535
14545
  <xsl:choose>
@@ -14595,16 +14605,29 @@
14595
14605
 
14596
14606
  <!-- END: insert cover page image -->
14597
14607
 
14608
+ <xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
14598
14609
  <xsl:template name="insertVerticalChar">
14599
14610
  <xsl:param name="str"/>
14611
+ <xsl:param name="writing-mode">lr-tb</xsl:param>
14612
+ <xsl:param name="reference-orientation">90</xsl:param>
14600
14613
  <xsl:if test="string-length($str) &gt; 0">
14601
- <fo:inline-container writing-mode="lr-tb" text-align="center" alignment-baseline="central" reference-orientation="90" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
14614
+ <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">
14615
+ <xsl:if test="normalize-space($writing-mode) != ''">
14616
+ <xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
14617
+ <xsl:attribute name="reference-orientation">90</xsl:attribute>
14618
+ </xsl:if>
14619
+ <xsl:variable name="char" select="substring($str,1,1)"/>
14620
+ <xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
14621
+ <xsl:attribute name="reference-orientation">0</xsl:attribute>
14622
+ </xsl:if>
14602
14623
  <fo:block-container width="1em">
14603
- <fo:block line-height="1em"><xsl:value-of select="substring($str,1,1)"/></fo:block>
14624
+ <fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
14604
14625
  </fo:block-container>
14605
14626
  </fo:inline-container>
14606
14627
  <xsl:call-template name="insertVerticalChar">
14607
14628
  <xsl:with-param name="str" select="substring($str, 2)"/>
14629
+ <xsl:with-param name="writing-mode" select="$writing-mode"/>
14630
+ <xsl:with-param name="reference-orientation" select="$reference-orientation"/>
14608
14631
  </xsl:call-template>
14609
14632
  </xsl:if>
14610
14633
  </xsl:template>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.5.5".freeze
3
+ VERSION = "2.5.6".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.5
4
+ version: 2.5.6
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-10-14 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso