metanorma-iso 3.3.2 → 3.3.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 +4 -4
- data/lib/isodoc/iso/html/style-human.css +25 -1
- data/lib/isodoc/iso/html/style-human.scss +25 -1
- data/lib/isodoc/iso/html/style-iso.css +25 -1
- data/lib/isodoc/iso/html/style-iso.scss +25 -1
- data/lib/isodoc/iso/iso.amendment.xsl +89 -6
- data/lib/isodoc/iso/iso.international-standard.xsl +89 -6
- data/lib/isodoc/iso/presentation_section.rb +8 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +16 -12
- data/lib/isodoc/iso/word_convert.rb +2 -10
- data/lib/isodoc/iso/word_dis_convert.rb +8 -0
- data/lib/metanorma/iso/cleanup_biblio.rb +1 -1
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +2 -5
- data/lib/isodoc/iso/html/isodoc-dis.css +0 -4794
- data/lib/isodoc/iso/html/wordstyle-dis.css +0 -2565
- data/lib/isodoc/iso/html/wordstyle.css +0 -1980
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3fb4819b20d1155ffd0acf0fd579db499b4fbcc03339da743b1890ae41dfe95
|
|
4
|
+
data.tar.gz: 2b1d15d4c9b4a884727ac31588faee8adc2e902cb3ff84a8cdca8e6e70f7684b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5b8815b2c3426fa2ba8f804823cb04ae7ec3cc44468f602fa95e68658098c5bb53c1212a339774d9b78acb253e2cc38858f342cbb9d2f87a2a3d0163ca28414
|
|
7
|
+
data.tar.gz: 7f77370059f7c43b52fbc6555e8a49c3574fffa4928bd2e953f0356cda4906b32ddf674d2c04a3716daec6d17d5b054a83dfb73f21ce8e87fed8d5bbe09d5c04
|
|
@@ -638,7 +638,18 @@ h6,
|
|
|
638
638
|
|
|
639
639
|
/* override for amendments */
|
|
640
640
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
|
641
|
-
h1
|
|
641
|
+
h1:not(.AmendNewcontent *),
|
|
642
|
+
h2:not(.AmendNewcontent *),
|
|
643
|
+
h3:not(.AmendNewcontent *),
|
|
644
|
+
h4:not(.AmendNewcontent *),
|
|
645
|
+
h5:not(.AmendNewcontent *),
|
|
646
|
+
h6:not(.AmendNewcontent *),
|
|
647
|
+
.h1:not(.AmendNewcontent *),
|
|
648
|
+
.h2:not(.AmendNewcontent *),
|
|
649
|
+
.h3:not(.AmendNewcontent *),
|
|
650
|
+
.h4:not(.AmendNewcontent *),
|
|
651
|
+
.h5:not(.AmendNewcontent *),
|
|
652
|
+
.h6:not(.AmendNewcontent *) {
|
|
642
653
|
font-weight: normal;
|
|
643
654
|
font-size: initial;
|
|
644
655
|
font-style: italic;
|
|
@@ -1407,6 +1418,19 @@ ol > li > p::before {
|
|
|
1407
1418
|
margin-right: auto;
|
|
1408
1419
|
}
|
|
1409
1420
|
|
|
1421
|
+
.Quote .Quote {
|
|
1422
|
+
margin-top: 0px;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
.Quote .h1,
|
|
1426
|
+
.Quote .h2,
|
|
1427
|
+
.Quote .h3,
|
|
1428
|
+
.Quote .h4,
|
|
1429
|
+
.Quote .h5,
|
|
1430
|
+
.Quote .h6 {
|
|
1431
|
+
margin-top: 0px;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1410
1434
|
/*
|
|
1411
1435
|
3.12 Formulas
|
|
1412
1436
|
*/
|
|
@@ -185,7 +185,18 @@ h6,
|
|
|
185
185
|
|
|
186
186
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
|
187
187
|
|
|
188
|
-
h1
|
|
188
|
+
h1:not(.AmendNewcontent *),
|
|
189
|
+
h2:not(.AmendNewcontent *),
|
|
190
|
+
h3:not(.AmendNewcontent *),
|
|
191
|
+
h4:not(.AmendNewcontent *),
|
|
192
|
+
h5:not(.AmendNewcontent *),
|
|
193
|
+
h6:not(.AmendNewcontent *),
|
|
194
|
+
.h1:not(.AmendNewcontent *),
|
|
195
|
+
.h2:not(.AmendNewcontent *),
|
|
196
|
+
.h3:not(.AmendNewcontent *),
|
|
197
|
+
.h4:not(.AmendNewcontent *),
|
|
198
|
+
.h5:not(.AmendNewcontent *),
|
|
199
|
+
.h6:not(.AmendNewcontent *) {
|
|
189
200
|
font-weight: normal;
|
|
190
201
|
font-size: initial;
|
|
191
202
|
font-style: italic;
|
|
@@ -711,6 +722,19 @@ ol>li>p::before {
|
|
|
711
722
|
@include blockquoteBlock(#f7f7f7);
|
|
712
723
|
}
|
|
713
724
|
|
|
725
|
+
.Quote .Quote {
|
|
726
|
+
margin-top: 0px;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.Quote .h1,
|
|
730
|
+
.Quote .h2,
|
|
731
|
+
.Quote .h3,
|
|
732
|
+
.Quote .h4,
|
|
733
|
+
.Quote .h5,
|
|
734
|
+
.Quote .h6 {
|
|
735
|
+
margin-top: 0px;
|
|
736
|
+
}
|
|
737
|
+
|
|
714
738
|
/*
|
|
715
739
|
3.12 Formulas
|
|
716
740
|
*/
|
|
@@ -595,7 +595,18 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
|
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
|
598
|
-
h1
|
|
598
|
+
h1:not(.AmendNewcontent *),
|
|
599
|
+
h2:not(.AmendNewcontent *),
|
|
600
|
+
h3:not(.AmendNewcontent *),
|
|
601
|
+
h4:not(.AmendNewcontent *),
|
|
602
|
+
h5:not(.AmendNewcontent *),
|
|
603
|
+
h6:not(.AmendNewcontent *),
|
|
604
|
+
.h1:not(.AmendNewcontent *),
|
|
605
|
+
.h2:not(.AmendNewcontent *),
|
|
606
|
+
.h3:not(.AmendNewcontent *),
|
|
607
|
+
.h4:not(.AmendNewcontent *),
|
|
608
|
+
.h5:not(.AmendNewcontent *),
|
|
609
|
+
.h6:not(.AmendNewcontent *) {
|
|
599
610
|
font-weight: normal;
|
|
600
611
|
font-size: initial;
|
|
601
612
|
font-style: italic;
|
|
@@ -1467,6 +1478,19 @@ ol > li > p::before {
|
|
|
1467
1478
|
margin-right: auto;
|
|
1468
1479
|
}
|
|
1469
1480
|
|
|
1481
|
+
.Quote .Quote {
|
|
1482
|
+
margin-top: 0px;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
.Quote .h1,
|
|
1486
|
+
.Quote .h2,
|
|
1487
|
+
.Quote .h3,
|
|
1488
|
+
.Quote .h4,
|
|
1489
|
+
.Quote .h5,
|
|
1490
|
+
.Quote .h6 {
|
|
1491
|
+
margin-top: 0px;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1470
1494
|
/*
|
|
1471
1495
|
3.12 Formulas
|
|
1472
1496
|
*/
|
|
@@ -136,7 +136,18 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
|
|
|
136
136
|
|
|
137
137
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
|
138
138
|
|
|
139
|
-
h1
|
|
139
|
+
h1:not(.AmendNewcontent *),
|
|
140
|
+
h2:not(.AmendNewcontent *),
|
|
141
|
+
h3:not(.AmendNewcontent *),
|
|
142
|
+
h4:not(.AmendNewcontent *),
|
|
143
|
+
h5:not(.AmendNewcontent *),
|
|
144
|
+
h6:not(.AmendNewcontent *),
|
|
145
|
+
.h1:not(.AmendNewcontent *),
|
|
146
|
+
.h2:not(.AmendNewcontent *),
|
|
147
|
+
.h3:not(.AmendNewcontent *),
|
|
148
|
+
.h4:not(.AmendNewcontent *),
|
|
149
|
+
.h5:not(.AmendNewcontent *),
|
|
150
|
+
.h6:not(.AmendNewcontent *) {
|
|
140
151
|
font-weight: normal;
|
|
141
152
|
font-size: initial;
|
|
142
153
|
font-style: italic;
|
|
@@ -739,6 +750,19 @@ ol > li > p::before {
|
|
|
739
750
|
@include blockquoteBlock(#f7f7f7);
|
|
740
751
|
}
|
|
741
752
|
|
|
753
|
+
.Quote .Quote {
|
|
754
|
+
margin-top: 0px;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.Quote .h1,
|
|
758
|
+
.Quote .h2,
|
|
759
|
+
.Quote .h3,
|
|
760
|
+
.Quote .h4,
|
|
761
|
+
.Quote .h5,
|
|
762
|
+
.Quote .h6 {
|
|
763
|
+
margin-top: 0px;
|
|
764
|
+
}
|
|
765
|
+
|
|
742
766
|
/*
|
|
743
767
|
3.12 Formulas
|
|
744
768
|
*/
|
|
@@ -4232,6 +4232,9 @@
|
|
|
4232
4232
|
<xsl:variable name="title">
|
|
4233
4233
|
<xsl:call-template name="getName"/>
|
|
4234
4234
|
</xsl:variable>
|
|
4235
|
+
<xsl:variable name="variant_title">
|
|
4236
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
4237
|
+
</xsl:variable>
|
|
4235
4238
|
|
|
4236
4239
|
<xsl:variable name="root">
|
|
4237
4240
|
<xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
|
|
@@ -4243,11 +4246,22 @@
|
|
|
4243
4246
|
<xsl:attribute name="level">1</xsl:attribute>
|
|
4244
4247
|
</xsl:if>
|
|
4245
4248
|
<mnx:title>
|
|
4246
|
-
<xsl:
|
|
4247
|
-
<xsl:
|
|
4248
|
-
<xsl:
|
|
4249
|
-
|
|
4250
|
-
|
|
4249
|
+
<xsl:choose>
|
|
4250
|
+
<xsl:when test="normalize-space($variant_title) != ''">
|
|
4251
|
+
<xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item">
|
|
4252
|
+
<xsl:with-param name="element">
|
|
4253
|
+
<xsl:if test="$level = 1"><xsl:value-of select="$root"/></xsl:if>
|
|
4254
|
+
</xsl:with-param>
|
|
4255
|
+
</xsl:apply-templates>
|
|
4256
|
+
</xsl:when>
|
|
4257
|
+
<xsl:otherwise>
|
|
4258
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
|
|
4259
|
+
<xsl:with-param name="element">
|
|
4260
|
+
<xsl:if test="$level = 1"><xsl:value-of select="$root"/></xsl:if>
|
|
4261
|
+
</xsl:with-param>
|
|
4262
|
+
</xsl:apply-templates>
|
|
4263
|
+
</xsl:otherwise>
|
|
4264
|
+
</xsl:choose>
|
|
4251
4265
|
</mnx:title>
|
|
4252
4266
|
<xsl:if test="$type != 'index'">
|
|
4253
4267
|
<xsl:apply-templates mode="contents"/>
|
|
@@ -6676,7 +6690,24 @@
|
|
|
6676
6690
|
<xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
|
|
6677
6691
|
|
|
6678
6692
|
<!-- remove image/emf -->
|
|
6679
|
-
<xsl:template match="mn:image
|
|
6693
|
+
<xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
|
|
6694
|
+
|
|
6695
|
+
<!-- https://github.com/metanorma/metanorma/issues/540 -->
|
|
6696
|
+
<xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
|
|
6697
|
+
<xsl:copy>
|
|
6698
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
6699
|
+
<xsl:choose>
|
|
6700
|
+
<xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
|
|
6701
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
|
|
6702
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
|
|
6703
|
+
</xsl:when>
|
|
6704
|
+
<xsl:otherwise>
|
|
6705
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
|
|
6706
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
|
|
6707
|
+
</xsl:otherwise>
|
|
6708
|
+
</xsl:choose>
|
|
6709
|
+
</xsl:copy>
|
|
6710
|
+
</xsl:template>
|
|
6680
6711
|
|
|
6681
6712
|
<!-- remove preprocess-xslt -->
|
|
6682
6713
|
<xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
|
|
@@ -6938,6 +6969,15 @@
|
|
|
6938
6969
|
</xsl:choose>
|
|
6939
6970
|
</xsl:template>
|
|
6940
6971
|
|
|
6972
|
+
<!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
|
|
6973
|
+
<xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
|
|
6974
|
+
<xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
|
|
6975
|
+
</xsl:template>
|
|
6976
|
+
|
|
6977
|
+
<xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
|
|
6978
|
+
<xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
|
|
6979
|
+
</xsl:template>
|
|
6980
|
+
|
|
6941
6981
|
<!-- li/fmt-name -->
|
|
6942
6982
|
<xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
|
|
6943
6983
|
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
|
@@ -10432,6 +10472,8 @@
|
|
|
10432
10472
|
</xsl:if>
|
|
10433
10473
|
|
|
10434
10474
|
<xsl:call-template name="setBordersTableArray"/>
|
|
10475
|
+
|
|
10476
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10435
10477
|
</xsl:template> <!-- refine_table-style -->
|
|
10436
10478
|
|
|
10437
10479
|
<xsl:attribute-set name="table-number-style">
|
|
@@ -10492,6 +10534,8 @@
|
|
|
10492
10534
|
</xsl:choose>
|
|
10493
10535
|
|
|
10494
10536
|
<xsl:call-template name="setBordersTableArray"/>
|
|
10537
|
+
|
|
10538
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10495
10539
|
</xsl:template> <!-- refine_table-header-row-style -->
|
|
10496
10540
|
|
|
10497
10541
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
|
@@ -10501,6 +10545,8 @@
|
|
|
10501
10545
|
</xsl:attribute-set>
|
|
10502
10546
|
|
|
10503
10547
|
<xsl:template name="refine_table-footer-row-style">
|
|
10548
|
+
|
|
10549
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10504
10550
|
</xsl:template> <!-- refine_table-footer-row-style -->
|
|
10505
10551
|
|
|
10506
10552
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
|
@@ -10513,6 +10559,8 @@
|
|
|
10513
10559
|
</xsl:if>
|
|
10514
10560
|
|
|
10515
10561
|
<xsl:call-template name="setBordersTableArray"/>
|
|
10562
|
+
|
|
10563
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10516
10564
|
</xsl:template> <!-- refine_table-body-row-style -->
|
|
10517
10565
|
|
|
10518
10566
|
<xsl:attribute-set name="table-header-cell-style">
|
|
@@ -10543,6 +10591,16 @@
|
|
|
10543
10591
|
</xsl:if>
|
|
10544
10592
|
|
|
10545
10593
|
<xsl:call-template name="setTableCellAttributes"/>
|
|
10594
|
+
|
|
10595
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
10596
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
10597
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
10598
|
+
<xsl:if test="following-sibling::*">
|
|
10599
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
10600
|
+
</xsl:if>
|
|
10601
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10602
|
+
</xsl:if>
|
|
10603
|
+
|
|
10546
10604
|
</xsl:template> <!-- refine_table-header-cell-style -->
|
|
10547
10605
|
|
|
10548
10606
|
<xsl:attribute-set name="table-cell-style">
|
|
@@ -10576,6 +10634,15 @@
|
|
|
10576
10634
|
|
|
10577
10635
|
<xsl:call-template name="setBordersTableArray"/>
|
|
10578
10636
|
|
|
10637
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
10638
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
10639
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
10640
|
+
<xsl:if test="following-sibling::*">
|
|
10641
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
10642
|
+
</xsl:if>
|
|
10643
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10644
|
+
</xsl:if>
|
|
10645
|
+
|
|
10579
10646
|
</xsl:template> <!-- refine_table-cell-style -->
|
|
10580
10647
|
|
|
10581
10648
|
<xsl:attribute-set name="table-footer-cell-style">
|
|
@@ -10591,6 +10658,8 @@
|
|
|
10591
10658
|
<xsl:if test="$layoutVersion = '2024'">
|
|
10592
10659
|
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
|
10593
10660
|
</xsl:if>
|
|
10661
|
+
|
|
10662
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10594
10663
|
</xsl:template> <!-- refine_table-footer-cell-style -->
|
|
10595
10664
|
|
|
10596
10665
|
<xsl:attribute-set name="table-note-style">
|
|
@@ -10643,6 +10712,16 @@
|
|
|
10643
10712
|
<xsl:template name="refine_table-fn-body-style">
|
|
10644
10713
|
</xsl:template>
|
|
10645
10714
|
|
|
10715
|
+
<xsl:template name="setNoBordersForTableList">
|
|
10716
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
10717
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
|
10718
|
+
<xsl:attribute name="border-top">none</xsl:attribute>
|
|
10719
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
|
10720
|
+
<xsl:attribute name="border-left">none</xsl:attribute>
|
|
10721
|
+
<xsl:attribute name="border-right">none</xsl:attribute>
|
|
10722
|
+
</xsl:if>
|
|
10723
|
+
</xsl:template>
|
|
10724
|
+
|
|
10646
10725
|
<!-- ========================== -->
|
|
10647
10726
|
<!-- END Table styles -->
|
|
10648
10727
|
<!-- ========================== -->
|
|
@@ -16422,6 +16501,10 @@
|
|
|
16422
16501
|
</fo:list-item>
|
|
16423
16502
|
</xsl:template>
|
|
16424
16503
|
|
|
16504
|
+
<xsl:template match="mn:fmt-ol | mn:fmt-ul">
|
|
16505
|
+
<xsl:apply-templates/>
|
|
16506
|
+
</xsl:template>
|
|
16507
|
+
|
|
16425
16508
|
<!-- ===================================== -->
|
|
16426
16509
|
<!-- END Lists processing -->
|
|
16427
16510
|
<!-- ===================================== -->
|
|
@@ -4232,6 +4232,9 @@
|
|
|
4232
4232
|
<xsl:variable name="title">
|
|
4233
4233
|
<xsl:call-template name="getName"/>
|
|
4234
4234
|
</xsl:variable>
|
|
4235
|
+
<xsl:variable name="variant_title">
|
|
4236
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
4237
|
+
</xsl:variable>
|
|
4235
4238
|
|
|
4236
4239
|
<xsl:variable name="root">
|
|
4237
4240
|
<xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
|
|
@@ -4243,11 +4246,22 @@
|
|
|
4243
4246
|
<xsl:attribute name="level">1</xsl:attribute>
|
|
4244
4247
|
</xsl:if>
|
|
4245
4248
|
<mnx:title>
|
|
4246
|
-
<xsl:
|
|
4247
|
-
<xsl:
|
|
4248
|
-
<xsl:
|
|
4249
|
-
|
|
4250
|
-
|
|
4249
|
+
<xsl:choose>
|
|
4250
|
+
<xsl:when test="normalize-space($variant_title) != ''">
|
|
4251
|
+
<xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item">
|
|
4252
|
+
<xsl:with-param name="element">
|
|
4253
|
+
<xsl:if test="$level = 1"><xsl:value-of select="$root"/></xsl:if>
|
|
4254
|
+
</xsl:with-param>
|
|
4255
|
+
</xsl:apply-templates>
|
|
4256
|
+
</xsl:when>
|
|
4257
|
+
<xsl:otherwise>
|
|
4258
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
|
|
4259
|
+
<xsl:with-param name="element">
|
|
4260
|
+
<xsl:if test="$level = 1"><xsl:value-of select="$root"/></xsl:if>
|
|
4261
|
+
</xsl:with-param>
|
|
4262
|
+
</xsl:apply-templates>
|
|
4263
|
+
</xsl:otherwise>
|
|
4264
|
+
</xsl:choose>
|
|
4251
4265
|
</mnx:title>
|
|
4252
4266
|
<xsl:if test="$type != 'index'">
|
|
4253
4267
|
<xsl:apply-templates mode="contents"/>
|
|
@@ -6676,7 +6690,24 @@
|
|
|
6676
6690
|
<xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
|
|
6677
6691
|
|
|
6678
6692
|
<!-- remove image/emf -->
|
|
6679
|
-
<xsl:template match="mn:image
|
|
6693
|
+
<xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
|
|
6694
|
+
|
|
6695
|
+
<!-- https://github.com/metanorma/metanorma/issues/540 -->
|
|
6696
|
+
<xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
|
|
6697
|
+
<xsl:copy>
|
|
6698
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
6699
|
+
<xsl:choose>
|
|
6700
|
+
<xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
|
|
6701
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
|
|
6702
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
|
|
6703
|
+
</xsl:when>
|
|
6704
|
+
<xsl:otherwise>
|
|
6705
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
|
|
6706
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
|
|
6707
|
+
</xsl:otherwise>
|
|
6708
|
+
</xsl:choose>
|
|
6709
|
+
</xsl:copy>
|
|
6710
|
+
</xsl:template>
|
|
6680
6711
|
|
|
6681
6712
|
<!-- remove preprocess-xslt -->
|
|
6682
6713
|
<xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
|
|
@@ -6938,6 +6969,15 @@
|
|
|
6938
6969
|
</xsl:choose>
|
|
6939
6970
|
</xsl:template>
|
|
6940
6971
|
|
|
6972
|
+
<!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
|
|
6973
|
+
<xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
|
|
6974
|
+
<xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
|
|
6975
|
+
</xsl:template>
|
|
6976
|
+
|
|
6977
|
+
<xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
|
|
6978
|
+
<xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
|
|
6979
|
+
</xsl:template>
|
|
6980
|
+
|
|
6941
6981
|
<!-- li/fmt-name -->
|
|
6942
6982
|
<xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
|
|
6943
6983
|
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
|
@@ -10432,6 +10472,8 @@
|
|
|
10432
10472
|
</xsl:if>
|
|
10433
10473
|
|
|
10434
10474
|
<xsl:call-template name="setBordersTableArray"/>
|
|
10475
|
+
|
|
10476
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10435
10477
|
</xsl:template> <!-- refine_table-style -->
|
|
10436
10478
|
|
|
10437
10479
|
<xsl:attribute-set name="table-number-style">
|
|
@@ -10492,6 +10534,8 @@
|
|
|
10492
10534
|
</xsl:choose>
|
|
10493
10535
|
|
|
10494
10536
|
<xsl:call-template name="setBordersTableArray"/>
|
|
10537
|
+
|
|
10538
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10495
10539
|
</xsl:template> <!-- refine_table-header-row-style -->
|
|
10496
10540
|
|
|
10497
10541
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
|
@@ -10501,6 +10545,8 @@
|
|
|
10501
10545
|
</xsl:attribute-set>
|
|
10502
10546
|
|
|
10503
10547
|
<xsl:template name="refine_table-footer-row-style">
|
|
10548
|
+
|
|
10549
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10504
10550
|
</xsl:template> <!-- refine_table-footer-row-style -->
|
|
10505
10551
|
|
|
10506
10552
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
|
@@ -10513,6 +10559,8 @@
|
|
|
10513
10559
|
</xsl:if>
|
|
10514
10560
|
|
|
10515
10561
|
<xsl:call-template name="setBordersTableArray"/>
|
|
10562
|
+
|
|
10563
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10516
10564
|
</xsl:template> <!-- refine_table-body-row-style -->
|
|
10517
10565
|
|
|
10518
10566
|
<xsl:attribute-set name="table-header-cell-style">
|
|
@@ -10543,6 +10591,16 @@
|
|
|
10543
10591
|
</xsl:if>
|
|
10544
10592
|
|
|
10545
10593
|
<xsl:call-template name="setTableCellAttributes"/>
|
|
10594
|
+
|
|
10595
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
10596
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
10597
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
10598
|
+
<xsl:if test="following-sibling::*">
|
|
10599
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
10600
|
+
</xsl:if>
|
|
10601
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10602
|
+
</xsl:if>
|
|
10603
|
+
|
|
10546
10604
|
</xsl:template> <!-- refine_table-header-cell-style -->
|
|
10547
10605
|
|
|
10548
10606
|
<xsl:attribute-set name="table-cell-style">
|
|
@@ -10576,6 +10634,15 @@
|
|
|
10576
10634
|
|
|
10577
10635
|
<xsl:call-template name="setBordersTableArray"/>
|
|
10578
10636
|
|
|
10637
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
10638
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
10639
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
10640
|
+
<xsl:if test="following-sibling::*">
|
|
10641
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
10642
|
+
</xsl:if>
|
|
10643
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10644
|
+
</xsl:if>
|
|
10645
|
+
|
|
10579
10646
|
</xsl:template> <!-- refine_table-cell-style -->
|
|
10580
10647
|
|
|
10581
10648
|
<xsl:attribute-set name="table-footer-cell-style">
|
|
@@ -10591,6 +10658,8 @@
|
|
|
10591
10658
|
<xsl:if test="$layoutVersion = '2024'">
|
|
10592
10659
|
<xsl:attribute name="border-top"><xsl:value-of select="$table-border"/></xsl:attribute>
|
|
10593
10660
|
</xsl:if>
|
|
10661
|
+
|
|
10662
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
10594
10663
|
</xsl:template> <!-- refine_table-footer-cell-style -->
|
|
10595
10664
|
|
|
10596
10665
|
<xsl:attribute-set name="table-note-style">
|
|
@@ -10643,6 +10712,16 @@
|
|
|
10643
10712
|
<xsl:template name="refine_table-fn-body-style">
|
|
10644
10713
|
</xsl:template>
|
|
10645
10714
|
|
|
10715
|
+
<xsl:template name="setNoBordersForTableList">
|
|
10716
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
10717
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
|
10718
|
+
<xsl:attribute name="border-top">none</xsl:attribute>
|
|
10719
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
|
10720
|
+
<xsl:attribute name="border-left">none</xsl:attribute>
|
|
10721
|
+
<xsl:attribute name="border-right">none</xsl:attribute>
|
|
10722
|
+
</xsl:if>
|
|
10723
|
+
</xsl:template>
|
|
10724
|
+
|
|
10646
10725
|
<!-- ========================== -->
|
|
10647
10726
|
<!-- END Table styles -->
|
|
10648
10727
|
<!-- ========================== -->
|
|
@@ -16422,6 +16501,10 @@
|
|
|
16422
16501
|
</fo:list-item>
|
|
16423
16502
|
</xsl:template>
|
|
16424
16503
|
|
|
16504
|
+
<xsl:template match="mn:fmt-ol | mn:fmt-ul">
|
|
16505
|
+
<xsl:apply-templates/>
|
|
16506
|
+
</xsl:template>
|
|
16507
|
+
|
|
16425
16508
|
<!-- ===================================== -->
|
|
16426
16509
|
<!-- END Lists processing -->
|
|
16427
16510
|
<!-- ===================================== -->
|
|
@@ -144,6 +144,14 @@ module IsoDoc
|
|
|
144
144
|
def move_norm_ref_to_sections(docxml)
|
|
145
145
|
amd?(docxml) or super
|
|
146
146
|
end
|
|
147
|
+
|
|
148
|
+
# number amend subclauses in amendments
|
|
149
|
+
def amend_subclause(clause, depth)
|
|
150
|
+
old_suppressheadingnumbers = @suppressheadingnumbers
|
|
151
|
+
@suppressheadingnumbers = false
|
|
152
|
+
super
|
|
153
|
+
@suppressheadingnumbers = old_suppressheadingnumbers
|
|
154
|
+
end
|
|
147
155
|
end
|
|
148
156
|
end
|
|
149
157
|
end
|
|
@@ -31,9 +31,9 @@ module IsoDoc
|
|
|
31
31
|
formula docxml
|
|
32
32
|
admonition docxml
|
|
33
33
|
source docxml
|
|
34
|
-
#list_to_table docxml
|
|
35
34
|
ul docxml
|
|
36
35
|
ol docxml
|
|
36
|
+
list_to_table docxml
|
|
37
37
|
quote docxml
|
|
38
38
|
permission docxml
|
|
39
39
|
requirement docxml
|
|
@@ -113,9 +113,9 @@ module IsoDoc
|
|
|
113
113
|
|
|
114
114
|
def formula_where(dlist)
|
|
115
115
|
dlist.nil? and return
|
|
116
|
-
dlist.xpath(ns(".//dt")).size == 1 &&
|
|
116
|
+
(dlist.xpath(ns(".//dt")).size == 1 &&
|
|
117
117
|
dlist.at(ns(".//dd"))&.elements&.size == 1 &&
|
|
118
|
-
dlist.at(ns(".//dd/p")) or return super
|
|
118
|
+
dlist.at(ns(".//dd/p"))) or return super
|
|
119
119
|
formula_where_one(dlist)
|
|
120
120
|
end
|
|
121
121
|
|
|
@@ -129,11 +129,7 @@ module IsoDoc
|
|
|
129
129
|
def table1(elem)
|
|
130
130
|
table1_key(elem)
|
|
131
131
|
if elem["class"] == "modspec"
|
|
132
|
-
|
|
133
|
-
n.remove.name = "name"
|
|
134
|
-
elem.add_first_child(n)
|
|
135
|
-
end
|
|
136
|
-
elem.at(ns("./thead"))&.remove
|
|
132
|
+
table1_modspec_name(elem)
|
|
137
133
|
super
|
|
138
134
|
elem.at(ns("./name"))&.remove
|
|
139
135
|
table1_fmt_xref_modspec(elem)
|
|
@@ -141,15 +137,23 @@ module IsoDoc
|
|
|
141
137
|
end
|
|
142
138
|
end
|
|
143
139
|
|
|
140
|
+
def table1_modspec_name(elem)
|
|
141
|
+
if n = elem.at(ns(".//fmt-name"))
|
|
142
|
+
n.remove.name = "name"
|
|
143
|
+
elem.add_first_child(n)
|
|
144
|
+
end
|
|
145
|
+
elem.at(ns("./thead"))&.remove
|
|
146
|
+
end
|
|
147
|
+
|
|
144
148
|
def table1_fmt_xref_modspec(elem)
|
|
145
149
|
p = elem.parent.parent.at(ns("./fmt-xref-label")) or return
|
|
146
|
-
t = elem.at(ns("./fmt-xref-label"))
|
|
150
|
+
t = elem.at(ns("./fmt-xref-label")) or return
|
|
147
151
|
n = t.at(ns("./span[@class='fmt-element-name'][2]")) or return
|
|
148
152
|
while i = n.next
|
|
149
153
|
i.remove
|
|
150
154
|
end
|
|
151
155
|
n.remove
|
|
152
|
-
p.children.first.previous = to_xml(t.children)
|
|
156
|
+
p.children.first.previous = to_xml(t.remove.children)
|
|
153
157
|
end
|
|
154
158
|
|
|
155
159
|
def table1_key(elem)
|
|
@@ -229,8 +233,8 @@ module IsoDoc
|
|
|
229
233
|
end
|
|
230
234
|
|
|
231
235
|
def url_note_process(data)
|
|
232
|
-
data[:type] == "standard" && data[:home_standard] == false &&
|
|
233
|
-
!data[:uri].blank? or return ""
|
|
236
|
+
(data[:type] == "standard" && data[:home_standard] == false &&
|
|
237
|
+
!data[:uri].blank?) or return ""
|
|
234
238
|
id = "_#{UUIDTools::UUID.random_create}"
|
|
235
239
|
@new_ids[id] = nil
|
|
236
240
|
<<~XML
|
|
@@ -51,21 +51,13 @@ module IsoDoc
|
|
|
51
51
|
|
|
52
52
|
def convert(input_filename, file = nil, debug = false,
|
|
53
53
|
output_filename = nil)
|
|
54
|
-
if @dis
|
|
54
|
+
if @dis&.use_dis?(input_filename, file, @wordtemplate)
|
|
55
55
|
swap_renderer(self, @dis, file, input_filename, debug)
|
|
56
56
|
@dis.convert(input_filename, file, debug, output_filename)
|
|
57
57
|
else super
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
-
def use_dis?(input_filename, file)
|
|
62
|
-
file ||= File.read(input_filename, encoding: "utf-8")
|
|
63
|
-
stage = Nokogiri::XML(file, &:huge)
|
|
64
|
-
.at(ns("//bibdata/status/stage"))&.text
|
|
65
|
-
(/^[4569].$/.match?(stage) && @wordtemplate != "simple") ||
|
|
66
|
-
(/^[0-3].$/.match?(stage) && @wordtemplate == "dis")
|
|
67
|
-
end
|
|
68
|
-
|
|
69
61
|
def make_body(xml, docxml)
|
|
70
62
|
body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72" }
|
|
71
63
|
xml.body(**body_attr) do |body|
|
|
@@ -132,7 +124,7 @@ module IsoDoc
|
|
|
132
124
|
page_break(out)
|
|
133
125
|
out.div do |div|
|
|
134
126
|
div.h1(**bibliography_attrs) do |h1|
|
|
135
|
-
node&.at(ns("./fmt-title"))
|
|
127
|
+
children_parse(node&.at(ns("./fmt-title")), h1)
|
|
136
128
|
end
|
|
137
129
|
biblio_list(node, div, true)
|
|
138
130
|
end
|
|
@@ -5,6 +5,14 @@ module IsoDoc
|
|
|
5
5
|
class WordDISConvert < WordConvert
|
|
6
6
|
attr_accessor :bgstripcolor
|
|
7
7
|
|
|
8
|
+
def use_dis?(input_filename, file, wordtemplate)
|
|
9
|
+
file ||= File.read(input_filename, encoding: "utf-8")
|
|
10
|
+
stage = Nokogiri::XML(file, &:huge)
|
|
11
|
+
.at(ns("//bibdata/status/stage"))&.text
|
|
12
|
+
(/^[4569].$/.match?(stage) && wordtemplate != "simple") ||
|
|
13
|
+
(/^[0-3].$/.match?(stage) && wordtemplate == "dis")
|
|
14
|
+
end
|
|
15
|
+
|
|
8
16
|
def default_file_locations(_options)
|
|
9
17
|
{ wordstylesheet: html_doc_path("wordstyle-dis.scss"),
|
|
10
18
|
standardstylesheet: html_doc_path("isodoc-dis.scss"),
|