metanorma-bipm 2.8.1 → 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 +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +127 -17
- data/lib/isodoc/bipm/bipm.guide.xsl +127 -17
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +127 -17
- data/lib/isodoc/bipm/bipm.rapport.xsl +127 -17
- data/lib/isodoc/bipm/html/htmlstyle.css +5 -0
- data/lib/isodoc/bipm/jcgm.standard.xsl +140 -43
- data/lib/isodoc/bipm/presentation_xml_convert.rb +1 -1
- data/lib/metanorma/bipm/biblio.rng +4 -4
- data/lib/metanorma/bipm/isodoc.rng +77 -28
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9822043ab6e1f16bc05e81fe275e2819d81551111d8c54499c45ee753a14a41
|
|
4
|
+
data.tar.gz: a4b26f29aa66dd9fdaec1ff87a29b67a6a11fa57b6ade9b38ea219cee7fece4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: afc778fc661361a78396eb88e102fcefb27261675dab5f273a4717b65afc7cf6f5d78c73b1c76623e345c594c81b6d24dc1028b3dc3b83b0a96b54d57763d404
|
|
7
|
+
data.tar.gz: 6d5fba58e14930f7729369d1f7ed499fb6dbfcb1a6f59b9bc434d974e440e26c168d8ec341bf3a2534fd2918c408015b283aac3966c59df8809a112d63fc7375
|
|
@@ -1134,7 +1134,9 @@
|
|
|
1134
1134
|
</fo:page-sequence>
|
|
1135
1135
|
|
|
1136
1136
|
<xsl:if test="mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
1137
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
|
1137
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-preface">
|
|
1138
|
+
<xsl:call-template name="refine_page-sequence-preface"/>
|
|
1139
|
+
|
|
1138
1140
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
1139
1141
|
|
|
1140
1142
|
<xsl:variable name="header-title">
|
|
@@ -1163,7 +1165,9 @@
|
|
|
1163
1165
|
<xsl:call-template name="getDocumentId"/>
|
|
1164
1166
|
</xsl:variable>
|
|
1165
1167
|
|
|
1166
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
|
1168
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-preface">
|
|
1169
|
+
<xsl:call-template name="refine_page-sequence-preface"/>
|
|
1170
|
+
|
|
1167
1171
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
1168
1172
|
|
|
1169
1173
|
<xsl:variable name="title-toc">
|
|
@@ -2148,6 +2152,9 @@
|
|
|
2148
2152
|
<xsl:variable name="title">
|
|
2149
2153
|
<xsl:call-template name="getName"/>
|
|
2150
2154
|
</xsl:variable>
|
|
2155
|
+
<xsl:variable name="variant_title">
|
|
2156
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
2157
|
+
</xsl:variable>
|
|
2151
2158
|
|
|
2152
2159
|
<xsl:variable name="type">
|
|
2153
2160
|
<xsl:choose>
|
|
@@ -2162,7 +2169,14 @@
|
|
|
2162
2169
|
<xsl:attribute name="parent">annex</xsl:attribute>
|
|
2163
2170
|
</xsl:if>
|
|
2164
2171
|
<mnx:title>
|
|
2165
|
-
<xsl:
|
|
2172
|
+
<xsl:choose>
|
|
2173
|
+
<xsl:when test="normalize-space($variant_title) != ''">
|
|
2174
|
+
<xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item"/>
|
|
2175
|
+
</xsl:when>
|
|
2176
|
+
<xsl:otherwise>
|
|
2177
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
|
2178
|
+
</xsl:otherwise>
|
|
2179
|
+
</xsl:choose>
|
|
2166
2180
|
</mnx:title>
|
|
2167
2181
|
<xsl:if test="$type != 'index'">
|
|
2168
2182
|
<xsl:apply-templates mode="contents"/>
|
|
@@ -2181,7 +2195,9 @@
|
|
|
2181
2195
|
<!-- ============================= -->
|
|
2182
2196
|
|
|
2183
2197
|
<xsl:template match="node()" mode="sections">
|
|
2184
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
|
2198
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-main">
|
|
2199
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
2200
|
+
|
|
2185
2201
|
<xsl:if test="@orientation = 'landscape'">
|
|
2186
2202
|
<xsl:attribute name="master-reference">document-landscape</xsl:attribute>
|
|
2187
2203
|
</xsl:if>
|
|
@@ -2242,7 +2258,9 @@
|
|
|
2242
2258
|
</xsl:template>
|
|
2243
2259
|
|
|
2244
2260
|
<xsl:template name="sections_appendix">
|
|
2245
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
|
2261
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-main">
|
|
2262
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
2263
|
+
|
|
2246
2264
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
2247
2265
|
|
|
2248
2266
|
<xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
|
|
@@ -3646,7 +3664,9 @@
|
|
|
3646
3664
|
<xsl:param name="isDraft"/>
|
|
3647
3665
|
<xsl:param name="lang"/>
|
|
3648
3666
|
|
|
3649
|
-
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
3667
|
+
<fo:page-sequence master-reference="index" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-main">
|
|
3668
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
3669
|
+
|
|
3650
3670
|
<xsl:variable name="header-title">
|
|
3651
3671
|
<xsl:choose>
|
|
3652
3672
|
<xsl:when test="./mn:title[1]/mn:tab">
|
|
@@ -4032,20 +4052,22 @@
|
|
|
4032
4052
|
</xsl:variable>
|
|
4033
4053
|
|
|
4034
4054
|
<xsl:attribute-set name="page-sequence-preface">
|
|
4035
|
-
|
|
4036
|
-
</xsl:attribute-set>
|
|
4055
|
+
</xsl:attribute-set> <!-- page-sequence-preface -->
|
|
4037
4056
|
|
|
4038
4057
|
<xsl:template name="refine_page-sequence-preface">
|
|
4039
4058
|
<xsl:param name="layoutVersion"/>
|
|
4040
|
-
|
|
4059
|
+
<xsl:param name="doctype"/>
|
|
4060
|
+
<xsl:param name="num"/>
|
|
4061
|
+
<xsl:param name="skip_force_page_count">false</xsl:param>
|
|
4062
|
+
</xsl:template> <!-- refine_page-sequence-preface -->
|
|
4041
4063
|
|
|
4042
4064
|
<xsl:attribute-set name="page-sequence-main">
|
|
4043
|
-
|
|
4044
|
-
</xsl:attribute-set>
|
|
4065
|
+
</xsl:attribute-set> <!-- page-sequence-main -->
|
|
4045
4066
|
|
|
4046
4067
|
<xsl:template name="refine_page-sequence-main">
|
|
4047
4068
|
<xsl:param name="layoutVersion"/>
|
|
4048
|
-
|
|
4069
|
+
<xsl:param name="doctype"/>
|
|
4070
|
+
</xsl:template> <!-- refine_page-sequence-main -->
|
|
4049
4071
|
|
|
4050
4072
|
<xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
|
|
4051
4073
|
<xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
|
|
@@ -4349,7 +4371,24 @@
|
|
|
4349
4371
|
<xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
|
|
4350
4372
|
|
|
4351
4373
|
<!-- remove image/emf -->
|
|
4352
|
-
<xsl:template match="mn:image
|
|
4374
|
+
<xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
|
|
4375
|
+
|
|
4376
|
+
<!-- https://github.com/metanorma/metanorma/issues/540 -->
|
|
4377
|
+
<xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
|
|
4378
|
+
<xsl:copy>
|
|
4379
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
4380
|
+
<xsl:choose>
|
|
4381
|
+
<xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
|
|
4382
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
|
|
4383
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
|
|
4384
|
+
</xsl:when>
|
|
4385
|
+
<xsl:otherwise>
|
|
4386
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
|
|
4387
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
|
|
4388
|
+
</xsl:otherwise>
|
|
4389
|
+
</xsl:choose>
|
|
4390
|
+
</xsl:copy>
|
|
4391
|
+
</xsl:template>
|
|
4353
4392
|
|
|
4354
4393
|
<!-- remove preprocess-xslt -->
|
|
4355
4394
|
<xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
|
|
@@ -4577,6 +4616,15 @@
|
|
|
4577
4616
|
</xsl:choose>
|
|
4578
4617
|
</xsl:template>
|
|
4579
4618
|
|
|
4619
|
+
<!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
|
|
4620
|
+
<xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
|
|
4621
|
+
<xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
|
|
4622
|
+
</xsl:template>
|
|
4623
|
+
|
|
4624
|
+
<xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
|
|
4625
|
+
<xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
|
|
4626
|
+
</xsl:template>
|
|
4627
|
+
|
|
4580
4628
|
<!-- li/fmt-name -->
|
|
4581
4629
|
<xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
|
|
4582
4630
|
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
|
@@ -7838,6 +7886,8 @@
|
|
|
7838
7886
|
</xsl:if>
|
|
7839
7887
|
|
|
7840
7888
|
<xsl:call-template name="setBordersTableArray"/>
|
|
7889
|
+
|
|
7890
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7841
7891
|
</xsl:template> <!-- refine_table-style -->
|
|
7842
7892
|
|
|
7843
7893
|
<xsl:attribute-set name="table-number-style">
|
|
@@ -7875,12 +7925,16 @@
|
|
|
7875
7925
|
<xsl:template name="refine_table-header-row-style">
|
|
7876
7926
|
|
|
7877
7927
|
<xsl:call-template name="setBordersTableArray"/>
|
|
7928
|
+
|
|
7929
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7878
7930
|
</xsl:template> <!-- refine_table-header-row-style -->
|
|
7879
7931
|
|
|
7880
7932
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
|
7881
7933
|
</xsl:attribute-set>
|
|
7882
7934
|
|
|
7883
7935
|
<xsl:template name="refine_table-footer-row-style">
|
|
7936
|
+
|
|
7937
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7884
7938
|
</xsl:template> <!-- refine_table-footer-row-style -->
|
|
7885
7939
|
|
|
7886
7940
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
|
@@ -7890,6 +7944,8 @@
|
|
|
7890
7944
|
<xsl:template name="refine_table-body-row-style">
|
|
7891
7945
|
|
|
7892
7946
|
<xsl:call-template name="setBordersTableArray"/>
|
|
7947
|
+
|
|
7948
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7893
7949
|
</xsl:template> <!-- refine_table-body-row-style -->
|
|
7894
7950
|
|
|
7895
7951
|
<xsl:attribute-set name="table-header-cell-style">
|
|
@@ -7923,6 +7979,16 @@
|
|
|
7923
7979
|
</xsl:if>
|
|
7924
7980
|
|
|
7925
7981
|
<xsl:call-template name="setTableCellAttributes"/>
|
|
7982
|
+
|
|
7983
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
7984
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
7985
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
7986
|
+
<xsl:if test="following-sibling::*">
|
|
7987
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
7988
|
+
</xsl:if>
|
|
7989
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7990
|
+
</xsl:if>
|
|
7991
|
+
|
|
7926
7992
|
</xsl:template> <!-- refine_table-header-cell-style -->
|
|
7927
7993
|
|
|
7928
7994
|
<xsl:attribute-set name="table-cell-style">
|
|
@@ -7953,6 +8019,15 @@
|
|
|
7953
8019
|
|
|
7954
8020
|
<xsl:call-template name="setBordersTableArray"/>
|
|
7955
8021
|
|
|
8022
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
8023
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
8024
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
8025
|
+
<xsl:if test="following-sibling::*">
|
|
8026
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
8027
|
+
</xsl:if>
|
|
8028
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
8029
|
+
</xsl:if>
|
|
8030
|
+
|
|
7956
8031
|
</xsl:template> <!-- refine_table-cell-style -->
|
|
7957
8032
|
|
|
7958
8033
|
<xsl:attribute-set name="table-footer-cell-style">
|
|
@@ -7964,6 +8039,8 @@
|
|
|
7964
8039
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
|
7965
8040
|
|
|
7966
8041
|
<xsl:template name="refine_table-footer-cell-style">
|
|
8042
|
+
|
|
8043
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7967
8044
|
</xsl:template> <!-- refine_table-footer-cell-style -->
|
|
7968
8045
|
|
|
7969
8046
|
<xsl:attribute-set name="table-note-style">
|
|
@@ -8013,6 +8090,16 @@
|
|
|
8013
8090
|
<xsl:template name="refine_table-fn-body-style">
|
|
8014
8091
|
</xsl:template>
|
|
8015
8092
|
|
|
8093
|
+
<xsl:template name="setNoBordersForTableList">
|
|
8094
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
8095
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
|
8096
|
+
<xsl:attribute name="border-top">none</xsl:attribute>
|
|
8097
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
|
8098
|
+
<xsl:attribute name="border-left">none</xsl:attribute>
|
|
8099
|
+
<xsl:attribute name="border-right">none</xsl:attribute>
|
|
8100
|
+
</xsl:if>
|
|
8101
|
+
</xsl:template>
|
|
8102
|
+
|
|
8016
8103
|
<!-- ========================== -->
|
|
8017
8104
|
<!-- END Table styles -->
|
|
8018
8105
|
<!-- ========================== -->
|
|
@@ -13633,6 +13720,10 @@
|
|
|
13633
13720
|
</fo:list-item>
|
|
13634
13721
|
</xsl:template>
|
|
13635
13722
|
|
|
13723
|
+
<xsl:template match="mn:fmt-ol | mn:fmt-ul">
|
|
13724
|
+
<xsl:apply-templates/>
|
|
13725
|
+
</xsl:template>
|
|
13726
|
+
|
|
13636
13727
|
<!-- ===================================== -->
|
|
13637
13728
|
<!-- END Lists processing -->
|
|
13638
13729
|
<!-- ===================================== -->
|
|
@@ -14929,6 +15020,7 @@
|
|
|
14929
15020
|
</xsl:attribute-set>
|
|
14930
15021
|
|
|
14931
15022
|
<xsl:template name="refine_toc-style">
|
|
15023
|
+
<xsl:copy-of select="@id"/>
|
|
14932
15024
|
</xsl:template>
|
|
14933
15025
|
|
|
14934
15026
|
<xsl:attribute-set name="toc-title-style">
|
|
@@ -15038,13 +15130,13 @@
|
|
|
15038
15130
|
|
|
15039
15131
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
15040
15132
|
<xsl:variable name="nodes_preface_">
|
|
15041
|
-
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc'
|
|
15133
|
+
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
|
|
15042
15134
|
<node id="{@id}"/>
|
|
15043
15135
|
</xsl:for-each>
|
|
15044
15136
|
</xsl:variable>
|
|
15045
15137
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
|
15046
15138
|
|
|
15047
|
-
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc'
|
|
15139
|
+
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
|
|
15048
15140
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
15049
15141
|
|
|
15050
15142
|
<!-- process Section's title -->
|
|
@@ -15057,6 +15149,23 @@
|
|
|
15057
15149
|
</xsl:for-each>
|
|
15058
15150
|
</xsl:template>
|
|
15059
15151
|
|
|
15152
|
+
<xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
|
|
15153
|
+
<xsl:variable name="title">
|
|
15154
|
+
<xsl:call-template name="getName"/>
|
|
15155
|
+
</xsl:variable>
|
|
15156
|
+
<xsl:variable name="root">
|
|
15157
|
+
<xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
|
|
15158
|
+
<xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
|
|
15159
|
+
</xsl:variable>
|
|
15160
|
+
<mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
|
|
15161
|
+
<mnx:title>
|
|
15162
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
|
|
15163
|
+
<xsl:with-param name="element" select="$root"/>
|
|
15164
|
+
</xsl:apply-templates>
|
|
15165
|
+
</mnx:title>
|
|
15166
|
+
</mnx:item>
|
|
15167
|
+
</xsl:template>
|
|
15168
|
+
|
|
15060
15169
|
<xsl:template name="processMainSectionsDefault_Contents">
|
|
15061
15170
|
|
|
15062
15171
|
<xsl:variable name="nodes_sections_">
|
|
@@ -16901,16 +17010,17 @@
|
|
|
16901
17010
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
|
16902
17011
|
<xsl:template name="insert_basic_link">
|
|
16903
17012
|
<xsl:param name="element"/>
|
|
17013
|
+
<xsl:param name="wrapper">true</xsl:param>
|
|
16904
17014
|
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
|
16905
17015
|
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
16906
17016
|
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
16907
17017
|
<xsl:choose>
|
|
16908
|
-
<xsl:when test="$internal-destination = 'true'">
|
|
17018
|
+
<xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
|
|
16909
17019
|
<fo:wrapper role="Reference">
|
|
16910
17020
|
<xsl:copy-of select="$element_node"/>
|
|
16911
17021
|
</fo:wrapper>
|
|
16912
17022
|
</xsl:when>
|
|
16913
|
-
<xsl:when test="$external-destination = 'true'">
|
|
17023
|
+
<xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
|
|
16914
17024
|
<xsl:copy-of select="$element_node"/>
|
|
16915
17025
|
</xsl:when>
|
|
16916
17026
|
<xsl:otherwise>
|
|
@@ -1134,7 +1134,9 @@
|
|
|
1134
1134
|
</fo:page-sequence>
|
|
1135
1135
|
|
|
1136
1136
|
<xsl:if test="mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
1137
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
|
1137
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-preface">
|
|
1138
|
+
<xsl:call-template name="refine_page-sequence-preface"/>
|
|
1139
|
+
|
|
1138
1140
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
1139
1141
|
|
|
1140
1142
|
<xsl:variable name="header-title">
|
|
@@ -1163,7 +1165,9 @@
|
|
|
1163
1165
|
<xsl:call-template name="getDocumentId"/>
|
|
1164
1166
|
</xsl:variable>
|
|
1165
1167
|
|
|
1166
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
|
1168
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-preface">
|
|
1169
|
+
<xsl:call-template name="refine_page-sequence-preface"/>
|
|
1170
|
+
|
|
1167
1171
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
1168
1172
|
|
|
1169
1173
|
<xsl:variable name="title-toc">
|
|
@@ -2148,6 +2152,9 @@
|
|
|
2148
2152
|
<xsl:variable name="title">
|
|
2149
2153
|
<xsl:call-template name="getName"/>
|
|
2150
2154
|
</xsl:variable>
|
|
2155
|
+
<xsl:variable name="variant_title">
|
|
2156
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
2157
|
+
</xsl:variable>
|
|
2151
2158
|
|
|
2152
2159
|
<xsl:variable name="type">
|
|
2153
2160
|
<xsl:choose>
|
|
@@ -2162,7 +2169,14 @@
|
|
|
2162
2169
|
<xsl:attribute name="parent">annex</xsl:attribute>
|
|
2163
2170
|
</xsl:if>
|
|
2164
2171
|
<mnx:title>
|
|
2165
|
-
<xsl:
|
|
2172
|
+
<xsl:choose>
|
|
2173
|
+
<xsl:when test="normalize-space($variant_title) != ''">
|
|
2174
|
+
<xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item"/>
|
|
2175
|
+
</xsl:when>
|
|
2176
|
+
<xsl:otherwise>
|
|
2177
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
|
2178
|
+
</xsl:otherwise>
|
|
2179
|
+
</xsl:choose>
|
|
2166
2180
|
</mnx:title>
|
|
2167
2181
|
<xsl:if test="$type != 'index'">
|
|
2168
2182
|
<xsl:apply-templates mode="contents"/>
|
|
@@ -2181,7 +2195,9 @@
|
|
|
2181
2195
|
<!-- ============================= -->
|
|
2182
2196
|
|
|
2183
2197
|
<xsl:template match="node()" mode="sections">
|
|
2184
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
|
2198
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-main">
|
|
2199
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
2200
|
+
|
|
2185
2201
|
<xsl:if test="@orientation = 'landscape'">
|
|
2186
2202
|
<xsl:attribute name="master-reference">document-landscape</xsl:attribute>
|
|
2187
2203
|
</xsl:if>
|
|
@@ -2242,7 +2258,9 @@
|
|
|
2242
2258
|
</xsl:template>
|
|
2243
2259
|
|
|
2244
2260
|
<xsl:template name="sections_appendix">
|
|
2245
|
-
<fo:page-sequence master-reference="document" force-page-count="no-force">
|
|
2261
|
+
<fo:page-sequence master-reference="document" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-main">
|
|
2262
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
2263
|
+
|
|
2246
2264
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
2247
2265
|
|
|
2248
2266
|
<xsl:variable name="curr_lang" select="/mn:metanorma/mn:bibdata/mn:language[@current = 'true']"/>
|
|
@@ -3646,7 +3664,9 @@
|
|
|
3646
3664
|
<xsl:param name="isDraft"/>
|
|
3647
3665
|
<xsl:param name="lang"/>
|
|
3648
3666
|
|
|
3649
|
-
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
3667
|
+
<fo:page-sequence master-reference="index" force-page-count="no-force" xsl:use-attribute-sets="page-sequence-main">
|
|
3668
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
3669
|
+
|
|
3650
3670
|
<xsl:variable name="header-title">
|
|
3651
3671
|
<xsl:choose>
|
|
3652
3672
|
<xsl:when test="./mn:title[1]/mn:tab">
|
|
@@ -4032,20 +4052,22 @@
|
|
|
4032
4052
|
</xsl:variable>
|
|
4033
4053
|
|
|
4034
4054
|
<xsl:attribute-set name="page-sequence-preface">
|
|
4035
|
-
|
|
4036
|
-
</xsl:attribute-set>
|
|
4055
|
+
</xsl:attribute-set> <!-- page-sequence-preface -->
|
|
4037
4056
|
|
|
4038
4057
|
<xsl:template name="refine_page-sequence-preface">
|
|
4039
4058
|
<xsl:param name="layoutVersion"/>
|
|
4040
|
-
|
|
4059
|
+
<xsl:param name="doctype"/>
|
|
4060
|
+
<xsl:param name="num"/>
|
|
4061
|
+
<xsl:param name="skip_force_page_count">false</xsl:param>
|
|
4062
|
+
</xsl:template> <!-- refine_page-sequence-preface -->
|
|
4041
4063
|
|
|
4042
4064
|
<xsl:attribute-set name="page-sequence-main">
|
|
4043
|
-
|
|
4044
|
-
</xsl:attribute-set>
|
|
4065
|
+
</xsl:attribute-set> <!-- page-sequence-main -->
|
|
4045
4066
|
|
|
4046
4067
|
<xsl:template name="refine_page-sequence-main">
|
|
4047
4068
|
<xsl:param name="layoutVersion"/>
|
|
4048
|
-
|
|
4069
|
+
<xsl:param name="doctype"/>
|
|
4070
|
+
</xsl:template> <!-- refine_page-sequence-main -->
|
|
4049
4071
|
|
|
4050
4072
|
<xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
|
|
4051
4073
|
<xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
|
|
@@ -4349,7 +4371,24 @@
|
|
|
4349
4371
|
<xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
|
|
4350
4372
|
|
|
4351
4373
|
<!-- remove image/emf -->
|
|
4352
|
-
<xsl:template match="mn:image
|
|
4374
|
+
<xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
|
|
4375
|
+
|
|
4376
|
+
<!-- https://github.com/metanorma/metanorma/issues/540 -->
|
|
4377
|
+
<xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
|
|
4378
|
+
<xsl:copy>
|
|
4379
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
4380
|
+
<xsl:choose>
|
|
4381
|
+
<xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
|
|
4382
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
|
|
4383
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
|
|
4384
|
+
</xsl:when>
|
|
4385
|
+
<xsl:otherwise>
|
|
4386
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
|
|
4387
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
|
|
4388
|
+
</xsl:otherwise>
|
|
4389
|
+
</xsl:choose>
|
|
4390
|
+
</xsl:copy>
|
|
4391
|
+
</xsl:template>
|
|
4353
4392
|
|
|
4354
4393
|
<!-- remove preprocess-xslt -->
|
|
4355
4394
|
<xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
|
|
@@ -4577,6 +4616,15 @@
|
|
|
4577
4616
|
</xsl:choose>
|
|
4578
4617
|
</xsl:template>
|
|
4579
4618
|
|
|
4619
|
+
<!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
|
|
4620
|
+
<xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
|
|
4621
|
+
<xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
|
|
4622
|
+
</xsl:template>
|
|
4623
|
+
|
|
4624
|
+
<xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
|
|
4625
|
+
<xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
|
|
4626
|
+
</xsl:template>
|
|
4627
|
+
|
|
4580
4628
|
<!-- li/fmt-name -->
|
|
4581
4629
|
<xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
|
|
4582
4630
|
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
|
@@ -7838,6 +7886,8 @@
|
|
|
7838
7886
|
</xsl:if>
|
|
7839
7887
|
|
|
7840
7888
|
<xsl:call-template name="setBordersTableArray"/>
|
|
7889
|
+
|
|
7890
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7841
7891
|
</xsl:template> <!-- refine_table-style -->
|
|
7842
7892
|
|
|
7843
7893
|
<xsl:attribute-set name="table-number-style">
|
|
@@ -7875,12 +7925,16 @@
|
|
|
7875
7925
|
<xsl:template name="refine_table-header-row-style">
|
|
7876
7926
|
|
|
7877
7927
|
<xsl:call-template name="setBordersTableArray"/>
|
|
7928
|
+
|
|
7929
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7878
7930
|
</xsl:template> <!-- refine_table-header-row-style -->
|
|
7879
7931
|
|
|
7880
7932
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
|
7881
7933
|
</xsl:attribute-set>
|
|
7882
7934
|
|
|
7883
7935
|
<xsl:template name="refine_table-footer-row-style">
|
|
7936
|
+
|
|
7937
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7884
7938
|
</xsl:template> <!-- refine_table-footer-row-style -->
|
|
7885
7939
|
|
|
7886
7940
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
|
@@ -7890,6 +7944,8 @@
|
|
|
7890
7944
|
<xsl:template name="refine_table-body-row-style">
|
|
7891
7945
|
|
|
7892
7946
|
<xsl:call-template name="setBordersTableArray"/>
|
|
7947
|
+
|
|
7948
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7893
7949
|
</xsl:template> <!-- refine_table-body-row-style -->
|
|
7894
7950
|
|
|
7895
7951
|
<xsl:attribute-set name="table-header-cell-style">
|
|
@@ -7923,6 +7979,16 @@
|
|
|
7923
7979
|
</xsl:if>
|
|
7924
7980
|
|
|
7925
7981
|
<xsl:call-template name="setTableCellAttributes"/>
|
|
7982
|
+
|
|
7983
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
7984
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
7985
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
7986
|
+
<xsl:if test="following-sibling::*">
|
|
7987
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
7988
|
+
</xsl:if>
|
|
7989
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7990
|
+
</xsl:if>
|
|
7991
|
+
|
|
7926
7992
|
</xsl:template> <!-- refine_table-header-cell-style -->
|
|
7927
7993
|
|
|
7928
7994
|
<xsl:attribute-set name="table-cell-style">
|
|
@@ -7953,6 +8019,15 @@
|
|
|
7953
8019
|
|
|
7954
8020
|
<xsl:call-template name="setBordersTableArray"/>
|
|
7955
8021
|
|
|
8022
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
8023
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
8024
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
8025
|
+
<xsl:if test="following-sibling::*">
|
|
8026
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
8027
|
+
</xsl:if>
|
|
8028
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
8029
|
+
</xsl:if>
|
|
8030
|
+
|
|
7956
8031
|
</xsl:template> <!-- refine_table-cell-style -->
|
|
7957
8032
|
|
|
7958
8033
|
<xsl:attribute-set name="table-footer-cell-style">
|
|
@@ -7964,6 +8039,8 @@
|
|
|
7964
8039
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
|
7965
8040
|
|
|
7966
8041
|
<xsl:template name="refine_table-footer-cell-style">
|
|
8042
|
+
|
|
8043
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
7967
8044
|
</xsl:template> <!-- refine_table-footer-cell-style -->
|
|
7968
8045
|
|
|
7969
8046
|
<xsl:attribute-set name="table-note-style">
|
|
@@ -8013,6 +8090,16 @@
|
|
|
8013
8090
|
<xsl:template name="refine_table-fn-body-style">
|
|
8014
8091
|
</xsl:template>
|
|
8015
8092
|
|
|
8093
|
+
<xsl:template name="setNoBordersForTableList">
|
|
8094
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
8095
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
|
8096
|
+
<xsl:attribute name="border-top">none</xsl:attribute>
|
|
8097
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
|
8098
|
+
<xsl:attribute name="border-left">none</xsl:attribute>
|
|
8099
|
+
<xsl:attribute name="border-right">none</xsl:attribute>
|
|
8100
|
+
</xsl:if>
|
|
8101
|
+
</xsl:template>
|
|
8102
|
+
|
|
8016
8103
|
<!-- ========================== -->
|
|
8017
8104
|
<!-- END Table styles -->
|
|
8018
8105
|
<!-- ========================== -->
|
|
@@ -13633,6 +13720,10 @@
|
|
|
13633
13720
|
</fo:list-item>
|
|
13634
13721
|
</xsl:template>
|
|
13635
13722
|
|
|
13723
|
+
<xsl:template match="mn:fmt-ol | mn:fmt-ul">
|
|
13724
|
+
<xsl:apply-templates/>
|
|
13725
|
+
</xsl:template>
|
|
13726
|
+
|
|
13636
13727
|
<!-- ===================================== -->
|
|
13637
13728
|
<!-- END Lists processing -->
|
|
13638
13729
|
<!-- ===================================== -->
|
|
@@ -14929,6 +15020,7 @@
|
|
|
14929
15020
|
</xsl:attribute-set>
|
|
14930
15021
|
|
|
14931
15022
|
<xsl:template name="refine_toc-style">
|
|
15023
|
+
<xsl:copy-of select="@id"/>
|
|
14932
15024
|
</xsl:template>
|
|
14933
15025
|
|
|
14934
15026
|
<xsl:attribute-set name="toc-title-style">
|
|
@@ -15038,13 +15130,13 @@
|
|
|
15038
15130
|
|
|
15039
15131
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
15040
15132
|
<xsl:variable name="nodes_preface_">
|
|
15041
|
-
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc'
|
|
15133
|
+
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
|
|
15042
15134
|
<node id="{@id}"/>
|
|
15043
15135
|
</xsl:for-each>
|
|
15044
15136
|
</xsl:variable>
|
|
15045
15137
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
|
15046
15138
|
|
|
15047
|
-
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc'
|
|
15139
|
+
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
|
|
15048
15140
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
15049
15141
|
|
|
15050
15142
|
<!-- process Section's title -->
|
|
@@ -15057,6 +15149,23 @@
|
|
|
15057
15149
|
</xsl:for-each>
|
|
15058
15150
|
</xsl:template>
|
|
15059
15151
|
|
|
15152
|
+
<xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
|
|
15153
|
+
<xsl:variable name="title">
|
|
15154
|
+
<xsl:call-template name="getName"/>
|
|
15155
|
+
</xsl:variable>
|
|
15156
|
+
<xsl:variable name="root">
|
|
15157
|
+
<xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
|
|
15158
|
+
<xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
|
|
15159
|
+
</xsl:variable>
|
|
15160
|
+
<mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
|
|
15161
|
+
<mnx:title>
|
|
15162
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
|
|
15163
|
+
<xsl:with-param name="element" select="$root"/>
|
|
15164
|
+
</xsl:apply-templates>
|
|
15165
|
+
</mnx:title>
|
|
15166
|
+
</mnx:item>
|
|
15167
|
+
</xsl:template>
|
|
15168
|
+
|
|
15060
15169
|
<xsl:template name="processMainSectionsDefault_Contents">
|
|
15061
15170
|
|
|
15062
15171
|
<xsl:variable name="nodes_sections_">
|
|
@@ -16901,16 +17010,17 @@
|
|
|
16901
17010
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
|
16902
17011
|
<xsl:template name="insert_basic_link">
|
|
16903
17012
|
<xsl:param name="element"/>
|
|
17013
|
+
<xsl:param name="wrapper">true</xsl:param>
|
|
16904
17014
|
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
|
16905
17015
|
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
16906
17016
|
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
16907
17017
|
<xsl:choose>
|
|
16908
|
-
<xsl:when test="$internal-destination = 'true'">
|
|
17018
|
+
<xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
|
|
16909
17019
|
<fo:wrapper role="Reference">
|
|
16910
17020
|
<xsl:copy-of select="$element_node"/>
|
|
16911
17021
|
</fo:wrapper>
|
|
16912
17022
|
</xsl:when>
|
|
16913
|
-
<xsl:when test="$external-destination = 'true'">
|
|
17023
|
+
<xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
|
|
16914
17024
|
<xsl:copy-of select="$element_node"/>
|
|
16915
17025
|
</xsl:when>
|
|
16916
17026
|
<xsl:otherwise>
|