metanorma-bipm 2.6.7 → 2.6.9

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.
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bipm="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:java="http://xml.apache.org/xalan/java" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java" extension-element-prefixes="redirect" version="1.0">
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bipm="https://www.metanorma.org/ns/standoc" xmlns:mn="https://www.metanorma.org/ns/xslt" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:java="http://xml.apache.org/xalan/java" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -40,9 +40,9 @@
40
40
  <xsl:variable name="docid">
41
41
  <xsl:call-template name="getDocumentId"/>
42
42
  </xsl:variable>
43
- <doc id="{$docid}" lang="{$lang}" doctype="{$doctype}" title-part="{$title-part}">
43
+ <mn:doc id="{$docid}" lang="{$lang}" doctype="{$doctype}" title-part="{$title-part}">
44
44
  <xsl:call-template name="generateContents"/>
45
- </doc>
45
+ </mn:doc>
46
46
  </xsl:for-each>
47
47
  </xsl:for-each>
48
48
  </xsl:when>
@@ -57,9 +57,9 @@
57
57
  <xsl:variable name="docid">
58
58
  <xsl:call-template name="getDocumentId"/>
59
59
  </xsl:variable>
60
- <doc id="{$docid}" lang="{$lang}">
60
+ <mn:doc id="{$docid}" lang="{$lang}">
61
61
  <xsl:call-template name="generateContents"/>
62
- </doc>
62
+ </mn:doc>
63
63
  </xsl:for-each>
64
64
  </xsl:for-each>
65
65
  </xsl:otherwise>
@@ -70,9 +70,9 @@
70
70
  <xsl:variable name="docid">
71
71
  <xsl:call-template name="getDocumentId"/>
72
72
  </xsl:variable>
73
- <doc id="{$docid}" lang="{$lang}">
73
+ <mn:doc id="{$docid}" lang="{$lang}">
74
74
  <xsl:call-template name="generateContents"/>
75
- </doc>
75
+ </mn:doc>
76
76
  </xsl:otherwise>
77
77
  </xsl:choose>
78
78
  </xsl:variable>
@@ -174,7 +174,7 @@
174
174
  <xsl:variable name="doctype" select="//bipm:metanorma/bipm:bibdata/bipm:ext/bipm:doctype"/>
175
175
 
176
176
  <xsl:template name="generateContents">
177
- <contents>
177
+ <mn:contents>
178
178
 
179
179
  <xsl:apply-templates select="/*/bipm:preface/*[not(local-name() = 'note' or local-name() = 'admonition' or (local-name() = 'clause' and @type = 'toc'))][position() &gt; 1]" mode="contents"/>
180
180
 
@@ -190,7 +190,7 @@
190
190
 
191
191
  <xsl:call-template name="processTablesFigures_Contents"/>
192
192
 
193
- </contents>
193
+ </mn:contents>
194
194
  </xsl:template>
195
195
 
196
196
  <xsl:variable name="mathml_attachments">
@@ -1028,9 +1028,6 @@
1028
1028
  <xsl:variable name="curr_xml">
1029
1029
  <xsl:copy-of select="."/>
1030
1030
  </xsl:variable>
1031
- <xsl:for-each select="xalan:nodeset($curr_xml)">
1032
- <xsl:call-template name="namespaceCheck"/>
1033
- </xsl:for-each>
1034
1031
 
1035
1032
  <xsl:variable name="curr_lang" select="bipm:bibdata/bipm:language[@current = 'true']"/>
1036
1033
 
@@ -1184,12 +1181,12 @@
1184
1181
  <fo:block role="TOC">
1185
1182
  <!-- <xsl:copy-of select="$contents"/> -->
1186
1183
 
1187
- <xsl:if test="$contents/doc[@id = $docid]//item[@display='true']">
1184
+ <xsl:if test="$contents/mn:doc[@id = $docid]//mn:item[@display='true']">
1188
1185
  <fo:table table-layout="fixed" width="100%" id="__internal_layout__toc_{generate-id()}" role="SKIP">
1189
1186
  <fo:table-column column-width="127mm"/>
1190
1187
  <fo:table-column column-width="12mm"/>
1191
1188
  <fo:table-body role="SKIP">
1192
- <xsl:for-each select="$contents/doc[@id = $docid]//item[@display='true' and not(@type = 'annex') and not(@type = 'index') and not(@parent = 'annex')]">
1189
+ <xsl:for-each select="$contents/mn:doc[@id = $docid]//mn:item[@display='true' and not(@type = 'annex') and not(@type = 'index') and not(@parent = 'annex')]">
1193
1190
  <xsl:call-template name="insertContentItem"/>
1194
1191
  </xsl:for-each>
1195
1192
  <!-- insert page break between main sections and appendixes in ToC -->
@@ -1200,31 +1197,31 @@
1200
1197
  </fo:table-cell>
1201
1198
  </fo:table-row>
1202
1199
  </xsl:if> -->
1203
- <xsl:for-each select="$contents/doc[@id = $docid]//item[@display='true' and (@type = 'annex')]"> <!-- or (@level = 2 and @parent = 'annex') -->
1200
+ <xsl:for-each select="$contents/mn:doc[@id = $docid]//mn:item[@display='true' and (@type = 'annex')]"> <!-- or (@level = 2 and @parent = 'annex') -->
1204
1201
  <xsl:call-template name="insertContentItem">
1205
1202
  <xsl:with-param name="keep-with-next">true</xsl:with-param>
1206
1203
  </xsl:call-template>
1207
1204
  </xsl:for-each>
1208
- <xsl:for-each select="$contents/doc[@id = $docid]//item[@display='true' and (@type = 'index')]">
1205
+ <xsl:for-each select="$contents/mn:doc[@id = $docid]//mn:item[@display='true' and (@type = 'index')]">
1209
1206
  <xsl:call-template name="insertContentItem"/>
1210
1207
  </xsl:for-each>
1211
1208
 
1212
1209
  <!-- List of Tables -->
1213
- <xsl:if test="$contents/doc[@id = $docid]//tables/table">
1210
+ <xsl:if test="$contents/mn:doc[@id = $docid]//mn:tables/mn:table">
1214
1211
  <xsl:call-template name="insertListOf_Title">
1215
1212
  <xsl:with-param name="title" select="$title-list-tables"/>
1216
1213
  </xsl:call-template>
1217
- <xsl:for-each select="$contents/doc[@id = $docid]//tables/table">
1214
+ <xsl:for-each select="$contents/mn:doc[@id = $docid]//mn:tables/mn:table">
1218
1215
  <xsl:call-template name="insertListOf_Item"/>
1219
1216
  </xsl:for-each>
1220
1217
  </xsl:if>
1221
1218
 
1222
1219
  <!-- List of Figures -->
1223
- <xsl:if test="$contents/doc[@id = $docid]//figures/figure">
1220
+ <xsl:if test="$contents/doc[@id = $docid]//mn:figures/mn:figure">
1224
1221
  <xsl:call-template name="insertListOf_Title">
1225
1222
  <xsl:with-param name="title" select="$title-list-figures"/>
1226
1223
  </xsl:call-template>
1227
- <xsl:for-each select="$contents/doc[@id = $docid]//figures/figure">
1224
+ <xsl:for-each select="$contents/mn:doc[@id = $docid]//mn:figures/mn:figure">
1228
1225
  <xsl:call-template name="insertListOf_Item"/>
1229
1226
  </xsl:for-each>
1230
1227
  </xsl:if>
@@ -1256,7 +1253,7 @@
1256
1253
  </xsl:if>
1257
1254
 
1258
1255
  <!-- Document Control -->
1259
- <xsl:apply-templates select="bipm:doccontrol" mode="sections"/>
1256
+ <xsl:apply-templates select="bipm:doccontrol | bipm:colophon" mode="sections"/>
1260
1257
 
1261
1258
  <!-- Index -->
1262
1259
  <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
@@ -1411,7 +1408,7 @@
1411
1408
  </xsl:if>
1412
1409
 
1413
1410
  <!-- Document Control -->
1414
- <xsl:apply-templates select="bipm:doccontrol" mode="sections"/>
1411
+ <xsl:apply-templates select="bipm:doccontrol | bipm:colophon" mode="sections"/>
1415
1412
 
1416
1413
  <!-- Index -->
1417
1414
  <xsl:apply-templates select="xalan:nodeset($indexes)/doc[@id = $docid]//bipm:indexsect" mode="index">
@@ -1877,8 +1874,8 @@
1877
1874
  <xsl:choose>
1878
1875
  <xsl:when test="@level = 1 and @type = 'annex'">0pt</xsl:when>
1879
1876
  <xsl:when test="@level = 1">6pt</xsl:when>
1880
- <xsl:when test="@level = 2 and not(following-sibling::item[@display='true']) and not(item[@display='true']) and not(position() = last())">12pt</xsl:when>
1881
- <xsl:when test="@level = 3 and not(following-sibling::item[@display='true']) and not(../following-sibling::item[@display='true']) and not(position() = last())">12pt</xsl:when>
1877
+ <xsl:when test="@level = 2 and not(following-sibling::mn:item[@display='true']) and not(mn:item[@display='true']) and not(position() = last())">12pt</xsl:when>
1878
+ <xsl:when test="@level = 3 and not(following-sibling::mn:item[@display='true']) and not(../following-sibling::mn:item[@display='true']) and not(position() = last())">12pt</xsl:when>
1882
1879
  </xsl:choose>
1883
1880
  </xsl:variable>
1884
1881
 
@@ -1944,13 +1941,13 @@
1944
1941
  <xsl:attribute name="margin-left">11mm</xsl:attribute>
1945
1942
  <xsl:attribute name="text-indent">-11mm</xsl:attribute>
1946
1943
  </xsl:if>
1947
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}" role="SKIP">
1944
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}" role="SKIP">
1948
1945
  <xsl:if test="@level &gt;= 3">
1949
1946
  <fo:inline padding-right="2mm" role="SKIP"><xsl:value-of select="@section"/></fo:inline>
1950
1947
  </xsl:if>
1951
1948
 
1952
1949
  <fo:inline role="SKIP">
1953
- <xsl:apply-templates select="title"/>
1950
+ <xsl:apply-templates select="mn:title"/>
1954
1951
  </fo:inline>
1955
1952
 
1956
1953
  </fo:basic-link>
@@ -1968,7 +1965,7 @@
1968
1965
  <xsl:attribute name="padding-bottom"><xsl:value-of select="normalize-space($space-after)"/></xsl:attribute>
1969
1966
  </xsl:if>
1970
1967
  <fo:block role="SKIP">
1971
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}" role="SKIP">
1968
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}" role="SKIP">
1972
1969
  <fo:inline font-family="Arial" font-weight="bold" font-size="10pt" role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
1973
1970
  </fo:basic-link>
1974
1971
  </fo:block>
@@ -2076,17 +2073,17 @@
2076
2073
  </xsl:choose>
2077
2074
  </xsl:variable>
2078
2075
 
2079
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
2076
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
2080
2077
  <xsl:if test="ancestor::bipm:annex">
2081
2078
  <xsl:attribute name="parent">annex</xsl:attribute>
2082
2079
  </xsl:if>
2083
- <title>
2080
+ <mn:title>
2084
2081
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
2085
- </title>
2082
+ </mn:title>
2086
2083
  <xsl:if test="$type != 'index'">
2087
2084
  <xsl:apply-templates mode="contents"/>
2088
2085
  </xsl:if>
2089
- </item>
2086
+ </mn:item>
2090
2087
  </xsl:if>
2091
2088
  </xsl:template>
2092
2089
 
@@ -4011,34 +4008,25 @@
4011
4008
  </xsl:if>
4012
4009
  </xsl:template>
4013
4010
 
4014
- <!-- <xsl:strip-space elements="bipm:xref"/> -->
4011
+ <!-- https://www.metanorma.org/ns/standoc -->
4012
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
4015
4013
 
4016
- <xsl:variable name="namespace_full_">
4017
- <xsl:choose>
4018
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
4019
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
4020
- </xsl:choose>
4021
- </xsl:variable>
4022
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
4014
+ <!-- https://www.metanorma.org/ns/xsl -->
4015
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
4023
4016
 
4024
- <xsl:variable name="root_element_">
4025
- <xsl:choose>
4026
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
4027
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
4028
- </xsl:choose>
4029
- </xsl:variable>
4030
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
4017
+ <xsl:variable name="root_element">metanorma</xsl:variable>
4031
4018
 
4019
+ <!---examples: 2013, 2024 -->
4032
4020
  <xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
4033
4021
 
4034
4022
  <!-- external parameters -->
4035
-
4036
4023
  <xsl:param name="svg_images"/> <!-- svg images array -->
4037
4024
  <xsl:variable name="images" select="document($svg_images)"/>
4038
4025
  <xsl:param name="basepath"/> <!-- base path for images -->
4039
4026
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
4040
4027
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
4041
4028
  <xsl:param name="output_path"/> <!-- output PDF file name -->
4029
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
4042
4030
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
4043
4031
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
4044
4032
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
@@ -4085,20 +4073,13 @@
4085
4073
 
4086
4074
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
4087
4075
 
4088
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
4089
- true
4076
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
4077
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
4090
4078
  </xsl:variable>
4091
4079
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
4092
4080
 
4093
- <xsl:variable name="isGenerateTableIF_">
4094
- <xsl:choose>
4095
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
4096
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
4097
- </xsl:when>
4098
- <xsl:otherwise>false</xsl:otherwise>
4099
- </xsl:choose>
4100
- </xsl:variable>
4101
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
4081
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
4082
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
4102
4083
 
4103
4084
  <xsl:variable name="lang">
4104
4085
  <xsl:call-template name="getLang"/>
@@ -4150,8 +4131,7 @@
4150
4131
  <xsl:variable name="pageWidth_">
4151
4132
  <xsl:choose>
4152
4133
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
4153
- <xsl:otherwise>
4154
- 210
4134
+ <xsl:otherwise>210
4155
4135
  </xsl:otherwise>
4156
4136
  </xsl:choose>
4157
4137
  </xsl:variable>
@@ -4161,8 +4141,7 @@
4161
4141
  <xsl:variable name="pageHeight_">
4162
4142
  <xsl:choose>
4163
4143
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
4164
- <xsl:otherwise>
4165
- 297
4144
+ <xsl:otherwise>297
4166
4145
  </xsl:otherwise>
4167
4146
  </xsl:choose>
4168
4147
  </xsl:variable>
@@ -4171,23 +4150,19 @@
4171
4150
  <!-- Page margins in mm (just digits, without 'mm')-->
4172
4151
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
4173
4152
  for example, left margin on odd page and right margin on even page -->
4174
- <xsl:variable name="marginLeftRight1_">
4175
- 31.7
4153
+ <xsl:variable name="marginLeftRight1_">31.7
4176
4154
  </xsl:variable>
4177
4155
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
4178
4156
 
4179
- <xsl:variable name="marginLeftRight2_">
4180
- 40
4157
+ <xsl:variable name="marginLeftRight2_">40
4181
4158
  </xsl:variable>
4182
4159
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
4183
4160
 
4184
- <xsl:variable name="marginTop_">
4185
- 25.4
4161
+ <xsl:variable name="marginTop_">25.4
4186
4162
  </xsl:variable>
4187
4163
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
4188
4164
 
4189
- <xsl:variable name="marginBottom_">
4190
- 22
4165
+ <xsl:variable name="marginBottom_">22
4191
4166
  </xsl:variable>
4192
4167
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
4193
4168
 
@@ -4236,17 +4211,12 @@
4236
4211
  <title-toc lang="zh">目次</title-toc>
4237
4212
 
4238
4213
  <title-part lang="en">
4239
-
4240
- <xsl:text>Part #</xsl:text>
4241
-
4214
+ <xsl:text>Part #</xsl:text>
4242
4215
  </title-part>
4243
4216
  <title-part lang="fr">
4244
-
4245
- <xsl:text>Partie #</xsl:text>
4246
-
4217
+ <xsl:text>Partie #</xsl:text>
4247
4218
  </title-part>
4248
4219
  <title-part lang="ru">
4249
-
4250
4220
  </title-part>
4251
4221
  <title-part lang="zh">第 # 部分:</title-part>
4252
4222
 
@@ -4300,6 +4270,7 @@
4300
4270
  <xsl:variable name="hair_space"> </xsl:variable>
4301
4271
  <xsl:variable name="en_dash">–</xsl:variable>
4302
4272
  <xsl:variable name="em_dash">—</xsl:variable>
4273
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
4303
4274
  <xsl:variable name="cr">&#13;</xsl:variable>
4304
4275
  <xsl:variable name="lf">
4305
4276
  </xsl:variable>
@@ -4341,11 +4312,9 @@
4341
4312
  <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>
4342
4313
  <xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable>
4343
4314
  <xsl:attribute-set name="root-style">
4344
-
4345
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
4346
- <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
4347
- <xsl:attribute name="font-size">10.5pt</xsl:attribute>
4348
-
4315
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
4316
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
4317
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
4349
4318
  </xsl:attribute-set> <!-- root-style -->
4350
4319
 
4351
4320
  <xsl:template name="insertRootStyle">
@@ -4433,37 +4402,28 @@
4433
4402
 
4434
4403
  <!-- Preface sections styles -->
4435
4404
  <xsl:attribute-set name="copyright-statement-style">
4436
-
4437
4405
  </xsl:attribute-set> <!-- copyright-statement-style -->
4438
4406
 
4439
4407
  <xsl:attribute-set name="copyright-statement-title-style">
4440
-
4441
4408
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
4442
4409
 
4443
4410
  <xsl:attribute-set name="copyright-statement-p-style">
4444
-
4445
4411
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
4446
4412
 
4447
4413
  <xsl:attribute-set name="license-statement-style">
4448
-
4449
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
4450
- <xsl:attribute name="font-size">10.5pt</xsl:attribute>
4451
-
4414
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
4415
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
4452
4416
  </xsl:attribute-set>
4453
4417
 
4454
4418
  <xsl:attribute-set name="license-statement-title-style">
4455
4419
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4456
-
4457
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4458
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4459
-
4420
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4421
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4460
4422
  </xsl:attribute-set> <!-- license-statement-title-style -->
4461
4423
 
4462
4424
  <xsl:attribute-set name="license-statement-p-style">
4463
-
4464
- <xsl:attribute name="text-align">justify</xsl:attribute>
4465
- <xsl:attribute name="line-height">135%</xsl:attribute>
4466
-
4425
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4426
+ <xsl:attribute name="line-height">135%</xsl:attribute>
4467
4427
  </xsl:attribute-set> <!-- license-statement-p-style -->
4468
4428
 
4469
4429
  <xsl:attribute-set name="legal-statement-style">
@@ -4472,86 +4432,67 @@
4472
4432
 
4473
4433
  <xsl:attribute-set name="legal-statement-title-style">
4474
4434
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4475
-
4476
4435
  </xsl:attribute-set> <!-- legal-statement-title-style -->
4477
4436
 
4478
4437
  <xsl:attribute-set name="legal-statement-p-style">
4479
-
4480
4438
  </xsl:attribute-set> <!-- legal-statement-p-style -->
4481
4439
 
4482
4440
  <xsl:attribute-set name="feedback-statement-style">
4483
-
4484
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4485
- <xsl:attribute name="line-height">125%</xsl:attribute>
4486
-
4441
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4442
+ <xsl:attribute name="line-height">125%</xsl:attribute>
4487
4443
  </xsl:attribute-set> <!-- feedback-statement-style -->
4488
4444
 
4489
4445
  <xsl:attribute-set name="feedback-statement-title-style">
4490
4446
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4491
-
4492
4447
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
4493
4448
 
4494
4449
  <xsl:attribute-set name="feedback-statement-p-style">
4495
-
4496
4450
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
4497
4451
 
4498
4452
  <!-- End Preface sections styles -->
4499
4453
 
4500
4454
  <xsl:attribute-set name="link-style">
4501
-
4502
- <xsl:attribute name="color">blue</xsl:attribute>
4503
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4504
-
4455
+ <xsl:attribute name="color">blue</xsl:attribute>
4456
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4505
4457
  </xsl:attribute-set>
4506
4458
 
4507
4459
  <xsl:template name="refine_link-style">
4508
-
4509
4460
  </xsl:template> <!-- refine_link-style -->
4510
4461
 
4511
4462
  <xsl:attribute-set name="sourcecode-container-style">
4512
-
4513
4463
  </xsl:attribute-set>
4514
4464
 
4515
4465
  <xsl:attribute-set name="sourcecode-style">
4516
4466
  <xsl:attribute name="white-space">pre</xsl:attribute>
4517
4467
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
4518
4468
  <xsl:attribute name="role">Code</xsl:attribute>
4519
-
4520
4469
  </xsl:attribute-set>
4521
4470
 
4522
4471
  <xsl:template name="refine_sourcecode-style">
4523
-
4524
4472
  </xsl:template> <!-- refine_sourcecode-style -->
4525
4473
 
4526
4474
  <xsl:attribute-set name="pre-style">
4527
4475
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4528
4476
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4529
-
4530
4477
  </xsl:attribute-set>
4531
4478
 
4532
4479
  <xsl:attribute-set name="permission-style">
4533
-
4534
4480
  </xsl:attribute-set>
4535
4481
 
4536
4482
  <xsl:attribute-set name="permission-name-style">
4537
-
4538
4483
  </xsl:attribute-set>
4539
4484
 
4540
4485
  <xsl:attribute-set name="permission-label-style">
4541
-
4542
4486
  </xsl:attribute-set>
4543
4487
 
4544
4488
  <xsl:attribute-set name="requirement-style">
4545
-
4546
4489
  </xsl:attribute-set>
4547
4490
 
4548
4491
  <xsl:attribute-set name="requirement-name-style">
4549
4492
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4550
-
4551
4493
  </xsl:attribute-set>
4552
4494
 
4553
4495
  <xsl:attribute-set name="requirement-label-style">
4554
-
4555
4496
  </xsl:attribute-set>
4556
4497
 
4557
4498
  <xsl:attribute-set name="subject-style">
@@ -4579,48 +4520,36 @@
4579
4520
  </xsl:attribute-set>
4580
4521
 
4581
4522
  <xsl:attribute-set name="recommendation-style">
4582
-
4583
4523
  </xsl:attribute-set>
4584
4524
 
4585
4525
  <xsl:attribute-set name="recommendation-name-style">
4586
-
4587
4526
  </xsl:attribute-set>
4588
4527
 
4589
4528
  <xsl:attribute-set name="recommendation-label-style">
4590
-
4591
4529
  </xsl:attribute-set>
4592
4530
 
4593
4531
  <xsl:attribute-set name="termexample-style">
4594
-
4595
4532
  </xsl:attribute-set>
4596
4533
 
4597
4534
  <xsl:template name="refine_termexample-style">
4598
-
4599
4535
  </xsl:template>
4600
4536
 
4601
4537
  <xsl:attribute-set name="example-style">
4602
-
4603
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4604
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4605
-
4538
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4539
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4606
4540
  </xsl:attribute-set> <!-- example-style -->
4607
4541
 
4608
4542
  <xsl:template name="refine_example-style">
4609
-
4610
4543
  </xsl:template> <!-- refine_example-style -->
4611
4544
 
4612
4545
  <xsl:attribute-set name="example-body-style">
4613
-
4614
4546
  </xsl:attribute-set> <!-- example-body-style -->
4615
4547
 
4616
4548
  <xsl:attribute-set name="example-name-style">
4617
-
4618
- <xsl:attribute name="font-style">italic</xsl:attribute>
4619
-
4549
+ <xsl:attribute name="font-style">italic</xsl:attribute>
4620
4550
  </xsl:attribute-set> <!-- example-name-style -->
4621
4551
 
4622
4552
  <xsl:template name="refine_example-name-style">
4623
-
4624
4553
  </xsl:template>
4625
4554
 
4626
4555
  <xsl:attribute-set name="example-p-style">
@@ -4628,84 +4557,69 @@
4628
4557
  </xsl:attribute-set> <!-- example-p-style -->
4629
4558
 
4630
4559
  <xsl:template name="refine_example-p-style">
4631
-
4632
4560
  </xsl:template> <!-- refine_example-p-style -->
4633
4561
 
4634
4562
  <xsl:attribute-set name="termexample-name-style">
4635
-
4636
- <xsl:attribute name="font-style">italic</xsl:attribute>
4637
-
4563
+ <xsl:attribute name="font-style">italic</xsl:attribute>
4638
4564
  </xsl:attribute-set> <!-- termexample-name-style -->
4639
4565
 
4640
4566
  <xsl:template name="refine_termexample-name-style">
4641
-
4642
4567
  </xsl:template>
4643
4568
 
4644
4569
  <!-- ========================== -->
4645
4570
  <!-- Table styles -->
4646
4571
  <!-- ========================== -->
4647
4572
  <xsl:variable name="table-border_">
4648
-
4649
4573
  </xsl:variable>
4650
4574
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
4651
4575
 
4652
4576
  <xsl:variable name="table-cell-border_">
4653
-
4654
4577
  </xsl:variable>
4655
4578
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
4656
4579
 
4657
4580
  <xsl:attribute-set name="table-container-style">
4658
4581
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
4659
4582
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
4660
-
4661
- <xsl:attribute name="space-after">12pt</xsl:attribute>
4662
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4663
-
4583
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
4584
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4664
4585
  </xsl:attribute-set> <!-- table-container-style -->
4665
4586
 
4666
4587
  <xsl:template name="refine_table-container-style">
4667
4588
  <xsl:param name="margin-side"/>
4668
-
4669
- <xsl:if test="not(ancestor::*[local-name()='note_side'])">
4670
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4671
- </xsl:if>
4672
- <xsl:if test="ancestor-or-self::*[@parent-type = 'quote']">
4673
- <xsl:attribute name="font-family">Arial</xsl:attribute>
4674
- <xsl:attribute name="font-size">9pt</xsl:attribute>
4675
- </xsl:if>
4676
-
4589
+ <xsl:if test="not(ancestor::*[local-name()='note_side'])">
4590
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4591
+ </xsl:if>
4592
+ <xsl:if test="ancestor-or-self::*[@parent-type = 'quote']">
4593
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
4594
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
4595
+ </xsl:if>
4677
4596
  <!-- end table block-container attributes -->
4678
4597
  </xsl:template> <!-- refine_table-container-style -->
4679
4598
 
4680
4599
  <xsl:attribute-set name="table-style">
4681
4600
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
4682
4601
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
4683
-
4684
4602
  </xsl:attribute-set><!-- table-style -->
4685
4603
 
4686
4604
  <xsl:template name="refine_table-style">
4687
4605
  <xsl:param name="margin-side"/>
4688
-
4689
- <xsl:if test="not(ancestor::*[local-name()='preface']) and not(ancestor::*[local-name()='note_side']) and not(ancestor::*[local-name() = 'annex'] and .//*[local-name() = 'xref'][@pagenumber]) and not(ancestor::*[local-name() = 'doccontrol'])">
4690
- <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
4691
- <xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
4692
- </xsl:if>
4606
+ <xsl:if test="not(ancestor::*[local-name()='preface']) and not(ancestor::*[local-name()='note_side']) and not(ancestor::*[local-name() = 'annex'] and .//*[local-name() = 'xref'][@pagenumber]) and not(ancestor::*[local-name() = 'doccontrol']) and not(ancestor::*[local-name() = 'colophon'])">
4607
+ <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
4608
+ <xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
4609
+ </xsl:if>
4693
4610
 
4694
4611
  <xsl:call-template name="setBordersTableArray"/>
4695
-
4696
4612
  </xsl:template> <!-- refine_table-style -->
4697
4613
 
4698
4614
  <xsl:attribute-set name="table-name-style">
4699
4615
  <xsl:attribute name="role">Caption</xsl:attribute>
4700
4616
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4701
-
4702
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4703
- <xsl:attribute name="text-align">left</xsl:attribute>
4704
- <xsl:attribute name="margin-top">24pt</xsl:attribute>
4705
- <!-- <xsl:attribute name="margin-left">25mm</xsl:attribute>
4617
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4618
+ <xsl:attribute name="text-align">left</xsl:attribute>
4619
+ <xsl:attribute name="margin-top">24pt</xsl:attribute>
4620
+ <!-- <xsl:attribute name="margin-left">25mm</xsl:attribute>
4706
4621
  <xsl:attribute name="text-indent">-25mm</xsl:attribute> -->
4707
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4708
-
4622
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4709
4623
  </xsl:attribute-set> <!-- table-name-style -->
4710
4624
 
4711
4625
  <xsl:template name="refine_table-name-style">
@@ -4713,31 +4627,25 @@
4713
4627
  <xsl:if test="$continued = 'true'">
4714
4628
  <xsl:attribute name="role">SKIP</xsl:attribute>
4715
4629
  </xsl:if>
4716
-
4717
4630
  </xsl:template> <!-- refine_table-name-style -->
4718
4631
 
4719
4632
  <xsl:attribute-set name="table-row-style">
4720
4633
  <xsl:attribute name="min-height">4mm</xsl:attribute>
4721
-
4722
4634
  </xsl:attribute-set>
4723
4635
 
4724
4636
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
4725
4637
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4726
-
4727
4638
  </xsl:attribute-set>
4728
4639
 
4729
4640
  <xsl:template name="refine_table-header-row-style">
4730
4641
 
4731
4642
  <xsl:call-template name="setBordersTableArray"/>
4732
-
4733
4643
  </xsl:template> <!-- refine_table-header-row-style -->
4734
4644
 
4735
4645
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
4736
-
4737
4646
  </xsl:attribute-set>
4738
4647
 
4739
4648
  <xsl:template name="refine_table-footer-row-style">
4740
-
4741
4649
  </xsl:template> <!-- refine_table-footer-row-style -->
4742
4650
 
4743
4651
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -4747,7 +4655,6 @@
4747
4655
  <xsl:template name="refine_table-body-row-style">
4748
4656
 
4749
4657
  <xsl:call-template name="setBordersTableArray"/>
4750
-
4751
4658
  </xsl:template> <!-- refine_table-body-row-style -->
4752
4659
 
4753
4660
  <xsl:attribute-set name="table-header-cell-style">
@@ -4755,27 +4662,24 @@
4755
4662
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
4756
4663
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
4757
4664
  <xsl:attribute name="display-align">center</xsl:attribute>
4758
-
4759
- <xsl:attribute name="font-weight">normal</xsl:attribute>
4760
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4761
- <xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
4762
- <xsl:attribute name="height">8mm</xsl:attribute>
4763
- <xsl:attribute name="padding-top">2mm</xsl:attribute>
4764
-
4665
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
4666
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4667
+ <xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
4668
+ <xsl:attribute name="height">8mm</xsl:attribute>
4669
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
4765
4670
  </xsl:attribute-set> <!-- table-header-cell-style -->
4766
4671
 
4767
4672
  <xsl:template name="refine_table-header-cell-style">
4768
-
4769
- <xsl:if test="(ancestor::*[local-name() = 'annex'] and ancestor::*[local-name() = 'table']//*[local-name() = 'xref'][@pagenumber]) or ancestor::*[local-name() = 'doccontrol']"><!-- for Annex ToC -->
4770
- <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
4771
- <xsl:attribute name="border-bottom">solid black 0pt</xsl:attribute>
4772
- </xsl:if>
4773
- <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
4774
- <xsl:call-template name="setTextAlignment">
4775
- <xsl:with-param name="default">left</xsl:with-param>
4776
- </xsl:call-template>
4777
- <xsl:attribute name="display-align">before</xsl:attribute>
4778
- </xsl:if>
4673
+ <xsl:if test="(ancestor::*[local-name() = 'annex'] and ancestor::*[local-name() = 'table']//*[local-name() = 'xref'][@pagenumber]) or ancestor::*[local-name() = 'doccontrol'] or ancestor::*[local-name() = 'colophon']"><!-- for Annex ToC -->
4674
+ <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
4675
+ <xsl:attribute name="border-bottom">solid black 0pt</xsl:attribute>
4676
+ </xsl:if>
4677
+ <xsl:if test="ancestor::*[local-name() = 'doccontrol'] or ancestor::*[local-name() = 'colophon']">
4678
+ <xsl:call-template name="setTextAlignment">
4679
+ <xsl:with-param name="default">left</xsl:with-param>
4680
+ </xsl:call-template>
4681
+ <xsl:attribute name="display-align">before</xsl:attribute>
4682
+ </xsl:if>
4779
4683
 
4780
4684
  <xsl:call-template name="setBordersTableArray"/>
4781
4685
 
@@ -4784,16 +4688,13 @@
4784
4688
  </xsl:if>
4785
4689
 
4786
4690
  <xsl:call-template name="setTableCellAttributes"/>
4787
-
4788
4691
  </xsl:template> <!-- refine_table-header-cell-style -->
4789
4692
 
4790
4693
  <xsl:attribute-set name="table-cell-style">
4791
4694
  <xsl:attribute name="display-align">center</xsl:attribute>
4792
4695
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
4793
4696
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
4794
-
4795
- <xsl:attribute name="border">solid 0pt white</xsl:attribute>
4796
-
4697
+ <xsl:attribute name="border">solid 0pt white</xsl:attribute>
4797
4698
  </xsl:attribute-set> <!-- table-cell-style -->
4798
4699
 
4799
4700
  <xsl:template name="refine_table-cell-style">
@@ -4801,19 +4702,19 @@
4801
4702
  <xsl:if test="$lang = 'ar'">
4802
4703
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
4803
4704
  </xsl:if>
4804
-
4805
- <xsl:variable name="rownum"><xsl:number count="*[local-name()='tr']"/></xsl:variable>
4806
- <xsl:if test="$rownum = 1">
4807
- <xsl:attribute name="padding-top">3mm</xsl:attribute>
4808
- </xsl:if>
4809
- <xsl:if test="not(ancestor::*[local-name()='tr']/following-sibling::*[local-name()='tr'])"> <!-- last row -->
4810
- <xsl:attribute name="padding-bottom">2mm</xsl:attribute>
4811
- </xsl:if>
4812
- <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
4813
- <xsl:attribute name="display-align">before</xsl:attribute>
4814
- </xsl:if>
4815
-
4816
- <!-- bsi -->
4705
+ <xsl:variable name="rownum"><xsl:number count="*[local-name()='tr']"/></xsl:variable>
4706
+ <xsl:if test="$rownum = 1">
4707
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
4708
+ </xsl:if>
4709
+ <xsl:if test="preceding-sibling::*[local-name() = 'th']">
4710
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
4711
+ </xsl:if>
4712
+ <xsl:if test="not(ancestor::*[local-name()='tr']/following-sibling::*[local-name()='tr'])"> <!-- last row -->
4713
+ <xsl:attribute name="padding-bottom">2mm</xsl:attribute>
4714
+ </xsl:if>
4715
+ <xsl:if test="ancestor::*[local-name() = 'doccontrol'] or ancestor::*[local-name() = 'colophon']">
4716
+ <xsl:attribute name="display-align">before</xsl:attribute>
4717
+ </xsl:if>
4817
4718
 
4818
4719
  <xsl:call-template name="setBordersTableArray"/>
4819
4720
 
@@ -4824,72 +4725,56 @@
4824
4725
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
4825
4726
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
4826
4727
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
4827
-
4828
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4829
-
4728
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4830
4729
  </xsl:attribute-set> <!-- table-footer-cell-style -->
4831
4730
 
4832
4731
  <xsl:template name="refine_table-footer-cell-style">
4833
-
4834
4732
  </xsl:template> <!-- refine_table-footer-cell-style -->
4835
4733
 
4836
4734
  <xsl:attribute-set name="table-note-style">
4837
4735
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4838
4736
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4839
-
4840
- <xsl:attribute name="text-align">justify</xsl:attribute>
4841
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4842
-
4737
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4738
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4843
4739
  </xsl:attribute-set><!-- table-note-style -->
4844
4740
 
4845
4741
  <xsl:template name="refine_table-note-style">
4846
-
4847
- <xsl:if test="ancestor::bipm:preface">
4848
- <xsl:attribute name="margin-top">18pt</xsl:attribute>
4849
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4850
- </xsl:if>
4851
-
4742
+ <xsl:if test="ancestor::bipm:preface">
4743
+ <xsl:attribute name="margin-top">18pt</xsl:attribute>
4744
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4745
+ </xsl:if>
4852
4746
  </xsl:template> <!-- refine_table-note-style -->
4853
4747
 
4854
4748
  <xsl:attribute-set name="table-fn-style">
4855
4749
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4856
-
4857
- <xsl:attribute name="font-size">9pt</xsl:attribute>
4858
- <xsl:attribute name="text-indent">-6.5mm</xsl:attribute>
4859
- <xsl:attribute name="margin-left">6.5mm</xsl:attribute>
4860
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4861
-
4750
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
4751
+ <xsl:attribute name="text-indent">-6.5mm</xsl:attribute>
4752
+ <xsl:attribute name="margin-left">6.5mm</xsl:attribute>
4753
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4862
4754
  </xsl:attribute-set> <!-- table-fn-style -->
4863
4755
 
4864
4756
  <xsl:template name="refine_table-fn-style">
4865
-
4866
4757
  </xsl:template>
4867
4758
 
4868
4759
  <xsl:attribute-set name="table-fn-number-style">
4869
4760
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
4870
-
4871
- <xsl:attribute name="font-style">italic</xsl:attribute>
4872
- <!-- <xsl:attribute name="padding-right">2.5mm</xsl:attribute> -->
4873
-
4761
+ <xsl:attribute name="font-style">italic</xsl:attribute>
4762
+ <!-- <xsl:attribute name="padding-right">2.5mm</xsl:attribute> -->
4874
4763
  </xsl:attribute-set> <!-- table-fn-number-style -->
4875
4764
 
4876
4765
  <xsl:attribute-set name="table-fmt-fn-label-style">
4877
4766
  <xsl:attribute name="font-size">80%</xsl:attribute>
4878
-
4879
4767
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
4880
4768
 
4881
4769
  <xsl:template name="refine_table-fmt-fn-label-style">
4882
-
4883
4770
  </xsl:template>
4884
4771
 
4885
4772
  <xsl:attribute-set name="fn-container-body-style">
4886
4773
  <xsl:attribute name="text-indent">0</xsl:attribute>
4887
4774
  <xsl:attribute name="start-indent">0</xsl:attribute>
4888
-
4889
4775
  </xsl:attribute-set>
4890
4776
 
4891
4777
  <xsl:attribute-set name="table-fn-body-style">
4892
-
4893
4778
  </xsl:attribute-set>
4894
4779
 
4895
4780
  <xsl:attribute-set name="figure-fn-number-style">
@@ -4899,17 +4784,14 @@
4899
4784
  <xsl:attribute-set name="figure-fmt-fn-label-style">
4900
4785
  <xsl:attribute name="font-size">80%</xsl:attribute>
4901
4786
  <xsl:attribute name="vertical-align">super</xsl:attribute>
4902
-
4903
4787
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
4904
4788
 
4905
4789
  <xsl:template name="refine_figure-fmt-fn-label-style">
4906
-
4907
4790
  </xsl:template>
4908
4791
 
4909
4792
  <xsl:attribute-set name="figure-fn-body-style">
4910
4793
  <xsl:attribute name="text-align">justify</xsl:attribute>
4911
4794
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4912
-
4913
4795
  </xsl:attribute-set>
4914
4796
  <!-- ========================== -->
4915
4797
  <!-- END Table styles -->
@@ -4920,47 +4802,36 @@
4920
4802
  <!-- ========================== -->
4921
4803
 
4922
4804
  <xsl:attribute-set name="dl-block-style">
4923
-
4924
4805
  </xsl:attribute-set>
4925
4806
 
4926
4807
  <xsl:attribute-set name="dt-row-style">
4927
-
4928
4808
  </xsl:attribute-set>
4929
4809
 
4930
4810
  <xsl:attribute-set name="dt-cell-style">
4931
-
4932
4811
  </xsl:attribute-set>
4933
4812
 
4934
4813
  <xsl:template name="refine_dt-cell-style">
4935
-
4936
4814
  </xsl:template> <!-- refine_dt-cell-style -->
4937
4815
 
4938
4816
  <xsl:attribute-set name="dt-block-style">
4939
4817
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
4940
-
4941
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4942
-
4818
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4943
4819
  </xsl:attribute-set>
4944
4820
 
4945
4821
  <xsl:template name="refine_dt-block-style">
4946
-
4947
4822
  </xsl:template> <!-- refine_dt-block-style -->
4948
4823
 
4949
4824
  <xsl:attribute-set name="dl-name-style">
4950
4825
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4951
4826
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4952
-
4953
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4954
-
4827
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4955
4828
  </xsl:attribute-set> <!-- dl-name-style -->
4956
4829
 
4957
4830
  <xsl:attribute-set name="dd-cell-style">
4958
4831
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
4959
-
4960
4832
  </xsl:attribute-set>
4961
4833
 
4962
4834
  <xsl:template name="refine_dd-cell-style">
4963
-
4964
4835
  </xsl:template> <!-- refine_dd-cell-style -->
4965
4836
 
4966
4837
  <!-- ========================== -->
@@ -4968,236 +4839,178 @@
4968
4839
  <!-- ========================== -->
4969
4840
 
4970
4841
  <xsl:attribute-set name="appendix-style">
4971
-
4972
4842
  </xsl:attribute-set>
4973
4843
 
4974
4844
  <xsl:attribute-set name="appendix-example-style">
4975
-
4976
4845
  </xsl:attribute-set>
4977
4846
 
4978
4847
  <xsl:attribute-set name="xref-style">
4979
-
4980
4848
  </xsl:attribute-set>
4981
4849
 
4982
4850
  <xsl:attribute-set name="eref-style">
4983
-
4984
4851
  </xsl:attribute-set>
4985
4852
 
4986
4853
  <xsl:template name="refine_eref-style">
4987
4854
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
4988
4855
  <xsl:variable name="text" select="normalize-space()"/>
4989
-
4990
4856
  </xsl:template> <!-- refine_eref-style -->
4991
4857
 
4992
4858
  <xsl:attribute-set name="note-style">
4993
-
4994
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4995
- <xsl:attribute name="text-align">justify</xsl:attribute>
4996
-
4859
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4860
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4997
4861
  </xsl:attribute-set>
4998
4862
 
4999
4863
  <xsl:template name="refine_note-style">
5000
-
5001
- <xsl:if test="parent::*[local-name() = 'li']">
5002
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
5003
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
5004
- </xsl:if>
5005
-
4864
+ <xsl:if test="parent::*[local-name() = 'li']">
4865
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
4866
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
4867
+ </xsl:if>
5006
4868
  </xsl:template>
5007
4869
 
5008
4870
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
5009
4871
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
5010
4872
 
5011
4873
  <xsl:attribute-set name="note-name-style">
5012
-
5013
4874
  </xsl:attribute-set>
5014
4875
 
5015
4876
  <xsl:template name="refine_note-name-style">
5016
-
5017
4877
  </xsl:template> <!-- refine_note-name-style -->
5018
4878
 
5019
4879
  <xsl:attribute-set name="table-note-name-style">
5020
4880
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
5021
-
5022
- <xsl:attribute name="font-size">10pt</xsl:attribute>
5023
-
4881
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
5024
4882
  </xsl:attribute-set>
5025
4883
 
5026
4884
  <xsl:template name="refine_table-note-name-style">
5027
-
5028
- <xsl:if test="ancestor::bipm:preface">
5029
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
5030
- </xsl:if>
5031
-
4885
+ <xsl:if test="ancestor::bipm:preface">
4886
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4887
+ </xsl:if>
5032
4888
  </xsl:template> <!-- refine_table-note-name-style -->
5033
4889
 
5034
4890
  <xsl:attribute-set name="note-p-style">
5035
-
5036
- <xsl:attribute name="text-align">justify</xsl:attribute>
5037
-
4891
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5038
4892
  </xsl:attribute-set>
5039
4893
 
5040
4894
  <xsl:attribute-set name="termnote-style">
5041
-
5042
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5043
- <xsl:attribute name="text-align">justify</xsl:attribute>
5044
-
4895
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4896
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5045
4897
  </xsl:attribute-set>
5046
4898
 
5047
4899
  <xsl:template name="refine_termnote-style">
5048
-
5049
4900
  </xsl:template> <!-- refine_termnote-style -->
5050
4901
 
5051
4902
  <xsl:attribute-set name="termnote-name-style">
5052
-
5053
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
5054
-
4903
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
5055
4904
  </xsl:attribute-set>
5056
4905
 
5057
4906
  <xsl:template name="refine_termnote-name-style">
5058
-
5059
- <!-- <xsl:if test="$namespace = 'ieee'">
5060
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
5061
- </xsl:if> -->
5062
-
5063
4907
  </xsl:template>
5064
4908
 
5065
4909
  <xsl:attribute-set name="termnote-p-style">
5066
-
5067
- <xsl:attribute name="text-align">justify</xsl:attribute>
5068
-
4910
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5069
4911
  </xsl:attribute-set>
5070
4912
 
5071
4913
  <xsl:attribute-set name="quote-style">
5072
4914
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
5073
4915
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
5074
-
5075
4916
  </xsl:attribute-set>
5076
4917
 
5077
4918
  <xsl:template name="refine_quote-style">
5078
-
5079
4919
  </xsl:template>
5080
4920
 
5081
4921
  <xsl:attribute-set name="quote-source-style">
5082
4922
  <xsl:attribute name="text-align">right</xsl:attribute>
5083
-
5084
4923
  </xsl:attribute-set>
5085
4924
 
5086
4925
  <xsl:attribute-set name="termsource-style">
5087
-
5088
4926
  </xsl:attribute-set>
5089
4927
 
5090
4928
  <xsl:template name="refine_termsource-style">
5091
-
5092
4929
  </xsl:template> <!-- refine_termsource-style -->
5093
4930
 
5094
4931
  <xsl:attribute-set name="termsource-text-style">
5095
-
5096
4932
  </xsl:attribute-set>
5097
4933
 
5098
4934
  <xsl:attribute-set name="origin-style">
5099
-
5100
4935
  </xsl:attribute-set>
5101
4936
 
5102
4937
  <xsl:attribute-set name="term-style">
5103
-
5104
4938
  </xsl:attribute-set>
5105
4939
 
5106
4940
  <xsl:attribute-set name="term-name-style">
5107
4941
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5108
4942
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5109
-
5110
4943
  </xsl:attribute-set>
5111
4944
 
5112
4945
  <xsl:attribute-set name="figure-block-style">
5113
4946
  <xsl:attribute name="role">SKIP</xsl:attribute>
5114
-
5115
4947
  </xsl:attribute-set>
5116
4948
 
5117
4949
  <xsl:template name="refine_figure-block-style">
5118
-
5119
- <xsl:if test="*[local-name() = 'name']">
5120
- <xsl:attribute name="space-after">12pt</xsl:attribute>
5121
- </xsl:if>
5122
-
4950
+ <xsl:if test="*[local-name() = 'name']">
4951
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
4952
+ </xsl:if>
5123
4953
  </xsl:template>
5124
4954
 
5125
4955
  <xsl:attribute-set name="figure-style">
5126
-
5127
4956
  </xsl:attribute-set>
5128
4957
 
5129
4958
  <xsl:attribute-set name="figure-name-style">
5130
4959
  <xsl:attribute name="role">Caption</xsl:attribute>
5131
-
5132
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5133
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5134
- <xsl:attribute name="text-align">left</xsl:attribute>
5135
- <xsl:attribute name="margin-left">19mm</xsl:attribute>
5136
- <xsl:attribute name="text-indent">-19mm</xsl:attribute>
5137
-
4960
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4961
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4962
+ <xsl:attribute name="text-align">left</xsl:attribute>
4963
+ <xsl:attribute name="margin-left">19mm</xsl:attribute>
4964
+ <xsl:attribute name="text-indent">-19mm</xsl:attribute>
5138
4965
  </xsl:attribute-set>
5139
4966
 
5140
4967
  <xsl:template name="refine_figure-name-style">
5141
-
5142
4968
  </xsl:template> <!-- refine_figure-name-style -->
5143
4969
 
5144
4970
  <xsl:attribute-set name="figure-source-style">
5145
-
5146
4971
  </xsl:attribute-set>
5147
4972
 
5148
4973
  <!-- Formula's styles -->
5149
4974
  <xsl:attribute-set name="formula-style">
5150
4975
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
5151
4976
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5152
-
5153
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5154
-
4977
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5155
4978
  </xsl:attribute-set> <!-- formula-style -->
5156
4979
 
5157
4980
  <xsl:attribute-set name="formula-stem-block-style">
5158
4981
  <xsl:attribute name="text-align">center</xsl:attribute>
5159
-
5160
4982
  </xsl:attribute-set> <!-- formula-stem-block-style -->
5161
4983
 
5162
4984
  <xsl:template name="refine_formula-stem-block-style">
5163
-
5164
4985
  </xsl:template> <!-- refine_formula-stem-block-style -->
5165
4986
 
5166
4987
  <xsl:attribute-set name="formula-stem-number-style">
5167
4988
  <xsl:attribute name="text-align">right</xsl:attribute>
5168
-
5169
4989
  </xsl:attribute-set> <!-- formula-stem-number-style -->
5170
4990
  <!-- End Formula's styles -->
5171
4991
 
5172
4992
  <xsl:template name="refine_formula-stem-number-style">
5173
-
5174
4993
  </xsl:template>
5175
4994
 
5176
4995
  <xsl:attribute-set name="image-style">
5177
4996
  <xsl:attribute name="role">SKIP</xsl:attribute>
5178
4997
  <xsl:attribute name="text-align">center</xsl:attribute>
5179
-
5180
4998
  </xsl:attribute-set>
5181
4999
 
5182
5000
  <xsl:template name="refine_image-style">
5183
-
5184
5001
  </xsl:template>
5185
5002
 
5186
5003
  <xsl:attribute-set name="figure-pseudocode-p-style">
5187
-
5188
5004
  </xsl:attribute-set>
5189
5005
 
5190
5006
  <xsl:attribute-set name="image-graphic-style">
5191
5007
  <xsl:attribute name="width">100%</xsl:attribute>
5192
5008
  <xsl:attribute name="content-height">100%</xsl:attribute>
5193
5009
  <xsl:attribute name="scaling">uniform</xsl:attribute>
5194
-
5195
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
5196
-
5010
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
5197
5011
  </xsl:attribute-set>
5198
5012
 
5199
5013
  <xsl:attribute-set name="tt-style">
5200
-
5201
5014
  </xsl:attribute-set>
5202
5015
 
5203
5016
  <xsl:attribute-set name="sourcecode-name-style">
@@ -5206,50 +5019,41 @@
5206
5019
  <xsl:attribute name="text-align">center</xsl:attribute>
5207
5020
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5208
5021
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5209
-
5210
5022
  </xsl:attribute-set>
5211
5023
 
5212
5024
  <xsl:attribute-set name="preferred-block-style">
5213
-
5214
5025
  </xsl:attribute-set>
5215
5026
 
5216
5027
  <xsl:attribute-set name="preferred-term-style">
5217
5028
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5218
5029
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5219
-
5220
5030
  </xsl:attribute-set>
5221
5031
 
5222
5032
  <xsl:attribute-set name="domain-style">
5223
-
5224
5033
  </xsl:attribute-set>
5225
5034
 
5226
5035
  <xsl:attribute-set name="admitted-style">
5227
-
5228
5036
  </xsl:attribute-set>
5229
5037
 
5230
5038
  <xsl:attribute-set name="deprecates-style">
5231
-
5232
5039
  </xsl:attribute-set>
5233
5040
 
5234
5041
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
5235
5042
  </xsl:attribute-set>
5236
5043
 
5237
5044
  <xsl:attribute-set name="definition-style">
5238
-
5239
5045
  </xsl:attribute-set>
5240
5046
 
5241
5047
  <xsl:variable name="color-added-text">
5242
5048
  <xsl:text>rgb(0, 255, 0)</xsl:text>
5243
5049
  </xsl:variable>
5244
5050
  <xsl:attribute-set name="add-style">
5245
-
5246
- <xsl:attribute name="color">red</xsl:attribute>
5247
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
5248
- <!-- <xsl:attribute name="color">black</xsl:attribute>
5051
+ <xsl:attribute name="color">red</xsl:attribute>
5052
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
5053
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
5249
5054
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
5250
5055
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
5251
5056
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
5252
-
5253
5057
  </xsl:attribute-set>
5254
5058
 
5255
5059
  <xsl:variable name="add-style">
@@ -5269,54 +5073,41 @@
5269
5073
 
5270
5074
  <xsl:attribute-set name="mathml-style">
5271
5075
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
5272
-
5273
5076
  </xsl:attribute-set>
5274
5077
 
5275
5078
  <xsl:template name="refine_mathml-style">
5276
-
5277
- <xsl:if test="ancestor::*[local-name()='table']">
5278
- <xsl:attribute name="font-size">95%</xsl:attribute> <!-- base font in table is 10pt -->
5279
- </xsl:if>
5280
-
5079
+ <xsl:if test="ancestor::*[local-name()='table']">
5080
+ <xsl:attribute name="font-size">95%</xsl:attribute> <!-- base font in table is 10pt -->
5081
+ </xsl:if>
5281
5082
  </xsl:template>
5282
5083
 
5283
5084
  <xsl:attribute-set name="list-style">
5284
-
5285
5085
  </xsl:attribute-set> <!-- list-style -->
5286
5086
 
5287
5087
  <xsl:template name="refine_list-style">
5288
-
5289
5088
  </xsl:template> <!-- refine_list-style -->
5290
5089
 
5291
5090
  <xsl:attribute-set name="list-name-style">
5292
5091
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5293
-
5294
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5295
-
5092
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5296
5093
  </xsl:attribute-set> <!-- list-name-style -->
5297
5094
 
5298
5095
  <xsl:attribute-set name="list-item-style">
5299
-
5300
5096
  </xsl:attribute-set>
5301
5097
 
5302
5098
  <xsl:template name="refine_list-item-style">
5303
-
5304
5099
  </xsl:template> <!-- refine_list-item-style -->
5305
5100
 
5306
5101
  <xsl:attribute-set name="list-item-label-style">
5307
-
5308
5102
  </xsl:attribute-set>
5309
5103
 
5310
5104
  <xsl:template name="refine_list-item-label-style">
5311
-
5312
5105
  </xsl:template> <!-- refine_list-item-label-style -->
5313
5106
 
5314
5107
  <xsl:attribute-set name="list-item-body-style">
5315
-
5316
5108
  </xsl:attribute-set>
5317
5109
 
5318
5110
  <xsl:template name="refine_list-item-body-style">
5319
-
5320
5111
  </xsl:template> <!-- refine_list-item-body-style -->
5321
5112
 
5322
5113
  <xsl:attribute-set name="toc-style">
@@ -5326,15 +5117,13 @@
5326
5117
  <xsl:attribute-set name="fn-reference-style">
5327
5118
  <xsl:attribute name="font-size">80%</xsl:attribute>
5328
5119
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5329
-
5330
- <xsl:attribute name="font-size">70%</xsl:attribute>
5331
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5332
- <xsl:attribute name="font-style">italic</xsl:attribute>
5120
+ <xsl:attribute name="font-size">70%</xsl:attribute>
5121
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5122
+ <xsl:attribute name="font-style">italic</xsl:attribute>
5333
5123
 
5334
5124
  </xsl:attribute-set>
5335
5125
 
5336
5126
  <xsl:template name="refine_fn-reference-style">
5337
-
5338
5127
  </xsl:template> <!-- refine_fn-reference-style -->
5339
5128
 
5340
5129
  <xsl:attribute-set name="fn-style">
@@ -5343,10 +5132,8 @@
5343
5132
 
5344
5133
  <xsl:attribute-set name="fn-num-style">
5345
5134
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5346
-
5347
- <xsl:attribute name="font-size">65%</xsl:attribute>
5348
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5349
-
5135
+ <xsl:attribute name="font-size">65%</xsl:attribute>
5136
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5350
5137
  </xsl:attribute-set>
5351
5138
 
5352
5139
  <xsl:attribute-set name="fn-body-style">
@@ -5354,135 +5141,102 @@
5354
5141
  <xsl:attribute name="font-style">normal</xsl:attribute>
5355
5142
  <xsl:attribute name="text-indent">0</xsl:attribute>
5356
5143
  <xsl:attribute name="start-indent">0</xsl:attribute>
5357
-
5358
- <xsl:attribute name="font-size">9pt</xsl:attribute>
5359
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5360
- <xsl:attribute name="line-height">124%</xsl:attribute>
5361
- <xsl:attribute name="text-align">justify</xsl:attribute>
5362
-
5144
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
5145
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5146
+ <xsl:attribute name="line-height">124%</xsl:attribute>
5147
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5363
5148
  </xsl:attribute-set>
5364
5149
 
5365
5150
  <xsl:template name="refine_fn-body-style">
5366
-
5367
5151
  </xsl:template> <!-- refine_fn-body-style -->
5368
5152
 
5369
5153
  <xsl:attribute-set name="fn-body-num-style">
5370
5154
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
5371
-
5372
- <xsl:attribute name="font-size">60%</xsl:attribute>
5373
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5374
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
5375
-
5155
+ <xsl:attribute name="font-size">60%</xsl:attribute>
5156
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5157
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
5376
5158
  </xsl:attribute-set> <!-- fn-body-num-style -->
5377
5159
 
5378
5160
  <xsl:template name="refine_fn-body-num-style">
5379
-
5380
5161
  </xsl:template> <!-- refine_fn-body-num-style -->
5381
5162
 
5382
5163
  <!-- admonition -->
5383
5164
  <xsl:attribute-set name="admonition-style">
5384
-
5385
- <xsl:attribute name="border">0.25pt solid black</xsl:attribute>
5386
- <xsl:attribute name="margin-left">16mm</xsl:attribute>
5387
- <xsl:attribute name="margin-right">16mm</xsl:attribute>
5388
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5389
-
5165
+ <xsl:attribute name="border">0.25pt solid black</xsl:attribute>
5166
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
5167
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
5168
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5390
5169
  </xsl:attribute-set> <!-- admonition-style -->
5391
5170
 
5392
5171
  <xsl:attribute-set name="admonition-container-style">
5393
5172
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
5394
5173
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
5395
-
5396
- <xsl:attribute name="padding">2mm</xsl:attribute>
5397
- <xsl:attribute name="padding-top">3mm</xsl:attribute>
5398
-
5174
+ <xsl:attribute name="padding">2mm</xsl:attribute>
5175
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
5399
5176
  </xsl:attribute-set> <!-- admonition-container-style -->
5400
5177
 
5401
5178
  <xsl:attribute-set name="admonition-name-style">
5402
5179
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5403
-
5404
- <xsl:attribute name="font-size">11pt</xsl:attribute>
5405
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5406
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5407
- <xsl:attribute name="font-style">italic</xsl:attribute>
5408
- <xsl:attribute name="text-align">center</xsl:attribute>
5409
-
5180
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
5181
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5182
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5183
+ <xsl:attribute name="font-style">italic</xsl:attribute>
5184
+ <xsl:attribute name="text-align">center</xsl:attribute>
5410
5185
  </xsl:attribute-set> <!-- admonition-name-style -->
5411
5186
 
5412
5187
  <xsl:attribute-set name="admonition-p-style">
5413
-
5414
- <xsl:attribute name="font-style">italic</xsl:attribute>
5415
-
5188
+ <xsl:attribute name="font-style">italic</xsl:attribute>
5416
5189
  </xsl:attribute-set> <!-- admonition-p-style -->
5417
5190
  <!-- end admonition -->
5418
5191
 
5419
5192
  <!-- bibitem in Normative References (references/@normative="true") -->
5420
5193
  <xsl:attribute-set name="bibitem-normative-style">
5421
-
5422
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5423
- <xsl:attribute name="start-indent">25mm</xsl:attribute>
5424
- <xsl:attribute name="text-indent">-25mm</xsl:attribute>
5425
- <xsl:attribute name="line-height">115%</xsl:attribute>
5426
-
5194
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5195
+ <xsl:attribute name="start-indent">25mm</xsl:attribute>
5196
+ <xsl:attribute name="text-indent">-25mm</xsl:attribute>
5197
+ <xsl:attribute name="line-height">115%</xsl:attribute>
5427
5198
  </xsl:attribute-set> <!-- bibitem-normative-style -->
5428
5199
 
5429
5200
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
5430
5201
  <xsl:attribute-set name="bibitem-normative-list-style">
5431
5202
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
5432
5203
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5433
-
5434
- <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
5435
-
5436
- <!-- <xsl:if test="$namespace = 'ieee'">
5437
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5438
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
5439
- </xsl:if> -->
5440
-
5204
+ <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
5441
5205
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
5442
5206
 
5443
5207
  <xsl:attribute-set name="bibitem-non-normative-style">
5444
-
5445
5208
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
5446
5209
 
5447
5210
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
5448
5211
  <xsl:attribute-set name="bibitem-non-normative-list-style">
5449
5212
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
5450
5213
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5451
-
5452
- <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
5453
-
5214
+ <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
5454
5215
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
5455
5216
 
5456
5217
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
5457
5218
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5458
-
5459
5219
  </xsl:attribute-set>
5460
5220
 
5461
5221
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
5462
5222
  <xsl:attribute-set name="bibitem-normative-list-body-style">
5463
-
5464
5223
  </xsl:attribute-set>
5465
5224
 
5466
5225
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
5467
-
5468
5226
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
5469
5227
 
5470
5228
  <!-- footnote reference number for bibitem, in the text -->
5471
5229
  <xsl:attribute-set name="bibitem-note-fn-style">
5472
5230
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5473
5231
  <xsl:attribute name="font-size">65%</xsl:attribute>
5474
-
5475
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5476
-
5232
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5477
5233
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
5478
5234
 
5479
5235
  <!-- footnote number on the page bottom -->
5480
5236
  <xsl:attribute-set name="bibitem-note-fn-number-style">
5481
5237
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
5482
-
5483
- <xsl:attribute name="font-size">60%</xsl:attribute>
5484
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5485
-
5238
+ <xsl:attribute name="font-size">60%</xsl:attribute>
5239
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5486
5240
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
5487
5241
 
5488
5242
  <!-- footnote body (text) on the page bottom -->
@@ -5490,13 +5244,10 @@
5490
5244
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5491
5245
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5492
5246
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
5493
-
5494
5247
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
5495
5248
 
5496
5249
  <xsl:attribute-set name="references-non-normative-style">
5497
-
5498
- <xsl:attribute name="line-height">120%</xsl:attribute>
5499
-
5250
+ <xsl:attribute name="line-height">120%</xsl:attribute>
5500
5251
  </xsl:attribute-set> <!-- references-non-normative-style -->
5501
5252
 
5502
5253
  <!-- Highlight.js syntax GitHub styles -->
@@ -5656,21 +5407,17 @@
5656
5407
  <!-- Index section styles -->
5657
5408
  <xsl:attribute-set name="indexsect-title-style">
5658
5409
  <xsl:attribute name="role">H1</xsl:attribute>
5659
-
5660
- <xsl:attribute name="font-size">16pt</xsl:attribute>
5661
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5662
- <xsl:attribute name="margin-bottom">84pt</xsl:attribute>
5663
- <xsl:attribute name="margin-left">-18mm</xsl:attribute>
5664
-
5410
+ <xsl:attribute name="font-size">16pt</xsl:attribute>
5411
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5412
+ <xsl:attribute name="margin-bottom">84pt</xsl:attribute>
5413
+ <xsl:attribute name="margin-left">-18mm</xsl:attribute>
5665
5414
  </xsl:attribute-set>
5666
5415
 
5667
5416
  <xsl:attribute-set name="indexsect-clause-title-style">
5668
5417
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5669
-
5670
- <xsl:attribute name="font-size">10pt</xsl:attribute>
5671
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5672
- <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
5673
-
5418
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
5419
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5420
+ <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
5674
5421
  </xsl:attribute-set>
5675
5422
 
5676
5423
  <!-- End Index section styles -->
@@ -5747,47 +5494,47 @@
5747
5494
  </xsl:template>
5748
5495
 
5749
5496
  <xsl:template name="processTables_Contents">
5750
- <tables>
5497
+ <mn:tables>
5751
5498
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
5752
5499
  <xsl:choose>
5753
5500
  <xsl:when test="*[local-name() = 'fmt-name']">
5754
5501
  <xsl:variable name="fmt_name">
5755
5502
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
5756
5503
  </xsl:variable>
5757
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
5504
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
5758
5505
  <xsl:copy-of select="$fmt_name"/>
5759
- </table>
5506
+ </mn:table>
5760
5507
  </xsl:when>
5761
5508
  <xsl:otherwise>
5762
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
5509
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
5763
5510
  <xsl:copy-of select="*[local-name() = 'name']"/>
5764
- </table>
5511
+ </mn:table>
5765
5512
  </xsl:otherwise>
5766
5513
  </xsl:choose>
5767
5514
  </xsl:for-each>
5768
- </tables>
5515
+ </mn:tables>
5769
5516
  </xsl:template>
5770
5517
 
5771
5518
  <xsl:template name="processFigures_Contents">
5772
- <figures>
5519
+ <mn:figures>
5773
5520
  <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
5774
5521
  <xsl:choose>
5775
5522
  <xsl:when test="*[local-name() = 'fmt-name']">
5776
5523
  <xsl:variable name="fmt_name">
5777
5524
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
5778
5525
  </xsl:variable>
5779
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
5526
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
5780
5527
  <xsl:copy-of select="$fmt_name"/>
5781
- </figure>
5528
+ </mn:figure>
5782
5529
  </xsl:when>
5783
5530
  <xsl:otherwise>
5784
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
5531
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
5785
5532
  <xsl:copy-of select="*[local-name() = 'name']"/>
5786
- </figure>
5533
+ </mn:figure>
5787
5534
  </xsl:otherwise>
5788
5535
  </xsl:choose>
5789
5536
  </xsl:for-each>
5790
- </figures>
5537
+ </mn:figures>
5791
5538
  </xsl:template>
5792
5539
 
5793
5540
  <xsl:template name="processPrefaceSectionsDefault">
@@ -5806,7 +5553,6 @@
5806
5553
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
5807
5554
  <xsl:sort select="@displayorder" data-type="number"/>
5808
5555
  <xsl:apply-templates select="."/>
5809
-
5810
5556
  </xsl:for-each>
5811
5557
 
5812
5558
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -5913,7 +5659,6 @@
5913
5659
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
5914
5660
  <xsl:sort select="@displayorder" data-type="number"/>
5915
5661
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
5916
-
5917
5662
  </xsl:for-each>
5918
5663
  </xsl:element>
5919
5664
  </xsl:element>
@@ -6047,7 +5792,6 @@
6047
5792
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
6048
5793
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
6049
5794
  </xsl:apply-templates>
6050
-
6051
5795
  </xsl:for-each>
6052
5796
  </xsl:element>
6053
5797
 
@@ -6087,19 +5831,17 @@
6087
5831
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
6088
5832
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
6089
5833
  <xsl:template match="text()" name="text">
6090
-
6091
- <xsl:choose>
6092
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
6093
- <xsl:otherwise>
6094
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
6095
- <xsl:call-template name="replace_fo_inline_tags">
6096
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
6097
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
6098
- <xsl:with-param name="text" select="$text"/>
6099
- </xsl:call-template>
6100
- </xsl:otherwise>
6101
- </xsl:choose>
6102
-
5834
+ <xsl:choose>
5835
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
5836
+ <xsl:otherwise>
5837
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
5838
+ <xsl:call-template name="replace_fo_inline_tags">
5839
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
5840
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
5841
+ <xsl:with-param name="text" select="$text"/>
5842
+ </xsl:call-template>
5843
+ </xsl:otherwise>
5844
+ </xsl:choose>
6103
5845
  </xsl:template>
6104
5846
 
6105
5847
  <xsl:template name="replace_fo_inline_tags">
@@ -6153,7 +5895,7 @@
6153
5895
  <xsl:with-param name="keep_sep">true</xsl:with-param>
6154
5896
  </xsl:call-template>
6155
5897
  </xsl:variable>
6156
- <xsl:for-each select="xalan:nodeset($items)/item">
5898
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
6157
5899
  <xsl:choose>
6158
5900
  <xsl:when test=". = $sep">
6159
5901
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -6182,17 +5924,13 @@
6182
5924
  </xsl:template> <!-- copyright-statement -->
6183
5925
 
6184
5926
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
6185
-
6186
- <!-- process in the template 'title' -->
6187
- <xsl:call-template name="title"/>
6188
-
5927
+ <!-- process in the template 'title' -->
5928
+ <xsl:call-template name="title"/>
6189
5929
  </xsl:template> <!-- copyright-statement//title -->
6190
5930
 
6191
5931
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
6192
-
6193
- <!-- process in the template 'paragraph' -->
6194
- <xsl:call-template name="paragraph"/>
6195
-
5932
+ <!-- process in the template 'paragraph' -->
5933
+ <xsl:call-template name="paragraph"/>
6196
5934
  </xsl:template> <!-- copyright-statement//p -->
6197
5935
 
6198
5936
  <xsl:template match="*[local-name()='license-statement']">
@@ -6202,48 +5940,42 @@
6202
5940
  </xsl:template> <!-- license-statement -->
6203
5941
 
6204
5942
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
6205
-
6206
- <xsl:variable name="level">
6207
- <xsl:call-template name="getLevel"/>
6208
- </xsl:variable>
6209
- <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
6210
- <xsl:apply-templates/>
6211
- </fo:block>
5943
+ <xsl:variable name="level">
5944
+ <xsl:call-template name="getLevel"/>
5945
+ </xsl:variable>
5946
+ <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
5947
+ <xsl:apply-templates/>
5948
+ </fo:block>
6212
5949
 
6213
5950
  </xsl:template> <!-- license-statement/title -->
6214
5951
 
6215
5952
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
5953
+ <fo:block xsl:use-attribute-sets="license-statement-p-style">
6216
5954
 
6217
- <fo:block xsl:use-attribute-sets="license-statement-p-style">
6218
-
6219
- <xsl:apply-templates/>
6220
- </fo:block>
5955
+ <xsl:apply-templates/>
5956
+ </fo:block>
6221
5957
 
6222
5958
  </xsl:template> <!-- license-statement/p -->
6223
5959
 
6224
5960
  <xsl:template match="*[local-name()='legal-statement']">
6225
5961
  <xsl:param name="isLegacy">false</xsl:param>
6226
5962
  <fo:block xsl:use-attribute-sets="legal-statement-style">
6227
-
6228
5963
  <xsl:apply-templates/>
6229
5964
  </fo:block>
6230
5965
  </xsl:template> <!-- legal-statement -->
6231
5966
 
6232
5967
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
6233
-
6234
- <!-- process in the template 'title' -->
6235
- <xsl:call-template name="title"/>
5968
+ <!-- process in the template 'title' -->
5969
+ <xsl:call-template name="title"/>
6236
5970
 
6237
5971
  </xsl:template> <!-- legal-statement/title -->
6238
5972
 
6239
5973
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
6240
5974
  <xsl:param name="margin"/>
6241
-
6242
- <!-- process in the template 'paragraph' -->
6243
- <xsl:call-template name="paragraph">
6244
- <xsl:with-param name="margin" select="$margin"/>
6245
- </xsl:call-template>
6246
-
5975
+ <!-- process in the template 'paragraph' -->
5976
+ <xsl:call-template name="paragraph">
5977
+ <xsl:with-param name="margin" select="$margin"/>
5978
+ </xsl:call-template>
6247
5979
  </xsl:template> <!-- legal-statement/p -->
6248
5980
 
6249
5981
  <xsl:template match="*[local-name()='feedback-statement']">
@@ -6253,20 +5985,16 @@
6253
5985
  </xsl:template> <!-- feedback-statement -->
6254
5986
 
6255
5987
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
6256
-
6257
- <!-- process in the template 'title' -->
6258
- <xsl:call-template name="title"/>
6259
-
5988
+ <!-- process in the template 'title' -->
5989
+ <xsl:call-template name="title"/>
6260
5990
  </xsl:template>
6261
5991
 
6262
5992
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
6263
5993
  <xsl:param name="margin"/>
6264
-
6265
- <!-- process in the template 'paragraph' -->
6266
- <xsl:call-template name="paragraph">
6267
- <xsl:with-param name="margin" select="$margin"/>
6268
- </xsl:call-template>
6269
-
5994
+ <!-- process in the template 'paragraph' -->
5995
+ <xsl:call-template name="paragraph">
5996
+ <xsl:with-param name="margin" select="$margin"/>
5997
+ </xsl:call-template>
6270
5998
  </xsl:template>
6271
5999
 
6272
6000
  <!-- ================================= -->
@@ -6319,7 +6047,6 @@
6319
6047
  <xsl:template match="*[local-name()='table']" name="table">
6320
6048
 
6321
6049
  <xsl:variable name="table-preamble">
6322
-
6323
6050
  </xsl:variable>
6324
6051
 
6325
6052
  <xsl:variable name="table">
@@ -6337,10 +6064,8 @@
6337
6064
 
6338
6065
  <!-- Display table's name before table as standalone block -->
6339
6066
  <!-- $namespace = 'iso' or -->
6340
-
6341
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
6342
-
6343
- <xsl:call-template name="table_name_fn_display"/>
6067
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
6068
+ <xsl:call-template name="table_name_fn_display"/>
6344
6069
 
6345
6070
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
6346
6071
 
@@ -6394,12 +6119,11 @@
6394
6119
  <xsl:variable name="table_width_default">100%</xsl:variable>
6395
6120
  <xsl:variable name="table_width">
6396
6121
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
6397
-
6398
- <xsl:choose>
6399
- <xsl:when test="@width = 'full-page-width' or @width = 'text-width'">100%</xsl:when>
6400
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
6401
- <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
6402
- </xsl:choose>
6122
+ <xsl:choose>
6123
+ <xsl:when test="@width = 'full-page-width' or @width = 'text-width'">100%</xsl:when>
6124
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
6125
+ <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
6126
+ </xsl:choose>
6403
6127
 
6404
6128
  </xsl:variable>
6405
6129
 
@@ -6543,23 +6267,22 @@
6543
6267
  <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
6544
6268
 
6545
6269
  <!-- centered table when table name is centered (see table-name-style) -->
6546
-
6547
- <xsl:choose>
6548
- <xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
6549
- <xsl:copy-of select="$table-preamble"/>
6550
- <fo:block>
6551
- <xsl:call-template name="setTrackChangesStyles">
6552
- <xsl:with-param name="isAdded" select="$isAdded"/>
6553
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
6554
- </xsl:call-template>
6555
- <xsl:copy-of select="$table"/>
6556
- </fo:block>
6557
- </xsl:when>
6558
- <xsl:otherwise>
6559
- <xsl:copy-of select="$table-preamble"/>
6270
+ <xsl:choose>
6271
+ <xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
6272
+ <xsl:copy-of select="$table-preamble"/>
6273
+ <fo:block>
6274
+ <xsl:call-template name="setTrackChangesStyles">
6275
+ <xsl:with-param name="isAdded" select="$isAdded"/>
6276
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
6277
+ </xsl:call-template>
6560
6278
  <xsl:copy-of select="$table"/>
6561
- </xsl:otherwise>
6562
- </xsl:choose>
6279
+ </fo:block>
6280
+ </xsl:when>
6281
+ <xsl:otherwise>
6282
+ <xsl:copy-of select="$table-preamble"/>
6283
+ <xsl:copy-of select="$table"/>
6284
+ </xsl:otherwise>
6285
+ </xsl:choose>
6563
6286
 
6564
6287
  </xsl:when>
6565
6288
  <xsl:otherwise>
@@ -6585,7 +6308,6 @@
6585
6308
  </xsl:template>
6586
6309
 
6587
6310
  <xsl:template name="setBordersTableArray">
6588
-
6589
6311
  </xsl:template>
6590
6312
 
6591
6313
  <!-- table/name-->
@@ -6593,39 +6315,38 @@
6593
6315
  <xsl:param name="continued"/>
6594
6316
  <xsl:param name="cols-count"/>
6595
6317
  <xsl:if test="normalize-space() != ''">
6318
+ <fo:list-block xsl:use-attribute-sets="table-name-style">
6596
6319
 
6597
- <fo:list-block xsl:use-attribute-sets="table-name-style">
6598
-
6599
- <xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
6600
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
6601
- </xsl:if>
6602
- <xsl:if test="not(../preceding-sibling::*) and ancestor::node()[@orientation]">
6603
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
6604
- </xsl:if>
6320
+ <xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
6321
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
6322
+ </xsl:if>
6323
+ <xsl:if test="not(../preceding-sibling::*) and ancestor::node()[@orientation]">
6324
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
6325
+ </xsl:if>
6605
6326
 
6606
- <xsl:attribute name="provisional-distance-between-starts">25mm</xsl:attribute>
6327
+ <xsl:attribute name="provisional-distance-between-starts">25mm</xsl:attribute>
6607
6328
 
6608
- <fo:list-item>
6609
- <fo:list-item-label end-indent="label-end()">
6610
- <fo:block>
6611
- <xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
6612
- </fo:block>
6613
- </fo:list-item-label>
6614
- <fo:list-item-body start-indent="body-start()">
6615
- <fo:block>
6616
- <xsl:choose>
6617
- <xsl:when test="./*[local-name() = 'tab']">
6618
- <xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
6619
- </xsl:when>
6620
- <xsl:otherwise>
6621
- <xsl:apply-templates/>
6622
- </xsl:otherwise>
6623
- </xsl:choose>
6624
- </fo:block>
6625
- </fo:list-item-body>
6626
- </fo:list-item>
6627
- </fo:list-block>
6628
- <!-- bipm -->
6329
+ <fo:list-item>
6330
+ <fo:list-item-label end-indent="label-end()">
6331
+ <fo:block>
6332
+ <xsl:apply-templates select="./*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
6333
+ </fo:block>
6334
+ </fo:list-item-label>
6335
+ <fo:list-item-body start-indent="body-start()">
6336
+ <fo:block>
6337
+ <xsl:choose>
6338
+ <xsl:when test="./*[local-name() = 'tab']">
6339
+ <xsl:apply-templates select="./*[local-name() = 'tab'][1]/following-sibling::node()"/>
6340
+ </xsl:when>
6341
+ <xsl:otherwise>
6342
+ <xsl:apply-templates/>
6343
+ </xsl:otherwise>
6344
+ </xsl:choose>
6345
+ </fo:block>
6346
+ </fo:list-item-body>
6347
+ </fo:list-item>
6348
+ </fo:list-block>
6349
+ <!-- bipm -->
6629
6350
 
6630
6351
  </xsl:if>
6631
6352
  </xsl:template> <!-- table/name -->
@@ -7000,7 +6721,6 @@
7000
6721
  <xsl:template match="*[local-name()='thead']">
7001
6722
  <xsl:param name="cols-count"/>
7002
6723
  <fo:table-header>
7003
-
7004
6724
  <xsl:apply-templates/>
7005
6725
  </fo:table-header>
7006
6726
  </xsl:template> <!-- thead -->
@@ -7014,21 +6734,20 @@
7014
6734
 
7015
6735
  <xsl:call-template name="refine_table-header-title-style"/>
7016
6736
 
7017
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
7018
- <xsl:with-param name="continued">true</xsl:with-param>
7019
- <xsl:with-param name="cols-count" select="$cols-count"/>
7020
- </xsl:apply-templates>
6737
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
6738
+ <xsl:with-param name="continued">true</xsl:with-param>
6739
+ <xsl:with-param name="cols-count" select="$cols-count"/>
6740
+ </xsl:apply-templates>
7021
6741
 
7022
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
7023
- <fo:block role="SKIP"/>
7024
- </xsl:if>
6742
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6743
+ <fo:block role="SKIP"/>
6744
+ </xsl:if>
7025
6745
 
7026
6746
  </fo:table-cell>
7027
6747
  </fo:table-row>
7028
6748
  </xsl:template> <!-- table-header-title -->
7029
6749
 
7030
6750
  <xsl:template name="refine_table-header-title-style">
7031
-
7032
6751
  </xsl:template> <!-- refine_table-header-title-style -->
7033
6752
 
7034
6753
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -7058,7 +6777,6 @@
7058
6777
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
7059
6778
 
7060
6779
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
7061
-
7062
6780
  </xsl:variable>
7063
6781
 
7064
6782
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -7120,36 +6838,28 @@
7120
6838
  <xsl:call-template name="setBordersTableArray"/>
7121
6839
 
7122
6840
  <!-- fn will be processed inside 'note' processing -->
7123
-
7124
- <xsl:if test="count(ancestor::bipm:table//*[local-name()='note'][not(@type = 'units')]) &gt; 1">
7125
- <fo:block font-weight="bold" role="SKIP">
7126
- <xsl:variable name="curr_lang" select="ancestor::bipm:metanorma/bipm:bibdata/bipm:language"/>
7127
- <xsl:choose>
7128
- <xsl:when test="$curr_lang = 'fr'">Remarques</xsl:when>
7129
- <xsl:otherwise>Notes</xsl:otherwise>
7130
- </xsl:choose>
7131
- </fo:block>
7132
- </xsl:if>
7133
-
7134
- <!-- for BSI (not PAS) display Notes before footnotes -->
7135
-
7136
- <!-- except gb and bsi -->
7137
-
7138
- <xsl:apply-templates select="../*[local-name()='p']"/>
7139
- <xsl:apply-templates select="../*[local-name()='dl']"/>
7140
- <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
7141
- <xsl:apply-templates select="../*[local-name()='example']"/>
7142
- <xsl:apply-templates select="../*[local-name()='source']"/>
6841
+ <xsl:if test="count(ancestor::bipm:table//*[local-name()='note'][not(@type = 'units')]) &gt; 1">
6842
+ <fo:block font-weight="bold" role="SKIP">
6843
+ <xsl:variable name="curr_lang" select="ancestor::bipm:metanorma/bipm:bibdata/bipm:language"/>
6844
+ <xsl:choose>
6845
+ <xsl:when test="$curr_lang = 'fr'">Remarques</xsl:when>
6846
+ <xsl:otherwise>Notes</xsl:otherwise>
6847
+ </xsl:choose>
6848
+ </fo:block>
6849
+ </xsl:if>
6850
+ <xsl:apply-templates select="../*[local-name()='p']"/>
6851
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
6852
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
6853
+ <xsl:apply-templates select="../*[local-name()='example']"/>
6854
+ <xsl:apply-templates select="../*[local-name()='source']"/>
7143
6855
 
7144
6856
  <xsl:variable name="isDisplayRowSeparator">
7145
-
7146
6857
  </xsl:variable>
7147
6858
 
7148
6859
  <!-- horizontal row separator -->
7149
6860
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
7150
6861
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
7151
6862
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
7152
-
7153
6863
  <xsl:call-template name="setBordersTableArray"/>
7154
6864
  <fo:block font-size="1pt"> </fo:block>
7155
6865
  </fo:block-container>
@@ -7157,11 +6867,8 @@
7157
6867
  </xsl:if>
7158
6868
 
7159
6869
  <!-- fn processing -->
7160
-
7161
- <!-- <xsl:call-template name="table_fn_display" /> -->
7162
- <xsl:copy-of select="$table_fn_block"/>
7163
-
7164
- <!-- for PAS display Notes after footnotes -->
6870
+ <!-- <xsl:call-template name="table_fn_display" /> -->
6871
+ <xsl:copy-of select="$table_fn_block"/>
7165
6872
 
7166
6873
  </fo:table-cell>
7167
6874
  </fo:table-row>
@@ -7288,7 +6995,7 @@
7288
6995
  <xsl:with-param name="pText" select="$border_under_row_"/>
7289
6996
  </xsl:call-template>
7290
6997
  </xsl:variable>
7291
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
6998
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
7292
6999
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
7293
7000
  </xsl:if>
7294
7001
  </xsl:when>
@@ -7326,13 +7033,12 @@
7326
7033
  </xsl:template>
7327
7034
 
7328
7035
  <xsl:template name="setTableRowAttributes">
7329
-
7330
- <xsl:if test="count(*) = 1 and local-name(*[1]) = 'th'">
7331
- <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
7036
+ <xsl:if test="count(*) = 1 and local-name(*[1]) = 'th'">
7037
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
7038
+ </xsl:if>
7039
+ <xsl:if test="not(ancestor::*[local-name()='note_side'])">
7040
+ <xsl:attribute name="min-height">5mm</xsl:attribute>
7332
7041
  </xsl:if>
7333
- <xsl:if test="not(ancestor::*[local-name()='note_side'])">
7334
- <xsl:attribute name="min-height">5mm</xsl:attribute>
7335
- </xsl:if>
7336
7042
 
7337
7043
  <xsl:call-template name="setColors"/>
7338
7044
 
@@ -7412,7 +7118,7 @@
7412
7118
  </xsl:variable>
7413
7119
  <xsl:variable name="quot">"</xsl:variable>
7414
7120
  <xsl:variable name="styles_">
7415
- <xsl:for-each select="xalan:nodeset($styles__)/item">
7121
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
7416
7122
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
7417
7123
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
7418
7124
  <xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
@@ -7462,19 +7168,16 @@
7462
7168
  <fo:block role="SKIP">
7463
7169
 
7464
7170
  <xsl:if test="$isGenerateTableIF = 'true'">
7465
-
7466
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
7467
-
7171
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
7172
+ </xsl:if>
7173
+ <xsl:if test="not(.//bipm:image)">
7174
+ <xsl:attribute name="line-stacking-strategy">font-height</xsl:attribute>
7175
+ </xsl:if>
7176
+ <!-- hanging indent for left column -->
7177
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'td'])">
7178
+ <xsl:attribute name="text-indent">-3mm</xsl:attribute>
7179
+ <xsl:attribute name="start-indent">3mm</xsl:attribute>
7468
7180
  </xsl:if>
7469
-
7470
- <xsl:if test="not(.//bipm:image)">
7471
- <xsl:attribute name="line-stacking-strategy">font-height</xsl:attribute>
7472
- </xsl:if>
7473
- <!-- hanging indent for left column -->
7474
- <xsl:if test="not(preceding-sibling::*[local-name() = 'td'])">
7475
- <xsl:attribute name="text-indent">-3mm</xsl:attribute>
7476
- <xsl:attribute name="start-indent">3mm</xsl:attribute>
7477
- </xsl:if>
7478
7181
 
7479
7182
  <xsl:apply-templates/>
7480
7183
 
@@ -7488,29 +7191,26 @@
7488
7191
 
7489
7192
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
7490
7193
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
7194
+ <xsl:call-template name="setNamedDestination"/>
7195
+ <fo:block xsl:use-attribute-sets="table-note-style">
7196
+ <xsl:copy-of select="@id"/>
7491
7197
 
7492
- <xsl:call-template name="setNamedDestination"/>
7493
- <fo:block xsl:use-attribute-sets="table-note-style">
7494
- <xsl:copy-of select="@id"/>
7495
-
7496
- <xsl:call-template name="refine_table-note-style"/>
7198
+ <xsl:call-template name="refine_table-note-style"/>
7497
7199
 
7498
- <!-- Table's note/example name (NOTE, for example) -->
7499
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
7200
+ <!-- Table's note/example name (NOTE, for example) -->
7201
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
7500
7202
 
7501
- <xsl:call-template name="refine_table-note-name-style"/>
7203
+ <xsl:call-template name="refine_table-note-name-style"/>
7502
7204
 
7503
- <xsl:apply-templates select="*[local-name() = 'name']"/>
7504
-
7505
- </fo:inline>
7506
-
7507
- <xsl:if test="ancestor::bipm:preface">
7508
- <fo:block> </fo:block>
7509
- </xsl:if>
7205
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7510
7206
 
7511
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7512
- </fo:block>
7207
+ </fo:inline>
7208
+ <xsl:if test="ancestor::bipm:preface">
7209
+ <fo:block> </fo:block>
7210
+ </xsl:if>
7513
7211
 
7212
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7213
+ </fo:block>
7514
7214
  </xsl:template> <!-- table/note -->
7515
7215
 
7516
7216
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
@@ -7555,9 +7255,7 @@
7555
7255
  <xsl:variable name="current_fn_number" select="@reference"/>
7556
7256
 
7557
7257
  <xsl:variable name="current_fn_number_text">
7558
-
7559
- <xsl:value-of select="$current_fn_number"/>
7560
-
7258
+ <xsl:value-of select="$current_fn_number"/>
7561
7259
  </xsl:variable>
7562
7260
 
7563
7261
  <xsl:variable name="ref_id" select="@target"/>
@@ -7569,12 +7267,10 @@
7569
7267
  <xsl:choose>
7570
7268
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
7571
7269
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
7572
-
7573
7270
  </fn_styles>
7574
7271
  </xsl:when>
7575
7272
  <xsl:otherwise>
7576
7273
  <fn_styles xsl:use-attribute-sets="fn-num-style">
7577
-
7578
7274
  </fn_styles>
7579
7275
  </xsl:otherwise>
7580
7276
  </xsl:choose>
@@ -7592,7 +7288,6 @@
7592
7288
  <xsl:with-param name="element">
7593
7289
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
7594
7290
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
7595
-
7596
7291
  <xsl:copy-of select="$current_fn_number_text"/>
7597
7292
 
7598
7293
  </fo:inline>
@@ -7630,10 +7325,9 @@
7630
7325
  <here><xsl:copy-of select="$footnotes"/></here> -->
7631
7326
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
7632
7327
  </xsl:variable>
7633
-
7634
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
7635
- <xsl:copy-of select="$fn_block"/>
7636
- </fo:block>
7328
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
7329
+ <xsl:copy-of select="$fn_block"/>
7330
+ </fo:block>
7637
7331
 
7638
7332
  </fo:block-container>
7639
7333
  </fo:footnote-body>
@@ -7710,21 +7404,20 @@
7710
7404
  <xsl:variable name="reference" select="@reference"/>
7711
7405
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
7712
7406
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
7407
+ <fo:block xsl:use-attribute-sets="table-fn-style">
7408
+ <xsl:copy-of select="@id"/>
7409
+ <xsl:call-template name="refine_table-fn-style"/>
7713
7410
 
7714
- <fo:block xsl:use-attribute-sets="table-fn-style">
7715
- <xsl:copy-of select="@id"/>
7716
- <xsl:call-template name="refine_table-fn-style"/>
7717
-
7718
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
7719
- <xsl:with-param name="process">true</xsl:with-param>
7720
- </xsl:apply-templates>
7411
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
7412
+ <xsl:with-param name="process">true</xsl:with-param>
7413
+ </xsl:apply-templates>
7721
7414
 
7722
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
7723
- <!-- <xsl:copy-of select="./node()"/> -->
7724
- <xsl:apply-templates/>
7725
- </fo:inline>
7415
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
7416
+ <!-- <xsl:copy-of select="./node()"/> -->
7417
+ <xsl:apply-templates/>
7418
+ </fo:inline>
7726
7419
 
7727
- </fo:block>
7420
+ </fo:block>
7728
7421
 
7729
7422
  <!-- </xsl:if> -->
7730
7423
  </xsl:for-each>
@@ -7777,9 +7470,7 @@
7777
7470
  <xsl:param name="process">false</xsl:param>
7778
7471
  <xsl:if test="$process = 'true'">
7779
7472
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
7780
-
7781
- <xsl:attribute name="padding-right">2.5mm</xsl:attribute>
7782
-
7473
+ <xsl:attribute name="padding-right">2.5mm</xsl:attribute>
7783
7474
  </xsl:if>
7784
7475
  </xsl:template>
7785
7476
 
@@ -7863,7 +7554,6 @@
7863
7554
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
7864
7555
 
7865
7556
  <xsl:variable name="key_iso">
7866
-
7867
7557
  </xsl:variable>
7868
7558
 
7869
7559
  <fo:block>
@@ -7909,7 +7599,6 @@
7909
7599
  <fo:table width="95%" table-layout="fixed">
7910
7600
  <xsl:if test="normalize-space($key_iso) = 'true'">
7911
7601
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7912
-
7913
7602
  </xsl:if>
7914
7603
  <xsl:choose>
7915
7604
  <!-- if there 'dl', then set same columns width -->
@@ -7933,23 +7622,19 @@
7933
7622
  <fo:table-row>
7934
7623
  <fo:table-cell>
7935
7624
  <fo:block>
7936
-
7937
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
7938
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
7939
- <!-- <xsl:value-of select="@reference"/> -->
7940
- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
7941
- </fo:inline>
7625
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
7626
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
7627
+ <!-- <xsl:value-of select="@reference"/> -->
7628
+ <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
7629
+ </fo:inline>
7942
7630
 
7943
7631
  </fo:block>
7944
7632
  </fo:table-cell>
7945
7633
  <fo:table-cell>
7946
7634
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
7947
7635
  <xsl:if test="normalize-space($key_iso) = 'true'">
7948
-
7949
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
7950
-
7636
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
7951
7637
  </xsl:if>
7952
-
7953
7638
  <!-- <xsl:copy-of select="./node()"/> -->
7954
7639
  <xsl:apply-templates/>
7955
7640
  </fo:block>
@@ -7999,11 +7684,9 @@
7999
7684
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
8000
7685
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
8001
7686
  <xsl:variable name="key_iso">
8002
-
8003
7687
  </xsl:variable>
8004
7688
  <xsl:if test="normalize-space($key_iso) = 'true'">
8005
7689
  <xsl:attribute name="font-size">10pt</xsl:attribute>
8006
-
8007
7690
  </xsl:if>
8008
7691
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
8009
7692
  <!-- <xsl:value-of select="@reference"/> -->
@@ -8049,11 +7732,10 @@
8049
7732
  <xsl:text>※</xsl:text>
8050
7733
  </xsl:if> -->
8051
7734
  <!-- <xsl:value-of select="@reference"/> -->
8052
-
8053
- <fo:inline font-style="normal"> </fo:inline>
8054
- <!-- Example: <fmt-fn-label><sup><span class="fmt-label-delim">(</span>a<span class="fmt-label-delim">)</span></sup></fmt-fn-label> -->
8055
- <!-- to <fo:inline font-style="normal">(</fo:inline> ... -->
8056
- <xsl:apply-templates select="*[local-name() = 'fmt-fn-label']/node()"/>
7735
+ <fo:inline font-style="normal"> </fo:inline>
7736
+ <!-- Example: <fmt-fn-label><sup><span class="fmt-label-delim">(</span>a<span class="fmt-label-delim">)</span></sup></fmt-fn-label> -->
7737
+ <!-- to <fo:inline font-style="normal">(</fo:inline> ... -->
7738
+ <xsl:apply-templates select="*[local-name() = 'fmt-fn-label']/node()"/>
8057
7739
 
8058
7740
  <!-- <xsl:if test="$namespace = 'bsi'">
8059
7741
  <xsl:text>)</xsl:text>
@@ -8125,13 +7807,12 @@
8125
7807
  </xsl:if>
8126
7808
 
8127
7809
  <xsl:call-template name="setBlockSpanAll"/>
8128
-
8129
- <xsl:if test="not(ancestor::*[local-name() = 'li'])">
8130
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
8131
- </xsl:if>
8132
- <xsl:if test="ancestor::*[local-name() = 'li']">
8133
- <xsl:attribute name="margin-left">6.5mm</xsl:attribute><!-- 8 mm -->
8134
- </xsl:if>
7810
+ <xsl:if test="not(ancestor::*[local-name() = 'li'])">
7811
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
7812
+ </xsl:if>
7813
+ <xsl:if test="ancestor::*[local-name() = 'li']">
7814
+ <xsl:attribute name="margin-left">6.5mm</xsl:attribute><!-- 8 mm -->
7815
+ </xsl:if>
8135
7816
 
8136
7817
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
8137
7818
  <!-- set font-size as sourcecode font-size -->
@@ -8152,7 +7833,6 @@
8152
7833
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
8153
7834
  </xsl:choose>
8154
7835
  </xsl:attribute>
8155
-
8156
7836
  </xsl:if>
8157
7837
 
8158
7838
  <xsl:call-template name="setTrackChangesStyles">
@@ -8164,32 +7844,28 @@
8164
7844
 
8165
7845
  <xsl:variable name="parent" select="local-name(..)"/>
8166
7846
 
8167
- <xsl:variable name="key_iso">
8168
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
7847
+ <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
8169
7848
  </xsl:variable>
8170
7849
 
8171
7850
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
8172
7851
 
8173
7852
  <xsl:choose>
8174
7853
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
8175
-
8176
- <fo:block margin-bottom="12pt" text-align="left">
8177
-
8178
- <!-- <xsl:variable name="title-where">
7854
+ <fo:block margin-bottom="12pt" text-align="left">
7855
+ <!-- <xsl:variable name="title-where">
8179
7856
  <xsl:call-template name="getLocalizedString">
8180
7857
  <xsl:with-param name="key">where</xsl:with-param>
8181
7858
  </xsl:call-template>
8182
7859
  </xsl:variable>
8183
7860
  <xsl:value-of select="$title-where"/> -->
8184
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
8185
- <xsl:text> </xsl:text>
8186
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
8187
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
8188
- <xsl:text> </xsl:text>
8189
- </xsl:if>
8190
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
8191
- </fo:block>
8192
-
7861
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
7862
+ <xsl:text> </xsl:text>
7863
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
7864
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
7865
+ <xsl:text> </xsl:text>
7866
+ </xsl:if>
7867
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
7868
+ </fo:block>
8193
7869
  </xsl:when> <!-- END: only one component -->
8194
7870
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
8195
7871
  <fo:block margin-bottom="12pt" text-align="left">
@@ -8209,19 +7885,17 @@
8209
7885
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
8210
7886
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
8211
7887
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
7888
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
8212
7889
 
8213
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
8214
-
8215
- <xsl:call-template name="refine_figure_key_style"/>
8216
-
8217
- <xsl:variable name="title-key">
8218
- <xsl:call-template name="getLocalizedString">
8219
- <xsl:with-param name="key">key</xsl:with-param>
8220
- </xsl:call-template>
8221
- </xsl:variable>
8222
- <xsl:value-of select="$title-key"/>
8223
- </fo:block>
7890
+ <xsl:call-template name="refine_figure_key_style"/>
8224
7891
 
7892
+ <xsl:variable name="title-key">
7893
+ <xsl:call-template name="getLocalizedString">
7894
+ <xsl:with-param name="key">key</xsl:with-param>
7895
+ </xsl:call-template>
7896
+ </xsl:variable>
7897
+ <xsl:value-of select="$title-key"/>
7898
+ </fo:block>
8225
7899
  </xsl:if>
8226
7900
  </xsl:when> <!-- END: definition list in a figure -->
8227
7901
  </xsl:choose>
@@ -8254,12 +7928,10 @@
8254
7928
  <xsl:if test="$isGenerateTableIF = 'true'">
8255
7929
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
8256
7930
  </xsl:if>
8257
-
8258
7931
  <xsl:choose>
8259
7932
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
8260
7933
  <xsl:when test="normalize-space($key_iso) = 'true'">
8261
7934
  <xsl:attribute name="font-size">10pt</xsl:attribute>
8262
-
8263
7935
  </xsl:when>
8264
7936
  </xsl:choose>
8265
7937
 
@@ -8364,17 +8036,15 @@
8364
8036
  <xsl:call-template name="getMaxLength_dt"/>
8365
8037
  </xsl:variable>
8366
8038
 
8367
- <xsl:variable name="isContainsKeepTogetherTag_">
8368
- false
8039
+ <xsl:variable name="isContainsKeepTogetherTag_">false
8369
8040
  </xsl:variable>
8370
8041
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
8371
8042
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
8372
-
8373
- <xsl:call-template name="setColumnWidth_dl">
8374
- <xsl:with-param name="colwidths" select="$colwidths"/>
8375
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
8376
- <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
8377
- </xsl:call-template>
8043
+ <xsl:call-template name="setColumnWidth_dl">
8044
+ <xsl:with-param name="colwidths" select="$colwidths"/>
8045
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
8046
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
8047
+ </xsl:call-template>
8378
8048
 
8379
8049
  <fo:table-body>
8380
8050
 
@@ -8425,21 +8095,17 @@
8425
8095
  </xsl:template>
8426
8096
 
8427
8097
  <xsl:template name="refine_dl_formula_where_style">
8428
-
8429
8098
  </xsl:template> <!-- refine_dl_formula_where_style -->
8430
8099
 
8431
8100
  <xsl:template name="refine_figure_key_style">
8432
-
8433
8101
  </xsl:template> <!-- refine_figure_key_style -->
8434
8102
 
8435
8103
  <xsl:template name="refine_multicomponent_style">
8436
8104
  <xsl:variable name="parent" select="local-name(..)"/>
8437
-
8438
8105
  </xsl:template> <!-- refine_multicomponent_style -->
8439
8106
 
8440
8107
  <xsl:template name="refine_multicomponent_block_style">
8441
8108
  <xsl:variable name="parent" select="local-name(..)"/>
8442
-
8443
8109
  </xsl:template> <!-- refine_multicomponent_block_style -->
8444
8110
 
8445
8111
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -8626,14 +8292,11 @@
8626
8292
  <xsl:attribute name="id">
8627
8293
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
8628
8294
  </xsl:attribute>
8629
-
8630
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
8631
- <xsl:with-param name="process">true</xsl:with-param>
8632
- </xsl:apply-templates>
8633
-
8295
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
8296
+ <xsl:with-param name="process">true</xsl:with-param>
8297
+ </xsl:apply-templates>
8634
8298
  </td>
8635
8299
  </tr>
8636
-
8637
8300
  </xsl:template>
8638
8301
 
8639
8302
  <!-- Definition's term -->
@@ -8642,7 +8305,6 @@
8642
8305
  <xsl:param name="split_keep-within-line"/>
8643
8306
 
8644
8307
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
8645
-
8646
8308
  <xsl:call-template name="insert_dt_cell">
8647
8309
  <xsl:with-param name="key_iso" select="$key_iso"/>
8648
8310
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -8664,7 +8326,6 @@
8664
8326
  <!-- border is mandatory, to calculate real width -->
8665
8327
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
8666
8328
  <xsl:attribute name="text-align">left</xsl:attribute>
8667
-
8668
8329
  </xsl:if>
8669
8330
 
8670
8331
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -8674,9 +8335,7 @@
8674
8335
 
8675
8336
  <xsl:choose>
8676
8337
  <xsl:when test="$isGenerateTableIF = 'true'">
8677
-
8678
- <xsl:copy-of select="@id"/>
8679
-
8338
+ <xsl:copy-of select="@id"/>
8680
8339
  </xsl:when>
8681
8340
  <xsl:otherwise>
8682
8341
  <xsl:copy-of select="@id"/>
@@ -8713,9 +8372,7 @@
8713
8372
  <fo:block role="SKIP">
8714
8373
 
8715
8374
  <xsl:if test="$isGenerateTableIF = 'true'">
8716
-
8717
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
8718
-
8375
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
8719
8376
  </xsl:if>
8720
8377
 
8721
8378
  <xsl:choose>
@@ -8863,7 +8520,6 @@
8863
8520
  </xsl:template>
8864
8521
 
8865
8522
  <xsl:template name="refine_italic_style">
8866
-
8867
8523
  </xsl:template>
8868
8524
 
8869
8525
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -8879,7 +8535,6 @@
8879
8535
  </xsl:template>
8880
8536
 
8881
8537
  <xsl:template name="refine_strong_style">
8882
-
8883
8538
  <xsl:if test="ancestor::*['preferred']">
8884
8539
  <xsl:attribute name="role">SKIP</xsl:attribute>
8885
8540
  </xsl:if>
@@ -8904,10 +8559,7 @@
8904
8559
  <xsl:template match="*[local-name()='tt']">
8905
8560
  <fo:inline xsl:use-attribute-sets="tt-style">
8906
8561
 
8907
- <xsl:variable name="_font-size">
8908
-
8909
- <!-- inherit -->
8910
-
8562
+ <xsl:variable name="_font-size"> <!-- inherit -->
8911
8563
  </xsl:variable>
8912
8564
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
8913
8565
  <xsl:if test="$font-size != ''">
@@ -9123,8 +8775,7 @@
9123
8775
  </xsl:otherwise>
9124
8776
  </xsl:choose>
9125
8777
  </xsl:variable>
9126
- <xsl:variable name="ratio_">
9127
- 0.75
8778
+ <xsl:variable name="ratio_">0.75
9128
8779
  </xsl:variable>
9129
8780
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
9130
8781
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -9214,7 +8865,7 @@
9214
8865
 
9215
8866
  <xsl:variable name="quot">"</xsl:variable>
9216
8867
  <xsl:variable name="styles_">
9217
- <xsl:for-each select="xalan:nodeset($styles__)/item">
8868
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
9218
8869
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
9219
8870
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
9220
8871
  <xsl:variable name="value">
@@ -9226,7 +8877,7 @@
9226
8877
  </xsl:otherwise>
9227
8878
  </xsl:choose>
9228
8879
  </xsl:variable>
9229
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
8880
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
9230
8881
  <style name="{$key}"><xsl:value-of select="$value"/></style>
9231
8882
  </xsl:if>
9232
8883
  <xsl:if test="$key = 'text-indent'">
@@ -9240,7 +8891,6 @@
9240
8891
  <fo:inline>
9241
8892
  <xsl:for-each select="$styles/style">
9242
8893
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
9243
-
9244
8894
  </xsl:for-each>
9245
8895
  <xsl:apply-templates/>
9246
8896
  </fo:inline>
@@ -10227,35 +9877,34 @@
10227
9877
  <xsl:variable name="mathml_content">
10228
9878
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
10229
9879
  </xsl:variable>
10230
-
10231
- <xsl:variable name="filename" select="xalan:nodeset($mathml_attachments)//attachment[. = $mathml_content]/@filename"/>
10232
- <xsl:choose>
10233
- <xsl:when test="$add_math_as_attachment = 'true' and normalize-space($filename) != ''">
10234
- <xsl:variable name="url" select="concat('url(embedded-file:', $filename, ')')"/>
10235
- <fo:basic-link external-destination="{$url}" fox:alt-text="MathLink">
10236
- <xsl:variable name="asciimath_text">
10237
- <!-- <xsl:call-template name="getMathml_comment_text"/> -->
10238
- <xsl:call-template name="getMathml_asciimath_text"/>
10239
- </xsl:variable>
10240
- <xsl:if test="normalize-space($asciimath_text) != ''">
10241
- <!-- put Mathin Alternate Text -->
10242
- <xsl:attribute name="fox:alt-text">
10243
- <xsl:value-of select="$asciimath_text"/>
10244
- </xsl:attribute>
10245
- </xsl:if>
10246
- <xsl:call-template name="mathml_instream_object">
10247
- <xsl:with-param name="asciimath_text" select="$asciimath_text"/>
10248
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
10249
- </xsl:call-template>
10250
- </fo:basic-link>
10251
- </xsl:when>
10252
- <xsl:otherwise>
10253
- <xsl:call-template name="mathml_instream_object">
10254
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
10255
- </xsl:call-template>
10256
- </xsl:otherwise>
10257
- </xsl:choose>
10258
- <!-- end BIPM -->
9880
+ <xsl:variable name="filename" select="xalan:nodeset($mathml_attachments)//attachment[. = $mathml_content]/@filename"/>
9881
+ <xsl:choose>
9882
+ <xsl:when test="$add_math_as_attachment = 'true' and normalize-space($filename) != ''">
9883
+ <xsl:variable name="url" select="concat('url(embedded-file:', $filename, ')')"/>
9884
+ <fo:basic-link external-destination="{$url}" fox:alt-text="MathLink">
9885
+ <xsl:variable name="asciimath_text">
9886
+ <!-- <xsl:call-template name="getMathml_comment_text"/> -->
9887
+ <xsl:call-template name="getMathml_asciimath_text"/>
9888
+ </xsl:variable>
9889
+ <xsl:if test="normalize-space($asciimath_text) != ''">
9890
+ <!-- put Mathin Alternate Text -->
9891
+ <xsl:attribute name="fox:alt-text">
9892
+ <xsl:value-of select="$asciimath_text"/>
9893
+ </xsl:attribute>
9894
+ </xsl:if>
9895
+ <xsl:call-template name="mathml_instream_object">
9896
+ <xsl:with-param name="asciimath_text" select="$asciimath_text"/>
9897
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
9898
+ </xsl:call-template>
9899
+ </fo:basic-link>
9900
+ </xsl:when>
9901
+ <xsl:otherwise>
9902
+ <xsl:call-template name="mathml_instream_object">
9903
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
9904
+ </xsl:call-template>
9905
+ </xsl:otherwise>
9906
+ </xsl:choose>
9907
+ <!-- end BIPM -->
10259
9908
 
10260
9909
  </fo:inline>
10261
9910
  </xsl:template>
@@ -10289,7 +9938,6 @@
10289
9938
  <xsl:template name="getMathml_asciimath_text">
10290
9939
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
10291
9940
  <xsl:variable name="latexmath">
10292
-
10293
9941
  </xsl:variable>
10294
9942
  <xsl:variable name="asciimath_text_following">
10295
9943
  <xsl:choose>
@@ -10362,14 +10010,12 @@
10362
10010
  </xsl:template>
10363
10011
 
10364
10012
  <xsl:template name="refine_mathml_insteam_object_style">
10365
-
10366
- <xsl:if test="local-name(../..) = 'formula'">
10367
- <xsl:attribute name="width">95%</xsl:attribute>
10368
- <xsl:attribute name="content-height">100%</xsl:attribute>
10369
- <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
10370
- <xsl:attribute name="scaling">uniform</xsl:attribute>
10371
- </xsl:if>
10372
-
10013
+ <xsl:if test="local-name(../..) = 'formula'">
10014
+ <xsl:attribute name="width">95%</xsl:attribute>
10015
+ <xsl:attribute name="content-height">100%</xsl:attribute>
10016
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
10017
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
10018
+ </xsl:if>
10373
10019
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
10374
10020
 
10375
10021
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -10767,7 +10413,6 @@
10767
10413
  <xsl:variable name="annotation-id" select="@id"/>
10768
10414
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
10769
10415
  <fo:block id="{$annotation-id}" white-space="nowrap">
10770
-
10771
10416
  <fo:inline>
10772
10417
  <xsl:apply-templates>
10773
10418
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -10796,7 +10441,6 @@
10796
10441
  <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'])">
10797
10442
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
10798
10443
  </xsl:if>
10799
-
10800
10444
  <xsl:if test="parent::*[local-name() = 'add']">
10801
10445
  <xsl:call-template name="append_add-style"/>
10802
10446
  </xsl:if>
@@ -10807,8 +10451,7 @@
10807
10451
  </xsl:template>
10808
10452
 
10809
10453
  <!-- command between two xref points to non-standard bibitem -->
10810
- <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
10811
- <xsl:value-of select="."/>
10454
+ <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]"><xsl:value-of select="."/>
10812
10455
  </xsl:template>
10813
10456
 
10814
10457
  <!-- ====== -->
@@ -10823,7 +10466,6 @@
10823
10466
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
10824
10467
  </xsl:choose>
10825
10468
  </xsl:attribute>
10826
-
10827
10469
  </xsl:if>
10828
10470
  <fo:block-container margin-left="0mm" role="SKIP">
10829
10471
  <xsl:call-template name="setNamedDestination"/>
@@ -10913,60 +10555,55 @@
10913
10555
 
10914
10556
  <xsl:template match="*[local-name() = 'note']" name="note">
10915
10557
 
10916
- <xsl:call-template name="setNamedDestination"/>
10917
-
10918
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
10919
-
10920
- <xsl:call-template name="setBlockSpanAll"/>
10921
-
10922
- <xsl:call-template name="refine_note-style"/>
10558
+ <xsl:call-template name="setNamedDestination"/>
10923
10559
 
10924
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10560
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
10925
10561
 
10926
- <fo:block>
10562
+ <xsl:call-template name="setBlockSpanAll"/>
10927
10563
 
10928
- <xsl:call-template name="refine_note_block_style"/>
10564
+ <xsl:call-template name="refine_note-style"/>
10929
10565
 
10930
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
10566
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10567
+ <fo:block>
10931
10568
 
10932
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
10569
+ <xsl:call-template name="refine_note_block_style"/>
10933
10570
 
10934
- <xsl:call-template name="refine_note-name-style"/>
10571
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
10935
10572
 
10936
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
10937
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
10938
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
10939
- <xsl:call-template name="append_add-style"/>
10940
- </xsl:if>
10573
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
10941
10574
 
10942
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
10943
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
10944
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
10945
- <xsl:with-param name="skip">false</xsl:with-param>
10946
- </xsl:apply-templates>
10947
- </xsl:if>
10575
+ <xsl:call-template name="refine_note-name-style"/>
10948
10576
 
10949
- <xsl:apply-templates select="*[local-name() = 'name']"/>
10577
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
10578
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
10579
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
10580
+ <xsl:call-template name="append_add-style"/>
10581
+ </xsl:if>
10950
10582
 
10951
- </fo:inline>
10583
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
10584
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
10585
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
10586
+ <xsl:with-param name="skip">false</xsl:with-param>
10587
+ </xsl:apply-templates>
10588
+ </xsl:if>
10952
10589
 
10953
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
10954
- </fo:block>
10590
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
10955
10591
 
10956
- </fo:block-container>
10957
- </fo:block-container>
10592
+ </fo:inline>
10958
10593
 
10594
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
10595
+ </fo:block>
10596
+ </fo:block-container>
10597
+ </fo:block-container>
10959
10598
  </xsl:template>
10960
10599
 
10961
10600
  <xsl:template name="refine_note_block_style">
10962
-
10963
- <xsl:if test="@parent-type = 'quote'">
10964
- <xsl:attribute name="font-family">Arial</xsl:attribute>
10965
- <xsl:attribute name="font-size">9pt</xsl:attribute>
10966
- <xsl:attribute name="line-height">130%</xsl:attribute>
10967
- <xsl:attribute name="text-align">justify</xsl:attribute>
10968
- </xsl:if>
10969
-
10601
+ <xsl:if test="@parent-type = 'quote'">
10602
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
10603
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
10604
+ <xsl:attribute name="line-height">130%</xsl:attribute>
10605
+ <xsl:attribute name="text-align">justify</xsl:attribute>
10606
+ </xsl:if>
10970
10607
  </xsl:template> <!-- refine_note_block_style -->
10971
10608
 
10972
10609
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -11019,14 +10656,12 @@
11019
10656
  <xsl:value-of select="$sfx"/>
11020
10657
  </xsl:when>
11021
10658
  <xsl:otherwise>
11022
-
11023
- <!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
10659
+ <!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
11024
10660
  <xsl:choose>
11025
10661
  <xsl:when test="$curr_lang = 'fr'"><xsl:text>&#xa0;: </xsl:text></xsl:when>
11026
10662
  <xsl:otherwise><xsl:text>: </xsl:text></xsl:otherwise>
11027
10663
  </xsl:choose> -->
11028
- <xsl:text> </xsl:text>
11029
-
10664
+ <xsl:text> </xsl:text>
11030
10665
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
11031
10666
  <!-- <xsl:if test="$namespace = 'ieee'">
11032
10667
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -11034,7 +10669,6 @@
11034
10669
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
11035
10670
  <xsl:text>:</xsl:text>
11036
10671
  </xsl:if> -->
11037
-
11038
10672
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
11039
10673
  <xsl:text> – </xsl:text> en dash &#x2013;
11040
10674
  </xsl:if> -->
@@ -11055,14 +10689,12 @@
11055
10689
  <xsl:value-of select="$sfx"/>
11056
10690
  </xsl:when>
11057
10691
  <xsl:otherwise>
11058
-
11059
- <!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
10692
+ <!-- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
11060
10693
  <xsl:choose>
11061
10694
  <xsl:when test="$curr_lang = 'fr'"><xsl:text>&#xa0;: </xsl:text></xsl:when>
11062
10695
  <xsl:otherwise><xsl:text>: </xsl:text></xsl:otherwise>
11063
10696
  </xsl:choose> -->
11064
- <xsl:text> </xsl:text>
11065
-
10697
+ <xsl:text> </xsl:text>
11066
10698
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
11067
10699
  <!-- <xsl:if test="$namespace = 'ieee'">
11068
10700
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -11118,7 +10750,6 @@
11118
10750
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
11119
10751
 
11120
10752
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
11121
-
11122
10753
  </xsl:if>
11123
10754
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
11124
10755
  </fo:block>
@@ -11158,8 +10789,7 @@
11158
10789
  <!-- Example: Dimensions in millimeters -->
11159
10790
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
11160
10791
 
11161
- <xsl:variable name="show_figure_key_in_block_container">
11162
- true
10792
+ <xsl:variable name="show_figure_key_in_block_container">true
11163
10793
  </xsl:variable>
11164
10794
 
11165
10795
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
@@ -11174,11 +10804,9 @@
11174
10804
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
11175
10805
  <xsl:call-template name="showFigureKey"/>
11176
10806
  </xsl:if>
11177
-
11178
- <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
10807
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
11179
10808
 
11180
10809
  </fo:block-container>
11181
-
11182
10810
  </xsl:template>
11183
10811
 
11184
10812
  <xsl:template name="showFigureKey">
@@ -11216,13 +10844,12 @@
11216
10844
  <!-- SOURCE: ... -->
11217
10845
  <!-- figure/source -->
11218
10846
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
11219
-
11220
- <xsl:call-template name="termsource"/>
11221
-
10847
+ <xsl:call-template name="termsource"/>
11222
10848
  </xsl:template>
11223
10849
 
11224
10850
  <xsl:template match="*[local-name() = 'image']">
11225
10851
  <xsl:param name="indent">0</xsl:param>
10852
+ <xsl:param name="logo_width"/>
11226
10853
  <xsl:variable name="isAdded" select="../@added"/>
11227
10854
  <xsl:variable name="isDeleted" select="../@deleted"/>
11228
10855
  <xsl:choose>
@@ -11244,9 +10871,18 @@
11244
10871
 
11245
10872
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
11246
10873
 
11247
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
11248
10874
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
11249
10875
 
10876
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
10877
+ <xsl:attribute name="width">100%</xsl:attribute>
10878
+ <xsl:if test="normalize-space($logo_width) != ''">
10879
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
10880
+ </xsl:if>
10881
+ <xsl:attribute name="content-height">100%</xsl:attribute>
10882
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
10883
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
10884
+ </xsl:if>
10885
+
11250
10886
  <xsl:variable name="width">
11251
10887
  <xsl:call-template name="setImageWidth"/>
11252
10888
  </xsl:variable>
@@ -11324,8 +10960,7 @@
11324
10960
  </xsl:call-template>
11325
10961
  </xsl:variable>
11326
10962
 
11327
- <xsl:variable name="scaleRatio">
11328
- 1
10963
+ <xsl:variable name="scaleRatio">1
11329
10964
  </xsl:variable>
11330
10965
 
11331
10966
  <xsl:if test="number($scale) &lt; 100">
@@ -11436,18 +11071,14 @@
11436
11071
  </xsl:variable>
11437
11072
 
11438
11073
  <xsl:variable name="image_width_effective">
11439
-
11440
- <xsl:value-of select="$width_effective - number($indent_left)"/>
11441
-
11074
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
11442
11075
  </xsl:variable>
11443
11076
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
11444
11077
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
11445
11078
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
11446
11079
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
11447
11080
  <xsl:variable name="scale">
11448
-
11449
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
11450
-
11081
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
11451
11082
  </xsl:variable>
11452
11083
  <xsl:value-of select="$scale"/>
11453
11084
  </xsl:template>
@@ -11468,7 +11099,8 @@
11468
11099
  </xsl:when>
11469
11100
  <xsl:when test="not(starts-with(@src, 'data:'))">
11470
11101
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
11471
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
11102
+ <xsl:variable name="file_protocol"><xsl:if test="not(starts-with($src_external, 'http:')) and not(starts-with($src_external, 'https:')) and not(starts-with($src_external, 'www.'))">file:///</xsl:if></xsl:variable>
11103
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
11472
11104
  </xsl:when>
11473
11105
  <xsl:otherwise>
11474
11106
  <xsl:value-of select="@src"/>
@@ -11764,8 +11396,8 @@
11764
11396
  </xsl:call-template>
11765
11397
  </xsl:variable>
11766
11398
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
11767
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
11768
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
11399
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
11400
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
11769
11401
 
11770
11402
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
11771
11403
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -11837,8 +11469,8 @@
11837
11469
  </xsl:variable>
11838
11470
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
11839
11471
  <xsl:variable name="att_name" select="local-name()"/>
11840
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
11841
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
11472
+ <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/mn:item[1], ',', $components/mn:item[2], ',', $components/mn:item[3], ')')"/></xsl:attribute>
11473
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
11842
11474
  </xsl:template>
11843
11475
 
11844
11476
  <!-- ============== -->
@@ -11911,13 +11543,13 @@
11911
11543
  </xsl:call-template>
11912
11544
  </xsl:variable>
11913
11545
  <xsl:variable name="x_coords">
11914
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
11546
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
11915
11547
  <xsl:sort select="." data-type="number"/>
11916
11548
  <x><xsl:value-of select="."/></x>
11917
11549
  </xsl:for-each>
11918
11550
  </xsl:variable>
11919
11551
  <xsl:variable name="y_coords">
11920
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
11552
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
11921
11553
  <xsl:sort select="." data-type="number"/>
11922
11554
  <y><xsl:value-of select="."/></y>
11923
11555
  </xsl:for-each>
@@ -12122,11 +11754,11 @@
12122
11754
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
12123
11755
  </xsl:variable>
12124
11756
 
12125
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
12126
- <title>
11757
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
11758
+ <mn:title>
12127
11759
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
12128
- </title>
12129
- </item>
11760
+ </mn:title>
11761
+ </mn:item>
12130
11762
  </xsl:if>
12131
11763
  </xsl:template>
12132
11764
 
@@ -12197,12 +11829,12 @@
12197
11829
  <xsl:param name="contents"/>
12198
11830
  <xsl:param name="contents_addon"/>
12199
11831
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
12200
- <xsl:if test="$contents_nodes//item">
11832
+ <xsl:if test="$contents_nodes//mn:item">
12201
11833
  <fo:bookmark-tree>
12202
11834
  <xsl:choose>
12203
- <xsl:when test="$contents_nodes/doc">
11835
+ <xsl:when test="$contents_nodes/mn:doc">
12204
11836
  <xsl:choose>
12205
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
11837
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
12206
11838
 
12207
11839
  <xsl:if test="$contents_nodes/collection">
12208
11840
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -12210,8 +11842,8 @@
12210
11842
  </fo:bookmark>
12211
11843
  </xsl:if>
12212
11844
 
12213
- <xsl:for-each select="$contents_nodes/doc">
12214
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
11845
+ <xsl:for-each select="$contents_nodes/mn:doc">
11846
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
12215
11847
  <xsl:if test="@bundle = 'true'">
12216
11848
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
12217
11849
  </xsl:if>
@@ -12245,14 +11877,14 @@
12245
11877
  </xsl:choose>
12246
11878
  </fo:bookmark-title>
12247
11879
 
12248
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
11880
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
12249
11881
 
12250
11882
  <xsl:call-template name="insertFigureBookmarks">
12251
- <xsl:with-param name="contents" select="contents"/>
11883
+ <xsl:with-param name="contents" select="mn:contents"/>
12252
11884
  </xsl:call-template>
12253
11885
 
12254
11886
  <xsl:call-template name="insertTableBookmarks">
12255
- <xsl:with-param name="contents" select="contents"/>
11887
+ <xsl:with-param name="contents" select="mn:contents"/>
12256
11888
  <xsl:with-param name="lang" select="@lang"/>
12257
11889
  </xsl:call-template>
12258
11890
 
@@ -12261,16 +11893,16 @@
12261
11893
  </xsl:for-each>
12262
11894
  </xsl:when>
12263
11895
  <xsl:otherwise>
12264
- <xsl:for-each select="$contents_nodes/doc">
11896
+ <xsl:for-each select="$contents_nodes/mn:doc">
12265
11897
 
12266
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
11898
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
12267
11899
 
12268
11900
  <xsl:call-template name="insertFigureBookmarks">
12269
- <xsl:with-param name="contents" select="contents"/>
11901
+ <xsl:with-param name="contents" select="mn:contents"/>
12270
11902
  </xsl:call-template>
12271
11903
 
12272
11904
  <xsl:call-template name="insertTableBookmarks">
12273
- <xsl:with-param name="contents" select="contents"/>
11905
+ <xsl:with-param name="contents" select="mn:contents"/>
12274
11906
  <xsl:with-param name="lang" select="@lang"/>
12275
11907
  </xsl:call-template>
12276
11908
 
@@ -12279,14 +11911,14 @@
12279
11911
  </xsl:choose>
12280
11912
  </xsl:when>
12281
11913
  <xsl:otherwise>
12282
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
11914
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
12283
11915
 
12284
11916
  <xsl:call-template name="insertFigureBookmarks">
12285
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
11917
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
12286
11918
  </xsl:call-template>
12287
11919
 
12288
11920
  <xsl:call-template name="insertTableBookmarks">
12289
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
11921
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
12290
11922
  <xsl:with-param name="lang" select="@lang"/>
12291
11923
  </xsl:call-template>
12292
11924
 
@@ -12303,80 +11935,72 @@
12303
11935
  <xsl:template name="insertFigureBookmarks">
12304
11936
  <xsl:param name="contents"/>
12305
11937
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
12306
- <xsl:if test="$contents_nodes/figure">
12307
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
11938
+ <xsl:if test="$contents_nodes/mn:figure">
11939
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
12308
11940
  <fo:bookmark-title>Figures</fo:bookmark-title>
12309
- <xsl:for-each select="$contents_nodes/figure">
11941
+ <xsl:for-each select="$contents_nodes/mn:figure">
12310
11942
  <fo:bookmark internal-destination="{@id}">
12311
11943
  <fo:bookmark-title>
12312
- <xsl:value-of select="normalize-space(title)"/>
11944
+ <xsl:value-of select="normalize-space(mn:title)"/>
12313
11945
  </fo:bookmark-title>
12314
11946
  </fo:bookmark>
12315
11947
  </xsl:for-each>
12316
11948
  </fo:bookmark>
12317
11949
  </xsl:if>
11950
+ <xsl:if test="$contents_nodes//mn:figures/mn:figure">
11951
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
12318
11952
 
12319
- <xsl:if test="$contents_nodes//figures/figure">
12320
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
12321
-
12322
- <xsl:variable name="bookmark-title">
12323
-
12324
- <xsl:value-of select="$title-list-figures"/>
12325
-
12326
- </xsl:variable>
12327
- <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
12328
- <xsl:for-each select="$contents_nodes//figures/figure">
12329
- <fo:bookmark internal-destination="{@id}">
12330
- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
12331
- </fo:bookmark>
12332
- </xsl:for-each>
11953
+ <xsl:variable name="bookmark-title">
11954
+ <xsl:value-of select="$title-list-figures"/>
11955
+ </xsl:variable>
11956
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
11957
+ <xsl:for-each select="$contents_nodes//mn:figures/mn:figure">
11958
+ <fo:bookmark internal-destination="{@id}">
11959
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
12333
11960
  </fo:bookmark>
12334
- </xsl:if>
12335
-
11961
+ </xsl:for-each>
11962
+ </fo:bookmark>
11963
+ </xsl:if>
12336
11964
  </xsl:template> <!-- insertFigureBookmarks -->
12337
11965
 
12338
11966
  <xsl:template name="insertTableBookmarks">
12339
11967
  <xsl:param name="contents"/>
12340
11968
  <xsl:param name="lang"/>
12341
11969
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
12342
- <xsl:if test="$contents_nodes/table">
12343
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
11970
+ <xsl:if test="$contents_nodes/mn:table">
11971
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
12344
11972
  <fo:bookmark-title>
12345
11973
  <xsl:choose>
12346
11974
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
12347
11975
  <xsl:otherwise>Tables</xsl:otherwise>
12348
11976
  </xsl:choose>
12349
11977
  </fo:bookmark-title>
12350
- <xsl:for-each select="$contents_nodes/table">
11978
+ <xsl:for-each select="$contents_nodes/mn:table">
12351
11979
  <fo:bookmark internal-destination="{@id}">
12352
11980
  <fo:bookmark-title>
12353
- <xsl:value-of select="normalize-space(title)"/>
11981
+ <xsl:value-of select="normalize-space(mn:title)"/>
12354
11982
  </fo:bookmark-title>
12355
11983
  </fo:bookmark>
12356
11984
  </xsl:for-each>
12357
11985
  </fo:bookmark>
12358
11986
  </xsl:if>
11987
+ <xsl:if test="$contents_nodes//mn:tables/mn:table">
11988
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
12359
11989
 
12360
- <xsl:if test="$contents_nodes//tables/table">
12361
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
12362
-
12363
- <xsl:variable name="bookmark-title">
12364
-
12365
- <xsl:value-of select="$title-list-tables"/>
12366
-
12367
- </xsl:variable>
11990
+ <xsl:variable name="bookmark-title">
11991
+ <xsl:value-of select="$title-list-tables"/>
11992
+ </xsl:variable>
12368
11993
 
12369
- <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
11994
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
12370
11995
 
12371
- <xsl:for-each select="$contents_nodes//tables/table">
12372
- <fo:bookmark internal-destination="{@id}">
12373
- <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
12374
- <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
12375
- </fo:bookmark>
12376
- </xsl:for-each>
11996
+ <xsl:for-each select="$contents_nodes//mn:tables/mn:table">
11997
+ <fo:bookmark internal-destination="{@id}">
11998
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
11999
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
12377
12000
  </fo:bookmark>
12378
- </xsl:if>
12379
-
12001
+ </xsl:for-each>
12002
+ </fo:bookmark>
12003
+ </xsl:if>
12380
12004
  </xsl:template> <!-- insertTableBookmarks -->
12381
12005
  <!-- End Bookmarks -->
12382
12006
 
@@ -12406,31 +12030,27 @@
12406
12030
  <xsl:param name="title" select="''"/>
12407
12031
  <xsl:choose>
12408
12032
  <xsl:when test="$lang = 'en'">
12409
-
12410
- <xsl:choose>
12411
- <xsl:when test="$doctype = 'guide'">
12412
- <xsl:value-of select="$title"/>
12413
- </xsl:when>
12414
- <xsl:otherwise>English version</xsl:otherwise>
12415
- </xsl:choose>
12416
-
12033
+ <xsl:choose>
12034
+ <xsl:when test="$doctype = 'guide'">
12035
+ <xsl:value-of select="$title"/>
12036
+ </xsl:when>
12037
+ <xsl:otherwise>English version</xsl:otherwise>
12038
+ </xsl:choose>
12417
12039
  </xsl:when>
12418
12040
  <xsl:when test="$lang = 'fr'">
12419
-
12420
- <xsl:choose>
12421
- <xsl:when test="$doctype = 'guide'">
12422
- <xsl:value-of select="$title"/>
12423
- </xsl:when>
12424
- <xsl:otherwise>Version française</xsl:otherwise>
12425
- </xsl:choose>
12426
-
12041
+ <xsl:choose>
12042
+ <xsl:when test="$doctype = 'guide'">
12043
+ <xsl:value-of select="$title"/>
12044
+ </xsl:when>
12045
+ <xsl:otherwise>Version française</xsl:otherwise>
12046
+ </xsl:choose>
12427
12047
  </xsl:when>
12428
12048
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
12429
12049
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
12430
12050
  </xsl:choose>
12431
12051
  </xsl:template>
12432
12052
 
12433
- <xsl:template match="item" mode="bookmark">
12053
+ <xsl:template match="mn:item" mode="bookmark">
12434
12054
  <xsl:choose>
12435
12055
  <xsl:when test="@id != ''">
12436
12056
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -12440,7 +12060,7 @@
12440
12060
  <xsl:text> </xsl:text>
12441
12061
  </xsl:if>
12442
12062
  <xsl:variable name="title">
12443
- <xsl:for-each select="title/node()">
12063
+ <xsl:for-each select="mn:title/node()">
12444
12064
  <xsl:choose>
12445
12065
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
12446
12066
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -12458,7 +12078,7 @@
12458
12078
  </xsl:choose>
12459
12079
  </xsl:template>
12460
12080
 
12461
- <xsl:template match="title" mode="bookmark"/>
12081
+ <xsl:template match="mn:title" mode="bookmark"/>
12462
12082
  <xsl:template match="text()" mode="bookmark"/>
12463
12083
 
12464
12084
  <!-- figure/name -->
@@ -12687,9 +12307,9 @@
12687
12307
  <xsl:template match="text()" mode="contents_item">
12688
12308
  <xsl:variable name="text">
12689
12309
  <!-- to split by '_' and other chars -->
12690
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
12310
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
12691
12311
  </xsl:variable>
12692
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
12312
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
12693
12313
  <xsl:call-template name="keep_together_standard_number"/>
12694
12314
  </xsl:for-each>
12695
12315
  </xsl:template>
@@ -12722,14 +12342,7 @@
12722
12342
 
12723
12343
  <xsl:template name="get_sourcecode_attributes">
12724
12344
  <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
12725
- <xsl:variable name="_font-size">
12726
-
12727
- <!-- inherit -->
12728
-
12729
- <!-- <xsl:if test="$namespace = 'ieee'">
12730
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
12731
- </xsl:if> -->
12732
-
12345
+ <xsl:variable name="_font-size"><!-- inherit -->
12733
12346
  </xsl:variable>
12734
12347
 
12735
12348
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -12785,7 +12398,6 @@
12785
12398
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
12786
12399
  </xsl:choose>
12787
12400
  </xsl:attribute>
12788
-
12789
12401
  </xsl:if>
12790
12402
  <fo:block-container margin-left="0mm" role="SKIP">
12791
12403
 
@@ -12809,8 +12421,7 @@
12809
12421
  </fo:block>
12810
12422
 
12811
12423
  <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
12812
-
12813
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
12424
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
12814
12425
 
12815
12426
  </fo:block-container>
12816
12427
  </fo:block-container>
@@ -12987,25 +12598,6 @@
12987
12598
  </xsl:choose>
12988
12599
  </xsl:template>
12989
12600
 
12990
- <!-- insert 'char' between each character in the string -->
12991
- <xsl:template name="interspers">
12992
- <xsl:param name="str"/>
12993
- <xsl:param name="char" select="$zero_width_space"/>
12994
- <xsl:if test="$str != ''">
12995
- <xsl:value-of select="substring($str, 1, 1)"/>
12996
-
12997
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
12998
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
12999
- <xsl:value-of select="$char"/>
13000
- </xsl:if>
13001
-
13002
- <xsl:call-template name="interspers">
13003
- <xsl:with-param name="str" select="substring($str, 2)"/>
13004
- <xsl:with-param name="char" select="$char"/>
13005
- </xsl:call-template>
13006
- </xsl:if>
13007
- </xsl:template>
13008
-
13009
12601
  <xsl:template name="interspers-java">
13010
12602
  <xsl:param name="str"/>
13011
12603
  <xsl:param name="char" select="$zero_width_space"/>
@@ -13102,7 +12694,7 @@
13102
12694
  </xsl:variable>
13103
12695
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
13104
12696
 
13105
- <xsl:for-each select="$classes/item">
12697
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
13106
12698
  <xsl:variable name="class_name" select="."/>
13107
12699
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
13108
12700
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -13185,12 +12777,9 @@
13185
12777
 
13186
12778
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
13187
12779
  <xsl:if test="normalize-space() != ''">
13188
-
13189
- <fo:block xsl:use-attribute-sets="permission-name-style">
13190
- <xsl:apply-templates/>
13191
-
13192
- </fo:block>
13193
-
12780
+ <fo:block xsl:use-attribute-sets="permission-name-style">
12781
+ <xsl:apply-templates/>
12782
+ </fo:block>
13194
12783
  </xsl:if>
13195
12784
  </xsl:template>
13196
12785
 
@@ -13219,12 +12808,9 @@
13219
12808
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
13220
12809
  <xsl:if test="normalize-space() != ''">
13221
12810
 
13222
- <fo:block xsl:use-attribute-sets="requirement-name-style">
13223
-
13224
- <xsl:apply-templates/>
13225
-
13226
- </fo:block>
13227
-
12811
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
12812
+ <xsl:apply-templates/>
12813
+ </fo:block>
13228
12814
  </xsl:if>
13229
12815
  </xsl:template>
13230
12816
 
@@ -13263,11 +12849,9 @@
13263
12849
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
13264
12850
  <xsl:if test="normalize-space() != ''">
13265
12851
 
13266
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
13267
- <xsl:apply-templates/>
13268
-
13269
- </fo:block>
13270
-
12852
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
12853
+ <xsl:apply-templates/>
12854
+ </fo:block>
13271
12855
  </xsl:if>
13272
12856
  </xsl:template>
13273
12857
 
@@ -13393,7 +12977,6 @@
13393
12977
 
13394
12978
  <xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
13395
12979
  <xsl:attribute name="font-weight">bold</xsl:attribute>
13396
-
13397
12980
  </xsl:if>
13398
12981
 
13399
12982
  <xsl:apply-templates mode="requirement"/>
@@ -13438,7 +13021,6 @@
13438
13021
 
13439
13022
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
13440
13023
  <fo:block font-size="11pt">
13441
-
13442
13024
  <xsl:apply-templates/>
13443
13025
  </fo:block>
13444
13026
  </xsl:template>
@@ -13478,7 +13060,6 @@
13478
13060
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
13479
13061
  <xsl:variable name="element">inline
13480
13062
 
13481
-
13482
13063
  </xsl:variable>
13483
13064
  <xsl:choose>
13484
13065
  <xsl:when test="contains($element, 'block')">
@@ -13510,110 +13091,105 @@
13510
13091
  text line 2
13511
13092
  -->
13512
13093
  <xsl:template match="*[local-name() = 'example']" name="example">
13094
+ <xsl:call-template name="setNamedDestination"/>
13095
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
13513
13096
 
13514
- <xsl:call-template name="setNamedDestination"/>
13515
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
13097
+ <xsl:call-template name="setBlockSpanAll"/>
13516
13098
 
13517
- <xsl:call-template name="setBlockSpanAll"/>
13099
+ <xsl:call-template name="refine_example-style"/>
13518
13100
 
13519
- <xsl:call-template name="refine_example-style"/>
13101
+ <xsl:variable name="fo_element">
13102
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>block
13103
+ </xsl:variable>
13520
13104
 
13521
- <xsl:variable name="fo_element">
13522
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
13523
- block
13524
- </xsl:variable>
13105
+ <fo:block-container margin-left="0mm" role="SKIP">
13525
13106
 
13526
- <fo:block-container margin-left="0mm" role="SKIP">
13107
+ <xsl:choose>
13527
13108
 
13528
- <xsl:choose>
13109
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
13529
13110
 
13530
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
13111
+ <!-- display name 'EXAMPLE' in a separate block -->
13112
+ <fo:block>
13113
+ <xsl:apply-templates select="*[local-name()='name']">
13114
+ <xsl:with-param name="fo_element" select="$fo_element"/>
13115
+ </xsl:apply-templates>
13116
+ </fo:block>
13531
13117
 
13532
- <!-- display name 'EXAMPLE' in a separate block -->
13533
- <fo:block>
13534
- <xsl:apply-templates select="*[local-name()='name']">
13118
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
13119
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
13120
+ <xsl:variable name="example_body">
13121
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
13535
13122
  <xsl:with-param name="fo_element" select="$fo_element"/>
13536
13123
  </xsl:apply-templates>
13537
- </fo:block>
13538
-
13539
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
13540
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
13541
- <xsl:variable name="example_body">
13542
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
13543
- <xsl:with-param name="fo_element" select="$fo_element"/>
13544
- </xsl:apply-templates>
13545
- </xsl:variable>
13546
- <xsl:choose>
13547
- <xsl:when test="xalan:nodeset($example_body)/*">
13548
- <xsl:copy-of select="$example_body"/>
13549
- </xsl:when>
13550
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
13551
- </xsl:choose>
13552
- </fo:block-container>
13553
- </fo:block-container>
13554
- </xsl:when> <!-- end block -->
13555
-
13556
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
13557
-
13558
- <xsl:variable name="provisional_distance_between_starts_">
13559
- 7
13560
- </xsl:variable>
13561
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
13562
- <xsl:variable name="indent_">
13563
- 0
13564
13124
  </xsl:variable>
13565
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
13566
-
13567
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
13568
- <fo:list-item>
13569
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
13570
- <fo:block>
13571
- <xsl:apply-templates select="*[local-name()='name']">
13572
- <xsl:with-param name="fo_element">block</xsl:with-param>
13573
- </xsl:apply-templates>
13574
- </fo:block>
13575
- </fo:list-item-label>
13576
- <fo:list-item-body start-indent="body-start()">
13577
- <fo:block>
13578
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
13579
- <xsl:with-param name="fo_element" select="$fo_element"/>
13580
- </xsl:apply-templates>
13581
- </fo:block>
13582
- </fo:list-item-body>
13583
- </fo:list-item>
13584
- </fo:list-block>
13585
- </xsl:when> <!-- end list -->
13125
+ <xsl:choose>
13126
+ <xsl:when test="xalan:nodeset($example_body)/*">
13127
+ <xsl:copy-of select="$example_body"/>
13128
+ </xsl:when>
13129
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
13130
+ </xsl:choose>
13131
+ </fo:block-container>
13132
+ </fo:block-container>
13133
+ </xsl:when> <!-- end block -->
13586
13134
 
13587
- <xsl:otherwise> <!-- inline -->
13135
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
13588
13136
 
13589
- <!-- display 'EXAMPLE' and first element in the same line -->
13590
- <fo:block>
13591
- <xsl:apply-templates select="*[local-name()='name']">
13592
- <xsl:with-param name="fo_element" select="$fo_element"/>
13593
- </xsl:apply-templates>
13594
- <fo:inline>
13595
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
13137
+ <xsl:variable name="provisional_distance_between_starts_">7
13138
+ </xsl:variable>
13139
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
13140
+ <xsl:variable name="indent_">0
13141
+ </xsl:variable>
13142
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
13143
+
13144
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
13145
+ <fo:list-item>
13146
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
13147
+ <fo:block>
13148
+ <xsl:apply-templates select="*[local-name()='name']">
13149
+ <xsl:with-param name="fo_element">block</xsl:with-param>
13150
+ </xsl:apply-templates>
13151
+ </fo:block>
13152
+ </fo:list-item-label>
13153
+ <fo:list-item-body start-indent="body-start()">
13154
+ <fo:block>
13155
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
13596
13156
  <xsl:with-param name="fo_element" select="$fo_element"/>
13597
13157
  </xsl:apply-templates>
13598
- </fo:inline>
13599
- </fo:block>
13158
+ </fo:block>
13159
+ </fo:list-item-body>
13160
+ </fo:list-item>
13161
+ </fo:list-block>
13162
+ </xsl:when> <!-- end list -->
13600
13163
 
13601
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
13602
- <!-- display further elements in blocks -->
13603
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
13604
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
13605
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
13606
- <xsl:with-param name="fo_element" select="'block'"/>
13607
- </xsl:apply-templates>
13608
- </fo:block-container>
13609
- </fo:block-container>
13610
- </xsl:if>
13611
- </xsl:otherwise> <!-- end inline -->
13164
+ <xsl:otherwise> <!-- inline -->
13612
13165
 
13613
- </xsl:choose>
13614
- </fo:block-container>
13615
- </fo:block-container>
13166
+ <!-- display 'EXAMPLE' and first element in the same line -->
13167
+ <fo:block>
13168
+ <xsl:apply-templates select="*[local-name()='name']">
13169
+ <xsl:with-param name="fo_element" select="$fo_element"/>
13170
+ </xsl:apply-templates>
13171
+ <fo:inline>
13172
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
13173
+ <xsl:with-param name="fo_element" select="$fo_element"/>
13174
+ </xsl:apply-templates>
13175
+ </fo:inline>
13176
+ </fo:block>
13616
13177
 
13178
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
13179
+ <!-- display further elements in blocks -->
13180
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
13181
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
13182
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
13183
+ <xsl:with-param name="fo_element" select="'block'"/>
13184
+ </xsl:apply-templates>
13185
+ </fo:block-container>
13186
+ </fo:block-container>
13187
+ </xsl:if>
13188
+ </xsl:otherwise> <!-- end inline -->
13189
+
13190
+ </xsl:choose>
13191
+ </fo:block-container>
13192
+ </fo:block-container>
13617
13193
  </xsl:template>
13618
13194
 
13619
13195
  <!-- example/name -->
@@ -13628,7 +13204,6 @@
13628
13204
  </xsl:when>
13629
13205
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
13630
13206
  <fo:block xsl:use-attribute-sets="example-name-style">
13631
-
13632
13207
  <xsl:apply-templates/>
13633
13208
  </fo:block>
13634
13209
  </xsl:when>
@@ -13645,7 +13220,6 @@
13645
13220
  <!-- table/example/name, table/tfoot//example/name -->
13646
13221
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
13647
13222
  <fo:inline xsl:use-attribute-sets="example-name-style">
13648
-
13649
13223
  <xsl:apply-templates/>
13650
13224
  </fo:inline>
13651
13225
  </xsl:template>
@@ -13655,7 +13229,6 @@
13655
13229
 
13656
13230
  <xsl:variable name="num"><xsl:number/></xsl:variable>
13657
13231
  <xsl:variable name="element">
13658
-
13659
13232
  <xsl:value-of select="$fo_element"/>
13660
13233
  </xsl:variable>
13661
13234
  <xsl:choose>
@@ -13773,7 +13346,7 @@
13773
13346
  </xsl:call-template>
13774
13347
  </xsl:variable>
13775
13348
 
13776
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
13349
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
13777
13350
  <xsl:choose>
13778
13351
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
13779
13352
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
@@ -13810,7 +13383,6 @@
13810
13383
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
13811
13384
  </xsl:if>
13812
13385
  </xsl:if>
13813
-
13814
13386
  <fo:block-container margin-left="0mm" role="SKIP">
13815
13387
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
13816
13388
 
@@ -13893,7 +13465,6 @@
13893
13465
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
13894
13466
  <xsl:attribute name="vertical-align">super</xsl:attribute>
13895
13467
  <xsl:attribute name="font-size">80%</xsl:attribute>
13896
-
13897
13468
  </xsl:if>
13898
13469
 
13899
13470
  <xsl:call-template name="refine_eref-style"/>
@@ -13942,16 +13513,14 @@
13942
13513
  </xsl:template>
13943
13514
 
13944
13515
  <xsl:template name="refine_basic_link_style">
13945
-
13946
- <xsl:attribute name="color">blue</xsl:attribute>
13947
- <xsl:if test="not(parent::*[local-name() = 'title'])">
13948
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
13949
- </xsl:if>
13950
- <xsl:if test="parent::*[local-name() = 'title']">
13951
- <xsl:attribute name="color">inherit</xsl:attribute>
13952
- <xsl:attribute name="font-weight">normal</xsl:attribute>
13953
- </xsl:if>
13954
-
13516
+ <xsl:attribute name="color">blue</xsl:attribute>
13517
+ <xsl:if test="not(parent::*[local-name() = 'title'])">
13518
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
13519
+ </xsl:if>
13520
+ <xsl:if test="parent::*[local-name() = 'title']">
13521
+ <xsl:attribute name="color">inherit</xsl:attribute>
13522
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
13523
+ </xsl:if>
13955
13524
  </xsl:template> <!-- refine_basic_link_style -->
13956
13525
 
13957
13526
  <!-- ====== -->
@@ -13968,12 +13537,10 @@
13968
13537
  </xsl:variable>
13969
13538
 
13970
13539
  <xsl:variable name="padding">
13971
-
13972
- <xsl:choose>
13973
- <xsl:when test="ancestor::bipm:annex">2</xsl:when>
13974
- <xsl:otherwise>8</xsl:otherwise>
13975
- </xsl:choose>
13976
-
13540
+ <xsl:choose>
13541
+ <xsl:when test="ancestor::bipm:annex">2</xsl:when>
13542
+ <xsl:otherwise>8</xsl:otherwise>
13543
+ </xsl:choose>
13977
13544
  </xsl:variable>
13978
13545
 
13979
13546
  <xsl:variable name="padding-right">
@@ -13984,7 +13551,6 @@
13984
13551
  </xsl:otherwise>
13985
13552
  </xsl:choose>
13986
13553
  </xsl:variable>
13987
-
13988
13554
  <xsl:choose>
13989
13555
  <xsl:when test="$lang = 'zh'">
13990
13556
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -14008,7 +13574,6 @@
14008
13574
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
14009
13575
 
14010
13576
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
14011
-
14012
13577
  </xsl:template>
14013
13578
 
14014
13579
  <xsl:template name="insertNonBreakSpaces">
@@ -14026,8 +13591,7 @@
14026
13591
  <xsl:variable name="level">
14027
13592
  <xsl:call-template name="getLevel"/>
14028
13593
  </xsl:variable>
14029
- <xsl:variable name="font-size">
14030
- inherit
13594
+ <xsl:variable name="font-size">inherit
14031
13595
  </xsl:variable>
14032
13596
  <xsl:variable name="levelTerm">
14033
13597
  <xsl:call-template name="getLevelTermName"/>
@@ -14079,11 +13643,9 @@
14079
13643
  </xsl:template>
14080
13644
 
14081
13645
  <xsl:template name="setStyle_preferred">
14082
-
14083
- <xsl:if test="*[local-name() = 'strong']">
14084
- <xsl:attribute name="font-weight">normal</xsl:attribute>
14085
- </xsl:if>
14086
-
13646
+ <xsl:if test="*[local-name() = 'strong']">
13647
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
13648
+ </xsl:if>
14087
13649
  </xsl:template>
14088
13650
 
14089
13651
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -14160,7 +13722,6 @@
14160
13722
 
14161
13723
  <!-- main sections -->
14162
13724
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
14163
-
14164
13725
  <xsl:call-template name="setNamedDestination"/>
14165
13726
  <fo:block>
14166
13727
  <xsl:call-template name="setId"/>
@@ -14195,13 +13756,10 @@
14195
13756
  </xsl:template>
14196
13757
 
14197
13758
  <xsl:template name="sections_element_style">
14198
-
14199
13759
  </xsl:template> <!-- sections_element_style -->
14200
13760
 
14201
13761
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
14202
-
14203
- <fo:block break-after="page"/>
14204
-
13762
+ <fo:block break-after="page"/>
14205
13763
  <xsl:call-template name="setNamedDestination"/>
14206
13764
  <fo:block>
14207
13765
  <xsl:call-template name="setId"/>
@@ -14250,9 +13808,7 @@
14250
13808
  </xsl:template>
14251
13809
 
14252
13810
  <xsl:template name="refine_clause_style">
14253
-
14254
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
14255
-
13811
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
14256
13812
  </xsl:template> <!-- refine_clause_style -->
14257
13813
 
14258
13814
  <xsl:template match="*[local-name() = 'definitions']">
@@ -14292,7 +13848,6 @@
14292
13848
  </xsl:template>
14293
13849
 
14294
13850
  <xsl:template name="refine_annex_style">
14295
-
14296
13851
  </xsl:template>
14297
13852
 
14298
13853
  <!-- document text (not figures, or tables) footnotes -->
@@ -14396,17 +13951,15 @@
14396
13951
  <!-- Lists processing -->
14397
13952
  <!-- ===================================== -->
14398
13953
  <xsl:variable name="ul_labels_">
14399
-
14400
- <label level="1" font-size="15pt">•</label>
14401
- <label level="2">−</label><!-- &#x2212; - minus sign. &#x2014; - en dash -->
14402
- <label level="3" font-size="75%">o</label> <!-- white circle -->
13954
+ <label level="1" font-size="15pt">•</label>
13955
+ <label level="2">−</label><!-- &#x2212; - minus sign. &#x2014; - en dash -->
13956
+ <label level="3" font-size="75%">o</label> <!-- white circle -->
14403
13957
 
14404
13958
  </xsl:variable>
14405
13959
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
14406
13960
 
14407
13961
  <xsl:template name="setULLabel">
14408
- <xsl:variable name="list_level__">
14409
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
13962
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
14410
13963
  </xsl:variable>
14411
13964
  <xsl:variable name="list_level_" select="number($list_level__)"/>
14412
13965
  <xsl:variable name="list_level">
@@ -14463,28 +14016,22 @@
14463
14016
  <xsl:variable name="label">
14464
14017
 
14465
14018
  <xsl:variable name="style_prefix_">
14466
- <xsl:if test="$type = 'roman'">
14467
- ( <!-- Example: (i) -->
14019
+ <xsl:if test="$type = 'roman'">( <!-- Example: (i) -->
14468
14020
  </xsl:if>
14469
14021
  <xsl:if test="$type = 'alphabet'">
14470
-
14471
14022
  </xsl:if>
14472
14023
  </xsl:variable>
14473
14024
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
14474
14025
 
14475
14026
  <xsl:variable name="style_suffix_">
14476
14027
  <xsl:choose>
14477
- <xsl:when test="$type = 'arabic'">
14478
- .
14028
+ <xsl:when test="$type = 'arabic'">.
14479
14029
  </xsl:when>
14480
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
14481
- )
14030
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">)
14482
14031
  </xsl:when>
14483
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
14484
- .
14032
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">.
14485
14033
  </xsl:when>
14486
- <xsl:when test="$type = 'roman'">
14487
- )
14034
+ <xsl:when test="$type = 'roman'">)
14488
14035
  </xsl:when>
14489
14036
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
14490
14037
  </xsl:choose>
@@ -14501,8 +14048,7 @@
14501
14048
  <xsl:value-of select="$style_suffix"/>
14502
14049
  </xsl:if>
14503
14050
  </xsl:variable>
14504
-
14505
- <xsl:value-of select="normalize-space($label)"/>
14051
+ <xsl:value-of select="normalize-space($label)"/>
14506
14052
 
14507
14053
  </xsl:when>
14508
14054
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -14559,17 +14105,13 @@
14559
14105
 
14560
14106
  <xsl:variable name="format">
14561
14107
  <xsl:choose>
14562
- <xsl:when test="$type = 'arabic'">
14563
- 1.
14108
+ <xsl:when test="$type = 'arabic'">1.
14564
14109
  </xsl:when>
14565
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
14566
- a)
14110
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a)
14567
14111
  </xsl:when>
14568
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
14569
- A.
14112
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A.
14570
14113
  </xsl:when>
14571
- <xsl:when test="$type = 'roman'">
14572
- (i)
14114
+ <xsl:when test="$type = 'roman'">(i)
14573
14115
  </xsl:when>
14574
14116
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
14575
14117
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -14606,21 +14148,17 @@
14606
14148
  </fo:block-container>
14607
14149
  </xsl:when>
14608
14150
  <xsl:otherwise>
14609
-
14610
- <fo:block role="SKIP">
14611
- <xsl:apply-templates select="." mode="list">
14612
- <xsl:with-param name="indent" select="$indent"/>
14613
- </xsl:apply-templates>
14614
- </fo:block>
14615
-
14151
+ <fo:block role="SKIP">
14152
+ <xsl:apply-templates select="." mode="list">
14153
+ <xsl:with-param name="indent" select="$indent"/>
14154
+ </xsl:apply-templates>
14155
+ </fo:block>
14616
14156
  </xsl:otherwise>
14617
14157
  </xsl:choose>
14618
14158
  </xsl:template>
14619
14159
 
14620
14160
  <xsl:template name="refine_list_container_style">
14621
-
14622
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
14623
-
14161
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
14624
14162
  </xsl:template> <!-- refine_list_container_style -->
14625
14163
 
14626
14164
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -14684,7 +14222,6 @@
14684
14222
  </xsl:template>
14685
14223
 
14686
14224
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
14687
-
14688
14225
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
14689
14226
 
14690
14227
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -14969,7 +14506,6 @@
14969
14506
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
14970
14507
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
14971
14508
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
14972
-
14973
14509
  <xsl:apply-templates/>
14974
14510
  </fo:block>
14975
14511
  </xsl:template>
@@ -15021,7 +14557,6 @@
15021
14557
  <fo:table-column column-width="15mm"/>
15022
14558
  <fo:table-body>
15023
14559
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
15024
-
15025
14560
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
15026
14561
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
15027
14562
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -15057,7 +14592,6 @@
15057
14592
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
15058
14593
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
15059
14594
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
15060
-
15061
14595
  </xsl:template>
15062
14596
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
15063
14597
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -15068,16 +14602,13 @@
15068
14602
  <xsl:call-template name="setNamedDestination"/>
15069
14603
  <fo:block id="{@id}">
15070
14604
  <xsl:apply-templates/>
15071
-
15072
14605
  </fo:block>
15073
14606
  </xsl:template>
15074
14607
 
15075
14608
  <!-- Bibliography (non-normative references) -->
15076
14609
  <xsl:template match="*[local-name() = 'references']">
15077
14610
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
15078
-
15079
- <fo:block break-after="page"/>
15080
-
14611
+ <fo:block break-after="page"/>
15081
14612
  </xsl:if>
15082
14613
 
15083
14614
  <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
@@ -15093,9 +14624,7 @@
15093
14624
 
15094
14625
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
15095
14626
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
15096
-
15097
14627
  </fo:block>
15098
-
15099
14628
  </xsl:template> <!-- references -->
15100
14629
 
15101
14630
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -15105,42 +14634,39 @@
15105
14634
  <!-- Normative references -->
15106
14635
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
15107
14636
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
15108
-
15109
- <xsl:call-template name="setNamedDestination"/>
15110
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
15111
-
15112
- <xsl:call-template name="processBibitem"/>
15113
- </fo:block>
14637
+ <xsl:call-template name="setNamedDestination"/>
14638
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
14639
+ <xsl:call-template name="processBibitem"/>
14640
+ </fo:block>
15114
14641
 
15115
14642
  </xsl:template> <!-- bibitem -->
15116
14643
 
15117
14644
  <!-- Bibliography (non-normative references) -->
15118
14645
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
15119
14646
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
15120
-
15121
- <!-- start BIPM bibitem processing -->
15122
- <xsl:call-template name="setNamedDestination"/>
15123
- <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
15124
- <fo:list-item>
15125
- <fo:list-item-label end-indent="label-end()">
15126
- <fo:block>
15127
- <fo:inline>
15128
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
15129
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
15130
- </xsl:apply-templates>
15131
- </fo:inline>
15132
- </fo:block>
15133
- </fo:list-item-label>
15134
- <fo:list-item-body start-indent="body-start()">
15135
- <fo:block>
15136
- <xsl:call-template name="processBibitem">
15137
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
15138
- </xsl:call-template>
15139
- </fo:block>
15140
- </fo:list-item-body>
15141
- </fo:list-item>
15142
- </fo:list-block>
15143
- <!-- END BIPM bibitem processing -->
14647
+ <!-- start BIPM bibitem processing -->
14648
+ <xsl:call-template name="setNamedDestination"/>
14649
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
14650
+ <fo:list-item>
14651
+ <fo:list-item-label end-indent="label-end()">
14652
+ <fo:block>
14653
+ <fo:inline>
14654
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
14655
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
14656
+ </xsl:apply-templates>
14657
+ </fo:inline>
14658
+ </fo:block>
14659
+ </fo:list-item-label>
14660
+ <fo:list-item-body start-indent="body-start()">
14661
+ <fo:block>
14662
+ <xsl:call-template name="processBibitem">
14663
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
14664
+ </xsl:call-template>
14665
+ </fo:block>
14666
+ </fo:list-item-body>
14667
+ </fo:list-item>
14668
+ </fo:list-block>
14669
+ <!-- END BIPM bibitem processing -->
15144
14670
 
15145
14671
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
15146
14672
 
@@ -15150,7 +14676,6 @@
15150
14676
  <xsl:otherwise>
15151
14677
  <xsl:call-template name="setNamedDestination"/>
15152
14678
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
15153
-
15154
14679
  <fo:list-item-label end-indent="label-end()">
15155
14680
  <fo:block role="SKIP">
15156
14681
  <fo:inline role="SKIP">
@@ -15177,18 +14702,16 @@
15177
14702
 
15178
14703
  <xsl:template name="processBibitem">
15179
14704
  <xsl:param name="biblio_tag_part">both</xsl:param>
14705
+ <!-- start bibitem processing -->
14706
+ <xsl:if test=".//*[local-name() = 'fn']">
14707
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
14708
+ </xsl:if>
15180
14709
 
15181
- <!-- start bibitem processing -->
15182
- <xsl:if test=".//*[local-name() = 'fn']">
15183
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
15184
- </xsl:if>
15185
-
15186
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
15187
- <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
15188
- </xsl:apply-templates>
15189
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
15190
- <!-- end bibitem processing -->
15191
-
14710
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
14711
+ <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
14712
+ </xsl:apply-templates>
14713
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
14714
+ <!-- end bibitem processing -->
15192
14715
  </xsl:template> <!-- processBibitem (bibitem) -->
15193
14716
 
15194
14717
  <xsl:template match="*[local-name() = 'title']" mode="title">
@@ -15331,8 +14854,7 @@
15331
14854
  <xsl:choose>
15332
14855
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
15333
14856
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
15334
- <xsl:otherwise><!-- default value -->
15335
- 3
14857
+ <xsl:otherwise><!-- default value -->3
15336
14858
  </xsl:otherwise>
15337
14859
  </xsl:choose>
15338
14860
  </xsl:variable>
@@ -15540,27 +15062,21 @@
15540
15062
  <!-- ================ -->
15541
15063
  <!-- Admonition -->
15542
15064
  <!-- ================ -->
15543
- <xsl:template match="*[local-name() = 'admonition']">
15544
-
15545
- <!-- text in the box -->
15546
- <xsl:call-template name="setNamedDestination"/>
15547
- <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
15548
-
15549
- <xsl:call-template name="setBlockSpanAll"/>
15550
-
15551
- <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
15552
-
15553
- <fo:block xsl:use-attribute-sets="admonition-name-style">
15554
- <xsl:call-template name="displayAdmonitionName"/>
15555
- </fo:block>
15556
- <fo:block xsl:use-attribute-sets="admonition-p-style">
15557
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
15558
- </fo:block>
15559
-
15560
- </fo:block-container>
15065
+ <xsl:template match="*[local-name() = 'admonition']"> <!-- text in the box -->
15066
+ <xsl:call-template name="setNamedDestination"/>
15067
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
15561
15068
 
15562
- </fo:block-container>
15069
+ <xsl:call-template name="setBlockSpanAll"/>
15070
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
15071
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
15072
+ <xsl:call-template name="displayAdmonitionName"/>
15073
+ </fo:block>
15074
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
15075
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
15076
+ </fo:block>
15563
15077
 
15078
+ </fo:block-container>
15079
+ </fo:block-container>
15564
15080
  </xsl:template>
15565
15081
 
15566
15082
  <xsl:template name="displayAdmonitionName">
@@ -15608,12 +15124,10 @@
15608
15124
  </xsl:template> -->
15609
15125
 
15610
15126
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
15127
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
15611
15128
 
15612
- <fo:block xsl:use-attribute-sets="admonition-p-style">
15613
-
15614
- <xsl:apply-templates/>
15615
- </fo:block>
15616
-
15129
+ <xsl:apply-templates/>
15130
+ </fo:block>
15617
15131
  </xsl:template>
15618
15132
 
15619
15133
  <!-- ================ -->
@@ -15649,11 +15163,9 @@
15649
15163
 
15650
15164
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
15651
15165
  <xsl:variable name="updated_xml_step2">
15652
-
15653
- <xsl:if test="$table_if = 'false'">
15654
- <xsl:copy-of select="$updated_xml_step1"/>
15655
- </xsl:if>
15656
-
15166
+ <xsl:if test="$table_if = 'false'">
15167
+ <xsl:copy-of select="$updated_xml_step1"/>
15168
+ </xsl:if>
15657
15169
  </xsl:variable>
15658
15170
 
15659
15171
  <xsl:variable name="endTime2" select="java:getTime(java:java.util.Date.new())"/>
@@ -16128,7 +15640,6 @@
16128
15640
  </xsl:template>
16129
15641
 
16130
15642
  <xsl:template name="addNamedDestinationAttribute">
16131
-
16132
15643
  </xsl:template>
16133
15644
 
16134
15645
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -16623,7 +16134,6 @@
16623
16134
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
16624
16135
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
16625
16136
  <!-- if EXPRESS reference -->
16626
-
16627
16137
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
16628
16138
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
16629
16139
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -16677,8 +16187,7 @@
16677
16187
 
16678
16188
  <xsl:variable name="text2">
16679
16189
  <xsl:element name="text" namespace="{$namespace_full}">
16680
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
16681
- <xsl:copy-of select="."/>
16190
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
16682
16191
  </xsl:for-each>
16683
16192
  </xsl:element>
16684
16193
  </xsl:variable>
@@ -16970,9 +16479,7 @@
16970
16479
  </xsl:attribute>
16971
16480
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
16972
16481
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
16973
-
16974
- <xsl:value-of select="$skip_footnote_body_"/>
16975
-
16482
+ <xsl:value-of select="$skip_footnote_body_"/>
16976
16483
  </xsl:attribute>
16977
16484
  <xsl:attribute name="ref_id">
16978
16485
  <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
@@ -17061,7 +16568,6 @@
17061
16568
 
17062
16569
  <xsl:template name="printEdition">
17063
16570
  <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
17064
-
17065
16571
  <xsl:choose>
17066
16572
  <xsl:when test="$edition_i18n != ''">
17067
16573
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -17290,16 +16796,32 @@
17290
16796
  <dc:title>
17291
16797
  <xsl:variable name="title">
17292
16798
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
17293
-
17294
- <xsl:choose>
17295
- <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
17296
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
17297
- </xsl:when>
17298
- <xsl:otherwise>
17299
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
17300
- </xsl:otherwise>
17301
- </xsl:choose>
17302
-
16799
+ <xsl:choose>
16800
+ <xsl:when test="*[local-name() = 'title'][@language = $lang and @type = 'main']">
16801
+ <!-- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/> -->
16802
+ <xsl:variable name="bibdata_doctype" select="*[local-name() = 'ext']/*[local-name() = 'doctype']"/>
16803
+ <xsl:if test="$bibdata_doctype = 'amendment'">
16804
+ <xsl:variable name="bibdata_doctype_localized" select="*[local-name() = 'ext']/*[local-name() = 'doctype'][@language = $lang]"/>
16805
+ <xsl:variable name="bibdata_amendment_number" select="*[local-name() = 'ext']/*[local-name() = 'structuredidentifier']/*[local-name() = 'project-number']/@amendment"/>
16806
+ <xsl:value-of select="normalize-space(concat($bibdata_doctype_localized, ' ', $bibdata_amendment_number))"/>
16807
+ <xsl:text> — </xsl:text>
16808
+ </xsl:if>
16809
+ <xsl:variable name="partnumber" select="*[local-name() = 'ext']/*[local-name() = 'structuredidentifier']/*[local-name() = 'project-number']/@part"/>
16810
+ <xsl:for-each select="*[local-name() = 'title'][@language = $lang and @type = 'title-intro'] | *[local-name() = 'title'][@language = $lang and @type = 'title-main'] | *[local-name() = 'title'][@language = $lang and @type = 'title-complementary'] | *[local-name() = 'title'][@language = $lang and @type = 'title-part']">
16811
+ <xsl:if test="@type = 'title-part'">
16812
+ <xsl:call-template name="getLocalizedString"><xsl:with-param name="key">locality.part</xsl:with-param></xsl:call-template>
16813
+ <xsl:text> </xsl:text>
16814
+ <xsl:value-of select="$partnumber"/>
16815
+ <xsl:text>: </xsl:text>
16816
+ </xsl:if>
16817
+ <xsl:value-of select="."/>
16818
+ <xsl:if test="position() != last()"><xsl:text> — </xsl:text></xsl:if>
16819
+ </xsl:for-each>
16820
+ </xsl:when>
16821
+ <xsl:otherwise>
16822
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'title-main']"/>
16823
+ </xsl:otherwise>
16824
+ </xsl:choose>
17303
16825
  </xsl:for-each>
17304
16826
  </xsl:variable>
17305
16827
  <rdf:Alt>
@@ -17317,16 +16839,14 @@
17317
16839
  </dc:title>
17318
16840
  <xsl:variable name="dc_creator">
17319
16841
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
17320
-
17321
- <rdf:Seq>
17322
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
17323
- <rdf:li>
17324
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
17325
- </rdf:li>
17326
- <!-- <xsl:if test="position() != last()">; </xsl:if> -->
17327
- </xsl:for-each>
17328
- </rdf:Seq>
17329
-
16842
+ <rdf:Seq>
16843
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role'][not(*[local-name() = 'description'])]/@type='author']">
16844
+ <rdf:li>
16845
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
16846
+ </rdf:li>
16847
+ <!-- <xsl:if test="position() != last()">; </xsl:if> -->
16848
+ </xsl:for-each>
16849
+ </rdf:Seq>
17330
16850
  </xsl:for-each>
17331
16851
  </xsl:variable>
17332
16852
  <xsl:if test="normalize-space($dc_creator) != ''">
@@ -17337,9 +16857,7 @@
17337
16857
 
17338
16858
  <xsl:variable name="dc_description">
17339
16859
  <xsl:variable name="abstract">
17340
-
17341
- <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
17342
-
16860
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
17343
16861
  </xsl:variable>
17344
16862
  <rdf:Alt>
17345
16863
  <rdf:li xml:lang="x-default">
@@ -17404,7 +16922,9 @@
17404
16922
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
17405
16923
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
17406
16924
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
17407
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
16925
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
16926
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
16927
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
17408
16928
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
17409
16929
  <!-- Todo: need update -->
17410
16930
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -17569,7 +17089,7 @@
17569
17089
  <xsl:param name="normalize-space" select="'true'"/>
17570
17090
  <xsl:param name="keep_sep" select="'false'"/>
17571
17091
  <xsl:if test="string-length($pText) &gt;0">
17572
- <item>
17092
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
17573
17093
  <xsl:choose>
17574
17094
  <xsl:when test="$normalize-space = 'true'">
17575
17095
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -17578,8 +17098,8 @@
17578
17098
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
17579
17099
  </xsl:otherwise>
17580
17100
  </xsl:choose>
17581
- </item>
17582
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
17101
+ </xsl:element>
17102
+ <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><xsl:element name="item" namespace="{$namespace_mn_xsl}"><xsl:value-of select="$sep"/></xsl:element></xsl:if>
17583
17103
  <xsl:call-template name="split">
17584
17104
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
17585
17105
  <xsl:with-param name="sep" select="$sep"/>
@@ -17597,30 +17117,6 @@
17597
17117
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
17598
17118
  </xsl:template>
17599
17119
 
17600
- <xsl:template name="namespaceCheck">
17601
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
17602
- <xsl:variable name="XSLNS">
17603
-
17604
- <xsl:value-of select="document('')//*/namespace::bipm"/>
17605
-
17606
- </xsl:variable>
17607
- <!-- <xsl:if test="$documentNS != $XSLNS">
17608
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
17609
- </xsl:if> -->
17610
- </xsl:template> <!-- namespaceCheck -->
17611
-
17612
- <xsl:template name="getLanguage">
17613
- <xsl:param name="lang"/>
17614
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
17615
- <xsl:choose>
17616
- <xsl:when test="$language = 'en'">English</xsl:when>
17617
- <xsl:when test="$language = 'fr'">French</xsl:when>
17618
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
17619
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
17620
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
17621
- </xsl:choose>
17622
- </xsl:template>
17623
-
17624
17120
  <xsl:template name="setId">
17625
17121
  <xsl:param name="prefix"/>
17626
17122
  <xsl:attribute name="id">