metanorma-taste 1.0.1 → 1.0.2

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: 895a164f33ae4997d1e3aafcf731717c37a91a1864da54f4c470ca55dad28982
4
- data.tar.gz: 2c1f8d8bafd7105735423881aeeb3fe8974b73dbad58874ec8d7b37dfae4f8ad
3
+ metadata.gz: 18a299bccb76f760f45a65eefe4ac50182f1eb4baf0ceef1ad938c4aee107da0
4
+ data.tar.gz: 5c174abc1c1fff7c61713ca41e069e6beaddd498a34dcfbbd92bbf825f9f456e
5
5
  SHA512:
6
- metadata.gz: 603cb1f2bacffbb2f04c3b25c1012530a476e6f1eab2205260ba78810e430a47b1721937b96199e1e6bb46ff8681ab7fde883a680e0b51de8315183d1f10b565
7
- data.tar.gz: f1a423ad322ba6fa6210dab23039f9c99d10510c4485cd54abcd7da2d82e7b4fef95da781a264e2ffd04e0e26fe5baf71a00c7d246588b3eda9800429e264c75
6
+ metadata.gz: d1b9d7e23c6f2e993424c4b036e9c8bd87b22bdf9a8180c6d8d941593bd07a5173c4dd7a6198f33f9f83575841d899f77d87d604b31c901d1e5fd3331e18d06a
7
+ data.tar.gz: f4dcd0eedf39eabac5572308f02c0ccbeb626b7c82b6ccf6a3cbe793d3fbd8bb396934c62a45ad6a8d534ad93af2ffb21a9fb300bc1ca62aaef60a6d0f3b9153
@@ -446,13 +446,23 @@
446
446
  <xsl:variable name="title">
447
447
  <xsl:call-template name="getName"/>
448
448
  </xsl:variable>
449
+ <xsl:variable name="variant_title">
450
+ <xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
451
+ </xsl:variable>
449
452
 
450
453
  <mnx:item id="{@id}" level="{$level}" section="{$section}" display="{$display}">
451
454
  <xsl:if test="$type = 'indexsect'">
452
455
  <xsl:attribute name="level">1</xsl:attribute>
453
456
  </xsl:if>
454
457
  <mnx:title>
455
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
458
+ <xsl:choose>
459
+ <xsl:when test="normalize-space($variant_title) != ''">
460
+ <xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item"/>
461
+ </xsl:when>
462
+ <xsl:otherwise>
463
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
464
+ </xsl:otherwise>
465
+ </xsl:choose>
456
466
  </mnx:title>
457
467
  <xsl:if test="$type != 'indexsect'">
458
468
  <xsl:apply-templates mode="contents"/>
@@ -1255,7 +1265,24 @@
1255
1265
  <xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
1256
1266
 
1257
1267
  <!-- remove image/emf -->
1258
- <xsl:template match="mn:image/mn:emf" mode="update_xml_step1"/>
1268
+ <xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
1269
+
1270
+ <!-- https://github.com/metanorma/metanorma/issues/540 -->
1271
+ <xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
1272
+ <xsl:copy>
1273
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
1274
+ <xsl:choose>
1275
+ <xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
1276
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
1277
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
1278
+ </xsl:when>
1279
+ <xsl:otherwise>
1280
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
1281
+ <xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
1282
+ </xsl:otherwise>
1283
+ </xsl:choose>
1284
+ </xsl:copy>
1285
+ </xsl:template>
1259
1286
 
1260
1287
  <!-- remove preprocess-xslt -->
1261
1288
  <xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
@@ -1483,6 +1510,15 @@
1483
1510
  </xsl:choose>
1484
1511
  </xsl:template>
1485
1512
 
1513
+ <!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
1514
+ <xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
1515
+ <xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
1516
+ </xsl:template>
1517
+
1518
+ <xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
1519
+ <xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
1520
+ </xsl:template>
1521
+
1486
1522
  <!-- li/fmt-name -->
1487
1523
  <xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
1488
1524
  <xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
@@ -4742,6 +4778,8 @@
4742
4778
  </xsl:if>
4743
4779
 
4744
4780
  <xsl:call-template name="setBordersTableArray"/>
4781
+
4782
+ <xsl:call-template name="setNoBordersForTableList"/>
4745
4783
  </xsl:template> <!-- refine_table-style -->
4746
4784
 
4747
4785
  <xsl:attribute-set name="table-number-style">
@@ -4773,12 +4811,16 @@
4773
4811
  <xsl:template name="refine_table-header-row-style">
4774
4812
 
4775
4813
  <xsl:call-template name="setBordersTableArray"/>
4814
+
4815
+ <xsl:call-template name="setNoBordersForTableList"/>
4776
4816
  </xsl:template> <!-- refine_table-header-row-style -->
4777
4817
 
4778
4818
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
4779
4819
  </xsl:attribute-set>
4780
4820
 
4781
4821
  <xsl:template name="refine_table-footer-row-style">
4822
+
4823
+ <xsl:call-template name="setNoBordersForTableList"/>
4782
4824
  </xsl:template> <!-- refine_table-footer-row-style -->
4783
4825
 
4784
4826
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -4788,6 +4830,8 @@
4788
4830
  <xsl:template name="refine_table-body-row-style">
4789
4831
 
4790
4832
  <xsl:call-template name="setBordersTableArray"/>
4833
+
4834
+ <xsl:call-template name="setNoBordersForTableList"/>
4791
4835
  </xsl:template> <!-- refine_table-body-row-style -->
4792
4836
 
4793
4837
  <xsl:attribute-set name="table-header-cell-style">
@@ -4806,6 +4850,16 @@
4806
4850
  </xsl:if>
4807
4851
 
4808
4852
  <xsl:call-template name="setTableCellAttributes"/>
4853
+
4854
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
4855
+ <xsl:attribute name="display-align">before</xsl:attribute>
4856
+ <xsl:attribute name="text-align">left</xsl:attribute>
4857
+ <xsl:if test="following-sibling::*">
4858
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
4859
+ </xsl:if>
4860
+ <xsl:call-template name="setNoBordersForTableList"/>
4861
+ </xsl:if>
4862
+
4809
4863
  </xsl:template> <!-- refine_table-header-cell-style -->
4810
4864
 
4811
4865
  <xsl:attribute-set name="table-cell-style">
@@ -4822,6 +4876,15 @@
4822
4876
 
4823
4877
  <xsl:call-template name="setBordersTableArray"/>
4824
4878
 
4879
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
4880
+ <xsl:attribute name="display-align">before</xsl:attribute>
4881
+ <xsl:attribute name="text-align">left</xsl:attribute>
4882
+ <xsl:if test="following-sibling::*">
4883
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
4884
+ </xsl:if>
4885
+ <xsl:call-template name="setNoBordersForTableList"/>
4886
+ </xsl:if>
4887
+
4825
4888
  </xsl:template> <!-- refine_table-cell-style -->
4826
4889
 
4827
4890
  <xsl:attribute-set name="table-footer-cell-style">
@@ -4832,6 +4895,8 @@
4832
4895
  </xsl:attribute-set> <!-- table-footer-cell-style -->
4833
4896
 
4834
4897
  <xsl:template name="refine_table-footer-cell-style">
4898
+
4899
+ <xsl:call-template name="setNoBordersForTableList"/>
4835
4900
  </xsl:template> <!-- refine_table-footer-cell-style -->
4836
4901
 
4837
4902
  <xsl:attribute-set name="table-note-style">
@@ -4869,6 +4934,16 @@
4869
4934
  <xsl:template name="refine_table-fn-body-style">
4870
4935
  </xsl:template>
4871
4936
 
4937
+ <xsl:template name="setNoBordersForTableList">
4938
+ <xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
4939
+ <xsl:attribute name="border">none</xsl:attribute>
4940
+ <xsl:attribute name="border-top">none</xsl:attribute>
4941
+ <xsl:attribute name="border-bottom">none</xsl:attribute>
4942
+ <xsl:attribute name="border-left">none</xsl:attribute>
4943
+ <xsl:attribute name="border-right">none</xsl:attribute>
4944
+ </xsl:if>
4945
+ </xsl:template>
4946
+
4872
4947
  <!-- ========================== -->
4873
4948
  <!-- END Table styles -->
4874
4949
  <!-- ========================== -->
@@ -10420,6 +10495,10 @@
10420
10495
  </fo:list-item>
10421
10496
  </xsl:template>
10422
10497
 
10498
+ <xsl:template match="mn:fmt-ol | mn:fmt-ul">
10499
+ <xsl:apply-templates/>
10500
+ </xsl:template>
10501
+
10423
10502
  <!-- ===================================== -->
10424
10503
  <!-- END Lists processing -->
10425
10504
  <!-- ===================================== -->
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Metanorma
4
4
  module Taste
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-taste
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
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: lutaml-model