metanorma-ieee 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
-
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
924
 
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
  <!-- ========================== -->
@@ -4437,7 +4616,6 @@
4437
4616
  </xsl:attribute-set>
4438
4617
 
4439
4618
  <xsl:attribute-set name="xref-style">
4440
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4441
4619
 
4442
4620
  <xsl:attribute name="color">blue</xsl:attribute>
4443
4621
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
@@ -4451,6 +4629,17 @@
4451
4629
 
4452
4630
  </xsl:attribute-set>
4453
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
+
4454
4643
  <xsl:attribute-set name="note-style">
4455
4644
 
4456
4645
  <xsl:attribute name="font-size">9pt</xsl:attribute>
@@ -4460,6 +4649,10 @@
4460
4649
 
4461
4650
  </xsl:attribute-set>
4462
4651
 
4652
+ <xsl:template name="refine_note-style">
4653
+
4654
+ </xsl:template>
4655
+
4463
4656
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
4464
4657
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
4465
4658
 
@@ -4467,11 +4660,19 @@
4467
4660
 
4468
4661
  </xsl:attribute-set>
4469
4662
 
4663
+ <xsl:template name="refine_note-name-style">
4664
+
4665
+ </xsl:template> <!-- refine_note-name-style -->
4666
+
4470
4667
  <xsl:attribute-set name="table-note-name-style">
4471
4668
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
4472
4669
 
4473
4670
  </xsl:attribute-set>
4474
4671
 
4672
+ <xsl:template name="refine_table-note-name-style">
4673
+
4674
+ </xsl:template> <!-- refine_table-note-name-style -->
4675
+
4475
4676
  <xsl:attribute-set name="note-p-style">
4476
4677
 
4477
4678
  <xsl:attribute name="text-align">justify</xsl:attribute>
@@ -4487,10 +4688,20 @@
4487
4688
 
4488
4689
  </xsl:attribute-set>
4489
4690
 
4691
+ <xsl:template name="refine_termnote-style">
4692
+
4693
+ </xsl:template> <!-- refine_termnote-style -->
4694
+
4490
4695
  <xsl:attribute-set name="termnote-name-style">
4491
4696
 
4492
4697
  </xsl:attribute-set>
4493
4698
 
4699
+ <xsl:template name="refine_termnote-name-style">
4700
+
4701
+ <xsl:attribute name="padding-right">0mm</xsl:attribute>
4702
+
4703
+ </xsl:template>
4704
+
4494
4705
  <xsl:attribute-set name="termnote-p-style">
4495
4706
 
4496
4707
  </xsl:attribute-set>
@@ -4501,6 +4712,10 @@
4501
4712
 
4502
4713
  </xsl:attribute-set>
4503
4714
 
4715
+ <xsl:template name="refine_quote-style">
4716
+
4717
+ </xsl:template>
4718
+
4504
4719
  <xsl:attribute-set name="quote-source-style">
4505
4720
  <xsl:attribute name="text-align">right</xsl:attribute>
4506
4721
 
@@ -4510,6 +4725,10 @@
4510
4725
 
4511
4726
  </xsl:attribute-set>
4512
4727
 
4728
+ <xsl:template name="refine_termsource-style">
4729
+
4730
+ </xsl:template> <!-- refine_termsource-style -->
4731
+
4513
4732
  <xsl:attribute-set name="termsource-text-style">
4514
4733
 
4515
4734
  </xsl:attribute-set>
@@ -4549,6 +4768,15 @@
4549
4768
 
4550
4769
  </xsl:attribute-set>
4551
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
+
4552
4780
  <xsl:attribute-set name="figure-source-style">
4553
4781
 
4554
4782
  </xsl:attribute-set>
@@ -4568,6 +4796,10 @@
4568
4796
 
4569
4797
  </xsl:attribute-set> <!-- formula-stem-block-style -->
4570
4798
 
4799
+ <xsl:template name="refine_formula-stem-block-style">
4800
+
4801
+ </xsl:template> <!-- refine_formula-stem-block-style -->
4802
+
4571
4803
  <xsl:attribute-set name="formula-stem-number-style">
4572
4804
  <xsl:attribute name="text-align">right</xsl:attribute>
4573
4805
 
@@ -4579,6 +4811,10 @@
4579
4811
 
4580
4812
  </xsl:attribute-set>
4581
4813
 
4814
+ <xsl:template name="refine_image-style">
4815
+
4816
+ </xsl:template>
4817
+
4582
4818
  <xsl:attribute-set name="figure-pseudocode-p-style">
4583
4819
 
4584
4820
  </xsl:attribute-set>
@@ -4665,6 +4901,10 @@
4665
4901
 
4666
4902
  </xsl:attribute-set>
4667
4903
 
4904
+ <xsl:template name="refine_mathml-style">
4905
+
4906
+ </xsl:template>
4907
+
4668
4908
  <xsl:attribute-set name="list-style">
4669
4909
 
4670
4910
  <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
@@ -4672,6 +4912,10 @@
4672
4912
 
4673
4913
  </xsl:attribute-set> <!-- list-style -->
4674
4914
 
4915
+ <xsl:template name="refine_list-style">
4916
+
4917
+ </xsl:template> <!-- refine_list-style -->
4918
+
4675
4919
  <xsl:attribute-set name="list-name-style">
4676
4920
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4677
4921
 
@@ -4684,14 +4928,34 @@
4684
4928
 
4685
4929
  </xsl:attribute-set>
4686
4930
 
4931
+ <xsl:template name="refine_list-item-style">
4932
+
4933
+ </xsl:template> <!-- refine_list-item-style -->
4934
+
4687
4935
  <xsl:attribute-set name="list-item-label-style">
4688
4936
 
4689
4937
  </xsl:attribute-set>
4690
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
+
4691
4951
  <xsl:attribute-set name="list-item-body-style">
4692
4952
 
4693
4953
  </xsl:attribute-set>
4694
4954
 
4955
+ <xsl:template name="refine_list-item-body-style">
4956
+
4957
+ </xsl:template> <!-- refine_list-item-body-style -->
4958
+
4695
4959
  <xsl:attribute-set name="toc-style">
4696
4960
  <xsl:attribute name="line-height">135%</xsl:attribute>
4697
4961
  </xsl:attribute-set>
@@ -4702,6 +4966,10 @@
4702
4966
 
4703
4967
  </xsl:attribute-set>
4704
4968
 
4969
+ <xsl:template name="refine_fn-reference-style">
4970
+
4971
+ </xsl:template> <!-- refine_fn-reference-style -->
4972
+
4705
4973
  <xsl:attribute-set name="fn-style">
4706
4974
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4707
4975
  </xsl:attribute-set>
@@ -4725,6 +4993,15 @@
4725
4993
 
4726
4994
  </xsl:attribute-set>
4727
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
+
4728
5005
  <xsl:attribute-set name="fn-body-num-style">
4729
5006
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
4730
5007
 
@@ -4734,6 +5011,14 @@
4734
5011
 
4735
5012
  </xsl:attribute-set> <!-- fn-body-num-style -->
4736
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
+
4737
5022
  <!-- admonition -->
4738
5023
  <xsl:attribute-set name="admonition-style">
4739
5024
 
@@ -5385,16 +5670,9 @@
5385
5670
 
5386
5671
  <fo:block-container xsl:use-attribute-sets="table-container-style">
5387
5672
 
5388
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5389
- <xsl:attribute name="font-size">10pt</xsl:attribute>
5390
- </xsl:if>
5391
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
5392
- <xsl:attribute name="font-size">inherit</xsl:attribute>
5393
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
5394
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5395
- </xsl:if>
5396
-
5397
- <!-- 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>
5398
5676
 
5399
5677
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
5400
5678
 
@@ -5422,14 +5700,9 @@
5422
5700
 
5423
5701
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
5424
5702
 
5425
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5426
- <xsl:attribute name="border">0.5 solid black</xsl:attribute>
5427
- </xsl:if>
5428
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
5429
- <xsl:attribute name="border">none</xsl:attribute>
5430
- </xsl:if>
5431
-
5432
- <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>
5433
5706
 
5434
5707
  </xsl:element>
5435
5708
  </xsl:variable>
@@ -5495,7 +5768,7 @@
5495
5768
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5496
5769
  </xsl:when>
5497
5770
  <xsl:otherwise>
5498
- <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 -->
5499
5772
  </xsl:otherwise>
5500
5773
  </xsl:choose>
5501
5774
 
@@ -5948,6 +6221,8 @@
5948
6221
  <fo:table-row>
5949
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">
5950
6223
 
6224
+ <xsl:call-template name="refine_table-header-title-style"/>
6225
+
5951
6226
  <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
5952
6227
  <xsl:attribute name="border-bottom">0.5 solid black</xsl:attribute>
5953
6228
  </xsl:if>
@@ -5967,6 +6242,10 @@
5967
6242
  </fo:table-row>
5968
6243
  </xsl:template> <!-- table-header-title -->
5969
6244
 
6245
+ <xsl:template name="refine_table-header-title-style">
6246
+
6247
+ </xsl:template> <!-- refine_table-header-title-style -->
6248
+
5970
6249
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
5971
6250
  <fo:table-body>
5972
6251
  <xsl:apply-templates/>
@@ -5991,7 +6270,7 @@
5991
6270
  <xsl:param name="colwidths"/>
5992
6271
  <xsl:param name="colgroup"/>
5993
6272
 
5994
- <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']"/>
5995
6274
 
5996
6275
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
5997
6276
 
@@ -6051,6 +6330,8 @@
6051
6330
  <fo:table-row>
6052
6331
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
6053
6332
 
6333
+ <xsl:call-template name="refine_table-footer-cell-style"/>
6334
+
6054
6335
  <xsl:call-template name="setBordersTableArray"/>
6055
6336
 
6056
6337
  <!-- fn will be processed inside 'note' processing -->
@@ -6059,6 +6340,7 @@
6059
6340
 
6060
6341
  <!-- except gb and bsi -->
6061
6342
 
6343
+ <xsl:apply-templates select="../*[local-name()='p']"/>
6062
6344
  <xsl:apply-templates select="../*[local-name()='dl']"/>
6063
6345
  <xsl:apply-templates select="../*[local-name()='note']"/>
6064
6346
  <xsl:apply-templates select="../*[local-name()='source']"/>
@@ -6232,14 +6514,7 @@
6232
6514
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
6233
6515
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
6234
6516
 
6235
- <xsl:call-template name="setBordersTableArray"/>
6236
-
6237
- <xsl:if test="position() = last()">
6238
- <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
6239
- </xsl:if>
6240
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
6241
- <xsl:attribute name="border-bottom">0.5 solid black</xsl:attribute>
6242
- </xsl:if>
6517
+ <xsl:call-template name="refine_table-header-row-style"/>
6243
6518
 
6244
6519
  <xsl:call-template name="setTableRowAttributes"/>
6245
6520
 
@@ -6273,6 +6548,8 @@
6273
6548
  <xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
6274
6549
  <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
6275
6550
 
6551
+ <xsl:call-template name="refine_table-footer-row-style"/>
6552
+
6276
6553
  <xsl:call-template name="setTableRowAttributes"/>
6277
6554
  <xsl:apply-templates/>
6278
6555
  </fo:table-row>
@@ -6286,13 +6563,10 @@
6286
6563
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6287
6564
  </xsl:if>
6288
6565
 
6289
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
6290
- <xsl:attribute name="min-height">0mm</xsl:attribute>
6291
- </xsl:if>
6292
-
6293
- <xsl:call-template name="setBordersTableArray"/>
6566
+ <xsl:call-template name="refine_table-body-row-style"/>
6294
6567
 
6295
6568
  <xsl:call-template name="setTableRowAttributes"/>
6569
+
6296
6570
  <xsl:apply-templates/>
6297
6571
  </fo:table-row>
6298
6572
  </xsl:template>
@@ -6311,13 +6585,7 @@
6311
6585
  <xsl:with-param name="default">center</xsl:with-param>
6312
6586
  </xsl:call-template>
6313
6587
 
6314
- <xsl:call-template name="setBordersTableArray"/>
6315
-
6316
- <xsl:if test="$lang = 'ar'">
6317
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
6318
- </xsl:if>
6319
-
6320
- <xsl:call-template name="setTableCellAttributes"/>
6588
+ <xsl:call-template name="refine_table-header-cell-style"/>
6321
6589
 
6322
6590
  <fo:block>
6323
6591
  <xsl:apply-templates/>
@@ -6359,20 +6627,7 @@
6359
6627
  <xsl:with-param name="default">left</xsl:with-param>
6360
6628
  </xsl:call-template>
6361
6629
 
6362
- <xsl:if test="$lang = 'ar'">
6363
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
6364
- </xsl:if>
6365
-
6366
- <!-- bsi -->
6367
-
6368
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
6369
- <xsl:attribute name="padding-left">0mm</xsl:attribute>
6370
- <xsl:attribute name="padding-top">0mm</xsl:attribute>
6371
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
6372
- <xsl:attribute name="border">none</xsl:attribute>
6373
- </xsl:if>
6374
-
6375
- <xsl:call-template name="setBordersTableArray"/>
6630
+ <xsl:call-template name="refine_table-cell-style"/>
6376
6631
 
6377
6632
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
6378
6633
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
@@ -6403,9 +6658,13 @@
6403
6658
 
6404
6659
  <fo:block xsl:use-attribute-sets="table-note-style">
6405
6660
 
6661
+ <xsl:call-template name="refine_table-note-style"/>
6662
+
6406
6663
  <!-- Table's note name (NOTE, for example) -->
6407
6664
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
6408
6665
 
6666
+ <xsl:call-template name="refine_table-note-name-style"/>
6667
+
6409
6668
  <xsl:apply-templates select="*[local-name() = 'name']"/>
6410
6669
 
6411
6670
  </fo:inline>
@@ -6433,6 +6692,14 @@
6433
6692
  <!-- list of footnotes to calculate actual footnotes number -->
6434
6693
  <xsl:variable name="p_fn_">
6435
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> -->
6436
6703
  </xsl:variable>
6437
6704
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
6438
6705
 
@@ -6457,7 +6724,14 @@
6457
6724
 
6458
6725
  </xsl:variable>
6459
6726
 
6460
- <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>
6461
6735
  <xsl:variable name="footnote_inline">
6462
6736
  <fo:inline>
6463
6737
 
@@ -6483,7 +6757,7 @@
6483
6757
  <xsl:call-template name="insert_basic_link">
6484
6758
  <xsl:with-param name="element">
6485
6759
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
6486
- <xsl:value-of select="$current_fn_number_text"/>
6760
+ <xsl:copy-of select="$current_fn_number_text"/>
6487
6761
  </fo:basic-link>
6488
6762
  </xsl:with-param>
6489
6763
  </xsl:call-template>
@@ -6503,16 +6777,11 @@
6503
6777
 
6504
6778
  <fo:block xsl:use-attribute-sets="fn-body-style">
6505
6779
 
6506
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
6507
- <xsl:attribute name="font-size">7pt</xsl:attribute>
6508
- <xsl:attribute name="line-height">1.1</xsl:attribute>
6509
- </xsl:if>
6780
+ <xsl:call-template name="refine_fn-body-style"/>
6510
6781
 
6511
6782
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
6512
6783
 
6513
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
6514
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
6515
- </xsl:if>
6784
+ <xsl:call-template name="refine_fn-body-num-style"/>
6516
6785
 
6517
6786
  <xsl:value-of select="$current_fn_number_text"/>
6518
6787
  </fo:inline>
@@ -6565,6 +6834,28 @@
6565
6834
  </xsl:choose>
6566
6835
  </xsl:template>
6567
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>
6568
6859
  <!-- ============================ -->
6569
6860
  <!-- table's footnotes rendering -->
6570
6861
  <!-- ============================ -->
@@ -6739,6 +7030,8 @@
6739
7030
  <xsl:template match="*[local-name()='fn']">
6740
7031
  <fo:inline xsl:use-attribute-sets="fn-reference-style">
6741
7032
 
7033
+ <xsl:call-template name="refine_fn-reference-style"/>
7034
+
6742
7035
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
6743
7036
 
6744
7037
  <xsl:value-of select="@reference"/>
@@ -6838,6 +7131,8 @@
6838
7131
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
6839
7132
  <fo:block margin-bottom="12pt" text-align="left">
6840
7133
 
7134
+ <xsl:call-template name="refine_dl_formula_where_style"/>
7135
+
6841
7136
  <!-- <xsl:variable name="title-where">
6842
7137
  <xsl:call-template name="getLocalizedString">
6843
7138
  <xsl:with-param name="key">where</xsl:with-param>
@@ -6851,6 +7146,8 @@
6851
7146
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
6852
7147
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
6853
7148
 
7149
+ <xsl:call-template name="refine_figure_key_style"/>
7150
+
6854
7151
  <xsl:variable name="title-key">
6855
7152
  <xsl:call-template name="getLocalizedString">
6856
7153
  <xsl:with-param name="key">key</xsl:with-param>
@@ -6865,12 +7162,16 @@
6865
7162
  <xsl:if test="$onlyOneComponent = 'false'">
6866
7163
  <fo:block>
6867
7164
 
7165
+ <xsl:call-template name="refine_multicomponent_style"/>
7166
+
6868
7167
  <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
6869
7168
  <xsl:attribute name="margin-top">0</xsl:attribute>
6870
7169
  </xsl:if>
6871
7170
 
6872
7171
  <fo:block>
6873
7172
 
7173
+ <xsl:call-template name="refine_multicomponent_block_style"/>
7174
+
6874
7175
  <xsl:apply-templates select="*[local-name() = 'name']">
6875
7176
  <xsl:with-param name="process">true</xsl:with-param>
6876
7177
  </xsl:apply-templates>
@@ -7028,6 +7329,24 @@
7028
7329
 
7029
7330
  </xsl:template> <!-- END: dl -->
7030
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
+
7031
7350
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
7032
7351
  <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
7033
7352
 
@@ -7247,6 +7566,8 @@
7247
7566
 
7248
7567
  </xsl:if>
7249
7568
 
7569
+ <xsl:call-template name="refine_dt-cell-style"/>
7570
+
7250
7571
  <fo:block xsl:use-attribute-sets="dt-block-style">
7251
7572
  <xsl:copy-of select="@id"/>
7252
7573
 
@@ -7254,6 +7575,8 @@
7254
7575
  <xsl:attribute name="margin-top">0</xsl:attribute>
7255
7576
  </xsl:if>
7256
7577
 
7578
+ <xsl:call-template name="refine_dt-block-style"/>
7579
+
7257
7580
  <xsl:apply-templates>
7258
7581
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
7259
7582
  </xsl:apply-templates>
@@ -7273,6 +7596,8 @@
7273
7596
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
7274
7597
  </xsl:if>
7275
7598
 
7599
+ <xsl:call-template name="refine_dd-cell-style"/>
7600
+
7276
7601
  <fo:block>
7277
7602
 
7278
7603
  <xsl:if test="$isGenerateTableIF = 'true'">
@@ -7423,12 +7748,18 @@
7423
7748
  <xsl:param name="split_keep-within-line"/>
7424
7749
  <fo:inline font-weight="bold">
7425
7750
 
7751
+ <xsl:call-template name="refine_strong_style"/>
7752
+
7426
7753
  <xsl:apply-templates>
7427
7754
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
7428
7755
  </xsl:apply-templates>
7429
7756
  </fo:inline>
7430
7757
  </xsl:template>
7431
7758
 
7759
+ <xsl:template name="refine_strong_style">
7760
+
7761
+ </xsl:template>
7762
+
7432
7763
  <xsl:template match="*[local-name()='padding']">
7433
7764
  <fo:inline padding-right="{@value}"> </fo:inline>
7434
7765
  </xsl:template>
@@ -7895,7 +8226,10 @@
7895
8226
  </xsl:choose>
7896
8227
  </xsl:variable>
7897
8228
 
7898
- <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"/>
7899
8233
  </xsl:template>
7900
8234
 
7901
8235
  <xsl:template name="add-zero-spaces-link-java">
@@ -8570,6 +8904,11 @@
8570
8904
 
8571
8905
  <fo:inline xsl:use-attribute-sets="mathml-style">
8572
8906
 
8907
+ <!-- DEBUG -->
8908
+ <!-- <xsl:copy-of select="ancestor::*[local-name() = 'stem']/@font-family"/> -->
8909
+
8910
+ <xsl:call-template name="refine_mathml-style"/>
8911
+
8573
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 -->
8574
8913
  <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
8575
8914
  </xsl:if>
@@ -8676,6 +9015,8 @@
8676
9015
 
8677
9016
  <fo:instream-foreign-object fox:alt-text="Math">
8678
9017
 
9018
+ <xsl:call-template name="refine_mathml_insteam_object_style"/>
9019
+
8679
9020
  <!-- put MathML in Actual Text -->
8680
9021
  <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
8681
9022
  <xsl:attribute name="fox:actual-text">
@@ -8696,6 +9037,10 @@
8696
9037
  </fo:instream-foreign-object>
8697
9038
  </xsl:template>
8698
9039
 
9040
+ <xsl:template name="refine_mathml_insteam_object_style">
9041
+
9042
+ </xsl:template> <!-- refine_mathml_insteam_object_style -->
9043
+
8699
9044
  <xsl:template match="mathml:*" mode="mathml_actual_text">
8700
9045
  <!-- <xsl:text>a+b</xsl:text> -->
8701
9046
  <xsl:text>&lt;</xsl:text>
@@ -8840,6 +9185,8 @@
8840
9185
  <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
8841
9186
  <fo:inline xsl:use-attribute-sets="mathml-style">
8842
9187
 
9188
+ <xsl:call-template name="refine_mathml-style"/>
9189
+
8843
9190
  <xsl:choose>
8844
9191
  <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
8845
9192
  <xsl:otherwise>
@@ -8884,17 +9231,7 @@
8884
9231
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8885
9232
  </xsl:if>
8886
9233
 
8887
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
8888
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
8889
- <xsl:attribute name="text-decoration">none</xsl:attribute>
8890
- </xsl:if>
8891
- <xsl:if test="$current_template = 'standard'">
8892
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
8893
- <xsl:attribute name="text-decoration">none</xsl:attribute>
8894
- <xsl:if test="ancestor::*[local-name() = 'feedback-statement']">
8895
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
8896
- </xsl:if>
8897
- </xsl:if>
9234
+ <xsl:call-template name="refine_link-style"/>
8898
9235
 
8899
9236
  <xsl:choose>
8900
9237
  <xsl:when test="$target_text = ''">
@@ -8983,6 +9320,9 @@
8983
9320
  <xsl:call-template name="insert_basic_link">
8984
9321
  <xsl:with-param name="element">
8985
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>
8986
9326
  <xsl:if test="parent::*[local-name() = 'add']">
8987
9327
  <xsl:call-template name="append_add-style"/>
8988
9328
  </xsl:if>
@@ -9044,6 +9384,8 @@
9044
9384
  <fo:table-cell display-align="center">
9045
9385
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9046
9386
 
9387
+ <xsl:call-template name="refine_formula-stem-block-style"/>
9388
+
9047
9389
  <xsl:apply-templates/>
9048
9390
  </fo:block>
9049
9391
  </fo:table-cell>
@@ -9085,12 +9427,18 @@
9085
9427
 
9086
9428
  <xsl:call-template name="setBlockSpanAll"/>
9087
9429
 
9430
+ <xsl:call-template name="refine_note-style"/>
9431
+
9088
9432
  <fo:block-container margin-left="0mm" margin-right="0mm">
9089
9433
 
9090
9434
  <fo:block>
9091
9435
 
9436
+ <xsl:call-template name="refine_note_block_style"/>
9437
+
9092
9438
  <fo:inline xsl:use-attribute-sets="note-name-style">
9093
9439
 
9440
+ <xsl:call-template name="refine_note-name-style"/>
9441
+
9094
9442
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9095
9443
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9096
9444
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -9116,6 +9464,10 @@
9116
9464
 
9117
9465
  </xsl:template>
9118
9466
 
9467
+ <xsl:template name="refine_note_block_style">
9468
+
9469
+ </xsl:template>
9470
+
9119
9471
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
9120
9472
  <xsl:variable name="num"><xsl:number/></xsl:variable>
9121
9473
  <xsl:choose>
@@ -9137,13 +9489,15 @@
9137
9489
 
9138
9490
  <xsl:call-template name="setBlockSpanAll"/>
9139
9491
 
9492
+ <xsl:call-template name="refine_termnote-style"/>
9493
+
9140
9494
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
9141
9495
 
9142
9496
  <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
9143
9497
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
9144
9498
  </xsl:if>
9145
9499
 
9146
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
9500
+ <xsl:call-template name="refine_termnote-name-style"/>
9147
9501
 
9148
9502
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9149
9503
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
@@ -9318,6 +9672,8 @@
9318
9672
  <xsl:otherwise>
9319
9673
  <fo:block xsl:use-attribute-sets="image-style">
9320
9674
 
9675
+ <xsl:call-template name="refine_image-style"/>
9676
+
9321
9677
  <xsl:variable name="src">
9322
9678
  <xsl:call-template name="image_src"/>
9323
9679
  </xsl:variable>
@@ -10167,10 +10523,7 @@
10167
10523
  <xsl:if test="normalize-space() != ''">
10168
10524
  <fo:block xsl:use-attribute-sets="figure-name-style">
10169
10525
 
10170
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
10171
- <xsl:attribute name="font-size">inherit</xsl:attribute>
10172
- <xsl:attribute name="font-family">Arial Black</xsl:attribute>
10173
- </xsl:if>
10526
+ <xsl:call-template name="refine_figure-name-style"/>
10174
10527
 
10175
10528
  <xsl:apply-templates/>
10176
10529
  </fo:block>
@@ -10435,6 +10788,8 @@
10435
10788
  </xsl:attribute>
10436
10789
  </xsl:for-each>
10437
10790
 
10791
+ <xsl:call-template name="refine_sourcecode-style"/>
10792
+
10438
10793
  <!-- remove margin between rows in the table with sourcecode line numbers -->
10439
10794
  <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
10440
10795
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
@@ -11143,6 +11498,8 @@
11143
11498
 
11144
11499
  <xsl:call-template name="setBlockSpanAll"/>
11145
11500
 
11501
+ <xsl:call-template name="refine_example-style"/>
11502
+
11146
11503
  <xsl:variable name="fo_element">
11147
11504
  <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
11148
11505
  block
@@ -11270,9 +11627,7 @@
11270
11627
  </xsl:if>
11271
11628
  <fo:block xsl:use-attribute-sets="example-p-style">
11272
11629
 
11273
- <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])">
11274
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
11275
- </xsl:if>
11630
+ <xsl:call-template name="refine_example-p-style"/>
11276
11631
 
11277
11632
  <xsl:apply-templates/>
11278
11633
  </fo:block>
@@ -11290,6 +11645,7 @@
11290
11645
  </xsl:otherwise>
11291
11646
  </xsl:choose>
11292
11647
  </xsl:template> <!-- example/p -->
11648
+
11293
11649
  <!-- ====== -->
11294
11650
  <!-- ====== -->
11295
11651
 
@@ -11301,6 +11657,8 @@
11301
11657
  <xsl:template match="*[local-name() = 'termsource']" name="termsource">
11302
11658
  <fo:block xsl:use-attribute-sets="termsource-style">
11303
11659
 
11660
+ <xsl:call-template name="refine_termsource-style"/>
11661
+
11304
11662
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
11305
11663
  <xsl:variable name="termsource_text">
11306
11664
  <xsl:apply-templates/>
@@ -11416,6 +11774,8 @@
11416
11774
  <fo:block-container margin-left="0mm">
11417
11775
  <fo:block-container xsl:use-attribute-sets="quote-style">
11418
11776
 
11777
+ <xsl:call-template name="refine_quote-style"/>
11778
+
11419
11779
  <fo:block-container margin-left="0mm" margin-right="0mm">
11420
11780
  <fo:block role="BlockQuote">
11421
11781
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
@@ -11490,13 +11850,7 @@
11490
11850
 
11491
11851
  </xsl:if>
11492
11852
 
11493
- <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
11494
- <xsl:variable name="text" select="normalize-space()"/>
11495
-
11496
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
11497
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
11498
- <xsl:attribute name="text-decoration">none</xsl:attribute>
11499
- </xsl:if>
11853
+ <xsl:call-template name="refine_eref-style"/>
11500
11854
 
11501
11855
  <xsl:call-template name="insert_basic_link">
11502
11856
  <xsl:with-param name="element">
@@ -11506,6 +11860,8 @@
11506
11860
  </xsl:if>
11507
11861
  <xsl:if test="@type = 'inline'">
11508
11862
 
11863
+ <xsl:call-template name="refine_basic_link_style"/>
11864
+
11509
11865
  </xsl:if>
11510
11866
 
11511
11867
  <xsl:choose>
@@ -11538,6 +11894,11 @@
11538
11894
  </xsl:otherwise>
11539
11895
  </xsl:choose>
11540
11896
  </xsl:template>
11897
+
11898
+ <xsl:template name="refine_basic_link_style">
11899
+
11900
+ </xsl:template> <!-- refine_basic_link_style -->
11901
+
11541
11902
  <!-- ====== -->
11542
11903
  <!-- END eref -->
11543
11904
  <!-- ====== -->
@@ -11678,11 +12039,17 @@
11678
12039
  <fo:block>
11679
12040
  <xsl:call-template name="setId"/>
11680
12041
 
12042
+ <xsl:call-template name="sections_element_style"/>
12043
+
11681
12044
  <xsl:apply-templates/>
11682
12045
  </fo:block>
11683
12046
 
11684
12047
  </xsl:template>
11685
12048
 
12049
+ <xsl:template name="sections_element_style">
12050
+
12051
+ </xsl:template> <!-- sections_element_style -->
12052
+
11686
12053
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11687
12054
  <fo:block break-after="page"/>
11688
12055
  <fo:block>
@@ -11697,10 +12064,16 @@
11697
12064
 
11698
12065
  <xsl:call-template name="setBlockSpanAll"/>
11699
12066
 
12067
+ <xsl:call-template name="refine_clause_style"/>
12068
+
11700
12069
  <xsl:apply-templates/>
11701
12070
  </fo:block>
11702
12071
  </xsl:template>
11703
12072
 
12073
+ <xsl:template name="refine_clause_style">
12074
+
12075
+ </xsl:template> <!-- refine_clause_style -->
12076
+
11704
12077
  <xsl:template match="*[local-name() = 'definitions']">
11705
12078
  <fo:block id="{@id}">
11706
12079
  <xsl:apply-templates/>
@@ -11713,10 +12086,16 @@
11713
12086
 
11714
12087
  <xsl:call-template name="setBlockSpanAll"/>
11715
12088
 
12089
+ <xsl:call-template name="refine_annex_style"/>
12090
+
11716
12091
  </fo:block>
11717
12092
  <xsl:apply-templates/>
11718
12093
  </xsl:template>
11719
12094
 
12095
+ <xsl:template name="refine_annex_style">
12096
+
12097
+ </xsl:template>
12098
+
11720
12099
  <xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11721
12100
  <!-- comment 2019-11-29 -->
11722
12101
  <!-- <fo:block font-weight="bold">Review:</fo:block>
@@ -11891,6 +12270,8 @@
11891
12270
  </xsl:choose>
11892
12271
  </xsl:attribute>
11893
12272
 
12273
+ <xsl:call-template name="refine_list_container_style"/>
12274
+
11894
12275
  <fo:block-container margin-left="0mm">
11895
12276
  <fo:block>
11896
12277
  <xsl:apply-templates select="." mode="list"/>
@@ -11908,6 +12289,10 @@
11908
12289
  </xsl:choose>
11909
12290
  </xsl:template>
11910
12291
 
12292
+ <xsl:template name="refine_list_container_style">
12293
+
12294
+ </xsl:template> <!-- refine_list_container_style -->
12295
+
11911
12296
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
11912
12297
 
11913
12298
  <xsl:apply-templates select="*[local-name() = 'name']">
@@ -11918,7 +12303,7 @@
11918
12303
 
11919
12304
  <xsl:variable name="provisional_distance_between_starts_">
11920
12305
  <attributes xsl:use-attribute-sets="list-style">
11921
-
12306
+ <xsl:call-template name="refine_list-style_provisional-distance-between-starts"/>
11922
12307
  </attributes>
11923
12308
  </xsl:variable>
11924
12309
  <xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
@@ -11954,6 +12339,8 @@
11954
12339
  <addon><xsl:value-of select="$addon"/></addon> -->
11955
12340
  </xsl:if>
11956
12341
 
12342
+ <xsl:call-template name="refine_list-style"/>
12343
+
11957
12344
  <xsl:if test="*[local-name() = 'name']">
11958
12345
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
11959
12346
  </xsl:if>
@@ -11966,6 +12353,10 @@
11966
12353
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
11967
12354
  </xsl:template>
11968
12355
 
12356
+ <xsl:template name="refine_list-style_provisional-distance-between-starts">
12357
+
12358
+ </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
12359
+
11969
12360
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
11970
12361
  <xsl:param name="process">false</xsl:param>
11971
12362
  <xsl:if test="$process = 'true'">
@@ -11979,17 +12370,12 @@
11979
12370
  <fo:list-item xsl:use-attribute-sets="list-item-style">
11980
12371
  <xsl:copy-of select="@id"/>
11981
12372
 
12373
+ <xsl:call-template name="refine_list-item-style"/>
12374
+
11982
12375
  <fo:list-item-label end-indent="label-end()">
11983
12376
  <fo:block xsl:use-attribute-sets="list-item-label-style">
11984
12377
 
11985
- <xsl:if test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
11986
- <xsl:attribute name="color">rgb(128,128,128)</xsl:attribute>
11987
- <xsl:attribute name="line-height">1.1</xsl:attribute>
11988
- <xsl:if test=".//ieee:fn">
11989
- <xsl:attribute name="line-height">1.4</xsl:attribute>
11990
- </xsl:if>
11991
-
11992
- </xsl:if>
12378
+ <xsl:call-template name="refine_list-item-label-style"/>
11993
12379
 
11994
12380
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
11995
12381
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -11997,11 +12383,14 @@
11997
12383
  </xsl:if>
11998
12384
 
11999
12385
  <xsl:call-template name="getListItemFormat"/>
12386
+
12000
12387
  </fo:block>
12001
12388
  </fo:list-item-label>
12002
12389
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
12003
12390
  <fo:block>
12004
12391
 
12392
+ <xsl:call-template name="refine_list-item-body-style"/>
12393
+
12005
12394
  <xsl:apply-templates/>
12006
12395
 
12007
12396
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
@@ -12319,6 +12708,7 @@
12319
12708
 
12320
12709
  <fo:block id="{@id}">
12321
12710
  <xsl:apply-templates/>
12711
+
12322
12712
  </fo:block>
12323
12713
  </xsl:template>
12324
12714
 
@@ -12336,6 +12726,7 @@
12336
12726
 
12337
12727
  <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
12338
12728
  <xsl:apply-templates/>
12729
+
12339
12730
  </fo:block>
12340
12731
 
12341
12732
  </xsl:template> <!-- references -->
@@ -12956,6 +13347,9 @@
12956
13347
  </xsl:copy>
12957
13348
  </xsl:template>
12958
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
+
12959
13353
  <xsl:template name="add_id">
12960
13354
  <xsl:if test="not(@id)">
12961
13355
  <!-- add @id - first element with @id plus '_element_name' -->
@@ -13344,6 +13738,14 @@
13344
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">
13345
13739
  <xsl:variable name="p_fn_">
13346
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> -->
13347
13749
  </xsl:variable>
13348
13750
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
13349
13751
  <xsl:variable name="gen_id" select="generate-id(.)"/>
@@ -13358,8 +13760,14 @@
13358
13760
  <xsl:attribute name="current_fn_number">
13359
13761
  <xsl:value-of select="$current_fn_number"/>
13360
13762
  </xsl:attribute>
13763
+ <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
13361
13764
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
13362
- <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)"/>
13363
13771
  </xsl:attribute>
13364
13772
  <xsl:apply-templates select="node()" mode="linear_xml"/>
13365
13773
  </xsl:copy>