metanorma-ieee 1.0.9 → 1.0.11

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.
@@ -872,160 +872,13 @@
872
872
  </xsl:for-each>
873
873
  </fo:block>
874
874
 
875
- <fo:block font-family="Arial" font-size="12pt" role="H1" font-weight="bold" margin-top="12pt" margin-bottom="24pt">
876
- <xsl:if test="$stage = 'published' or $stage = 'approved'">
877
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
878
- </xsl:if>
879
- <!-- Contents -->
880
- <xsl:call-template name="getLocalizedString">
881
- <xsl:with-param name="key">table_of_contents</xsl:with-param>
882
- </xsl:call-template>
883
- </fo:block>
884
-
885
- <fo:block role="TOC">
886
- <xsl:if test="$contents/doc[@num = $num]//item[@display = 'true']">
887
-
888
- <xsl:choose>
889
- <xsl:when test="$stage = 'draft'">
890
-
891
- <xsl:variable name="margin-left">4</xsl:variable>
892
-
893
- <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true']">
894
- <fo:block role="TOCI">
895
- <xsl:if test="@level = 1">
896
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
897
- </xsl:if>
898
-
899
- <fo:block text-align-last="justify">
900
- <xsl:attribute name="margin-left"><xsl:value-of select="$margin-left * (@level - 1)"/>mm</xsl:attribute>
901
- <xsl:if test="@type = 'annex'">
902
- <xsl:attribute name="font-weight">normal</xsl:attribute>
903
- </xsl:if>
904
-
905
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
906
-
907
- <xsl:value-of select="@section"/>
908
- <!-- <xsl:if test="normalize-space(@section) != '' and @level = 1">.</xsl:if> -->
909
- <xsl:if test="normalize-space(@section) != ''"><xsl:text> </xsl:text></xsl:if>
910
-
911
- <xsl:apply-templates select="title"/>
912
-
913
- <fo:inline keep-together.within-line="always">
914
- <fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
915
- <fo:inline>
916
- <fo:page-number-citation ref-id="{@id}"/>
917
- </fo:inline>
918
- </fo:inline>
919
-
920
- </fo:basic-link>
921
- </fo:block>
922
- </fo:block>
923
- </xsl:for-each>
924
-
925
- <!-- List of Tables -->
926
- <xsl:if test="$contents//tables/table">
927
- <xsl:call-template name="insertListOf_Title">
928
- <xsl:with-param name="title" select="$title-list-tables"/>
929
- </xsl:call-template>
930
- <xsl:for-each select="$contents//tables/table">
931
- <xsl:call-template name="insertListOf_Item"/>
932
- </xsl:for-each>
933
- </xsl:if>
934
-
935
- <!-- List of Figures -->
936
- <xsl:if test="$contents//figures/figure">
937
- <xsl:call-template name="insertListOf_Title">
938
- <xsl:with-param name="title" select="$title-list-figures"/>
939
- </xsl:call-template>
940
- <xsl:for-each select="$contents//figures/figure">
941
- <xsl:call-template name="insertListOf_Item"/>
942
- </xsl:for-each>
943
- </xsl:if>
944
-
945
- </xsl:when> <!-- $stage = 'draft' -->
946
-
947
- <xsl:when test="$stage = 'published' or $stage = 'approved'">
948
-
949
- <xsl:variable name="provisional-distance-between-starts">10</xsl:variable>
950
-
951
- <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true']">
952
-
953
- <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}mm" role="TOCI">
954
-
955
- <xsl:if test="@level = 1">
956
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
957
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
958
- </xsl:if>
959
-
960
- <xsl:attribute name="margin-left"><xsl:value-of select="$provisional-distance-between-starts * (@level - 1)"/>mm</xsl:attribute>
961
-
962
- <fo:list-item>
963
- <fo:list-item-label end-indent="label-end()">
964
- <fo:block>
965
- <xsl:value-of select="@section"/>
966
- </fo:block>
967
- </fo:list-item-label>
968
- <fo:list-item-body start-indent="body-start()">
969
- <fo:block text-align-last="justify">
970
-
971
- <xsl:if test="@type = 'annex'">
972
- <xsl:attribute name="font-weight">normal</xsl:attribute>
973
- <xsl:if test="@level = 1">
974
- <xsl:attribute name="margin-left">-<xsl:value-of select="$provisional-distance-between-starts"/>mm</xsl:attribute>
975
- </xsl:if>
976
- </xsl:if>
977
-
978
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
979
-
980
- <xsl:apply-templates select="title"/>
981
-
982
- <fo:inline keep-together.within-line="always">
983
- <fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
984
- <fo:inline>
985
- <fo:page-number-citation ref-id="{@id}"/>
986
- </fo:inline>
987
- </fo:inline>
988
-
989
- </fo:basic-link>
990
- </fo:block>
991
- </fo:list-item-body>
992
- </fo:list-item>
993
-
994
- </fo:list-block>
995
- </xsl:for-each>
996
-
997
- <!-- List of Figures -->
998
- <xsl:if test="$contents//figures/figure">
999
- <fo:block break-after="page"/>
1000
- <xsl:call-template name="insertListOf_Title">
1001
- <xsl:with-param name="title" select="'Figures'"/>
1002
- </xsl:call-template>
1003
- <xsl:for-each select="$contents//figures/figure">
1004
- <xsl:call-template name="insertListOf_Item"/>
1005
- </xsl:for-each>
1006
- </xsl:if>
1007
-
1008
- <!-- List of Tables -->
1009
- <xsl:if test="$contents//tables/table">
1010
- <fo:block break-after="page"/>
1011
- <xsl:call-template name="insertListOf_Title">
1012
- <xsl:with-param name="title" select="'Tables'"/>
1013
- </xsl:call-template>
1014
- <xsl:for-each select="$contents//tables/table">
1015
- <xsl:call-template name="insertListOf_Item"/>
1016
- </xsl:for-each>
1017
- </xsl:if>
1018
-
1019
- </xsl:when> <!-- $stage = 'published' or 'approved' -->
1020
- </xsl:choose>
1021
-
1022
- </xsl:if>
1023
-
1024
- </fo:block>
875
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() = 'clause'][@type = 'toc']">
876
+ <xsl:with-param name="num" select="$num"/>
877
+ </xsl:apply-templates>
1025
878
 
1026
879
  </fo:flow>
1027
880
  </fo:page-sequence>
1028
- </xsl:when> <!-- $stage = 'draft' -->
881
+ </xsl:when> <!-- 'standard' or 'draft' -->
1029
882
 
1030
883
  <xsl:when test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
1031
884
  <!-- TRADEMARKS AND DISCLAIMERS -->
@@ -1068,70 +921,11 @@
1068
921
  <fo:block-container margin-left="47mm" margin-top="10mm"> <!-- margin-top="27mm" -->
1069
922
 
1070
923
  <fo:block-container margin-left="0mm">
1071
- <fo:block role="TOC" font-size="10pt">
1072
- <xsl:if test="$contents/doc[@num = $num]//item[@display = 'true']">
1073
-
1074
- <xsl:variable name="margin-left">
1075
- <xsl:choose>
1076
- <xsl:when test="@level = 2">4.5mm</xsl:when>
1077
- <xsl:when test="@level &gt;= 3">7.5mm</xsl:when>
1078
- <xsl:otherwise>0mm</xsl:otherwise>
1079
- </xsl:choose>
1080
- </xsl:variable>
1081
-
1082
- <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true'][@level &lt;= $toc_level or @type = 'figure' or @type = 'table']">
1083
- <fo:block role="TOCI">
1084
- <xsl:if test="@level = 1">
1085
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1086
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1087
- </xsl:if>
1088
924
 
1089
- <xsl:if test="@type = 'figure' or @type = 'table' and preceding-sibling::item[1][@type = 'figure' or @type = 'table']">
1090
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
1091
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1092
- </xsl:if>
1093
-
1094
- <fo:block text-align-last="justify">
1095
- <xsl:attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</xsl:attribute>
1096
- <xsl:if test="@type = 'annex'">
1097
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1098
- </xsl:if>
1099
-
1100
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1101
-
1102
- <xsl:value-of select="@section"/>
1103
- <xsl:if test="normalize-space(@section) != ''"><xsl:text> </xsl:text></xsl:if>
1104
-
1105
- <xsl:variable name="section_title">
1106
- <xsl:apply-templates select="title"/>
1107
- </xsl:variable>
1108
-
1109
- <!-- DEBUG=<xsl:copy-of select="$title"/> -->
1110
-
1111
- <xsl:choose>
1112
- <xsl:when test="@level = 1">
1113
- <xsl:apply-templates select="xalan:nodeset($section_title)" mode="uppercase"/>
1114
- </xsl:when>
1115
- <xsl:otherwise>
1116
- <xsl:apply-templates select="xalan:nodeset($section_title)" mode="smallcaps"/>
1117
- </xsl:otherwise>
1118
- </xsl:choose>
1119
-
1120
- <fo:inline keep-together.within-line="always">
1121
- <fo:leader font-weight="normal" leader-pattern="dots"/>
1122
- <fo:inline>
1123
- <fo:page-number-citation ref-id="{@id}"/>
1124
- </fo:inline>
1125
- </fo:inline>
1126
-
1127
- </fo:basic-link>
1128
- </fo:block>
1129
- </fo:block>
1130
- </xsl:for-each>
1131
-
1132
- </xsl:if>
925
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() = 'clause'][@type = 'toc']">
926
+ <xsl:with-param name="num" select="$num"/>
927
+ </xsl:apply-templates>
1133
928
 
1134
- </fo:block>
1135
929
  </fo:block-container>
1136
930
  </fo:block-container>
1137
931
  </fo:flow>
@@ -1362,6 +1156,246 @@
1362
1156
  </fo:root>
1363
1157
  </xsl:template>
1364
1158
 
1159
+ <xsl:template match="ieee:preface/ieee:clause[@type = 'toc']" priority="3">
1160
+ <xsl:param name="num"/>
1161
+
1162
+ <xsl:apply-templates/>
1163
+
1164
+ <xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
1165
+ <fo:block role="TOC">
1166
+ <xsl:if test="$contents/doc[@num = $num]//item[@display = 'true']">
1167
+ <xsl:choose>
1168
+ <xsl:when test="$current_template = 'standard' or $current_template = 'draft'">
1169
+
1170
+ <xsl:choose>
1171
+ <xsl:when test="$stage = 'draft'">
1172
+
1173
+ <xsl:variable name="margin-left">4</xsl:variable>
1174
+
1175
+ <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true']">
1176
+ <fo:block role="TOCI">
1177
+ <xsl:if test="@level = 1">
1178
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1179
+ </xsl:if>
1180
+
1181
+ <fo:block text-align-last="justify">
1182
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-left * (@level - 1)"/>mm</xsl:attribute>
1183
+ <xsl:if test="@type = 'annex'">
1184
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1185
+ </xsl:if>
1186
+
1187
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1188
+
1189
+ <xsl:value-of select="@section"/>
1190
+ <!-- <xsl:if test="normalize-space(@section) != '' and @level = 1">.</xsl:if> -->
1191
+ <xsl:if test="normalize-space(@section) != ''"><xsl:text> </xsl:text></xsl:if>
1192
+
1193
+ <xsl:apply-templates select="title"/>
1194
+
1195
+ <fo:inline keep-together.within-line="always">
1196
+ <fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
1197
+ <fo:inline>
1198
+ <fo:page-number-citation ref-id="{@id}"/>
1199
+ </fo:inline>
1200
+ </fo:inline>
1201
+
1202
+ </fo:basic-link>
1203
+ </fo:block>
1204
+ </fo:block>
1205
+ </xsl:for-each>
1206
+
1207
+ <!-- List of Tables -->
1208
+ <xsl:if test="$contents//tables/table">
1209
+ <xsl:call-template name="insertListOf_Title">
1210
+ <xsl:with-param name="title" select="$title-list-tables"/>
1211
+ </xsl:call-template>
1212
+ <xsl:for-each select="$contents//tables/table">
1213
+ <xsl:call-template name="insertListOf_Item"/>
1214
+ </xsl:for-each>
1215
+ </xsl:if>
1216
+
1217
+ <!-- List of Figures -->
1218
+ <xsl:if test="$contents//figures/figure">
1219
+ <xsl:call-template name="insertListOf_Title">
1220
+ <xsl:with-param name="title" select="$title-list-figures"/>
1221
+ </xsl:call-template>
1222
+ <xsl:for-each select="$contents//figures/figure">
1223
+ <xsl:call-template name="insertListOf_Item"/>
1224
+ </xsl:for-each>
1225
+ </xsl:if>
1226
+
1227
+ </xsl:when> <!-- $stage = 'draft' -->
1228
+
1229
+ <xsl:when test="$stage = 'published' or $stage = 'approved'">
1230
+
1231
+ <xsl:variable name="provisional-distance-between-starts">10</xsl:variable>
1232
+
1233
+ <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true']">
1234
+
1235
+ <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}mm" role="TOCI">
1236
+
1237
+ <xsl:if test="@level = 1">
1238
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1239
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1240
+ </xsl:if>
1241
+
1242
+ <xsl:attribute name="margin-left"><xsl:value-of select="$provisional-distance-between-starts * (@level - 1)"/>mm</xsl:attribute>
1243
+
1244
+ <fo:list-item>
1245
+ <fo:list-item-label end-indent="label-end()">
1246
+ <fo:block>
1247
+ <xsl:value-of select="@section"/>
1248
+ </fo:block>
1249
+ </fo:list-item-label>
1250
+ <fo:list-item-body start-indent="body-start()">
1251
+ <fo:block text-align-last="justify">
1252
+
1253
+ <xsl:if test="@type = 'annex'">
1254
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1255
+ <xsl:if test="@level = 1">
1256
+ <xsl:attribute name="margin-left">-<xsl:value-of select="$provisional-distance-between-starts"/>mm</xsl:attribute>
1257
+ </xsl:if>
1258
+ </xsl:if>
1259
+
1260
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1261
+
1262
+ <xsl:apply-templates select="title"/>
1263
+
1264
+ <fo:inline keep-together.within-line="always">
1265
+ <fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
1266
+ <fo:inline>
1267
+ <fo:page-number-citation ref-id="{@id}"/>
1268
+ </fo:inline>
1269
+ </fo:inline>
1270
+
1271
+ </fo:basic-link>
1272
+ </fo:block>
1273
+ </fo:list-item-body>
1274
+ </fo:list-item>
1275
+
1276
+ </fo:list-block>
1277
+ </xsl:for-each>
1278
+
1279
+ <!-- List of Figures -->
1280
+ <xsl:if test="$contents//figures/figure">
1281
+ <fo:block break-after="page"/>
1282
+ <xsl:call-template name="insertListOf_Title">
1283
+ <xsl:with-param name="title" select="'Figures'"/>
1284
+ </xsl:call-template>
1285
+ <xsl:for-each select="$contents//figures/figure">
1286
+ <xsl:call-template name="insertListOf_Item"/>
1287
+ </xsl:for-each>
1288
+ </xsl:if>
1289
+
1290
+ <!-- List of Tables -->
1291
+ <xsl:if test="$contents//tables/table">
1292
+ <fo:block break-after="page"/>
1293
+ <xsl:call-template name="insertListOf_Title">
1294
+ <xsl:with-param name="title" select="'Tables'"/>
1295
+ </xsl:call-template>
1296
+ <xsl:for-each select="$contents//tables/table">
1297
+ <xsl:call-template name="insertListOf_Item"/>
1298
+ </xsl:for-each>
1299
+ </xsl:if>
1300
+
1301
+ </xsl:when> <!-- $stage = 'published' or 'approved' -->
1302
+ </xsl:choose>
1303
+
1304
+ </xsl:when> <!-- 'standard' or 'draft' -->
1305
+
1306
+ <xsl:when test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
1307
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1308
+
1309
+ <xsl:variable name="margin-left">
1310
+ <xsl:choose>
1311
+ <xsl:when test="@level = 2">4.5mm</xsl:when>
1312
+ <xsl:when test="@level &gt;= 3">7.5mm</xsl:when>
1313
+ <xsl:otherwise>0mm</xsl:otherwise>
1314
+ </xsl:choose>
1315
+ </xsl:variable>
1316
+
1317
+ <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true'][@level &lt;= $toc_level or @type = 'figure' or @type = 'table']">
1318
+ <fo:block role="TOCI">
1319
+ <xsl:if test="@level = 1">
1320
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1321
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1322
+ </xsl:if>
1323
+
1324
+ <xsl:if test="@type = 'figure' or @type = 'table' and preceding-sibling::item[1][@type = 'figure' or @type = 'table']">
1325
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
1326
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1327
+ </xsl:if>
1328
+
1329
+ <fo:block text-align-last="justify">
1330
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</xsl:attribute>
1331
+ <xsl:if test="@type = 'annex'">
1332
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1333
+ </xsl:if>
1334
+
1335
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1336
+
1337
+ <xsl:value-of select="@section"/>
1338
+ <xsl:if test="normalize-space(@section) != ''"><xsl:text> </xsl:text></xsl:if>
1339
+
1340
+ <xsl:variable name="section_title">
1341
+ <xsl:apply-templates select="title"/>
1342
+ </xsl:variable>
1343
+
1344
+ <!-- DEBUG=<xsl:copy-of select="$title"/> -->
1345
+
1346
+ <xsl:choose>
1347
+ <xsl:when test="@level = 1">
1348
+ <xsl:apply-templates select="xalan:nodeset($section_title)" mode="uppercase"/>
1349
+ </xsl:when>
1350
+ <xsl:otherwise>
1351
+ <xsl:apply-templates select="xalan:nodeset($section_title)" mode="smallcaps"/>
1352
+ </xsl:otherwise>
1353
+ </xsl:choose>
1354
+
1355
+ <fo:inline keep-together.within-line="always">
1356
+ <fo:leader font-weight="normal" leader-pattern="dots"/>
1357
+ <fo:inline>
1358
+ <fo:page-number-citation ref-id="{@id}"/>
1359
+ </fo:inline>
1360
+ </fo:inline>
1361
+
1362
+ </fo:basic-link>
1363
+ </fo:block>
1364
+ </fo:block>
1365
+ </xsl:for-each>
1366
+
1367
+ </xsl:when>
1368
+ </xsl:choose>
1369
+ </xsl:if>
1370
+ </fo:block>
1371
+ </xsl:if>
1372
+ </xsl:template>
1373
+
1374
+ <xsl:template match="ieee:preface/ieee:clause[@type = 'toc']/ieee:title" priority="3">
1375
+ <xsl:choose>
1376
+ <xsl:when test="$current_template = 'standard' or $current_template = 'draft'">
1377
+ <fo:block font-family="Arial" font-size="12pt" role="H1" font-weight="bold" margin-top="12pt" margin-bottom="24pt">
1378
+ <xsl:if test="$stage = 'published' or $stage = 'approved'">
1379
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1380
+ </xsl:if>
1381
+ <!-- Contents -->
1382
+ <!-- <xsl:call-template name="getLocalizedString">
1383
+ <xsl:with-param name="key">table_of_contents</xsl:with-param>
1384
+ </xsl:call-template> -->
1385
+ <xsl:apply-templates/>
1386
+ </fo:block>
1387
+ </xsl:when>
1388
+ <xsl:when test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
1389
+ </xsl:when>
1390
+ <xsl:otherwise>
1391
+ <fo:block font-family="Arial" font-size="12pt" role="H1" font-weight="bold" margin-top="12pt" margin-bottom="24pt">
1392
+ <xsl:apply-templates/>
1393
+ </fo:block>
1394
+ </xsl:otherwise>
1395
+ </xsl:choose>
1396
+
1397
+ </xsl:template>
1398
+
1365
1399
  <xsl:template match="ieee:boilerplate/ieee:copyright-statement//ieee:p" priority="2">
1366
1400
  <fo:block margin-top="6pt" margin-bottom="6pt" text-align="justify">
1367
1401
  <xsl:apply-templates/>
@@ -1755,6 +1789,7 @@
1755
1789
 
1756
1790
  <xsl:variable name="skip">
1757
1791
  <xsl:choose>
1792
+ <xsl:when test="@type = 'toc'">true</xsl:when>
1758
1793
  <xsl:when test="($current_template = 'standard' or $current_template = 'draft') and ancestor-or-self::ieee:preface">true</xsl:when> <!-- no need render preface sections in ToC -->
1759
1794
  <xsl:when test="ancestor-or-self::ieee:bibitem">true</xsl:when>
1760
1795
  <xsl:when test="ancestor-or-self::ieee:term">true</xsl:when>
@@ -1942,7 +1977,7 @@
1942
1977
  <!-- ignore processing (source STS is front/notes) -->
1943
1978
  </xsl:template>
1944
1979
 
1945
- <xsl:template match="ieee:foreword | ieee:foreword//ieee:clause | ieee:preface//ieee:clause[not(@type = 'corrigenda') and not(@type = 'related-refs')] | ieee:introduction | ieee:introduction//ieee:clause | ieee:sections//ieee:clause | ieee:annex | ieee:annex//ieee:clause | ieee:references | ieee:bibliography/ieee:clause | *[local-name()='sections']//*[local-name()='terms'] | *[local-name()='sections']//*[local-name()='definitions'] | *[local-name()='annex']//*[local-name()='definitions']" mode="flatxml" name="clause">
1980
+ <xsl:template match="ieee:foreword | ieee:foreword//ieee:clause | ieee:preface//ieee:clause[not(@type = 'corrigenda') and not(@type = 'related-refs') and not(@type = 'toc') ] | ieee:introduction | ieee:introduction//ieee:clause | ieee:sections//ieee:clause | ieee:annex | ieee:annex//ieee:clause | ieee:references | ieee:bibliography/ieee:clause | *[local-name()='sections']//*[local-name()='terms'] | *[local-name()='sections']//*[local-name()='definitions'] | *[local-name()='annex']//*[local-name()='definitions']" mode="flatxml" name="clause">
1946
1981
  <!-- From:
1947
1982
  <clause>
1948
1983
  <title>...</title>
@@ -4110,6 +4145,22 @@
4110
4145
 
4111
4146
  </xsl:attribute-set>
4112
4147
 
4148
+ <xsl:template name="refine_link-style">
4149
+
4150
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
4151
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
4152
+ <xsl:attribute name="text-decoration">none</xsl:attribute>
4153
+ </xsl:if>
4154
+ <xsl:if test="$current_template = 'standard'">
4155
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
4156
+ <xsl:attribute name="text-decoration">none</xsl:attribute>
4157
+ <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
4158
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4159
+ </xsl:if>
4160
+ </xsl:if>
4161
+
4162
+ </xsl:template> <!-- refine_link-style -->
4163
+
4113
4164
  <xsl:attribute-set name="sourcecode-container-style">
4114
4165
 
4115
4166
  </xsl:attribute-set>
@@ -4125,6 +4176,10 @@
4125
4176
 
4126
4177
  </xsl:attribute-set>
4127
4178
 
4179
+ <xsl:template name="refine_sourcecode-style">
4180
+
4181
+ </xsl:template> <!-- refine_sourcecode-style -->
4182
+
4128
4183
  <xsl:attribute-set name="pre-style">
4129
4184
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4130
4185
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -4212,6 +4267,10 @@
4212
4267
 
4213
4268
  </xsl:attribute-set> <!-- example-style -->
4214
4269
 
4270
+ <xsl:template name="refine_example-style">
4271
+
4272
+ </xsl:template> <!-- refine_example-style -->
4273
+
4215
4274
  <xsl:attribute-set name="example-body-style">
4216
4275
 
4217
4276
  </xsl:attribute-set> <!-- example-body-style -->
@@ -4228,6 +4287,14 @@
4228
4287
 
4229
4288
  </xsl:attribute-set> <!-- example-p-style -->
4230
4289
 
4290
+ <xsl:template name="refine_example-p-style">
4291
+
4292
+ <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])">
4293
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4294
+ </xsl:if>
4295
+
4296
+ </xsl:template> <!-- refine_example-p-style -->
4297
+
4231
4298
  <xsl:attribute-set name="termexample-name-style">
4232
4299
 
4233
4300
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -4262,6 +4329,21 @@
4262
4329
 
4263
4330
  </xsl:attribute-set> <!-- table-container-style -->
4264
4331
 
4332
+ <xsl:template name="refine_table-container-style">
4333
+ <xsl:param name="margin-side"/>
4334
+
4335
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
4336
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4337
+ </xsl:if>
4338
+ <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
4339
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
4340
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4341
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4342
+ </xsl:if>
4343
+
4344
+ <!-- end table block-container attributes -->
4345
+ </xsl:template> <!-- refine_table-container-style -->
4346
+
4265
4347
  <xsl:attribute-set name="table-style">
4266
4348
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
4267
4349
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
@@ -4270,6 +4352,20 @@
4270
4352
 
4271
4353
  </xsl:attribute-set><!-- table-style -->
4272
4354
 
4355
+ <xsl:template name="refine_table-style">
4356
+ <xsl:param name="margin-side"/>
4357
+
4358
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
4359
+ <xsl:attribute name="border">0.5 solid black</xsl:attribute>
4360
+ </xsl:if>
4361
+ <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
4362
+ <xsl:attribute name="border">none</xsl:attribute>
4363
+ </xsl:if>
4364
+
4365
+ <xsl:call-template name="setBordersTableArray"/>
4366
+
4367
+ </xsl:template> <!-- refine_table-style -->
4368
+
4273
4369
  <xsl:attribute-set name="table-name-style">
4274
4370
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4275
4371
 
@@ -4280,6 +4376,11 @@
4280
4376
 
4281
4377
  </xsl:attribute-set> <!-- table-name-style -->
4282
4378
 
4379
+ <xsl:template name="refine_table-name-style">
4380
+ <xsl:param name="continued"/>
4381
+
4382
+ </xsl:template> <!-- refine_table-name-style -->
4383
+
4283
4384
  <xsl:attribute-set name="table-row-style">
4284
4385
  <xsl:attribute name="min-height">4mm</xsl:attribute>
4285
4386
 
@@ -4290,14 +4391,41 @@
4290
4391
 
4291
4392
  </xsl:attribute-set>
4292
4393
 
4394
+ <xsl:template name="refine_table-header-row-style">
4395
+
4396
+ <xsl:call-template name="setBordersTableArray"/>
4397
+
4398
+ <xsl:if test="position() = last()">
4399
+ <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
4400
+ </xsl:if>
4401
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
4402
+ <xsl:attribute name="border-bottom">0.5 solid black</xsl:attribute>
4403
+ </xsl:if>
4404
+
4405
+ </xsl:template> <!-- refine_table-header-row-style -->
4406
+
4293
4407
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
4294
4408
 
4295
4409
  </xsl:attribute-set>
4296
4410
 
4411
+ <xsl:template name="refine_table-footer-row-style">
4412
+
4413
+ </xsl:template> <!-- refine_table-footer-row-style -->
4414
+
4297
4415
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
4298
4416
 
4299
4417
  </xsl:attribute-set>
4300
4418
 
4419
+ <xsl:template name="refine_table-body-row-style">
4420
+
4421
+ <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
4422
+ <xsl:attribute name="min-height">0mm</xsl:attribute>
4423
+ </xsl:if>
4424
+
4425
+ <xsl:call-template name="setBordersTableArray"/>
4426
+
4427
+ </xsl:template> <!-- refine_table-body-row-style -->
4428
+
4301
4429
  <xsl:attribute-set name="table-header-cell-style">
4302
4430
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4303
4431
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -4309,6 +4437,18 @@
4309
4437
 
4310
4438
  </xsl:attribute-set> <!-- table-header-cell-style -->
4311
4439
 
4440
+ <xsl:template name="refine_table-header-cell-style">
4441
+
4442
+ <xsl:call-template name="setBordersTableArray"/>
4443
+
4444
+ <xsl:if test="$lang = 'ar'">
4445
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
4446
+ </xsl:if>
4447
+
4448
+ <xsl:call-template name="setTableCellAttributes"/>
4449
+
4450
+ </xsl:template> <!-- refine_table-header-cell-style -->
4451
+
4312
4452
  <xsl:attribute-set name="table-cell-style">
4313
4453
  <xsl:attribute name="display-align">center</xsl:attribute>
4314
4454
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -4319,6 +4459,25 @@
4319
4459
 
4320
4460
  </xsl:attribute-set> <!-- table-cell-style -->
4321
4461
 
4462
+ <xsl:template name="refine_table-cell-style">
4463
+
4464
+ <xsl:if test="$lang = 'ar'">
4465
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
4466
+ </xsl:if>
4467
+
4468
+ <!-- bsi -->
4469
+
4470
+ <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
4471
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
4472
+ <xsl:attribute name="padding-top">0mm</xsl:attribute>
4473
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
4474
+ <xsl:attribute name="border">none</xsl:attribute>
4475
+ </xsl:if>
4476
+
4477
+ <xsl:call-template name="setBordersTableArray"/>
4478
+
4479
+ </xsl:template> <!-- refine_table-cell-style -->
4480
+
4322
4481
  <xsl:attribute-set name="table-footer-cell-style">
4323
4482
  <xsl:attribute name="border">solid black 1pt</xsl:attribute>
4324
4483
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -4329,6 +4488,10 @@
4329
4488
 
4330
4489
  </xsl:attribute-set> <!-- table-footer-cell-style -->
4331
4490
 
4491
+ <xsl:template name="refine_table-footer-cell-style">
4492
+
4493
+ </xsl:template> <!-- refine_table-footer-cell-style -->
4494
+
4332
4495
  <xsl:attribute-set name="table-note-style">
4333
4496
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4334
4497
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -4338,6 +4501,10 @@
4338
4501
 
4339
4502
  </xsl:attribute-set><!-- table-note-style -->
4340
4503
 
4504
+ <xsl:template name="refine_table-note-style">
4505
+
4506
+ </xsl:template> <!-- refine_table-note-style -->
4507
+
4341
4508
  <xsl:attribute-set name="table-fn-style">
4342
4509
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4343
4510
 
@@ -4402,6 +4569,10 @@
4402
4569
 
4403
4570
  </xsl:attribute-set>
4404
4571
 
4572
+ <xsl:template name="refine_dt-cell-style">
4573
+
4574
+ </xsl:template> <!-- refine_dt-cell-style -->
4575
+
4405
4576
  <xsl:attribute-set name="dt-block-style">
4406
4577
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
4407
4578
 
@@ -4410,6 +4581,10 @@
4410
4581
 
4411
4582
  </xsl:attribute-set>
4412
4583
 
4584
+ <xsl:template name="refine_dt-block-style">
4585
+
4586
+ </xsl:template> <!-- refine_dt-block-style -->
4587
+
4413
4588
  <xsl:attribute-set name="dl-name-style">
4414
4589
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4415
4590
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -4424,6 +4599,10 @@
4424
4599
 
4425
4600
  </xsl:attribute-set>
4426
4601
 
4602
+ <xsl:template name="refine_dd-cell-style">
4603
+
4604
+ </xsl:template> <!-- refine_dd-cell-style -->
4605
+
4427
4606
  <!-- ========================== -->
4428
4607
  <!-- END Definition's list styles -->
4429
4608
  <!-- ========================== -->
@@ -4450,6 +4629,17 @@
4450
4629
 
4451
4630
  </xsl:attribute-set>
4452
4631
 
4632
+ <xsl:template name="refine_eref-style">
4633
+ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
4634
+ <xsl:variable name="text" select="normalize-space()"/>
4635
+
4636
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
4637
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
4638
+ <xsl:attribute name="text-decoration">none</xsl:attribute>
4639
+ </xsl:if>
4640
+
4641
+ </xsl:template> <!-- refine_eref-style -->
4642
+
4453
4643
  <xsl:attribute-set name="note-style">
4454
4644
 
4455
4645
  <xsl:attribute name="font-size">9pt</xsl:attribute>
@@ -4459,6 +4649,10 @@
4459
4649
 
4460
4650
  </xsl:attribute-set>
4461
4651
 
4652
+ <xsl:template name="refine_note-style">
4653
+
4654
+ </xsl:template>
4655
+
4462
4656
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
4463
4657
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
4464
4658
 
@@ -4466,11 +4660,19 @@
4466
4660
 
4467
4661
  </xsl:attribute-set>
4468
4662
 
4663
+ <xsl:template name="refine_note-name-style">
4664
+
4665
+ </xsl:template> <!-- refine_note-name-style -->
4666
+
4469
4667
  <xsl:attribute-set name="table-note-name-style">
4470
4668
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
4471
4669
 
4472
4670
  </xsl:attribute-set>
4473
4671
 
4672
+ <xsl:template name="refine_table-note-name-style">
4673
+
4674
+ </xsl:template> <!-- refine_table-note-name-style -->
4675
+
4474
4676
  <xsl:attribute-set name="note-p-style">
4475
4677
 
4476
4678
  <xsl:attribute name="text-align">justify</xsl:attribute>
@@ -4486,10 +4688,20 @@
4486
4688
 
4487
4689
  </xsl:attribute-set>
4488
4690
 
4691
+ <xsl:template name="refine_termnote-style">
4692
+
4693
+ </xsl:template> <!-- refine_termnote-style -->
4694
+
4489
4695
  <xsl:attribute-set name="termnote-name-style">
4490
4696
 
4491
4697
  </xsl:attribute-set>
4492
4698
 
4699
+ <xsl:template name="refine_termnote-name-style">
4700
+
4701
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
4702
+
4703
+ </xsl:template>
4704
+
4493
4705
  <xsl:attribute-set name="termnote-p-style">
4494
4706
 
4495
4707
  </xsl:attribute-set>
@@ -4500,6 +4712,10 @@
4500
4712
 
4501
4713
  </xsl:attribute-set>
4502
4714
 
4715
+ <xsl:template name="refine_quote-style">
4716
+
4717
+ </xsl:template>
4718
+
4503
4719
  <xsl:attribute-set name="quote-source-style">
4504
4720
  <xsl:attribute name="text-align">right</xsl:attribute>
4505
4721
 
@@ -4509,6 +4725,10 @@
4509
4725
 
4510
4726
  </xsl:attribute-set>
4511
4727
 
4728
+ <xsl:template name="refine_termsource-style">
4729
+
4730
+ </xsl:template> <!-- refine_termsource-style -->
4731
+
4512
4732
  <xsl:attribute-set name="termsource-text-style">
4513
4733
 
4514
4734
  </xsl:attribute-set>
@@ -4548,6 +4768,15 @@
4548
4768
 
4549
4769
  </xsl:attribute-set>
4550
4770
 
4771
+ <xsl:template name="refine_figure-name-style">
4772
+
4773
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
4774
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
4775
+ <xsl:attribute name="font-family">Arial Black</xsl:attribute>
4776
+ </xsl:if>
4777
+
4778
+ </xsl:template> <!-- refine_figure-name-style -->
4779
+
4551
4780
  <xsl:attribute-set name="figure-source-style">
4552
4781
 
4553
4782
  </xsl:attribute-set>
@@ -4567,6 +4796,10 @@
4567
4796
 
4568
4797
  </xsl:attribute-set> <!-- formula-stem-block-style -->
4569
4798
 
4799
+ <xsl:template name="refine_formula-stem-block-style">
4800
+
4801
+ </xsl:template> <!-- refine_formula-stem-block-style -->
4802
+
4570
4803
  <xsl:attribute-set name="formula-stem-number-style">
4571
4804
  <xsl:attribute name="text-align">right</xsl:attribute>
4572
4805
 
@@ -4578,6 +4811,10 @@
4578
4811
 
4579
4812
  </xsl:attribute-set>
4580
4813
 
4814
+ <xsl:template name="refine_image-style">
4815
+
4816
+ </xsl:template>
4817
+
4581
4818
  <xsl:attribute-set name="figure-pseudocode-p-style">
4582
4819
 
4583
4820
  </xsl:attribute-set>
@@ -4664,6 +4901,10 @@
4664
4901
 
4665
4902
  </xsl:attribute-set>
4666
4903
 
4904
+ <xsl:template name="refine_mathml-style">
4905
+
4906
+ </xsl:template>
4907
+
4667
4908
  <xsl:attribute-set name="list-style">
4668
4909
 
4669
4910
  <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
@@ -4671,6 +4912,10 @@
4671
4912
 
4672
4913
  </xsl:attribute-set> <!-- list-style -->
4673
4914
 
4915
+ <xsl:template name="refine_list-style">
4916
+
4917
+ </xsl:template> <!-- refine_list-style -->
4918
+
4674
4919
  <xsl:attribute-set name="list-name-style">
4675
4920
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4676
4921
 
@@ -4683,14 +4928,34 @@
4683
4928
 
4684
4929
  </xsl:attribute-set>
4685
4930
 
4931
+ <xsl:template name="refine_list-item-style">
4932
+
4933
+ </xsl:template> <!-- refine_list-item-style -->
4934
+
4686
4935
  <xsl:attribute-set name="list-item-label-style">
4687
4936
 
4688
4937
  </xsl:attribute-set>
4689
4938
 
4939
+ <xsl:template name="refine_list-item-label-style">
4940
+
4941
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
4942
+ <xsl:attribute name="color">rgb(128,128,128)</xsl:attribute>
4943
+ <xsl:attribute name="line-height">1.1</xsl:attribute>
4944
+ <xsl:if test=".//ieee:fn">
4945
+ <xsl:attribute name="line-height">1.4</xsl:attribute>
4946
+ </xsl:if>
4947
+ </xsl:if>
4948
+
4949
+ </xsl:template> <!-- refine_list-item-label-style -->
4950
+
4690
4951
  <xsl:attribute-set name="list-item-body-style">
4691
4952
 
4692
4953
  </xsl:attribute-set>
4693
4954
 
4955
+ <xsl:template name="refine_list-item-body-style">
4956
+
4957
+ </xsl:template> <!-- refine_list-item-body-style -->
4958
+
4694
4959
  <xsl:attribute-set name="toc-style">
4695
4960
  <xsl:attribute name="line-height">135%</xsl:attribute>
4696
4961
  </xsl:attribute-set>
@@ -4701,6 +4966,10 @@
4701
4966
 
4702
4967
  </xsl:attribute-set>
4703
4968
 
4969
+ <xsl:template name="refine_fn-reference-style">
4970
+
4971
+ </xsl:template> <!-- refine_fn-reference-style -->
4972
+
4704
4973
  <xsl:attribute-set name="fn-style">
4705
4974
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4706
4975
  </xsl:attribute-set>
@@ -4724,6 +4993,15 @@
4724
4993
 
4725
4994
  </xsl:attribute-set>
4726
4995
 
4996
+ <xsl:template name="refine_fn-body-style">
4997
+
4998
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
4999
+ <xsl:attribute name="font-size">7pt</xsl:attribute>
5000
+ <xsl:attribute name="line-height">1.1</xsl:attribute>
5001
+ </xsl:if>
5002
+
5003
+ </xsl:template> <!-- refine_fn-body-style -->
5004
+
4727
5005
  <xsl:attribute-set name="fn-body-num-style">
4728
5006
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
4729
5007
 
@@ -4733,6 +5011,14 @@
4733
5011
 
4734
5012
  </xsl:attribute-set> <!-- fn-body-num-style -->
4735
5013
 
5014
+ <xsl:template name="refine_fn-body-num-style">
5015
+
5016
+ <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5017
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
5018
+ </xsl:if>
5019
+
5020
+ </xsl:template> <!-- refine_fn-body-num-style -->
5021
+
4736
5022
  <!-- admonition -->
4737
5023
  <xsl:attribute-set name="admonition-style">
4738
5024
 
@@ -5384,16 +5670,9 @@
5384
5670
 
5385
5671
  <fo:block-container xsl:use-attribute-sets="table-container-style">
5386
5672
 
5387
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5388
- <xsl:attribute name="font-size">10pt</xsl:attribute>
5389
- </xsl:if>
5390
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
5391
- <xsl:attribute name="font-size">inherit</xsl:attribute>
5392
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
5393
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5394
- </xsl:if>
5395
-
5396
- <!-- end table block-container attributes -->
5673
+ <xsl:call-template name="refine_table-container-style">
5674
+ <xsl:with-param name="margin-side" select="$margin-side"/>
5675
+ </xsl:call-template>
5397
5676
 
5398
5677
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
5399
5678
 
@@ -5421,14 +5700,9 @@
5421
5700
 
5422
5701
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
5423
5702
 
5424
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5425
- <xsl:attribute name="border">0.5 solid black</xsl:attribute>
5426
- </xsl:if>
5427
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
5428
- <xsl:attribute name="border">none</xsl:attribute>
5429
- </xsl:if>
5430
-
5431
- <xsl:call-template name="setBordersTableArray"/>
5703
+ <xsl:call-template name="refine_table-style">
5704
+ <xsl:with-param name="margin-side" select="$margin-side"/>
5705
+ </xsl:call-template>
5432
5706
 
5433
5707
  </xsl:element>
5434
5708
  </xsl:variable>
@@ -5494,7 +5768,7 @@
5494
5768
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5495
5769
  </xsl:when>
5496
5770
  <xsl:otherwise>
5497
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
5771
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
5498
5772
  </xsl:otherwise>
5499
5773
  </xsl:choose>
5500
5774
 
@@ -5947,6 +6221,8 @@
5947
6221
  <fo:table-row>
5948
6222
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
5949
6223
 
6224
+ <xsl:call-template name="refine_table-header-title-style"/>
6225
+
5950
6226
  <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5951
6227
  <xsl:attribute name="border-bottom">0.5 solid black</xsl:attribute>
5952
6228
  </xsl:if>
@@ -5966,6 +6242,10 @@
5966
6242
  </fo:table-row>
5967
6243
  </xsl:template> <!-- table-header-title -->
5968
6244
 
6245
+ <xsl:template name="refine_table-header-title-style">
6246
+
6247
+ </xsl:template> <!-- refine_table-header-title-style -->
6248
+
5969
6249
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
5970
6250
  <fo:table-body>
5971
6251
  <xsl:apply-templates/>
@@ -5990,7 +6270,7 @@
5990
6270
  <xsl:param name="colwidths"/>
5991
6271
  <xsl:param name="colgroup"/>
5992
6272
 
5993
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
6273
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
5994
6274
 
5995
6275
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5996
6276
 
@@ -6050,6 +6330,8 @@
6050
6330
  <fo:table-row>
6051
6331
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
6052
6332
 
6333
+ <xsl:call-template name="refine_table-footer-cell-style"/>
6334
+
6053
6335
  <xsl:call-template name="setBordersTableArray"/>
6054
6336
 
6055
6337
  <!-- fn will be processed inside 'note' processing -->
@@ -6058,6 +6340,7 @@
6058
6340
 
6059
6341
  <!-- except gb and bsi -->
6060
6342
 
6343
+ <xsl:apply-templates select="../*[local-name()='p']"/>
6061
6344
  <xsl:apply-templates select="../*[local-name()='dl']"/>
6062
6345
  <xsl:apply-templates select="../*[local-name()='note']"/>
6063
6346
  <xsl:apply-templates select="../*[local-name()='source']"/>
@@ -6231,14 +6514,7 @@
6231
6514
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
6232
6515
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
6233
6516
 
6234
- <xsl:call-template name="setBordersTableArray"/>
6235
-
6236
- <xsl:if test="position() = last()">
6237
- <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
6238
- </xsl:if>
6239
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
6240
- <xsl:attribute name="border-bottom">0.5 solid black</xsl:attribute>
6241
- </xsl:if>
6517
+ <xsl:call-template name="refine_table-header-row-style"/>
6242
6518
 
6243
6519
  <xsl:call-template name="setTableRowAttributes"/>
6244
6520
 
@@ -6272,6 +6548,8 @@
6272
6548
  <xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
6273
6549
  <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
6274
6550
 
6551
+ <xsl:call-template name="refine_table-footer-row-style"/>
6552
+
6275
6553
  <xsl:call-template name="setTableRowAttributes"/>
6276
6554
  <xsl:apply-templates/>
6277
6555
  </fo:table-row>
@@ -6285,13 +6563,10 @@
6285
6563
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6286
6564
  </xsl:if>
6287
6565
 
6288
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
6289
- <xsl:attribute name="min-height">0mm</xsl:attribute>
6290
- </xsl:if>
6291
-
6292
- <xsl:call-template name="setBordersTableArray"/>
6566
+ <xsl:call-template name="refine_table-body-row-style"/>
6293
6567
 
6294
6568
  <xsl:call-template name="setTableRowAttributes"/>
6569
+
6295
6570
  <xsl:apply-templates/>
6296
6571
  </fo:table-row>
6297
6572
  </xsl:template>
@@ -6310,13 +6585,7 @@
6310
6585
  <xsl:with-param name="default">center</xsl:with-param>
6311
6586
  </xsl:call-template>
6312
6587
 
6313
- <xsl:call-template name="setBordersTableArray"/>
6314
-
6315
- <xsl:if test="$lang = 'ar'">
6316
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
6317
- </xsl:if>
6318
-
6319
- <xsl:call-template name="setTableCellAttributes"/>
6588
+ <xsl:call-template name="refine_table-header-cell-style"/>
6320
6589
 
6321
6590
  <fo:block>
6322
6591
  <xsl:apply-templates/>
@@ -6356,22 +6625,9 @@
6356
6625
  <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
6357
6626
  <xsl:call-template name="setTextAlignment">
6358
6627
  <xsl:with-param name="default">left</xsl:with-param>
6359
- </xsl:call-template>
6360
-
6361
- <xsl:if test="$lang = 'ar'">
6362
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
6363
- </xsl:if>
6364
-
6365
- <!-- bsi -->
6366
-
6367
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
6368
- <xsl:attribute name="padding-left">0mm</xsl:attribute>
6369
- <xsl:attribute name="padding-top">0mm</xsl:attribute>
6370
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
6371
- <xsl:attribute name="border">none</xsl:attribute>
6372
- </xsl:if>
6628
+ </xsl:call-template>
6373
6629
 
6374
- <xsl:call-template name="setBordersTableArray"/>
6630
+ <xsl:call-template name="refine_table-cell-style"/>
6375
6631
 
6376
6632
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
6377
6633
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
@@ -6402,9 +6658,13 @@
6402
6658
 
6403
6659
  <fo:block xsl:use-attribute-sets="table-note-style">
6404
6660
 
6661
+ <xsl:call-template name="refine_table-note-style"/>
6662
+
6405
6663
  <!-- Table's note name (NOTE, for example) -->
6406
6664
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
6407
6665
 
6666
+ <xsl:call-template name="refine_table-note-name-style"/>
6667
+
6408
6668
  <xsl:apply-templates select="*[local-name() = 'name']"/>
6409
6669
 
6410
6670
  </fo:inline>
@@ -6432,6 +6692,14 @@
6432
6692
  <!-- list of footnotes to calculate actual footnotes number -->
6433
6693
  <xsl:variable name="p_fn_">
6434
6694
  <xsl:call-template name="get_fn_list"/>
6695
+ <!-- <xsl:choose>
6696
+ <xsl:when test="$namespace = 'jis'">
6697
+ <xsl:call-template name="get_fn_list_for_element"/>
6698
+ </xsl:when>
6699
+ <xsl:otherwise>
6700
+ <xsl:call-template name="get_fn_list"/>
6701
+ </xsl:otherwise>
6702
+ </xsl:choose> -->
6435
6703
  </xsl:variable>
6436
6704
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
6437
6705
 
@@ -6456,7 +6724,14 @@
6456
6724
 
6457
6725
  </xsl:variable>
6458
6726
 
6459
- <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
6727
+ <xsl:variable name="ref_id">
6728
+ <xsl:choose>
6729
+ <xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
6730
+ <xsl:otherwise>
6731
+ <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
6732
+ </xsl:otherwise>
6733
+ </xsl:choose>
6734
+ </xsl:variable>
6460
6735
  <xsl:variable name="footnote_inline">
6461
6736
  <fo:inline>
6462
6737
 
@@ -6479,9 +6754,13 @@
6479
6754
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
6480
6755
  </xsl:if>
6481
6756
 
6482
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
6483
- <xsl:value-of select="$current_fn_number_text"/>
6484
- </fo:basic-link>
6757
+ <xsl:call-template name="insert_basic_link">
6758
+ <xsl:with-param name="element">
6759
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
6760
+ <xsl:copy-of select="$current_fn_number_text"/>
6761
+ </fo:basic-link>
6762
+ </xsl:with-param>
6763
+ </xsl:call-template>
6485
6764
  </fo:inline>
6486
6765
  </xsl:variable>
6487
6766
 
@@ -6498,16 +6777,11 @@
6498
6777
 
6499
6778
  <fo:block xsl:use-attribute-sets="fn-body-style">
6500
6779
 
6501
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
6502
- <xsl:attribute name="font-size">7pt</xsl:attribute>
6503
- <xsl:attribute name="line-height">1.1</xsl:attribute>
6504
- </xsl:if>
6780
+ <xsl:call-template name="refine_fn-body-style"/>
6505
6781
 
6506
6782
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
6507
6783
 
6508
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
6509
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
6510
- </xsl:if>
6784
+ <xsl:call-template name="refine_fn-body-num-style"/>
6511
6785
 
6512
6786
  <xsl:value-of select="$current_fn_number_text"/>
6513
6787
  </fo:inline>
@@ -6560,6 +6834,28 @@
6560
6834
  </xsl:choose>
6561
6835
  </xsl:template>
6562
6836
 
6837
+ <xsl:template name="get_fn_list_for_element">
6838
+ <xsl:choose>
6839
+ <xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
6840
+ <fn gen_id="{generate-id(.)}">
6841
+ <xsl:copy-of select="@*"/>
6842
+ <xsl:copy-of select="node()"/>
6843
+ </fn>
6844
+ </xsl:when>
6845
+ <xsl:otherwise>
6846
+ <xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
6847
+ <xsl:variable name="element_id" select="@id"/>
6848
+ <xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
6849
+ <!-- copy unique fn -->
6850
+ <fn gen_id="{generate-id(.)}">
6851
+ <xsl:copy-of select="@*"/>
6852
+ <xsl:copy-of select="node()"/>
6853
+ </fn>
6854
+ </xsl:for-each>
6855
+ </xsl:for-each>
6856
+ </xsl:otherwise>
6857
+ </xsl:choose>
6858
+ </xsl:template>
6563
6859
  <!-- ============================ -->
6564
6860
  <!-- table's footnotes rendering -->
6565
6861
  <!-- ============================ -->
@@ -6734,6 +7030,8 @@
6734
7030
  <xsl:template match="*[local-name()='fn']">
6735
7031
  <fo:inline xsl:use-attribute-sets="fn-reference-style">
6736
7032
 
7033
+ <xsl:call-template name="refine_fn-reference-style"/>
7034
+
6737
7035
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
6738
7036
 
6739
7037
  <xsl:value-of select="@reference"/>
@@ -6823,14 +7121,18 @@
6823
7121
  <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
6824
7122
  <xsl:text> </xsl:text>
6825
7123
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
6826
- <xsl:text/>
6827
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
7124
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
7125
+ <xsl:text> </xsl:text>
7126
+ </xsl:if>
7127
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
6828
7128
  </fo:block>
6829
7129
 
6830
7130
  </xsl:when> <!-- END: only one component -->
6831
7131
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
6832
7132
  <fo:block margin-bottom="12pt" text-align="left">
6833
7133
 
7134
+ <xsl:call-template name="refine_dl_formula_where_style"/>
7135
+
6834
7136
  <!-- <xsl:variable name="title-where">
6835
7137
  <xsl:call-template name="getLocalizedString">
6836
7138
  <xsl:with-param name="key">where</xsl:with-param>
@@ -6844,6 +7146,8 @@
6844
7146
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
6845
7147
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
6846
7148
 
7149
+ <xsl:call-template name="refine_figure_key_style"/>
7150
+
6847
7151
  <xsl:variable name="title-key">
6848
7152
  <xsl:call-template name="getLocalizedString">
6849
7153
  <xsl:with-param name="key">key</xsl:with-param>
@@ -6858,12 +7162,16 @@
6858
7162
  <xsl:if test="$onlyOneComponent = 'false'">
6859
7163
  <fo:block>
6860
7164
 
7165
+ <xsl:call-template name="refine_multicomponent_style"/>
7166
+
6861
7167
  <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
6862
7168
  <xsl:attribute name="margin-top">0</xsl:attribute>
6863
7169
  </xsl:if>
6864
7170
 
6865
7171
  <fo:block>
6866
7172
 
7173
+ <xsl:call-template name="refine_multicomponent_block_style"/>
7174
+
6867
7175
  <xsl:apply-templates select="*[local-name() = 'name']">
6868
7176
  <xsl:with-param name="process">true</xsl:with-param>
6869
7177
  </xsl:apply-templates>
@@ -7021,6 +7329,24 @@
7021
7329
 
7022
7330
  </xsl:template> <!-- END: dl -->
7023
7331
 
7332
+ <xsl:template name="refine_dl_formula_where_style">
7333
+
7334
+ </xsl:template> <!-- refine_dl_formula_where_style -->
7335
+
7336
+ <xsl:template name="refine_figure_key_style">
7337
+
7338
+ </xsl:template> <!-- refine_figure_key_style -->
7339
+
7340
+ <xsl:template name="refine_multicomponent_style">
7341
+ <xsl:variable name="parent" select="local-name(..)"/>
7342
+
7343
+ </xsl:template> <!-- refine_multicomponent_style -->
7344
+
7345
+ <xsl:template name="refine_multicomponent_block_style">
7346
+ <xsl:variable name="parent" select="local-name(..)"/>
7347
+
7348
+ </xsl:template> <!-- refine_multicomponent_block_style -->
7349
+
7024
7350
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
7025
7351
  <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
7026
7352
 
@@ -7240,6 +7566,8 @@
7240
7566
 
7241
7567
  </xsl:if>
7242
7568
 
7569
+ <xsl:call-template name="refine_dt-cell-style"/>
7570
+
7243
7571
  <fo:block xsl:use-attribute-sets="dt-block-style">
7244
7572
  <xsl:copy-of select="@id"/>
7245
7573
 
@@ -7247,6 +7575,8 @@
7247
7575
  <xsl:attribute name="margin-top">0</xsl:attribute>
7248
7576
  </xsl:if>
7249
7577
 
7578
+ <xsl:call-template name="refine_dt-block-style"/>
7579
+
7250
7580
  <xsl:apply-templates>
7251
7581
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
7252
7582
  </xsl:apply-templates>
@@ -7266,6 +7596,8 @@
7266
7596
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
7267
7597
  </xsl:if>
7268
7598
 
7599
+ <xsl:call-template name="refine_dd-cell-style"/>
7600
+
7269
7601
  <fo:block>
7270
7602
 
7271
7603
  <xsl:if test="$isGenerateTableIF = 'true'">
@@ -7311,8 +7643,18 @@
7311
7643
  </xsl:if>
7312
7644
  </xsl:template>
7313
7645
 
7314
- <xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
7315
- <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
7646
+ <xsl:template match="*[local-name()='dd']/*" mode="inline">
7647
+ <xsl:variable name="is_inline_element_after_where">
7648
+ <xsl:if test="(local-name() = 'p') and not(preceding-sibling::node()[normalize-space() != ''])">true</xsl:if>
7649
+ </xsl:variable>
7650
+ <xsl:choose>
7651
+ <xsl:when test="$is_inline_element_after_where = 'true'">
7652
+ <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
7653
+ </xsl:when>
7654
+ <xsl:otherwise>
7655
+ <xsl:apply-templates select="."/>
7656
+ </xsl:otherwise>
7657
+ </xsl:choose>
7316
7658
  </xsl:template>
7317
7659
 
7318
7660
  <!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
@@ -7406,12 +7748,18 @@
7406
7748
  <xsl:param name="split_keep-within-line"/>
7407
7749
  <fo:inline font-weight="bold">
7408
7750
 
7751
+ <xsl:call-template name="refine_strong_style"/>
7752
+
7409
7753
  <xsl:apply-templates>
7410
7754
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
7411
7755
  </xsl:apply-templates>
7412
7756
  </fo:inline>
7413
7757
  </xsl:template>
7414
7758
 
7759
+ <xsl:template name="refine_strong_style">
7760
+
7761
+ </xsl:template>
7762
+
7415
7763
  <xsl:template match="*[local-name()='padding']">
7416
7764
  <fo:inline padding-right="{@value}"> </fo:inline>
7417
7765
  </xsl:template>
@@ -7878,7 +8226,10 @@
7878
8226
  </xsl:choose>
7879
8227
  </xsl:variable>
7880
8228
 
7881
- <xsl:value-of select="$text9"/>
8229
+ <!-- replace sequence #x200B and space TO space -->
8230
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
8231
+
8232
+ <xsl:value-of select="$text10"/>
7882
8233
  </xsl:template>
7883
8234
 
7884
8235
  <xsl:template name="add-zero-spaces-link-java">
@@ -8553,6 +8904,11 @@
8553
8904
 
8554
8905
  <fo:inline xsl:use-attribute-sets="mathml-style">
8555
8906
 
8907
+ <!-- DEBUG -->
8908
+ <!-- <xsl:copy-of select="ancestor::*[local-name() = 'stem']/@font-family"/> -->
8909
+
8910
+ <xsl:call-template name="refine_mathml-style"/>
8911
+
8556
8912
  <xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
8557
8913
  <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
8558
8914
  </xsl:if>
@@ -8659,6 +9015,8 @@
8659
9015
 
8660
9016
  <fo:instream-foreign-object fox:alt-text="Math">
8661
9017
 
9018
+ <xsl:call-template name="refine_mathml_insteam_object_style"/>
9019
+
8662
9020
  <!-- put MathML in Actual Text -->
8663
9021
  <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
8664
9022
  <xsl:attribute name="fox:actual-text">
@@ -8679,6 +9037,10 @@
8679
9037
  </fo:instream-foreign-object>
8680
9038
  </xsl:template>
8681
9039
 
9040
+ <xsl:template name="refine_mathml_insteam_object_style">
9041
+
9042
+ </xsl:template> <!-- refine_mathml_insteam_object_style -->
9043
+
8682
9044
  <xsl:template match="mathml:*" mode="mathml_actual_text">
8683
9045
  <!-- <xsl:text>a+b</xsl:text> -->
8684
9046
  <xsl:text>&lt;</xsl:text>
@@ -8742,6 +9104,79 @@
8742
9104
  <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
8743
9105
  </xsl:template>
8744
9106
 
9107
+ <!-- special case for:
9108
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
9109
+ <mstyle displaystyle="true">
9110
+ <msup>
9111
+ <mi color="#00000000">C</mi>
9112
+ <mtext>R</mtext>
9113
+ </msup>
9114
+ <msubsup>
9115
+ <mtext>C</mtext>
9116
+ <mi>n</mi>
9117
+ <mi>k</mi>
9118
+ </msubsup>
9119
+ </mstyle>
9120
+ </math>
9121
+ -->
9122
+ <xsl:template match="mathml:msup/mathml:mi[. = '‌' or . = ''][not(preceding-sibling::*)][following-sibling::mathml:mtext]" mode="mathml">
9123
+ <xsl:copy>
9124
+ <xsl:copy-of select="@*"/>
9125
+ <xsl:variable name="next_mtext" select="ancestor::mathml:msup/following-sibling::*[1][self::mathml:msubsup or self::mathml:msub or self::mathml:msup]/mathml:mtext"/>
9126
+ <xsl:if test="string-length($next_mtext) != ''">
9127
+ <xsl:attribute name="color">#00000000</xsl:attribute>
9128
+ </xsl:if>
9129
+ <xsl:apply-templates/>
9130
+ <xsl:value-of select="$next_mtext"/>
9131
+ </xsl:copy>
9132
+ </xsl:template>
9133
+
9134
+ <!-- special case for:
9135
+ <msup>
9136
+ <mtext/>
9137
+ <mn>1</mn>
9138
+ </msup>
9139
+ convert to (add mspace after mtext and enclose them into mrow):
9140
+ <msup>
9141
+ <mrow>
9142
+ <mtext/>
9143
+ <mspace height="1.47ex"/>
9144
+ </mrow>
9145
+ <mn>1</mn>
9146
+ </msup>
9147
+ -->
9148
+ <xsl:template match="mathml:msup/mathml:mtext[not(preceding-sibling::*)]" mode="mathml">
9149
+ <mathml:mrow>
9150
+ <xsl:copy-of select="."/>
9151
+ <mathml:mspace height="1.47ex"/>
9152
+ </mathml:mrow>
9153
+ </xsl:template>
9154
+
9155
+ <!-- add space around vertical line -->
9156
+ <xsl:template match="mathml:mo[normalize-space(text()) = '|']" mode="mathml">
9157
+ <xsl:copy>
9158
+ <xsl:apply-templates select="@*" mode="mathml"/>
9159
+ <xsl:if test="not(@lspace)">
9160
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
9161
+ </xsl:if>
9162
+ <xsl:if test="not(@rspace)">
9163
+ <xsl:attribute name="rspace">0.4em</xsl:attribute>
9164
+ </xsl:if>
9165
+ <xsl:apply-templates mode="mathml"/>
9166
+ </xsl:copy>
9167
+ </xsl:template>
9168
+
9169
+ <!-- decrease fontsize for 'Circled Times' char -->
9170
+ <xsl:template match="mathml:mo[normalize-space(text()) = '⊗']" mode="mathml">
9171
+ <xsl:copy>
9172
+ <xsl:apply-templates select="@*" mode="mathml"/>
9173
+ <xsl:if test="not(@fontsize)">
9174
+ <xsl:attribute name="fontsize">55%</xsl:attribute>
9175
+ </xsl:if>
9176
+ <xsl:apply-templates mode="mathml"/>
9177
+ </xsl:copy>
9178
+ </xsl:template>
9179
+
8745
9180
  <!-- Examples:
8746
9181
  <stem type="AsciiMath">x = 1</stem>
8747
9182
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -8750,6 +9185,8 @@
8750
9185
  <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
8751
9186
  <fo:inline xsl:use-attribute-sets="mathml-style">
8752
9187
 
9188
+ <xsl:call-template name="refine_mathml-style"/>
9189
+
8753
9190
  <xsl:choose>
8754
9191
  <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
8755
9192
  <xsl:otherwise>
@@ -8794,36 +9231,30 @@
8794
9231
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8795
9232
  </xsl:if>
8796
9233
 
8797
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
8798
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
8799
- <xsl:attribute name="text-decoration">none</xsl:attribute>
8800
- </xsl:if>
8801
- <xsl:if test="$current_template = 'standard'">
8802
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
8803
- <xsl:attribute name="text-decoration">none</xsl:attribute>
8804
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
8805
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
8806
- </xsl:if>
8807
- </xsl:if>
9234
+ <xsl:call-template name="refine_link-style"/>
8808
9235
 
8809
9236
  <xsl:choose>
8810
9237
  <xsl:when test="$target_text = ''">
8811
9238
  <xsl:apply-templates/>
8812
9239
  </xsl:when>
8813
9240
  <xsl:otherwise>
8814
- <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
8815
- <xsl:choose>
8816
- <xsl:when test="normalize-space(.) = ''">
8817
- <xsl:call-template name="add-zero-spaces-link-java">
8818
- <xsl:with-param name="text" select="$target_text"/>
8819
- </xsl:call-template>
8820
- </xsl:when>
8821
- <xsl:otherwise>
8822
- <!-- output text from <link>text</link> -->
8823
- <xsl:apply-templates/>
8824
- </xsl:otherwise>
8825
- </xsl:choose>
8826
- </fo:basic-link>
9241
+ <xsl:call-template name="insert_basic_link">
9242
+ <xsl:with-param name="element">
9243
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
9244
+ <xsl:choose>
9245
+ <xsl:when test="normalize-space(.) = ''">
9246
+ <xsl:call-template name="add-zero-spaces-link-java">
9247
+ <xsl:with-param name="text" select="$target_text"/>
9248
+ </xsl:call-template>
9249
+ </xsl:when>
9250
+ <xsl:otherwise>
9251
+ <!-- output text from <link>text</link> -->
9252
+ <xsl:apply-templates/>
9253
+ </xsl:otherwise>
9254
+ </xsl:choose>
9255
+ </fo:basic-link>
9256
+ </xsl:with-param>
9257
+ </xsl:call-template>
8827
9258
  </xsl:otherwise>
8828
9259
  </xsl:choose>
8829
9260
  </fo:inline>
@@ -8886,12 +9317,19 @@
8886
9317
  </xsl:template>
8887
9318
 
8888
9319
  <xsl:template match="*[local-name() = 'xref']">
8889
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
8890
- <xsl:if test="parent::*[local-name() = 'add']">
8891
- <xsl:call-template name="append_add-style"/>
8892
- </xsl:if>
8893
- <xsl:apply-templates/>
8894
- </fo:basic-link>
9320
+ <xsl:call-template name="insert_basic_link">
9321
+ <xsl:with-param name="element">
9322
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
9323
+ <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'])">
9324
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9325
+ </xsl:if>
9326
+ <xsl:if test="parent::*[local-name() = 'add']">
9327
+ <xsl:call-template name="append_add-style"/>
9328
+ </xsl:if>
9329
+ <xsl:apply-templates/>
9330
+ </fo:basic-link>
9331
+ </xsl:with-param>
9332
+ </xsl:call-template>
8895
9333
  </xsl:template>
8896
9334
 
8897
9335
  <!-- ====== -->
@@ -8946,6 +9384,8 @@
8946
9384
  <fo:table-cell display-align="center">
8947
9385
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
8948
9386
 
9387
+ <xsl:call-template name="refine_formula-stem-block-style"/>
9388
+
8949
9389
  <xsl:apply-templates/>
8950
9390
  </fo:block>
8951
9391
  </fo:table-cell>
@@ -8987,12 +9427,18 @@
8987
9427
 
8988
9428
  <xsl:call-template name="setBlockSpanAll"/>
8989
9429
 
9430
+ <xsl:call-template name="refine_note-style"/>
9431
+
8990
9432
  <fo:block-container margin-left="0mm" margin-right="0mm">
8991
9433
 
8992
9434
  <fo:block>
8993
9435
 
9436
+ <xsl:call-template name="refine_note_block_style"/>
9437
+
8994
9438
  <fo:inline xsl:use-attribute-sets="note-name-style">
8995
9439
 
9440
+ <xsl:call-template name="refine_note-name-style"/>
9441
+
8996
9442
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8997
9443
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8998
9444
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -9018,6 +9464,10 @@
9018
9464
 
9019
9465
  </xsl:template>
9020
9466
 
9467
+ <xsl:template name="refine_note_block_style">
9468
+
9469
+ </xsl:template>
9470
+
9021
9471
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
9022
9472
  <xsl:variable name="num"><xsl:number/></xsl:variable>
9023
9473
  <xsl:choose>
@@ -9039,13 +9489,15 @@
9039
9489
 
9040
9490
  <xsl:call-template name="setBlockSpanAll"/>
9041
9491
 
9492
+ <xsl:call-template name="refine_termnote-style"/>
9493
+
9042
9494
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
9043
9495
 
9044
9496
  <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
9045
9497
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
9046
9498
  </xsl:if>
9047
9499
 
9048
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
9500
+ <xsl:call-template name="refine_termnote-name-style"/>
9049
9501
 
9050
9502
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9051
9503
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
@@ -9220,6 +9672,8 @@
9220
9672
  <xsl:otherwise>
9221
9673
  <fo:block xsl:use-attribute-sets="image-style">
9222
9674
 
9675
+ <xsl:call-template name="refine_image-style"/>
9676
+
9223
9677
  <xsl:variable name="src">
9224
9678
  <xsl:call-template name="image_src"/>
9225
9679
  </xsl:variable>
@@ -9278,7 +9732,7 @@
9278
9732
  <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
9279
9733
  </xsl:when>
9280
9734
  <xsl:when test="not(starts-with(@src, 'data:'))">
9281
- <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
9735
+ <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
9282
9736
  </xsl:when>
9283
9737
  <xsl:otherwise>
9284
9738
  <xsl:value-of select="@src"/>
@@ -9300,7 +9754,7 @@
9300
9754
  </xsl:when>
9301
9755
  <xsl:when test="not(starts-with(@src, 'data:'))">
9302
9756
  <xsl:variable name="src">
9303
- <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
9757
+ <xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
9304
9758
  </xsl:variable>
9305
9759
  <xsl:variable name="file" select="java:java.io.File.new(@src)"/>
9306
9760
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
@@ -9686,15 +10140,19 @@
9686
10140
  <xsl:param name="dest"/>
9687
10141
  <fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
9688
10142
  <fo:block font-size="1pt">
9689
- <fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
9690
- <fo:inline-container inline-progression-dimension="100%">
9691
- <fo:block-container height="{$height - 1}px" width="100%">
9692
- <!-- DEBUG <xsl:if test="local-name()='polygon'">
9693
- <xsl:attribute name="background-color">magenta</xsl:attribute>
9694
- </xsl:if> -->
9695
- <fo:block> </fo:block></fo:block-container>
9696
- </fo:inline-container>
9697
- </fo:basic-link>
10143
+ <xsl:call-template name="insert_basic_link">
10144
+ <xsl:with-param name="element">
10145
+ <fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
10146
+ <fo:inline-container inline-progression-dimension="100%">
10147
+ <fo:block-container height="{$height - 1}px" width="100%">
10148
+ <!-- DEBUG <xsl:if test="local-name()='polygon'">
10149
+ <xsl:attribute name="background-color">magenta</xsl:attribute>
10150
+ </xsl:if> -->
10151
+ <fo:block> </fo:block></fo:block-container>
10152
+ </fo:inline-container>
10153
+ </fo:basic-link>
10154
+ </xsl:with-param>
10155
+ </xsl:call-template>
9698
10156
  </fo:block>
9699
10157
  </fo:block-container>
9700
10158
  </xsl:template>
@@ -10065,10 +10523,7 @@
10065
10523
  <xsl:if test="normalize-space() != ''">
10066
10524
  <fo:block xsl:use-attribute-sets="figure-name-style">
10067
10525
 
10068
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
10069
- <xsl:attribute name="font-size">inherit</xsl:attribute>
10070
- <xsl:attribute name="font-family">Arial Black</xsl:attribute>
10071
- </xsl:if>
10526
+ <xsl:call-template name="refine_figure-name-style"/>
10072
10527
 
10073
10528
  <xsl:apply-templates/>
10074
10529
  </fo:block>
@@ -10333,6 +10788,8 @@
10333
10788
  </xsl:attribute>
10334
10789
  </xsl:for-each>
10335
10790
 
10791
+ <xsl:call-template name="refine_sourcecode-style"/>
10792
+
10336
10793
  <!-- remove margin between rows in the table with sourcecode line numbers -->
10337
10794
  <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
10338
10795
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
@@ -11041,6 +11498,8 @@
11041
11498
 
11042
11499
  <xsl:call-template name="setBlockSpanAll"/>
11043
11500
 
11501
+ <xsl:call-template name="refine_example-style"/>
11502
+
11044
11503
  <xsl:variable name="fo_element">
11045
11504
  <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
11046
11505
  block
@@ -11168,9 +11627,7 @@
11168
11627
  </xsl:if>
11169
11628
  <fo:block xsl:use-attribute-sets="example-p-style">
11170
11629
 
11171
- <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])">
11172
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
11173
- </xsl:if>
11630
+ <xsl:call-template name="refine_example-p-style"/>
11174
11631
 
11175
11632
  <xsl:apply-templates/>
11176
11633
  </fo:block>
@@ -11188,6 +11645,7 @@
11188
11645
  </xsl:otherwise>
11189
11646
  </xsl:choose>
11190
11647
  </xsl:template> <!-- example/p -->
11648
+
11191
11649
  <!-- ====== -->
11192
11650
  <!-- ====== -->
11193
11651
 
@@ -11199,6 +11657,8 @@
11199
11657
  <xsl:template match="*[local-name() = 'termsource']" name="termsource">
11200
11658
  <fo:block xsl:use-attribute-sets="termsource-style">
11201
11659
 
11660
+ <xsl:call-template name="refine_termsource-style"/>
11661
+
11202
11662
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
11203
11663
  <xsl:variable name="termsource_text">
11204
11664
  <xsl:apply-templates/>
@@ -11251,14 +11711,18 @@
11251
11711
  </xsl:template>
11252
11712
 
11253
11713
  <xsl:template match="*[local-name() = 'origin']">
11254
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
11255
- <xsl:if test="normalize-space(@citeas) = ''">
11256
- <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
11257
- </xsl:if>
11258
- <fo:inline xsl:use-attribute-sets="origin-style">
11259
- <xsl:apply-templates/>
11260
- </fo:inline>
11261
- </fo:basic-link>
11714
+ <xsl:call-template name="insert_basic_link">
11715
+ <xsl:with-param name="element">
11716
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
11717
+ <xsl:if test="normalize-space(@citeas) = ''">
11718
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
11719
+ </xsl:if>
11720
+ <fo:inline xsl:use-attribute-sets="origin-style">
11721
+ <xsl:apply-templates/>
11722
+ </fo:inline>
11723
+ </fo:basic-link>
11724
+ </xsl:with-param>
11725
+ </xsl:call-template>
11262
11726
  </xsl:template>
11263
11727
 
11264
11728
  <!-- not using, see https://github.com/glossarist/iev-document/issues/23 -->
@@ -11310,6 +11774,8 @@
11310
11774
  <fo:block-container margin-left="0mm">
11311
11775
  <fo:block-container xsl:use-attribute-sets="quote-style">
11312
11776
 
11777
+ <xsl:call-template name="refine_quote-style"/>
11778
+
11313
11779
  <fo:block-container margin-left="0mm" margin-right="0mm">
11314
11780
  <fo:block role="BlockQuote">
11315
11781
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
@@ -11332,9 +11798,13 @@
11332
11798
  <xsl:if test="../*[local-name() = 'author']">
11333
11799
  <xsl:text>, </xsl:text>
11334
11800
  </xsl:if>
11335
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
11336
- <xsl:apply-templates/>
11337
- </fo:basic-link>
11801
+ <xsl:call-template name="insert_basic_link">
11802
+ <xsl:with-param name="element">
11803
+ <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
11804
+ <xsl:apply-templates/>
11805
+ </fo:basic-link>
11806
+ </xsl:with-param>
11807
+ </xsl:call-template>
11338
11808
  </xsl:template>
11339
11809
 
11340
11810
  <xsl:template match="*[local-name() = 'author']">
@@ -11380,33 +11850,33 @@
11380
11850
 
11381
11851
  </xsl:if>
11382
11852
 
11383
- <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
11384
- <xsl:variable name="text" select="normalize-space()"/>
11853
+ <xsl:call-template name="refine_eref-style"/>
11385
11854
 
11386
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
11387
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
11388
- <xsl:attribute name="text-decoration">none</xsl:attribute>
11389
- </xsl:if>
11855
+ <xsl:call-template name="insert_basic_link">
11856
+ <xsl:with-param name="element">
11857
+ <fo:basic-link fox:alt-text="{@citeas}">
11858
+ <xsl:if test="normalize-space(@citeas) = ''">
11859
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
11860
+ </xsl:if>
11861
+ <xsl:if test="@type = 'inline'">
11390
11862
 
11391
- <fo:basic-link fox:alt-text="{@citeas}">
11392
- <xsl:if test="normalize-space(@citeas) = ''">
11393
- <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
11394
- </xsl:if>
11395
- <xsl:if test="@type = 'inline'">
11863
+ <xsl:call-template name="refine_basic_link_style"/>
11396
11864
 
11397
- </xsl:if>
11865
+ </xsl:if>
11398
11866
 
11399
- <xsl:choose>
11400
- <xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
11401
- <xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
11402
- </xsl:when>
11403
- <xsl:otherwise>
11404
- <xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
11405
- </xsl:otherwise>
11406
- </xsl:choose>
11867
+ <xsl:choose>
11868
+ <xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
11869
+ <xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
11870
+ </xsl:when>
11871
+ <xsl:otherwise>
11872
+ <xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
11873
+ </xsl:otherwise>
11874
+ </xsl:choose>
11407
11875
 
11408
- <xsl:apply-templates/>
11409
- </fo:basic-link>
11876
+ <xsl:apply-templates/>
11877
+ </fo:basic-link>
11878
+ </xsl:with-param>
11879
+ </xsl:call-template>
11410
11880
 
11411
11881
  </fo:inline>
11412
11882
  </xsl:when>
@@ -11424,6 +11894,11 @@
11424
11894
  </xsl:otherwise>
11425
11895
  </xsl:choose>
11426
11896
  </xsl:template>
11897
+
11898
+ <xsl:template name="refine_basic_link_style">
11899
+
11900
+ </xsl:template> <!-- refine_basic_link_style -->
11901
+
11427
11902
  <!-- ====== -->
11428
11903
  <!-- END eref -->
11429
11904
  <!-- ====== -->
@@ -11564,11 +12039,17 @@
11564
12039
  <fo:block>
11565
12040
  <xsl:call-template name="setId"/>
11566
12041
 
12042
+ <xsl:call-template name="sections_element_style"/>
12043
+
11567
12044
  <xsl:apply-templates/>
11568
12045
  </fo:block>
11569
12046
 
11570
12047
  </xsl:template>
11571
12048
 
12049
+ <xsl:template name="sections_element_style">
12050
+
12051
+ </xsl:template> <!-- sections_element_style -->
12052
+
11572
12053
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11573
12054
  <fo:block break-after="page"/>
11574
12055
  <fo:block>
@@ -11583,10 +12064,16 @@
11583
12064
 
11584
12065
  <xsl:call-template name="setBlockSpanAll"/>
11585
12066
 
12067
+ <xsl:call-template name="refine_clause_style"/>
12068
+
11586
12069
  <xsl:apply-templates/>
11587
12070
  </fo:block>
11588
12071
  </xsl:template>
11589
12072
 
12073
+ <xsl:template name="refine_clause_style">
12074
+
12075
+ </xsl:template> <!-- refine_clause_style -->
12076
+
11590
12077
  <xsl:template match="*[local-name() = 'definitions']">
11591
12078
  <fo:block id="{@id}">
11592
12079
  <xsl:apply-templates/>
@@ -11599,10 +12086,16 @@
11599
12086
 
11600
12087
  <xsl:call-template name="setBlockSpanAll"/>
11601
12088
 
12089
+ <xsl:call-template name="refine_annex_style"/>
12090
+
11602
12091
  </fo:block>
11603
12092
  <xsl:apply-templates/>
11604
12093
  </xsl:template>
11605
12094
 
12095
+ <xsl:template name="refine_annex_style">
12096
+
12097
+ </xsl:template>
12098
+
11606
12099
  <xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11607
12100
  <!-- comment 2019-11-29 -->
11608
12101
  <!-- <fo:block font-weight="bold">Review:</fo:block>
@@ -11649,7 +12142,10 @@
11649
12142
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
11650
12143
 
11651
12144
  <xsl:template name="setULLabel">
11652
- <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
12145
+ <xsl:variable name="list_level__">
12146
+ <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
12147
+ </xsl:variable>
12148
+ <xsl:variable name="list_level_" select="number($list_level__)"/>
11653
12149
  <xsl:variable name="list_level">
11654
12150
  <xsl:choose>
11655
12151
  <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
@@ -11774,6 +12270,8 @@
11774
12270
  </xsl:choose>
11775
12271
  </xsl:attribute>
11776
12272
 
12273
+ <xsl:call-template name="refine_list_container_style"/>
12274
+
11777
12275
  <fo:block-container margin-left="0mm">
11778
12276
  <fo:block>
11779
12277
  <xsl:apply-templates select="." mode="list"/>
@@ -11782,13 +12280,19 @@
11782
12280
  </fo:block-container>
11783
12281
  </xsl:when>
11784
12282
  <xsl:otherwise>
11785
- <fo:block>
11786
- <xsl:apply-templates select="." mode="list"/>
11787
- </fo:block>
12283
+
12284
+ <fo:block>
12285
+ <xsl:apply-templates select="." mode="list"/>
12286
+ </fo:block>
12287
+
11788
12288
  </xsl:otherwise>
11789
12289
  </xsl:choose>
11790
12290
  </xsl:template>
11791
12291
 
12292
+ <xsl:template name="refine_list_container_style">
12293
+
12294
+ </xsl:template> <!-- refine_list_container_style -->
12295
+
11792
12296
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
11793
12297
 
11794
12298
  <xsl:apply-templates select="*[local-name() = 'name']">
@@ -11799,7 +12303,7 @@
11799
12303
 
11800
12304
  <xsl:variable name="provisional_distance_between_starts_">
11801
12305
  <attributes xsl:use-attribute-sets="list-style">
11802
-
12306
+ <xsl:call-template name="refine_list-style_provisional-distance-between-starts"/>
11803
12307
  </attributes>
11804
12308
  </xsl:variable>
11805
12309
  <xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
@@ -11835,6 +12339,8 @@
11835
12339
  <addon><xsl:value-of select="$addon"/></addon> -->
11836
12340
  </xsl:if>
11837
12341
 
12342
+ <xsl:call-template name="refine_list-style"/>
12343
+
11838
12344
  <xsl:if test="*[local-name() = 'name']">
11839
12345
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
11840
12346
  </xsl:if>
@@ -11847,6 +12353,10 @@
11847
12353
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
11848
12354
  </xsl:template>
11849
12355
 
12356
+ <xsl:template name="refine_list-style_provisional-distance-between-starts">
12357
+
12358
+ </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
12359
+
11850
12360
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
11851
12361
  <xsl:param name="process">false</xsl:param>
11852
12362
  <xsl:if test="$process = 'true'">
@@ -11860,17 +12370,12 @@
11860
12370
  <fo:list-item xsl:use-attribute-sets="list-item-style">
11861
12371
  <xsl:copy-of select="@id"/>
11862
12372
 
12373
+ <xsl:call-template name="refine_list-item-style"/>
12374
+
11863
12375
  <fo:list-item-label end-indent="label-end()">
11864
12376
  <fo:block xsl:use-attribute-sets="list-item-label-style">
11865
12377
 
11866
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
11867
- <xsl:attribute name="color">rgb(128,128,128)</xsl:attribute>
11868
- <xsl:attribute name="line-height">1.1</xsl:attribute>
11869
- <xsl:if test=".//ieee:fn">
11870
- <xsl:attribute name="line-height">1.4</xsl:attribute>
11871
- </xsl:if>
11872
-
11873
- </xsl:if>
12378
+ <xsl:call-template name="refine_list-item-label-style"/>
11874
12379
 
11875
12380
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
11876
12381
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -11878,11 +12383,14 @@
11878
12383
  </xsl:if>
11879
12384
 
11880
12385
  <xsl:call-template name="getListItemFormat"/>
12386
+
11881
12387
  </fo:block>
11882
12388
  </fo:list-item-label>
11883
12389
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
11884
12390
  <fo:block>
11885
12391
 
12392
+ <xsl:call-template name="refine_list-item-body-style"/>
12393
+
11886
12394
  <xsl:apply-templates/>
11887
12395
 
11888
12396
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
@@ -12200,6 +12708,7 @@
12200
12708
 
12201
12709
  <fo:block id="{@id}">
12202
12710
  <xsl:apply-templates/>
12711
+
12203
12712
  </fo:block>
12204
12713
  </xsl:template>
12205
12714
 
@@ -12217,6 +12726,7 @@
12217
12726
 
12218
12727
  <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
12219
12728
  <xsl:apply-templates/>
12729
+
12220
12730
  </fo:block>
12221
12731
 
12222
12732
  </xsl:template> <!-- references -->
@@ -12484,24 +12994,32 @@
12484
12994
  <xsl:for-each select="*[local-name() = 'tab']">
12485
12995
  <xsl:variable name="current_id" select="generate-id()"/>
12486
12996
  <fo:table-cell>
12487
- <fo:block>
12488
- <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
12489
- <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
12490
- <xsl:choose>
12491
- <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
12492
- <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
12493
- </xsl:choose>
12494
- </xsl:for-each>
12495
- </fo:basic-link>
12997
+ <fo:block line-height-shift-adjustment="disregard-shifts">
12998
+ <xsl:call-template name="insert_basic_link">
12999
+ <xsl:with-param name="element">
13000
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
13001
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
13002
+ <xsl:choose>
13003
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
13004
+ <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
13005
+ </xsl:choose>
13006
+ </xsl:for-each>
13007
+ </fo:basic-link>
13008
+ </xsl:with-param>
13009
+ </xsl:call-template>
12496
13010
  </fo:block>
12497
13011
  </fo:table-cell>
12498
13012
  </xsl:for-each>
12499
13013
  <!-- last column - for page numbers -->
12500
13014
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
12501
13015
  <fo:block>
12502
- <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
12503
- <fo:page-number-citation ref-id="{$target}"/>
12504
- </fo:basic-link>
13016
+ <xsl:call-template name="insert_basic_link">
13017
+ <xsl:with-param name="element">
13018
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
13019
+ <fo:page-number-citation ref-id="{$target}"/>
13020
+ </fo:basic-link>
13021
+ </xsl:with-param>
13022
+ </xsl:call-template>
12505
13023
  </fo:block>
12506
13024
  </fo:table-cell>
12507
13025
  </xsl:template>
@@ -12543,6 +13061,27 @@
12543
13061
  <!-- End Table of Contents (ToC) processing -->
12544
13062
  <!-- =================== -->
12545
13063
 
13064
+ <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
13065
+ <xsl:template name="insert_basic_link">
13066
+ <xsl:param name="element"/>
13067
+ <xsl:variable name="element_node" select="xalan:nodeset($element)"/>
13068
+ <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
13069
+ <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
13070
+ <xsl:choose>
13071
+ <xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
13072
+ <xsl:copy-of select="$element_node"/>
13073
+ </xsl:when>
13074
+ <xsl:otherwise>
13075
+ <fo:inline>
13076
+ <xsl:for-each select="$element_node/fo:basic-link/@*[local-name() != 'external-destination' and local-name() != 'internal-destination' and local-name() != 'alt-text']">
13077
+ <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
13078
+ </xsl:for-each>
13079
+ <xsl:copy-of select="$element_node/fo:basic-link/node()"/>
13080
+ </fo:inline>
13081
+ </xsl:otherwise>
13082
+ </xsl:choose>
13083
+ </xsl:template>
13084
+
12546
13085
  <xsl:template match="*[local-name() = 'variant-title']"/> <!-- [@type = 'sub'] -->
12547
13086
  <xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
12548
13087
  <fo:inline padding-right="5mm"> </fo:inline>
@@ -12808,6 +13347,9 @@
12808
13347
  </xsl:copy>
12809
13348
  </xsl:template>
12810
13349
 
13350
+ <!-- prevent empty thead processing in XSL-FO, remove it -->
13351
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'thead'][count(*) = 0]" mode="update_xml_step1"/>
13352
+
12811
13353
  <xsl:template name="add_id">
12812
13354
  <xsl:if test="not(@id)">
12813
13355
  <!-- add @id - first element with @id plus '_element_name' -->
@@ -13196,6 +13738,14 @@
13196
13738
  <xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
13197
13739
  <xsl:variable name="p_fn_">
13198
13740
  <xsl:call-template name="get_fn_list"/>
13741
+ <!-- <xsl:choose>
13742
+ <xsl:when test="$namespace = 'jis'">
13743
+ <xsl:call-template name="get_fn_list_for_element"/>
13744
+ </xsl:when>
13745
+ <xsl:otherwise>
13746
+ <xsl:call-template name="get_fn_list"/>
13747
+ </xsl:otherwise>
13748
+ </xsl:choose> -->
13199
13749
  </xsl:variable>
13200
13750
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
13201
13751
  <xsl:variable name="gen_id" select="generate-id(.)"/>
@@ -13210,8 +13760,14 @@
13210
13760
  <xsl:attribute name="current_fn_number">
13211
13761
  <xsl:value-of select="$current_fn_number"/>
13212
13762
  </xsl:attribute>
13763
+ <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
13213
13764
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
13214
- <xsl:value-of select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
13765
+
13766
+ <xsl:value-of select="$skip_footnote_body_"/>
13767
+
13768
+ </xsl:attribute>
13769
+ <xsl:attribute name="ref_id">
13770
+ <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
13215
13771
  </xsl:attribute>
13216
13772
  <xsl:apply-templates select="node()" mode="linear_xml"/>
13217
13773
  </xsl:copy>