metanorma-ribose 2.8.2 → 2.8.3

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: 284d22a131d86b0c7d6c646d9cd50911c32f3409fca61ceb5b241a0214fb0148
4
- data.tar.gz: d0c711bab0e2d680e1a9eefae0fede9b137df1a82287a5ae92a79b8b79be811e
3
+ metadata.gz: fa900719fa5ce68ae05ad7681eca4ef1c45677fd675dcaf1e8977de6c5d25701
4
+ data.tar.gz: 566f33f03a3de079dae0b6f588553e9c2907d354349d647527836991017acb0a
5
5
  SHA512:
6
- metadata.gz: 5ebc1a0f8d91cb8c0bb9a13c0a378a8aab52b3eee0cb6997493a331dc391592e3baa8b8718fcf3634c305adb443f9c69fea100d79eec5c7a5b604d948b3647ac
7
- data.tar.gz: 818bbcf3ccc7e84d198c67975b6c212b94da3bab609d92028de5343c4032f7e763c7ed31777110a4ea3974206478eadeee0e08fb7a13d0bfaa7d0706700c04d0
6
+ metadata.gz: bc70150e86130da1443f8b255cf1cbe8e9758502510b756e58693fbaf6e684daf3fc74987faf20746b29d579f5f38d54cff89de68f2072ae73a607f10f454013
7
+ data.tar.gz: bc7daaacf3b65fcf6b153e1000ae3509b0132896586b7dd1b10069e203520d185d52e95460bbfe8f36009a436e2b4abbdd43a382c2eec0ae083daf355fc72b00
@@ -654,6 +654,9 @@
654
654
  <xsl:variable name="title">
655
655
  <xsl:call-template name="getName"/>
656
656
  </xsl:variable>
657
+ <xsl:variable name="variant_title">
658
+ <xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
659
+ </xsl:variable>
657
660
 
658
661
  <xsl:variable name="type" select="local-name()"/>
659
662
 
@@ -662,7 +665,14 @@
662
665
  <xsl:attribute name="level">1</xsl:attribute>
663
666
  </xsl:if>
664
667
  <mnx:title>
665
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
668
+ <xsl:choose>
669
+ <xsl:when test="normalize-space($variant_title) != ''">
670
+ <xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item"/>
671
+ </xsl:when>
672
+ <xsl:otherwise>
673
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
674
+ </xsl:otherwise>
675
+ </xsl:choose>
666
676
  </mnx:title>
667
677
  <xsl:if test="$type != 'indexsect'">
668
678
  <xsl:apply-templates mode="contents"/>
@@ -1841,7 +1851,24 @@
1841
1851
  <xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
1842
1852
 
1843
1853
  <!-- remove image/emf -->
1844
- <xsl:template match="mn:image/mn:emf" mode="update_xml_step1"/>
1854
+ <xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
1855
+
1856
+ <!-- https://github.com/metanorma/metanorma/issues/540 -->
1857
+ <xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
1858
+ <xsl:copy>
1859
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
1860
+ <xsl:choose>
1861
+ <xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
1862
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
1863
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
1864
+ </xsl:when>
1865
+ <xsl:otherwise>
1866
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
1867
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
1868
+ </xsl:otherwise>
1869
+ </xsl:choose>
1870
+ </xsl:copy>
1871
+ </xsl:template>
1845
1872
 
1846
1873
  <!-- remove preprocess-xslt -->
1847
1874
  <xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
@@ -2069,6 +2096,15 @@
2069
2096
  </xsl:choose>
2070
2097
  </xsl:template>
2071
2098
 
2099
+ <!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
2100
+ <xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
2101
+ <xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
2102
+ </xsl:template>
2103
+
2104
+ <xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
2105
+ <xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
2106
+ </xsl:template>
2107
+
2072
2108
  <!-- li/fmt-name -->
2073
2109
  <xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
2074
2110
  <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
@@ -5420,6 +5456,8 @@
5420
5456
  <xsl:param name="margin-side"/>
5421
5457
 
5422
5458
  <xsl:call-template name="setBordersTableArray"/>
5459
+
5460
+ <xsl:call-template name="setNoBordersForTableList"/>
5423
5461
  </xsl:template> <!-- refine_table-style -->
5424
5462
 
5425
5463
  <xsl:attribute-set name="table-number-style">
@@ -5465,12 +5503,16 @@
5465
5503
  <xsl:template name="refine_table-header-row-style">
5466
5504
 
5467
5505
  <xsl:call-template name="setBordersTableArray"/>
5506
+
5507
+ <xsl:call-template name="setNoBordersForTableList"/>
5468
5508
  </xsl:template> <!-- refine_table-header-row-style -->
5469
5509
 
5470
5510
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
5471
5511
  </xsl:attribute-set>
5472
5512
 
5473
5513
  <xsl:template name="refine_table-footer-row-style">
5514
+
5515
+ <xsl:call-template name="setNoBordersForTableList"/>
5474
5516
  </xsl:template> <!-- refine_table-footer-row-style -->
5475
5517
 
5476
5518
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -5484,6 +5526,8 @@
5484
5526
  <xsl:if test="$number mod 2 = 0">
5485
5527
  <xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
5486
5528
  </xsl:if>
5529
+
5530
+ <xsl:call-template name="setNoBordersForTableList"/>
5487
5531
  </xsl:template> <!-- refine_table-body-row-style -->
5488
5532
 
5489
5533
  <xsl:attribute-set name="table-header-cell-style">
@@ -5504,6 +5548,16 @@
5504
5548
  </xsl:if>
5505
5549
 
5506
5550
  <xsl:call-template name="setTableCellAttributes"/>
5551
+
5552
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
5553
+ <xsl:attribute name="display-align">before</xsl:attribute>
5554
+ <xsl:attribute name="text-align">left</xsl:attribute>
5555
+ <xsl:if test="following-sibling::*">
5556
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
5557
+ </xsl:if>
5558
+ <xsl:call-template name="setNoBordersForTableList"/>
5559
+ </xsl:if>
5560
+
5507
5561
  </xsl:template> <!-- refine_table-header-cell-style -->
5508
5562
 
5509
5563
  <xsl:attribute-set name="table-cell-style">
@@ -5522,6 +5576,15 @@
5522
5576
 
5523
5577
  <xsl:call-template name="setBordersTableArray"/>
5524
5578
 
5579
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
5580
+ <xsl:attribute name="display-align">before</xsl:attribute>
5581
+ <xsl:attribute name="text-align">left</xsl:attribute>
5582
+ <xsl:if test="following-sibling::*">
5583
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
5584
+ </xsl:if>
5585
+ <xsl:call-template name="setNoBordersForTableList"/>
5586
+ </xsl:if>
5587
+
5525
5588
  </xsl:template> <!-- refine_table-cell-style -->
5526
5589
 
5527
5590
  <xsl:attribute-set name="table-footer-cell-style">
@@ -5533,6 +5596,8 @@
5533
5596
  </xsl:attribute-set> <!-- table-footer-cell-style -->
5534
5597
 
5535
5598
  <xsl:template name="refine_table-footer-cell-style">
5599
+
5600
+ <xsl:call-template name="setNoBordersForTableList"/>
5536
5601
  </xsl:template> <!-- refine_table-footer-cell-style -->
5537
5602
 
5538
5603
  <xsl:attribute-set name="table-note-style">
@@ -5571,6 +5636,16 @@
5571
5636
  <xsl:template name="refine_table-fn-body-style">
5572
5637
  </xsl:template>
5573
5638
 
5639
+ <xsl:template name="setNoBordersForTableList">
5640
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
5641
+ <xsl:attribute name="border">none</xsl:attribute>
5642
+ <xsl:attribute name="border-top">none</xsl:attribute>
5643
+ <xsl:attribute name="border-bottom">none</xsl:attribute>
5644
+ <xsl:attribute name="border-left">none</xsl:attribute>
5645
+ <xsl:attribute name="border-right">none</xsl:attribute>
5646
+ </xsl:if>
5647
+ </xsl:template>
5648
+
5574
5649
  <!-- ========================== -->
5575
5650
  <!-- END Table styles -->
5576
5651
  <!-- ========================== -->
@@ -11164,6 +11239,10 @@
11164
11239
  </fo:list-item>
11165
11240
  </xsl:template>
11166
11241
 
11242
+ <xsl:template match="mn:fmt-ol | mn:fmt-ul">
11243
+ <xsl:apply-templates/>
11244
+ </xsl:template>
11245
+
11167
11246
  <!-- ===================================== -->
11168
11247
  <!-- END Lists processing -->
11169
11248
  <!-- ===================================== -->
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.8.2".freeze
3
+ VERSION = "2.8.3".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.8.2
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-03-16 00:00:00.000000000 Z
11
+ date: 2026-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic