metanorma-un 0.8.0 → 0.8.1

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.
@@ -45,7 +45,7 @@
45
45
 
46
46
  <xsl:template match="/">
47
47
  <xsl:call-template name="namespaceCheck"/>
48
- <fo:root font-family="Times New Roman, STIX Two Math, Source Han Sans" font-size="10pt" xml:lang="{$lang}">
48
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
49
49
  <fo:layout-master-set>
50
50
  <!-- Cover page -->
51
51
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -325,9 +325,6 @@
325
325
  <!-- ============================= -->
326
326
  <!-- CONTENTS -->
327
327
  <!-- ============================= -->
328
- <xsl:template match="node()" mode="contents">
329
- <xsl:apply-templates mode="contents"/>
330
- </xsl:template>
331
328
 
332
329
  <!-- element with title -->
333
330
  <xsl:template match="*[un:title]" mode="contents">
@@ -570,7 +567,7 @@
570
567
  <xsl:template match="un:ul//un:note/un:name | un:ol//un:note/un:name" mode="process" priority="2"/>
571
568
  <xsl:template match="un:ul//un:note/un:p | un:ol//un:note/un:p" mode="process" priority="2">
572
569
  <fo:block margin-top="4pt">
573
- <xsl:apply-templates select="../un:name" mode="presentation"/>
570
+ <xsl:apply-templates select="../un:name"/>
574
571
  <xsl:apply-templates/>
575
572
  </fo:block>
576
573
  </xsl:template>
@@ -644,32 +641,6 @@
644
641
  </xsl:template>
645
642
 
646
643
 
647
- <xsl:template match="un:admonition">
648
- <fo:block text-align="center" font-style="italic" keep-with-next="always" margin-bottom="6pt">
649
- <xsl:apply-templates select="un:name" mode="process"/>
650
- </fo:block>
651
- <fo:block-container border="0.25pt solid black" margin-left="-3mm" margin-right="-3mm" padding-top="4mm">
652
- <fo:block id="{@id}" font-weight="bold" margin-left="6mm" margin-right="6mm" keep-with-next="always">
653
- <xsl:apply-templates select="un:name" mode="process"/>
654
- </fo:block>
655
- <fo:block-container margin-left="2mm" margin-right="2mm">
656
- <fo:block-container margin-left="0mm" margin-right="0mm">
657
- <xsl:apply-templates/>
658
- </fo:block-container>
659
- </fo:block-container>
660
- </fo:block-container>
661
- <fo:block margin-bottom="4pt"> </fo:block>
662
- </xsl:template>
663
-
664
- <xsl:template match="un:admonition/un:name"/>
665
- <xsl:template match="un:admonition/un:name" mode="process">
666
- <xsl:apply-templates/>
667
- </xsl:template>
668
-
669
- <xsl:template match="un:admonition/un:p">
670
- <fo:block text-align="justify" margin-bottom="6pt" line-height="122%"><xsl:apply-templates/></fo:block>
671
- </xsl:template>
672
-
673
644
  <!-- ============================= -->
674
645
  <!-- ============================= -->
675
646
 
@@ -810,42 +781,13 @@
810
781
  <!-- for further use -->
811
782
  <!-- ============================ -->
812
783
 
813
-
814
-
815
- <xsl:template match="un:bibitem">
816
- <fo:block id="{@id}" margin-top="6pt" margin-left="14mm" text-indent="-14mm">
817
- <fo:inline padding-right="5mm">[<xsl:value-of select="un:docidentifier"/>]</fo:inline><xsl:value-of select="un:docidentifier"/>
818
- <xsl:if test="un:title">
819
- <fo:inline font-style="italic">
820
- <xsl:text>, </xsl:text>
821
- <xsl:choose>
822
- <xsl:when test="un:title[@type = 'main' and @language = 'en']">
823
- <xsl:value-of select="un:title[@type = 'main' and @language = 'en']"/>
824
- </xsl:when>
825
- <xsl:otherwise>
826
- <xsl:value-of select="un:title"/>
827
- </xsl:otherwise>
828
- </xsl:choose>
829
- </fo:inline>
830
- </xsl:if>
831
- <xsl:apply-templates select="un:formattedref"/>
832
- </fo:block>
833
- </xsl:template>
834
- <xsl:template match="un:bibitem/un:docidentifier"/>
835
-
836
- <xsl:template match="un:bibitem/un:title"/>
837
-
838
- <xsl:template match="un:formattedref">
839
- <xsl:text>, </xsl:text><xsl:apply-templates/>
840
- </xsl:template>
841
-
842
784
 
843
785
  <xsl:template match="un:figure" priority="2">
844
786
  <fo:block-container id="{@id}">
845
787
  <fo:block>
846
- <xsl:apply-templates/>
788
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
847
789
  </fo:block>
848
- <xsl:apply-templates select="un:name" mode="presentation"/>
790
+ <xsl:apply-templates select="un:name"/>
849
791
  <!-- <xsl:call-template name="fn_display_figure"/> -->
850
792
  <xsl:for-each select="un:note">
851
793
  <xsl:call-template name="note"/>
@@ -956,12 +898,12 @@
956
898
  <xsl:attribute name="text-align">left</xsl:attribute>
957
899
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
958
900
  </xsl:if>
959
- <xsl:apply-templates/>
901
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
960
902
  </fo:block>
961
903
  </fo:table-cell>
962
904
  <fo:table-cell> <!-- display-align="center" -->
963
905
  <fo:block text-align="right">
964
- <xsl:apply-templates select="un:name" mode="presentation"/>
906
+ <xsl:apply-templates select="un:name"/>
965
907
  </fo:block>
966
908
  </fo:table-cell>
967
909
  </fo:table-row>
@@ -979,15 +921,6 @@
979
921
  </xsl:template>
980
922
 
981
923
 
982
-
983
- <xsl:template match="un:references">
984
- <fo:block>
985
- <xsl:if test="not(un:title)">
986
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
987
- </xsl:if>
988
- <xsl:apply-templates/>
989
- </fo:block>
990
- </xsl:template>
991
924
 
992
925
  <xsl:template match="un:dl" priority="2">
993
926
  <fo:block-container margin-left="0mm">
@@ -1089,22 +1022,18 @@
1089
1022
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAJkAAAAmCAYAAADXwDkaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+lpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJNaWNyb3NvZnTCriBXb3JkIDIwMTYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzM0NUVBQ0U2RUMzMTFFQUIzQjg4RDg3OEE1NEI2QzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzM0NUVBQ0Y2RUMzMTFFQUIzQjg4RDg3OEE1NEI2QzAiPiA8ZGM6Y3JlYXRvcj4gPHJkZjpTZXE+IDxyZGY6bGk+RGhhbmplZTwvcmRmOmxpPiA8L3JkZjpTZXE+IDwvZGM6Y3JlYXRvcj4gPGRjOnRpdGxlPiA8cmRmOkFsdD4gPHJkZjpsaSB4bWw6bGFuZz0ieC1kZWZhdWx0Ij4xODAxNzYzPC9yZGY6bGk+IDwvcmRmOkFsdD4gPC9kYzp0aXRsZT4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVm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</xsl:text>
1090
1023
  </xsl:variable>
1091
1024
 
1092
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
1025
+ <xsl:variable name="titles_">
1093
1026
 
1094
1027
  <title-edition lang="en">
1095
1028
 
1096
- <xsl:text>Edition </xsl:text>
1097
-
1098
-
1029
+ <xsl:text>Edition </xsl:text>
1030
+
1099
1031
  </title-edition>
1100
1032
 
1101
1033
  <title-edition lang="fr">
1102
-
1103
- <xsl:text>Édition </xsl:text>
1104
-
1034
+ <xsl:text>Édition </xsl:text>
1105
1035
  </title-edition>
1106
1036
 
1107
-
1108
1037
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
1109
1038
  <title-toc lang="en">
1110
1039
 
@@ -1112,10 +1041,13 @@
1112
1041
 
1113
1042
  </title-toc>
1114
1043
  <title-toc lang="fr">
1044
+ <xsl:text>Sommaire</xsl:text>
1045
+ </title-toc>
1046
+ <title-toc lang="zh">
1115
1047
 
1048
+ <xsl:text>Contents</xsl:text>
1049
+
1116
1050
  </title-toc>
1117
-
1118
-
1119
1051
 
1120
1052
  <title-descriptors lang="en">Descriptors</title-descriptors>
1121
1053
 
@@ -1131,12 +1063,8 @@
1131
1063
  </title-part>
1132
1064
  <title-part lang="zh">第 # 部分:</title-part>
1133
1065
 
1134
- <title-subpart lang="en">
1135
-
1136
- </title-subpart>
1137
- <title-subpart lang="fr">
1138
-
1139
- </title-subpart>
1066
+ <title-subpart lang="en">Sub-part #</title-subpart>
1067
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
1140
1068
 
1141
1069
  <title-list-tables lang="en">List of Tables</title-list-tables>
1142
1070
 
@@ -1151,7 +1079,7 @@
1151
1079
  <title-continued lang="en">(continued)</title-continued>
1152
1080
  <title-continued lang="fr">(continué)</title-continued>
1153
1081
 
1154
- </xsl:variable><xsl:variable name="bibdata">
1082
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
1155
1083
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1156
1084
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1157
1085
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1180,12 +1108,32 @@
1180
1108
  </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1181
1109
 
1182
1110
 
1111
+
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+
1124
+
1125
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
1126
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1127
+
1183
1128
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1184
1129
 
1185
1130
 
1186
1131
 
1187
1132
 
1188
1133
 
1134
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
1135
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1136
+
1189
1137
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1190
1138
  <xsl:attribute name="white-space">pre</xsl:attribute>
1191
1139
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1195,14 +1143,21 @@
1195
1143
 
1196
1144
 
1197
1145
 
1198
- <xsl:attribute name="font-family">Courier New</xsl:attribute>
1199
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1200
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1146
+
1147
+
1148
+
1149
+
1201
1150
 
1202
1151
 
1203
1152
 
1204
1153
 
1205
1154
 
1155
+
1156
+
1157
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
1158
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1159
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1160
+
1206
1161
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1207
1162
 
1208
1163
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1309,7 +1264,61 @@
1309
1264
 
1310
1265
  </xsl:attribute-set><xsl:variable name="table-border_">
1311
1266
 
1312
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1267
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1268
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1269
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1270
+
1271
+
1272
+
1273
+
1274
+
1275
+
1276
+
1277
+
1278
+
1279
+
1280
+
1281
+
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+
1288
+
1289
+ <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1290
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1291
+
1292
+
1293
+
1294
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
1295
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1296
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
1297
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1298
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1299
+
1300
+
1301
+
1302
+
1303
+
1304
+
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+ <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
1319
+
1320
+
1321
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1313
1322
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1314
1323
 
1315
1324
 
@@ -1332,7 +1341,166 @@
1332
1341
 
1333
1342
 
1334
1343
 
1344
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
1345
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
1346
+
1347
+
1348
+
1349
+
1350
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1351
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1352
+
1353
+
1354
+
1355
+
1356
+
1357
+
1358
+
1359
+
1360
+
1361
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1362
+
1363
+
1364
+
1365
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
1366
+
1367
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
1368
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1369
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1370
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1371
+ <xsl:attribute name="display-align">center</xsl:attribute>
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+ <xsl:attribute name="display-align">center</xsl:attribute>
1385
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1386
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1387
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
1388
+ <xsl:attribute name="padding-left">2mm</xsl:attribute>
1389
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
1390
+ <xsl:attribute name="border-top">solid black 0.2pt</xsl:attribute>
1391
+ <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
1392
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
1393
+
1394
+
1395
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
1396
+ <xsl:attribute name="display-align">center</xsl:attribute>
1397
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1398
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1399
+
1400
+
1401
+
1402
+
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+ <xsl:attribute name="display-align">before</xsl:attribute>
1412
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
1413
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
1414
+ <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
1415
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
1416
+ <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
1417
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
1418
+
1419
+
1335
1420
  </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1421
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1422
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1423
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1424
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1425
+
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+
1434
+
1435
+
1436
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
1437
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1438
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1448
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1456
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1457
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1458
+
1459
+
1460
+
1461
+
1462
+
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1471
+
1472
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
1473
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1474
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1475
+
1476
+
1477
+ <xsl:attribute name="margin-left">-8mm</xsl:attribute>
1478
+
1479
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
1480
+
1481
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
1482
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1483
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1484
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1485
+
1486
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
1487
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1488
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1489
+
1490
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1491
+
1492
+
1493
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
1494
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1495
+
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+
1502
+
1503
+
1336
1504
 
1337
1505
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1338
1506
 
@@ -1393,6 +1561,7 @@
1393
1561
 
1394
1562
 
1395
1563
  </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1564
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
1396
1565
 
1397
1566
 
1398
1567
 
@@ -1450,6 +1619,9 @@
1450
1619
 
1451
1620
 
1452
1621
 
1622
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
1623
+
1624
+
1453
1625
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1454
1626
 
1455
1627
 
@@ -1457,6 +1629,8 @@
1457
1629
 
1458
1630
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1459
1631
 
1632
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
1633
+
1460
1634
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1461
1635
 
1462
1636
 
@@ -1556,6 +1730,17 @@
1556
1730
 
1557
1731
  </xsl:attribute-set><xsl:attribute-set name="toc-style">
1558
1732
  <xsl:attribute name="line-height">135%</xsl:attribute>
1733
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
1734
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1735
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1736
+
1737
+
1738
+
1739
+
1740
+
1741
+
1742
+
1743
+
1559
1744
  </xsl:attribute-set><xsl:attribute-set name="fn-style">
1560
1745
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1561
1746
  </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
@@ -1630,31 +1815,206 @@
1630
1815
  <xsl:attribute name="padding-right">8mm</xsl:attribute>
1631
1816
 
1632
1817
 
1633
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
1634
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1635
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1636
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1637
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1638
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1639
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
1640
- <xsl:for-each select="/*/*[local-name()='preface']/*">
1641
- <xsl:sort select="@displayorder" data-type="number"/>
1642
- <xsl:apply-templates select="." mode="contents"/>
1643
- </xsl:for-each>
1644
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
1645
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1646
-
1647
- <!-- Normative references -->
1648
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
1649
- <!-- Terms and definitions -->
1650
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
1651
- <!-- Another main sections -->
1652
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
1653
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1654
- <!-- Bibliography -->
1655
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
1818
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
1656
1819
 
1657
- </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1820
+
1821
+
1822
+
1823
+
1824
+
1825
+
1826
+
1827
+
1828
+
1829
+
1830
+
1831
+
1832
+ <xsl:attribute name="border">0.25pt solid black</xsl:attribute>
1833
+ <xsl:attribute name="margin-left">-3mm</xsl:attribute>
1834
+ <xsl:attribute name="margin-right">-3mm</xsl:attribute>
1835
+ <xsl:attribute name="padding-top">4mm</xsl:attribute>
1836
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1837
+
1838
+
1839
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
1840
+
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+ <xsl:attribute name="margin-left">2mm</xsl:attribute>
1850
+ <xsl:attribute name="margin-right">2mm</xsl:attribute>
1851
+
1852
+
1853
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
1854
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1855
+
1856
+
1857
+
1858
+
1859
+
1860
+
1861
+
1862
+
1863
+
1864
+
1865
+
1866
+
1867
+ <xsl:attribute name="text-align">center</xsl:attribute>
1868
+ <xsl:attribute name="font-style">italic</xsl:attribute>
1869
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1870
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1871
+
1872
+
1873
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
1874
+
1875
+
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+
1882
+
1883
+
1884
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1885
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1886
+ <xsl:attribute name="line-height">122%</xsl:attribute>
1887
+
1888
+
1889
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
1890
+
1891
+
1892
+
1893
+
1894
+
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+
1901
+
1902
+
1903
+
1904
+
1905
+
1906
+
1907
+
1908
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1909
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
1910
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
1911
+
1912
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
1913
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1914
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1915
+
1916
+
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+
1926
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
1927
+
1928
+
1929
+
1930
+
1931
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
1932
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
1933
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+
1944
+
1945
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
1946
+
1947
+
1948
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
1949
+
1950
+
1951
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
1952
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1953
+ <xsl:attribute name="font-size">65%</xsl:attribute>
1954
+
1955
+
1956
+
1957
+
1958
+
1959
+
1960
+
1961
+
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+
1968
+
1969
+
1970
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1971
+
1972
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
1973
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
1974
+
1975
+
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+ <xsl:attribute name="font-size">60%</xsl:attribute>
1991
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1992
+
1993
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
1994
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1995
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1996
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
1997
+
1998
+
1999
+
2000
+
2001
+
2002
+
2003
+
2004
+
2005
+
2006
+
2007
+
2008
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
2009
+
2010
+
2011
+
2012
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2013
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
2014
+ <xsl:sort select="@displayorder" data-type="number"/>
2015
+ <xsl:apply-templates select="." mode="contents"/>
2016
+ </xsl:for-each>
2017
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1658
2018
 
1659
2019
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
1660
2020
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -1670,29 +2030,11 @@
1670
2030
  <xsl:sort select="@displayorder" data-type="number"/>
1671
2031
  <xsl:apply-templates select="." mode="contents"/>
1672
2032
  </xsl:for-each>
1673
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
1674
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1675
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1676
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1677
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1678
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1679
2033
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1680
2034
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1681
2035
  <xsl:sort select="@displayorder" data-type="number"/>
1682
2036
  <xsl:apply-templates select="."/>
1683
2037
  </xsl:for-each>
1684
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
1685
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1686
-
1687
- <!-- Normative references -->
1688
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1689
- <!-- Terms and definitions -->
1690
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
1691
- <!-- Another main sections -->
1692
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
1693
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1694
- <!-- Bibliography -->
1695
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1696
2038
  </xsl:template><xsl:template name="processMainSectionsDefault">
1697
2039
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1698
2040
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -1729,43 +2071,19 @@
1729
2071
  <xsl:call-template name="getSimpleTable"/>
1730
2072
  </xsl:variable>
1731
2073
 
1732
- <!-- <xsl:if test="$namespace = 'bipm'">
1733
- <fo:block>&#xA0;</fo:block>
1734
- </xsl:if> -->
1735
-
1736
2074
 
1737
2075
  <!-- Display table's name before table as standalone block -->
1738
2076
  <!-- $namespace = 'iso' or -->
1739
2077
 
1740
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1741
-
1742
-
1743
-
1744
-
2078
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
2079
+
1745
2080
 
1746
- <xsl:call-template name="fn_name_display"/>
1747
2081
 
2082
+ <xsl:call-template name="table_name_fn_display"/>
1748
2083
 
1749
2084
 
1750
2085
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
1751
2086
 
1752
- <!-- <xsl:variable name="cols-count">
1753
- <xsl:choose>
1754
- <xsl:when test="*[local-name()='thead']">
1755
- <xsl:call-template name="calculate-columns-numbers">
1756
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1757
- </xsl:call-template>
1758
- </xsl:when>
1759
- <xsl:otherwise>
1760
- <xsl:call-template name="calculate-columns-numbers">
1761
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1762
- </xsl:call-template>
1763
- </xsl:otherwise>
1764
- </xsl:choose>
1765
- </xsl:variable> -->
1766
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1767
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1768
-
1769
2087
  <xsl:variable name="colwidths">
1770
2088
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1771
2089
  <xsl:call-template name="calculate-column-widths">
@@ -1776,17 +2094,8 @@
1776
2094
  </xsl:variable>
1777
2095
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1778
2096
 
1779
- <!-- <xsl:variable name="colwidths2">
1780
- <xsl:call-template name="calculate-column-widths">
1781
- <xsl:with-param name="cols-count" select="$cols-count"/>
1782
- </xsl:call-template>
1783
- </xsl:variable> -->
1784
-
1785
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1786
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1787
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1788
2097
 
1789
- <xsl:variable name="margin-left">
2098
+ <xsl:variable name="margin-side">
1790
2099
  <xsl:choose>
1791
2100
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1792
2101
  <xsl:otherwise>0</xsl:otherwise>
@@ -1794,73 +2103,72 @@
1794
2103
  </xsl:variable>
1795
2104
 
1796
2105
 
1797
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1798
-
1799
-
1800
-
1801
-
1802
-
1803
-
1804
- <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1805
- <xsl:attribute name="font-size">8pt</xsl:attribute>
1806
-
2106
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
2107
+
1807
2108
 
2109
+ <xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
2110
+ <xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
1808
2111
 
1809
-
2112
+
1810
2113
 
2114
+
1811
2115
 
2116
+
1812
2117
 
1813
2118
 
1814
2119
 
2120
+
1815
2121
 
1816
2122
 
1817
2123
 
1818
2124
 
1819
2125
 
2126
+ <!-- end table block-container attributes -->
1820
2127
 
1821
2128
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
1822
2129
 
1823
2130
 
2131
+ <xsl:variable name="table_width_default">100%</xsl:variable>
1824
2132
  <xsl:variable name="table_width">
1825
2133
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1826
2134
 
1827
-
1828
-
1829
- <xsl:choose>
1830
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1831
- <xsl:otherwise>100%</xsl:otherwise>
1832
- </xsl:choose>
1833
-
2135
+ <xsl:choose>
2136
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
2137
+ <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
2138
+ </xsl:choose>
2139
+
1834
2140
  </xsl:variable>
1835
2141
 
2142
+
1836
2143
  <xsl:variable name="table_attributes">
1837
- <attribute name="table-layout">fixed</attribute>
1838
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1839
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1840
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1841
-
1842
-
1843
-
1844
-
1845
-
1846
-
1847
-
1848
-
1849
-
1850
-
1851
- <attribute name="border-top">0.5pt solid black</attribute>
1852
-
1853
-
1854
-
1855
-
1856
-
2144
+
2145
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
2146
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2147
+
2148
+
2149
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2150
+ <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2151
+
2152
+
2153
+
2154
+
2155
+
2156
+
2157
+
2158
+
2159
+
2160
+
2161
+
2162
+
2163
+
2164
+ </xsl:element>
1857
2165
  </xsl:variable>
1858
2166
 
1859
2167
 
1860
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2168
+ <fo:table id="{@id}">
1861
2169
 
1862
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1863
- <xsl:attribute name="{@name}">
2170
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2171
+ <xsl:attribute name="{local-name()}">
1864
2172
  <xsl:value-of select="."/>
1865
2173
  </xsl:attribute>
1866
2174
  </xsl:for-each>
@@ -1871,7 +2179,6 @@
1871
2179
  </xsl:if>
1872
2180
 
1873
2181
 
1874
-
1875
2182
  <xsl:choose>
1876
2183
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1877
2184
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -1897,7 +2204,7 @@
1897
2204
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1898
2205
  </xsl:when>
1899
2206
  <xsl:otherwise>
1900
- <xsl:apply-templates/>
2207
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1901
2208
  </xsl:otherwise>
1902
2209
  </xsl:choose>
1903
2210
 
@@ -1912,25 +2219,6 @@
1912
2219
  </xsl:call-template>
1913
2220
  </xsl:for-each>
1914
2221
 
1915
- <!-- insert footer as table -->
1916
- <!-- <fo:table>
1917
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1918
- <xsl:attribute name="{@name}">
1919
- <xsl:value-of select="."/>
1920
- </xsl:attribute>
1921
- </xsl:for-each>
1922
-
1923
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1924
- <xsl:choose>
1925
- <xsl:when test=". = 1 or . = 0">
1926
- <fo:table-column column-width="proportional-column-width(2)"/>
1927
- </xsl:when>
1928
- <xsl:otherwise>
1929
- <fo:table-column column-width="proportional-column-width({.})"/>
1930
- </xsl:otherwise>
1931
- </xsl:choose>
1932
- </xsl:for-each>
1933
- </fo:table>-->
1934
2222
 
1935
2223
 
1936
2224
 
@@ -1988,18 +2276,17 @@
1988
2276
  </xsl:otherwise>
1989
2277
  </xsl:choose>
1990
2278
 
1991
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2279
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
1992
2280
  <xsl:param name="continued"/>
1993
2281
  <xsl:if test="normalize-space() != ''">
1994
2282
  <fo:block xsl:use-attribute-sets="table-name-style">
1995
-
2283
+
1996
2284
 
1997
2285
 
1998
2286
 
1999
2287
 
2000
2288
  <xsl:choose>
2001
2289
  <xsl:when test="$continued = 'true'">
2002
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2003
2290
 
2004
2291
  </xsl:when>
2005
2292
  <xsl:otherwise>
@@ -2062,13 +2349,6 @@
2062
2349
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
2063
2350
  <xsl:variable name="td_text">
2064
2351
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2065
-
2066
- <!-- <xsl:if test="$namespace = 'bipm'">
2067
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
2068
- <word><xsl:value-of select="normalize-space(.)"/></word>
2069
- </xsl:for-each>
2070
- </xsl:if> -->
2071
-
2072
2352
  </xsl:variable>
2073
2353
  <xsl:variable name="words">
2074
2354
  <xsl:variable name="string_with_added_zerospaces">
@@ -2105,7 +2385,6 @@
2105
2385
  </xsl:otherwise>
2106
2386
  </xsl:choose>
2107
2387
  </xsl:variable>
2108
-
2109
2388
 
2110
2389
  <column>
2111
2390
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -2141,7 +2420,6 @@
2141
2420
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2142
2421
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2143
2422
  <xsl:param name="cols-count"/>
2144
- <!-- font-weight="bold" -->
2145
2423
  <fo:table-header>
2146
2424
 
2147
2425
 
@@ -2153,13 +2431,12 @@
2153
2431
  <fo:table-row>
2154
2432
  <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">
2155
2433
 
2156
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2434
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
2157
2435
  <xsl:with-param name="continued">true</xsl:with-param>
2158
2436
  </xsl:apply-templates>
2159
2437
 
2160
2438
 
2161
2439
 
2162
-
2163
2440
  </fo:table-cell>
2164
2441
  </fo:table-row>
2165
2442
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -2175,64 +2452,6 @@
2175
2452
  <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2176
2453
  </fo:table-footer>
2177
2454
  </xsl:if>
2178
- </xsl:template><xsl:template name="insertTableFooter2">
2179
- <xsl:param name="cols-count"/>
2180
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2181
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2182
-
2183
- <fo:table-footer>
2184
-
2185
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2186
-
2187
- <!-- if there are note(s) or fn(s) then create footer row -->
2188
- <xsl:if test="$isNoteOrFnExist = 'true'">
2189
-
2190
-
2191
-
2192
- <fo:table-row>
2193
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2194
-
2195
-
2196
-
2197
- <!-- fn will be processed inside 'note' processing -->
2198
-
2199
-
2200
-
2201
-
2202
-
2203
-
2204
- <!-- except gb -->
2205
-
2206
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2207
-
2208
-
2209
- <!-- show Note under table in preface (ex. abstract) sections -->
2210
- <!-- empty, because notes show at page side in main sections -->
2211
- <!-- <xsl:if test="$namespace = 'bipm'">
2212
- <xsl:choose>
2213
- <xsl:when test="ancestor::*[local-name()='preface']">
2214
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2215
- </xsl:when>
2216
- <xsl:otherwise>
2217
- <fo:block/>
2218
- </xsl:otherwise>
2219
- </xsl:choose>
2220
- </xsl:if> -->
2221
-
2222
-
2223
- <!-- horizontal row separator -->
2224
-
2225
-
2226
- <!-- fn processing -->
2227
- <xsl:call-template name="fn_display"/>
2228
-
2229
- </fo:table-cell>
2230
- </fo:table-row>
2231
-
2232
- </xsl:if>
2233
- </fo:table-footer>
2234
-
2235
- </xsl:if>
2236
2455
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2237
2456
  <xsl:param name="table_attributes"/>
2238
2457
  <xsl:param name="colwidths"/>
@@ -2258,17 +2477,18 @@
2258
2477
  </xsl:variable>
2259
2478
 
2260
2479
  <fo:table keep-with-previous="always">
2261
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2480
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2481
+ <xsl:variable name="name" select="local-name()"/>
2262
2482
  <xsl:choose>
2263
- <xsl:when test="@name = 'border-top'">
2264
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2483
+ <xsl:when test="$name = 'border-top'">
2484
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
2265
2485
  </xsl:when>
2266
- <xsl:when test="@name = 'border'">
2267
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2486
+ <xsl:when test="$name = 'border'">
2487
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2268
2488
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2269
2489
  </xsl:when>
2270
2490
  <xsl:otherwise>
2271
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2491
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2272
2492
  </xsl:otherwise>
2273
2493
  </xsl:choose>
2274
2494
  </xsl:for-each>
@@ -2297,9 +2517,10 @@
2297
2517
 
2298
2518
  <fo:table-body>
2299
2519
  <fo:table-row>
2300
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2520
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
2301
2521
 
2302
2522
 
2523
+
2303
2524
 
2304
2525
 
2305
2526
  <!-- fn will be processed inside 'note' processing -->
@@ -2309,37 +2530,20 @@
2309
2530
 
2310
2531
 
2311
2532
 
2312
-
2313
-
2314
-
2315
2533
  <!-- for BSI (not PAS) display Notes before footnotes -->
2316
2534
 
2317
2535
 
2318
- <!-- except gb -->
2319
-
2320
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2536
+ <!-- except gb and bsi -->
2321
2537
 
2322
-
2323
- <!-- <xsl:if test="$namespace = 'bipm'">
2324
- <xsl:choose>
2325
- <xsl:when test="ancestor::*[local-name()='preface']">
2326
- show Note under table in preface (ex. abstract) sections
2327
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2328
- </xsl:when>
2329
- <xsl:otherwise>
2330
- empty, because notes show at page side in main sections
2331
- <fo:block/>
2332
- </xsl:otherwise>
2333
- </xsl:choose>
2334
- </xsl:if> -->
2538
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2539
+
2335
2540
 
2336
2541
 
2337
2542
  <!-- horizontal row separator -->
2338
2543
 
2339
2544
 
2340
2545
  <!-- fn processing -->
2341
- <xsl:call-template name="fn_display"/>
2342
-
2546
+ <xsl:call-template name="table_fn_display"/>
2343
2547
 
2344
2548
  <!-- for PAS display Notes after footnotes -->
2345
2549
 
@@ -2381,93 +2585,62 @@
2381
2585
 
2382
2586
 
2383
2587
  <xsl:apply-templates/>
2384
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2385
-
2588
+
2386
2589
  </fo:table-body>
2387
2590
 
2388
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2389
- <xsl:choose>
2390
- <xsl:when test="substring-after(., '—') != ''">
2391
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2392
- </xsl:when>
2393
- <xsl:otherwise>
2394
- <xsl:value-of select="."/>
2395
- </xsl:otherwise>
2396
- </xsl:choose>
2397
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2398
- <xsl:apply-templates mode="presentation_name"/>
2399
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2400
- <xsl:apply-templates select="."/>
2401
- </xsl:template><xsl:template match="*[local-name()='tr']">
2402
- <xsl:variable name="parent-name" select="local-name(..)"/>
2403
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2404
- <fo:table-row min-height="4mm">
2405
- <xsl:if test="$parent-name = 'thead'">
2406
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2407
-
2408
-
2409
-
2410
-
2411
-
2412
-
2413
-
2414
-
2415
- </xsl:if>
2416
- <xsl:if test="$parent-name = 'tfoot'">
2417
-
2418
-
2419
-
2420
- </xsl:if>
2421
-
2422
-
2423
- <xsl:if test="not(*[local-name()='th'])">
2424
- <xsl:attribute name="min-height">8mm</xsl:attribute>
2425
- </xsl:if>
2426
-
2427
-
2428
-
2429
-
2430
-
2431
-
2432
-
2433
-
2434
-
2435
- <!-- <xsl:if test="$namespace = 'bipm'">
2436
- <xsl:attribute name="height">8mm</xsl:attribute>
2437
- </xsl:if> -->
2438
-
2439
- <xsl:apply-templates/>
2440
- </fo:table-row>
2441
- </xsl:template><xsl:template match="*[local-name()='th']">
2442
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2443
- <xsl:attribute name="text-align">
2444
- <xsl:choose>
2445
- <xsl:when test="@align">
2446
- <xsl:call-template name="setAlignment"/>
2447
- <!-- <xsl:value-of select="@align"/> -->
2448
- </xsl:when>
2449
- <xsl:otherwise>center</xsl:otherwise>
2450
- </xsl:choose>
2451
- </xsl:attribute>
2591
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2592
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2593
+
2594
+
2452
2595
 
2453
2596
 
2597
+
2598
+
2599
+
2600
+ <xsl:call-template name="setTableRowAttributes"/>
2601
+
2602
+ <xsl:apply-templates/>
2603
+ </fo:table-row>
2604
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
2605
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
2454
2606
 
2607
+ <xsl:call-template name="setTableRowAttributes"/>
2608
+ <xsl:apply-templates/>
2609
+ </fo:table-row>
2610
+ </xsl:template><xsl:template match="*[local-name()='tr']">
2611
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
2612
+
2455
2613
 
2614
+
2456
2615
 
2616
+
2617
+ <xsl:call-template name="setTableRowAttributes"/>
2618
+ <xsl:apply-templates/>
2619
+ </fo:table-row>
2620
+ </xsl:template><xsl:template name="setTableRowAttributes">
2621
+
2622
+
2623
+
2624
+
2625
+
2626
+
2627
+
2628
+
2629
+ <xsl:if test="not(*[local-name()='th'])">
2630
+ <xsl:attribute name="min-height">8mm</xsl:attribute>
2631
+ </xsl:if>
2632
+
2633
+ </xsl:template><xsl:template match="*[local-name()='th']">
2634
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
2635
+ <xsl:call-template name="setTextAlignment">
2636
+ <xsl:with-param name="default">center</xsl:with-param>
2637
+ </xsl:call-template>
2457
2638
 
2458
2639
 
2459
2640
 
2460
2641
 
2642
+
2461
2643
 
2462
- <xsl:attribute name="display-align">center</xsl:attribute>
2463
- <xsl:attribute name="font-style">italic</xsl:attribute>
2464
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2465
- <xsl:attribute name="padding-top">2mm</xsl:attribute>
2466
- <xsl:attribute name="padding-left">2mm</xsl:attribute>
2467
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2468
- <xsl:attribute name="border-top">solid black 0.2pt</xsl:attribute>
2469
- <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
2470
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
2471
2644
 
2472
2645
 
2473
2646
 
@@ -2475,21 +2648,25 @@
2475
2648
  <xsl:if test="$lang = 'ar'">
2476
2649
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2477
2650
  </xsl:if>
2478
- <xsl:if test="@colspan">
2479
- <xsl:attribute name="number-columns-spanned">
2480
- <xsl:value-of select="@colspan"/>
2481
- </xsl:attribute>
2482
- </xsl:if>
2483
- <xsl:if test="@rowspan">
2484
- <xsl:attribute name="number-rows-spanned">
2485
- <xsl:value-of select="@rowspan"/>
2486
- </xsl:attribute>
2487
- </xsl:if>
2488
- <xsl:call-template name="display-align"/>
2651
+
2652
+ <xsl:call-template name="setTableCellAttributes"/>
2653
+
2489
2654
  <fo:block>
2490
2655
  <xsl:apply-templates/>
2491
2656
  </fo:block>
2492
2657
  </fo:table-cell>
2658
+ </xsl:template><xsl:template name="setTableCellAttributes">
2659
+ <xsl:if test="@colspan">
2660
+ <xsl:attribute name="number-columns-spanned">
2661
+ <xsl:value-of select="@colspan"/>
2662
+ </xsl:attribute>
2663
+ </xsl:if>
2664
+ <xsl:if test="@rowspan">
2665
+ <xsl:attribute name="number-rows-spanned">
2666
+ <xsl:value-of select="@rowspan"/>
2667
+ </xsl:attribute>
2668
+ </xsl:if>
2669
+ <xsl:call-template name="display-align"/>
2493
2670
  </xsl:template><xsl:template name="display-align">
2494
2671
  <xsl:if test="@valign">
2495
2672
  <xsl:attribute name="display-align">
@@ -2502,22 +2679,18 @@
2502
2679
  </xsl:attribute>
2503
2680
  </xsl:if>
2504
2681
  </xsl:template><xsl:template match="*[local-name()='td']">
2505
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2506
- <xsl:attribute name="text-align">
2507
- <xsl:choose>
2508
- <xsl:when test="@align">
2509
- <xsl:call-template name="setAlignment"/>
2510
- <!-- <xsl:value-of select="@align"/> -->
2511
- </xsl:when>
2512
- <xsl:otherwise>left</xsl:otherwise>
2513
- </xsl:choose>
2514
- </xsl:attribute>
2682
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
2683
+ <xsl:call-template name="setTextAlignment">
2684
+ <xsl:with-param name="default">left</xsl:with-param>
2685
+ </xsl:call-template>
2686
+
2515
2687
  <xsl:if test="$lang = 'ar'">
2516
2688
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2517
2689
  </xsl:if>
2518
2690
 
2519
2691
 
2520
2692
 
2693
+ <!-- bsi -->
2521
2694
 
2522
2695
 
2523
2696
 
@@ -2526,76 +2699,55 @@
2526
2699
 
2527
2700
 
2528
2701
 
2529
- <xsl:attribute name="display-align">before</xsl:attribute>
2530
- <xsl:attribute name="padding-left">0mm</xsl:attribute>
2531
- <xsl:attribute name="padding-top">2mm</xsl:attribute>
2532
- <xsl:attribute name="padding-bottom">1mm</xsl:attribute>
2533
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2534
- <xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
2535
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
2702
+
2536
2703
 
2537
2704
 
2538
2705
 
2539
2706
 
2540
2707
 
2541
2708
 
2542
- <xsl:if test=".//*[local-name() = 'table']">
2709
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
2543
2710
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2544
2711
  </xsl:if>
2545
- <xsl:if test="@colspan">
2546
- <xsl:attribute name="number-columns-spanned">
2547
- <xsl:value-of select="@colspan"/>
2548
- </xsl:attribute>
2549
- </xsl:if>
2550
- <xsl:if test="@rowspan">
2551
- <xsl:attribute name="number-rows-spanned">
2552
- <xsl:value-of select="@rowspan"/>
2553
- </xsl:attribute>
2554
- </xsl:if>
2555
- <xsl:call-template name="display-align"/>
2712
+
2713
+ <xsl:call-template name="setTableCellAttributes"/>
2714
+
2556
2715
  <fo:block>
2557
-
2716
+
2717
+
2718
+
2558
2719
  <xsl:apply-templates/>
2559
2720
  </fo:block>
2560
2721
  </fo:table-cell>
2561
2722
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2723
+
2724
+ <fo:block xsl:use-attribute-sets="table-note-style">
2725
+
2726
+
2727
+
2728
+
2562
2729
 
2563
-
2564
- <fo:block font-size="10pt" margin-bottom="12pt">
2730
+ <!-- Table's note name (NOTE, for example) -->
2731
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
2565
2732
 
2566
2733
 
2567
2734
 
2568
2735
 
2569
2736
 
2570
2737
 
2738
+ <xsl:if test="@type = 'source' or @type = 'abbreviation'">
2739
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
2740
+ </xsl:if>
2571
2741
 
2572
2742
 
2573
- <!-- Table's note name (NOTE, for example) -->
2574
-
2575
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
2576
-
2577
-
2578
-
2579
- <xsl:if test="@type = 'source' or @type = 'abbreviation'">
2580
- <xsl:attribute name="font-size">9pt</xsl:attribute>
2581
- <!-- <fo:inline>
2582
- <xsl:call-template name="capitalize">
2583
- <xsl:with-param name="str" select="@type"/>
2584
- </xsl:call-template>
2585
- <xsl:text>: </xsl:text>
2586
- </fo:inline> -->
2587
- </xsl:if>
2743
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
2588
2744
 
2589
-
2590
-
2591
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2592
-
2593
- </fo:inline>
2594
-
2595
-
2596
-
2597
- <xsl:apply-templates mode="process"/>
2598
- </fo:block>
2745
+ </fo:inline>
2746
+
2747
+
2748
+
2749
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
2750
+ </fo:block>
2599
2751
 
2600
2752
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
2601
2753
  <xsl:apply-templates/>
@@ -2675,10 +2827,7 @@
2675
2827
  <xsl:copy-of select="$footnote_inline"/>
2676
2828
  <fo:footnote-body>
2677
2829
 
2678
- <fo:block-container text-indent="0" start-indent="0">
2679
-
2680
-
2681
- <xsl:attribute name="margin-left">-8mm</xsl:attribute>
2830
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
2682
2831
 
2683
2832
  <fo:block xsl:use-attribute-sets="fn-body-style">
2684
2833
 
@@ -2697,7 +2846,7 @@
2697
2846
  <xsl:copy-of select="$footnote_inline"/>
2698
2847
  </xsl:otherwise>
2699
2848
  </xsl:choose>
2700
- </xsl:template><xsl:template name="fn_display">
2849
+ </xsl:template><xsl:template name="table_fn_display">
2701
2850
  <xsl:variable name="references">
2702
2851
 
2703
2852
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -2708,33 +2857,26 @@
2708
2857
  <xsl:for-each select="xalan:nodeset($references)//fn">
2709
2858
  <xsl:variable name="reference" select="@reference"/>
2710
2859
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2711
- <fo:block margin-bottom="12pt">
2860
+ <fo:block xsl:use-attribute-sets="table-fn-style">
2712
2861
 
2713
2862
 
2714
2863
 
2715
-
2716
-
2717
-
2718
-
2719
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
2864
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
2720
2865
 
2721
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2722
2866
 
2723
2867
 
2724
2868
 
2725
2869
 
2870
+ <xsl:value-of select="@reference"/>
2726
2871
 
2727
2872
 
2728
2873
 
2729
2874
 
2730
- <xsl:value-of select="@reference"/>
2731
2875
 
2732
2876
 
2733
2877
 
2734
2878
  </fo:inline>
2735
- <fo:inline>
2736
-
2737
- <!-- <xsl:apply-templates /> -->
2879
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
2738
2880
  <xsl:copy-of select="./node()"/>
2739
2881
  </fo:inline>
2740
2882
  </fo:block>
@@ -2746,15 +2888,7 @@
2746
2888
 
2747
2889
  <xsl:apply-templates/>
2748
2890
  </fn>
2749
- </xsl:template><xsl:template name="fn_name_display">
2750
- <!-- <xsl:variable name="references">
2751
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2752
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2753
- <xsl:apply-templates />
2754
- </fn>
2755
- </xsl:for-each>
2756
- </xsl:variable>
2757
- $references=<xsl:copy-of select="$references"/> -->
2891
+ </xsl:template><xsl:template name="table_name_fn_display">
2758
2892
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2759
2893
  <xsl:variable name="reference" select="@reference"/>
2760
2894
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -2763,9 +2897,7 @@
2763
2897
  </fo:block>
2764
2898
  </xsl:for-each>
2765
2899
  </xsl:template><xsl:template name="fn_display_figure">
2766
- <xsl:variable name="key_iso">
2767
- <!-- and (not(@class) or @class !='pseudocode') -->
2768
- </xsl:variable>
2900
+
2769
2901
  <xsl:variable name="references">
2770
2902
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2771
2903
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -2773,50 +2905,52 @@
2773
2905
  </fn>
2774
2906
  </xsl:for-each>
2775
2907
  </xsl:variable>
2908
+
2909
+ <xsl:if test="xalan:nodeset($references)//fn">
2776
2910
 
2777
- <!-- current hierarchy is 'figure' element -->
2778
- <xsl:variable name="following_dl_colwidths">
2779
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2780
- <xsl:variable name="html-table">
2781
- <xsl:variable name="doc_ns">
2911
+ <xsl:variable name="key_iso">
2912
+
2913
+ </xsl:variable>
2914
+
2915
+ <!-- current hierarchy is 'figure' element -->
2916
+ <xsl:variable name="following_dl_colwidths">
2917
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2918
+ <xsl:variable name="html-table">
2919
+ <xsl:variable name="doc_ns">
2920
+
2921
+ </xsl:variable>
2922
+ <xsl:variable name="ns">
2923
+ <xsl:choose>
2924
+ <xsl:when test="normalize-space($doc_ns) != ''">
2925
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2926
+ </xsl:when>
2927
+ <xsl:otherwise>
2928
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2929
+ </xsl:otherwise>
2930
+ </xsl:choose>
2931
+ </xsl:variable>
2782
2932
 
2783
- </xsl:variable>
2784
- <xsl:variable name="ns">
2785
- <xsl:choose>
2786
- <xsl:when test="normalize-space($doc_ns) != ''">
2787
- <xsl:value-of select="normalize-space($doc_ns)"/>
2788
- </xsl:when>
2789
- <xsl:otherwise>
2790
- <xsl:value-of select="substring-before(name(/*), '-')"/>
2791
- </xsl:otherwise>
2792
- </xsl:choose>
2793
- </xsl:variable>
2794
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2795
- <!-- <xsl:element name="{$ns}:table"> -->
2796
2933
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2797
2934
  <tbody>
2798
2935
  <xsl:apply-templates mode="dl"/>
2799
2936
  </tbody>
2800
2937
  </xsl:for-each>
2801
- <!-- </xsl:element> -->
2802
- </xsl:variable>
2803
-
2804
- <xsl:call-template name="calculate-column-widths">
2805
- <xsl:with-param name="cols-count" select="2"/>
2806
- <xsl:with-param name="table" select="$html-table"/>
2807
- </xsl:call-template>
2808
-
2809
- </xsl:if>
2810
- </xsl:variable>
2811
-
2812
-
2813
- <xsl:variable name="maxlength_dt">
2814
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2815
- <xsl:call-template name="getMaxLength_dt"/>
2816
- </xsl:for-each>
2817
- </xsl:variable>
2818
-
2819
- <xsl:if test="xalan:nodeset($references)//fn">
2938
+ </xsl:variable>
2939
+
2940
+ <xsl:call-template name="calculate-column-widths">
2941
+ <xsl:with-param name="cols-count" select="2"/>
2942
+ <xsl:with-param name="table" select="$html-table"/>
2943
+ </xsl:call-template>
2944
+
2945
+ </xsl:if>
2946
+ </xsl:variable>
2947
+
2948
+ <xsl:variable name="maxlength_dt">
2949
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
2950
+ <xsl:call-template name="getMaxLength_dt"/>
2951
+ </xsl:for-each>
2952
+ </xsl:variable>
2953
+
2820
2954
  <fo:block>
2821
2955
  <fo:table width="95%" table-layout="fixed">
2822
2956
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -2843,20 +2977,18 @@
2843
2977
  <fo:table-row>
2844
2978
  <fo:table-cell>
2845
2979
  <fo:block>
2846
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
2847
-
2980
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
2848
2981
  <xsl:value-of select="@reference"/>
2849
2982
  </fo:inline>
2850
2983
  </fo:block>
2851
2984
  </fo:table-cell>
2852
2985
  <fo:table-cell>
2853
- <fo:block text-align="justify" margin-bottom="12pt">
2854
-
2986
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
2855
2987
  <xsl:if test="normalize-space($key_iso) = 'true'">
2856
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
2988
+
2989
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
2990
+
2857
2991
  </xsl:if>
2858
-
2859
- <!-- <xsl:apply-templates /> -->
2860
2992
  <xsl:copy-of select="./node()"/>
2861
2993
  </fo:block>
2862
2994
  </fo:table-cell>
@@ -2869,14 +3001,8 @@
2869
3001
  </xsl:if>
2870
3002
 
2871
3003
  </xsl:template><xsl:template match="*[local-name()='fn']">
2872
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2873
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
2874
-
2875
-
2876
-
2877
-
2878
-
2879
-
3004
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
3005
+
2880
3006
 
2881
3007
 
2882
3008
 
@@ -2900,10 +3026,10 @@
2900
3026
  <xsl:variable name="isDeleted" select="@deleted"/>
2901
3027
  <fo:block-container>
2902
3028
 
2903
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2904
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2905
- </xsl:if>
2906
-
3029
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3030
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3031
+ </xsl:if>
3032
+
2907
3033
 
2908
3034
  <xsl:if test="parent::*[local-name() = 'note']">
2909
3035
  <xsl:attribute name="margin-left">
@@ -2920,11 +3046,11 @@
2920
3046
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
2921
3047
  </xsl:call-template>
2922
3048
 
2923
- <fo:block-container>
2924
-
2925
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2926
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3049
+ <fo:block-container margin-left="0mm">
3050
+
2927
3051
 
3052
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3053
+
2928
3054
 
2929
3055
  <xsl:variable name="parent" select="local-name(..)"/>
2930
3056
 
@@ -2935,20 +3061,19 @@
2935
3061
  <xsl:choose>
2936
3062
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2937
3063
 
2938
-
2939
- <fo:block margin-bottom="12pt" text-align="left">
2940
-
2941
- <xsl:variable name="title-where">
2942
- <xsl:call-template name="getLocalizedString">
2943
- <xsl:with-param name="key">where</xsl:with-param>
2944
- </xsl:call-template>
2945
- </xsl:variable>
2946
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2947
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2948
- <xsl:text/>
2949
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2950
- </fo:block>
2951
-
3064
+ <fo:block margin-bottom="12pt" text-align="left">
3065
+
3066
+ <xsl:variable name="title-where">
3067
+ <xsl:call-template name="getLocalizedString">
3068
+ <xsl:with-param name="key">where</xsl:with-param>
3069
+ </xsl:call-template>
3070
+ </xsl:variable>
3071
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3072
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
3073
+ <xsl:text/>
3074
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3075
+ </fo:block>
3076
+
2952
3077
  </xsl:when>
2953
3078
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2954
3079
  <fo:block margin-bottom="12pt" text-align="left">
@@ -2995,9 +3120,7 @@
2995
3120
  <fo:table width="95%" table-layout="fixed">
2996
3121
 
2997
3122
  <xsl:choose>
2998
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2999
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3000
- </xsl:when>
3123
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
3001
3124
  <xsl:when test="normalize-space($key_iso) = 'true'">
3002
3125
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3003
3126
 
@@ -3018,12 +3141,9 @@
3018
3141
  </xsl:otherwise>
3019
3142
  </xsl:choose>
3020
3143
  </xsl:variable>
3021
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3022
- <!-- <xsl:element name="{$ns}:table"> -->
3023
- <tbody>
3024
- <xsl:apply-templates mode="dl"/>
3025
- </tbody>
3026
- <!-- </xsl:element> -->
3144
+ <tbody>
3145
+ <xsl:apply-templates mode="dl"/>
3146
+ </tbody>
3027
3147
  </xsl:variable>
3028
3148
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
3029
3149
  <xsl:variable name="colwidths">
@@ -3103,8 +3223,6 @@
3103
3223
  </xsl:for-each>
3104
3224
  </xsl:otherwise>
3105
3225
  </xsl:choose>
3106
- <!-- <fo:table-column column-width="15%"/>
3107
- <fo:table-column column-width="85%"/> -->
3108
3226
  </xsl:otherwise>
3109
3227
  </xsl:choose>
3110
3228
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -3119,12 +3237,6 @@
3119
3237
  </xsl:for-each>
3120
3238
  </xsl:variable>
3121
3239
  <xsl:variable name="maxLength">
3122
- <!-- <xsl:for-each select="*[local-name()='dt']">
3123
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3124
- <xsl:if test="position() = 1">
3125
- <xsl:value-of select="string-length(normalize-space(.))"/>
3126
- </xsl:if>
3127
- </xsl:for-each> -->
3128
3240
  <xsl:for-each select="xalan:nodeset($lengths)/length">
3129
3241
  <xsl:sort select="." data-type="number" order="descending"/>
3130
3242
  <xsl:if test="position() = 1">
@@ -3150,12 +3262,12 @@
3150
3262
  <xsl:if test="normalize-space($key_iso) = 'true'">
3151
3263
  <xsl:attribute name="margin-top">0</xsl:attribute>
3152
3264
  </xsl:if>
3153
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3265
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3154
3266
  </fo:block>
3155
3267
  </fo:table-cell>
3156
3268
  <fo:table-cell>
3157
3269
  <fo:block>
3158
- <xsl:apply-templates/>
3270
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3159
3271
  </fo:block>
3160
3272
  </fo:table-cell>
3161
3273
  </fo:table-row>
@@ -3166,76 +3278,37 @@
3166
3278
  </td>
3167
3279
  <td>
3168
3280
 
3169
-
3170
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3171
-
3281
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3282
+
3172
3283
  </td>
3173
3284
  </tr>
3174
3285
 
3175
3286
  </xsl:template><xsl:template match="*[local-name()='dt']">
3176
3287
  <xsl:param name="key_iso"/>
3177
3288
 
3178
- <fo:table-row>
3179
-
3180
-
3289
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
3181
3290
  <fo:table-cell>
3182
3291
 
3183
- <fo:block margin-top="6pt">
3292
+ <fo:block xsl:use-attribute-sets="dt-style">
3184
3293
  <xsl:copy-of select="@id"/>
3185
3294
 
3186
-
3187
3295
  <xsl:if test="normalize-space($key_iso) = 'true'">
3188
3296
  <xsl:attribute name="margin-top">0</xsl:attribute>
3189
-
3190
3297
  </xsl:if>
3191
3298
 
3192
3299
 
3193
3300
 
3194
-
3195
-
3196
-
3197
-
3198
3301
  <xsl:apply-templates/>
3199
- <!-- <xsl:if test="$namespace = 'gb'">
3200
- <xsl:if test="ancestor::*[local-name()='formula']">
3201
- <xsl:text>—</xsl:text>
3202
- </xsl:if>
3203
- </xsl:if> -->
3204
3302
  </fo:block>
3205
3303
  </fo:table-cell>
3206
3304
  <fo:table-cell>
3207
3305
  <fo:block>
3208
3306
 
3209
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3210
- <xsl:if test="local-name(*[1]) != 'stem'">
3211
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3212
- </xsl:if>
3213
- </xsl:if> -->
3214
-
3215
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3216
-
3307
+
3308
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3217
3309
  </fo:block>
3218
3310
  </fo:table-cell>
3219
3311
  </fo:table-row>
3220
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3221
- <xsl:if test="local-name(*[1]) = 'stem'">
3222
- <fo:table-row>
3223
- <fo:table-cell>
3224
- <fo:block margin-top="6pt">
3225
- <xsl:if test="normalize-space($key_iso) = 'true'">
3226
- <xsl:attribute name="margin-top">0</xsl:attribute>
3227
- </xsl:if>
3228
- <xsl:text>&#xA0;</xsl:text>
3229
- </fo:block>
3230
- </fo:table-cell>
3231
- <fo:table-cell>
3232
- <fo:block>
3233
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3234
- </fo:block>
3235
- </fo:table-cell>
3236
- </fo:table-row>
3237
- </xsl:if>
3238
- </xsl:if> -->
3239
3312
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3240
3313
  <xsl:apply-templates/>
3241
3314
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3264,6 +3337,7 @@
3264
3337
  </fo:inline>
3265
3338
  </xsl:template><xsl:template match="*[local-name()='tt']">
3266
3339
  <fo:inline xsl:use-attribute-sets="tt-style">
3340
+
3267
3341
  <xsl:variable name="_font-size">
3268
3342
 
3269
3343
 
@@ -3300,15 +3374,21 @@
3300
3374
  <xsl:apply-templates/>
3301
3375
  </fo:inline>
3302
3376
  </xsl:template><xsl:template match="*[local-name()='add']">
3377
+ <xsl:param name="skip">true</xsl:param>
3303
3378
  <xsl:choose>
3304
3379
  <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
3305
- <fo:inline>
3306
- <xsl:call-template name="insertTag">
3307
- <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3308
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3309
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3310
- </xsl:call-template>
3311
- </fo:inline>
3380
+ <xsl:choose>
3381
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
3382
+ <xsl:otherwise>
3383
+ <fo:inline>
3384
+ <xsl:call-template name="insertTag">
3385
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3386
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3387
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3388
+ </xsl:call-template>
3389
+ </fo:inline>
3390
+ </xsl:otherwise>
3391
+ </xsl:choose>
3312
3392
  </xsl:when>
3313
3393
  <xsl:when test="@amendment">
3314
3394
  <fo:inline>
@@ -3351,8 +3431,6 @@
3351
3431
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
3352
3432
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
3353
3433
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
3354
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
3355
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
3356
3434
  <xsl:attribute name="height">5mm</xsl:attribute>
3357
3435
  <xsl:attribute name="content-width">100%</xsl:attribute>
3358
3436
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -3570,14 +3648,6 @@
3570
3648
 
3571
3649
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3572
3650
 
3573
- <!-- <xsl:choose>
3574
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
3575
-
3576
- </xsl:when>
3577
- <xsl:otherwise>
3578
- <xsl:copy-of select="current()"/>
3579
- </xsl:otherwise>
3580
- </xsl:choose> -->
3581
3651
  </xsl:variable>
3582
3652
  <xsl:copy-of select="$simple-table"/>
3583
3653
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -3696,8 +3766,6 @@
3696
3766
  <xsl:choose>
3697
3767
  <xsl:when test="contains($str2, ' ')">
3698
3768
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
3699
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
3700
- <xsl:value-of select="substring($substr, 2)"/> -->
3701
3769
  <xsl:call-template name="capitalize">
3702
3770
  <xsl:with-param name="str" select="$substr"/>
3703
3771
  </xsl:call-template>
@@ -3707,8 +3775,6 @@
3707
3775
  </xsl:call-template>
3708
3776
  </xsl:when>
3709
3777
  <xsl:otherwise>
3710
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
3711
- <xsl:value-of select="substring($str2, 2)"/> -->
3712
3778
  <xsl:call-template name="capitalize">
3713
3779
  <xsl:with-param name="str" select="$str2"/>
3714
3780
  </xsl:call-template>
@@ -3736,6 +3802,7 @@
3736
3802
  <xsl:apply-templates select="." mode="mathml"/>
3737
3803
  </xsl:variable>
3738
3804
  <fo:instream-foreign-object fox:alt-text="Math">
3805
+
3739
3806
 
3740
3807
 
3741
3808
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -3767,7 +3834,7 @@
3767
3834
  </xsl:attribute>
3768
3835
 
3769
3836
 
3770
- <!-- <xsl:copy-of select="."/> -->
3837
+
3771
3838
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
3772
3839
  </fo:instream-foreign-object>
3773
3840
  </fo:inline>
@@ -3826,6 +3893,10 @@
3826
3893
 
3827
3894
 
3828
3895
 
3896
+
3897
+
3898
+
3899
+
3829
3900
  <xsl:choose>
3830
3901
  <xsl:when test="$target_text = ''">
3831
3902
  <xsl:apply-templates/>
@@ -3883,7 +3954,6 @@
3883
3954
  </fo:inline>
3884
3955
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3885
3956
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3886
-
3887
3957
  <xsl:apply-templates/>
3888
3958
  </fo:basic-link>
3889
3959
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3911,58 +3981,73 @@
3911
3981
  <fo:inline>
3912
3982
  <xsl:apply-templates/>
3913
3983
  </fo:inline>
3914
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
3984
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
3915
3985
  <xsl:if test="normalize-space() != ''">
3916
3986
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
3917
3987
  </xsl:if>
3918
3988
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
3919
3989
 
3920
3990
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
3991
+
3992
+
3993
+
3921
3994
 
3922
3995
 
3923
3996
 
3924
3997
 
3925
3998
 
3999
+
4000
+
4001
+
3926
4002
  <fo:block-container margin-left="0mm">
4003
+
3927
4004
 
3928
4005
 
3929
4006
 
4007
+
3930
4008
 
3931
-
3932
-
3933
-
3934
-
3935
- <fo:block>
3936
-
3937
-
3938
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3939
- <xsl:attribute name="text-indent">0</xsl:attribute>
3940
- <xsl:attribute name="padding-top">1.5mm</xsl:attribute>
3941
- <xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
3942
- <xsl:attribute name="font-size">9pt</xsl:attribute>
3943
- <xsl:attribute name="text-align">justify</xsl:attribute>
3944
- <xsl:attribute name="padding-top">0mm</xsl:attribute>
3945
- </xsl:if>
3946
-
3947
-
3948
-
3949
-
4009
+ <fo:block>
4010
+
4011
+
3950
4012
 
3951
- <fo:inline xsl:use-attribute-sets="note-name-style">
3952
4013
 
3953
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3954
- </fo:inline>
3955
- <xsl:apply-templates/>
3956
- </fo:block>
3957
-
3958
-
4014
+
4015
+
4016
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4017
+ <xsl:attribute name="text-indent">0</xsl:attribute>
4018
+ <xsl:attribute name="padding-top">1.5mm</xsl:attribute>
4019
+ <xsl:if test="../@type = 'source' or ../@type = 'abbreviation'">
4020
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
4021
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4022
+ <xsl:attribute name="padding-top">0mm</xsl:attribute>
4023
+ </xsl:if>
4024
+
4025
+
4026
+ <fo:inline xsl:use-attribute-sets="note-name-style">
4027
+
4028
+
4029
+
4030
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
4031
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4032
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4033
+ <xsl:with-param name="skip">false</xsl:with-param>
4034
+ </xsl:apply-templates>
4035
+ </xsl:if>
4036
+
4037
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4038
+
4039
+ </fo:inline>
4040
+
4041
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4042
+ </fo:block>
4043
+
3959
4044
  </fo:block-container>
3960
4045
  </fo:block-container>
3961
4046
 
3962
4047
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
3963
4048
  <xsl:variable name="num"><xsl:number/></xsl:variable>
3964
4049
  <xsl:choose>
3965
- <xsl:when test="$num = 1">
4050
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
3966
4051
  <fo:inline xsl:use-attribute-sets="note-p-style">
3967
4052
  <xsl:apply-templates/>
3968
4053
  </fo:inline>
@@ -3977,12 +4062,16 @@
3977
4062
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3978
4063
 
3979
4064
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4065
+
4066
+
4067
+
4068
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3980
4069
 
3981
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3982
4070
  </fo:inline>
3983
- <xsl:apply-templates/>
4071
+
4072
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3984
4073
  </fo:block>
3985
- </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
4074
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
3986
4075
  <xsl:param name="sfx"/>
3987
4076
  <xsl:variable name="suffix">
3988
4077
  <xsl:choose>
@@ -4001,7 +4090,7 @@
4001
4090
  <xsl:apply-templates/>
4002
4091
  <xsl:value-of select="$suffix"/>
4003
4092
  </xsl:if>
4004
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
4093
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
4005
4094
  <xsl:param name="sfx"/>
4006
4095
  <xsl:variable name="suffix">
4007
4096
  <xsl:choose>
@@ -4028,25 +4117,23 @@
4028
4117
  <xsl:apply-templates/>
4029
4118
  </fo:block>
4030
4119
  </xsl:template><xsl:template match="*[local-name() = 'term']">
4031
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
4032
4120
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4033
4121
 
4034
4122
 
4123
+
4124
+
4035
4125
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
4036
4126
 
4037
4127
  </xsl:if>
4038
- <xsl:apply-templates/>
4128
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4039
4129
  </fo:block>
4040
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4130
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
4041
4131
  <xsl:if test="normalize-space() != ''">
4042
4132
  <xsl:variable name="level">
4043
4133
  <xsl:call-template name="getLevelTermName"/>
4044
4134
  </xsl:variable>
4045
4135
  <fo:inline role="H{$level}">
4046
4136
  <xsl:apply-templates/>
4047
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
4048
- <xsl:text>.</xsl:text>
4049
- </xsl:if> -->
4050
4137
  </fo:inline>
4051
4138
  </xsl:if>
4052
4139
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -4059,9 +4146,10 @@
4059
4146
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4060
4147
  </xsl:call-template>
4061
4148
 
4062
- <fo:block>
4063
-
4064
- <xsl:apply-templates/>
4149
+
4150
+
4151
+ <fo:block xsl:use-attribute-sets="figure-style">
4152
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4065
4153
  </fo:block>
4066
4154
  <xsl:call-template name="fn_display_figure"/>
4067
4155
  <xsl:for-each select="*[local-name() = 'note']">
@@ -4069,14 +4157,15 @@
4069
4157
  </xsl:for-each>
4070
4158
 
4071
4159
 
4072
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4160
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
4161
+
4073
4162
 
4074
4163
  </fo:block-container>
4075
4164
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4076
4165
  <fo:block id="{@id}">
4077
- <xsl:apply-templates/>
4166
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4078
4167
  </fo:block>
4079
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4168
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4080
4169
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
4081
4170
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
4082
4171
  <xsl:apply-templates/>
@@ -4183,9 +4272,7 @@
4183
4272
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
4184
4273
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
4185
4274
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
4186
- <!-- width=<xsl:value-of select="$width"/> -->
4187
4275
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
4188
- <!-- height=<xsl:value-of select="$height"/> -->
4189
4276
  <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
4190
4277
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
4191
4278
  <xsl:call-template name="svg_cross">
@@ -4455,7 +4542,7 @@
4455
4542
  </fo:basic-link>
4456
4543
  </fo:block>
4457
4544
  </fo:block-container>
4458
- </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4545
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4459
4546
  <xsl:apply-templates mode="contents"/>
4460
4547
  <xsl:text> </xsl:text>
4461
4548
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
@@ -4608,8 +4695,6 @@
4608
4695
 
4609
4696
 
4610
4697
 
4611
-
4612
-
4613
4698
  </fo:bookmark-tree>
4614
4699
  </xsl:if>
4615
4700
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -4680,7 +4765,7 @@
4680
4765
  <xsl:apply-templates mode="bookmark"/>
4681
4766
  </xsl:otherwise>
4682
4767
  </xsl:choose>
4683
- </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
4768
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
4684
4769
  <xsl:if test="normalize-space() != ''">
4685
4770
  <fo:block xsl:use-attribute-sets="figure-name-style">
4686
4771
 
@@ -4696,12 +4781,6 @@
4696
4781
  <!-- <xsl:text> </xsl:text> -->
4697
4782
  </xsl:template><xsl:template name="getSection">
4698
4783
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4699
- <!--
4700
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
4701
- <xsl:value-of select="."/>
4702
- </xsl:for-each>
4703
- -->
4704
-
4705
4784
  </xsl:template><xsl:template name="getName">
4706
4785
  <xsl:choose>
4707
4786
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -4770,16 +4849,21 @@
4770
4849
  <xsl:apply-templates mode="contents_item">
4771
4850
  <xsl:with-param name="mode" select="$mode"/>
4772
4851
  </xsl:apply-templates>
4773
- </xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
4852
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
4774
4853
  <xsl:param name="mode">bookmarks</xsl:param>
4775
- <xsl:if test="$mode = 'contents'">
4776
- <xsl:copy>
4777
- <xsl:apply-templates mode="contents_item"/>
4778
- </xsl:copy>
4779
- </xsl:if>
4854
+ <xsl:choose>
4855
+ <xsl:when test="starts-with(text(), $ace_tag)">
4856
+ <xsl:if test="$mode = 'contents'">
4857
+ <xsl:copy>
4858
+ <xsl:apply-templates mode="contents_item"/>
4859
+ </xsl:copy>
4860
+ </xsl:if>
4861
+ </xsl:when>
4862
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
4863
+ </xsl:choose>
4780
4864
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4781
4865
 
4782
- <fo:block-container margin-left="0mm">
4866
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
4783
4867
  <xsl:copy-of select="@id"/>
4784
4868
 
4785
4869
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -4816,6 +4900,7 @@
4816
4900
 
4817
4901
  10
4818
4902
  </xsl:variable>
4903
+
4819
4904
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
4820
4905
  <xsl:if test="$font-size != ''">
4821
4906
  <xsl:attribute name="font-size">
@@ -4832,11 +4917,11 @@
4832
4917
 
4833
4918
 
4834
4919
 
4835
- <xsl:apply-templates/>
4920
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4836
4921
  </fo:block>
4837
4922
 
4838
4923
 
4839
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4924
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
4840
4925
 
4841
4926
 
4842
4927
 
@@ -4850,7 +4935,7 @@
4850
4935
  <xsl:call-template name="add-zero-spaces-java">
4851
4936
  <xsl:with-param name="text" select="$text"/>
4852
4937
  </xsl:call-template>
4853
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
4938
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
4854
4939
  <xsl:if test="normalize-space() != ''">
4855
4940
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
4856
4941
  <xsl:apply-templates/>
@@ -4858,10 +4943,10 @@
4858
4943
  </xsl:if>
4859
4944
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
4860
4945
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
4861
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4862
- <xsl:apply-templates/>
4946
+ <xsl:apply-templates select="*[local-name()='name']"/>
4947
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4863
4948
  </fo:block>
4864
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
4949
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
4865
4950
  <xsl:if test="normalize-space() != ''">
4866
4951
  <fo:block xsl:use-attribute-sets="permission-name-style">
4867
4952
  <xsl:apply-templates/>
@@ -4874,13 +4959,13 @@
4874
4959
  </fo:block>
4875
4960
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
4876
4961
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
4877
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4878
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
4879
- <xsl:apply-templates select="@obligation" mode="presentation"/>
4880
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
4881
- <xsl:apply-templates/>
4962
+ <xsl:apply-templates select="*[local-name()='name']"/>
4963
+ <xsl:apply-templates select="*[local-name()='label']"/>
4964
+ <xsl:apply-templates select="@obligation"/>
4965
+ <xsl:apply-templates select="*[local-name()='subject']"/>
4966
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
4882
4967
  </fo:block>
4883
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
4968
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
4884
4969
  <xsl:if test="normalize-space() != ''">
4885
4970
  <fo:block xsl:use-attribute-sets="requirement-name-style">
4886
4971
 
@@ -4888,20 +4973,24 @@
4888
4973
 
4889
4974
  </fo:block>
4890
4975
  </xsl:if>
4891
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
4976
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
4892
4977
  <fo:block xsl:use-attribute-sets="requirement-label-style">
4893
4978
  <xsl:apply-templates/>
4894
4979
  </fo:block>
4895
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
4980
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
4896
4981
  <fo:block>
4897
4982
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
4898
4983
  </fo:block>
4984
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
4985
+ <fo:block xsl:use-attribute-sets="subject-style">
4986
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4987
+ </fo:block>
4899
4988
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
4900
4989
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
4901
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4902
- <xsl:apply-templates/>
4990
+ <xsl:apply-templates select="*[local-name()='name']"/>
4991
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4903
4992
  </fo:block>
4904
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
4993
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
4905
4994
  <xsl:if test="normalize-space() != ''">
4906
4995
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
4907
4996
  <xsl:apply-templates/>
@@ -4912,10 +5001,6 @@
4912
5001
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
4913
5002
  <xsl:apply-templates/>
4914
5003
  </fo:block>
4915
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
4916
- <fo:block xsl:use-attribute-sets="subject-style">
4917
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
4918
- </fo:block>
4919
5004
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
4920
5005
  <fo:block xsl:use-attribute-sets="subject-style">
4921
5006
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -4959,8 +5044,6 @@
4959
5044
  </xsl:variable>
4960
5045
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
4961
5046
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
4962
- <!-- <fo:table-column column-width="35mm"/>
4963
- <fo:table-column column-width="115mm"/> -->
4964
5047
  <fo:table-column column-width="30%"/>
4965
5048
  <fo:table-column column-width="70%"/>
4966
5049
  </xsl:if>
@@ -4970,7 +5053,7 @@
4970
5053
  <xsl:if test=".//*[local-name() = 'fn']">
4971
5054
  <xsl:for-each select="*[local-name() = 'tbody']">
4972
5055
  <fo:block font-size="90%" border-bottom="1pt solid black">
4973
- <xsl:call-template name="fn_display"/>
5056
+ <xsl:call-template name="table_fn_display"/>
4974
5057
  </fo:block>
4975
5058
  </xsl:for-each>
4976
5059
  </xsl:if>
@@ -4987,7 +5070,6 @@
4987
5070
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
4988
5071
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
4989
5072
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
4990
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
4991
5073
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
4992
5074
  </xsl:if>
4993
5075
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -5000,34 +5082,11 @@
5000
5082
  </fo:table-row>
5001
5083
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
5002
5084
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
5003
- <xsl:attribute name="text-align">
5004
- <xsl:choose>
5005
- <xsl:when test="@align">
5006
- <xsl:value-of select="@align"/>
5007
- </xsl:when>
5008
- <xsl:otherwise>left</xsl:otherwise>
5009
- </xsl:choose>
5010
- </xsl:attribute>
5011
- <xsl:if test="@colspan">
5012
- <xsl:attribute name="number-columns-spanned">
5013
- <xsl:value-of select="@colspan"/>
5014
- </xsl:attribute>
5015
- </xsl:if>
5016
- <xsl:if test="@rowspan">
5017
- <xsl:attribute name="number-rows-spanned">
5018
- <xsl:value-of select="@rowspan"/>
5019
- </xsl:attribute>
5020
- </xsl:if>
5021
- <xsl:call-template name="display-align"/>
5085
+ <xsl:call-template name="setTextAlignment">
5086
+ <xsl:with-param name="default">left</xsl:with-param>
5087
+ </xsl:call-template>
5022
5088
 
5023
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5024
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5025
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
5026
- </xsl:if>
5027
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
5028
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5029
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5030
- </xsl:if> -->
5089
+ <xsl:call-template name="setTableCellAttributes"/>
5031
5090
 
5032
5091
  <fo:block>
5033
5092
  <xsl:apply-templates/>
@@ -5039,37 +5098,15 @@
5039
5098
  <xsl:attribute name="padding">0mm</xsl:attribute>
5040
5099
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
5041
5100
  </xsl:if>
5042
- <xsl:attribute name="text-align">
5043
- <xsl:choose>
5044
- <xsl:when test="@align">
5045
- <xsl:value-of select="@align"/>
5046
- </xsl:when>
5047
- <xsl:otherwise>left</xsl:otherwise>
5048
- </xsl:choose>
5049
- </xsl:attribute>
5101
+ <xsl:call-template name="setTextAlignment">
5102
+ <xsl:with-param name="default">left</xsl:with-param>
5103
+ </xsl:call-template>
5104
+
5050
5105
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
5051
5106
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5052
5107
  </xsl:if>
5053
- <xsl:if test="@colspan">
5054
- <xsl:attribute name="number-columns-spanned">
5055
- <xsl:value-of select="@colspan"/>
5056
- </xsl:attribute>
5057
- </xsl:if>
5058
- <xsl:if test="@rowspan">
5059
- <xsl:attribute name="number-rows-spanned">
5060
- <xsl:value-of select="@rowspan"/>
5061
- </xsl:attribute>
5062
- </xsl:if>
5063
- <xsl:call-template name="display-align"/>
5064
5108
 
5065
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5066
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
5067
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5068
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
5069
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5070
- </xsl:if>
5071
- </xsl:if> -->
5072
- <!-- 2nd line and below -->
5109
+ <xsl:call-template name="setTableCellAttributes"/>
5073
5110
 
5074
5111
  <fo:block>
5075
5112
  <xsl:apply-templates/>
@@ -5081,15 +5118,15 @@
5081
5118
  <xsl:apply-templates/>
5082
5119
  </fo:block>
5083
5120
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
5084
- <fo:block> <!-- margin-bottom="10pt" -->
5121
+ <fo:block>
5085
5122
  <xsl:apply-templates/>
5086
5123
  </fo:block>
5087
5124
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
5088
5125
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
5089
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5090
- <xsl:apply-templates/>
5126
+ <xsl:apply-templates select="*[local-name()='name']"/>
5127
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5091
5128
  </fo:block>
5092
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
5129
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
5093
5130
  <xsl:if test="normalize-space() != ''">
5094
5131
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5095
5132
  <xsl:apply-templates/>
@@ -5115,9 +5152,7 @@
5115
5152
 
5116
5153
  <xsl:variable name="fo_element">
5117
5154
  <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5118
- block
5119
-
5120
-
5155
+ block
5121
5156
  </xsl:variable>
5122
5157
 
5123
5158
  <!-- display 'EXAMPLE' -->
@@ -5194,6 +5229,8 @@
5194
5229
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5195
5230
  <fo:block xsl:use-attribute-sets="termsource-style">
5196
5231
 
5232
+
5233
+
5197
5234
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5198
5235
  <xsl:variable name="termsource_text">
5199
5236
  <xsl:apply-templates/>
@@ -5231,9 +5268,7 @@
5231
5268
  <xsl:value-of select="."/>
5232
5269
  </xsl:if>
5233
5270
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
5234
- <fo:inline>
5235
-
5236
-
5271
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
5237
5272
  <xsl:value-of select="."/>
5238
5273
  </fo:inline>
5239
5274
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -5276,7 +5311,6 @@
5276
5311
  <fo:block-container margin-left="0mm">
5277
5312
 
5278
5313
  <fo:block xsl:use-attribute-sets="quote-style">
5279
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
5280
5314
 
5281
5315
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5282
5316
  </fo:block>
@@ -5319,15 +5353,13 @@
5319
5353
  </xsl:variable>
5320
5354
 
5321
5355
  <xsl:choose>
5322
- <xsl:when test="normalize-space($bibitemid) != ''">
5356
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
5323
5357
  <fo:inline xsl:use-attribute-sets="eref-style">
5324
5358
  <xsl:if test="@type = 'footnote'">
5325
-
5326
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5327
- <xsl:attribute name="font-size">80%</xsl:attribute>
5328
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5329
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5330
-
5359
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5360
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5361
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5362
+ <xsl:attribute name="font-size">80%</xsl:attribute>
5331
5363
 
5332
5364
  </xsl:if>
5333
5365
 
@@ -5344,7 +5376,6 @@
5344
5376
 
5345
5377
 
5346
5378
 
5347
-
5348
5379
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
5349
5380
 
5350
5381
  </xsl:if>
@@ -5404,8 +5435,6 @@
5404
5435
  </xsl:choose>
5405
5436
  </xsl:variable>
5406
5437
 
5407
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
5408
-
5409
5438
  <xsl:choose>
5410
5439
  <xsl:when test="$lang = 'zh'">
5411
5440
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -5461,7 +5490,6 @@
5461
5490
  <xsl:apply-templates/>
5462
5491
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5463
5492
  <fo:inline> <xsl:apply-templates/></fo:inline>
5464
- <!-- <fo:block>&#xA0;</fo:block> -->
5465
5493
  <fo:block/>
5466
5494
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5467
5495
 
@@ -5502,11 +5530,6 @@
5502
5530
  <xsl:apply-templates/>
5503
5531
  </fo:block>
5504
5532
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
5505
- <fo:block id="{@id}">
5506
- <xsl:apply-templates/>
5507
- </fo:block>
5508
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
5509
-
5510
5533
  <fo:block id="{@id}">
5511
5534
  <xsl:apply-templates/>
5512
5535
  </fo:block>
@@ -5779,32 +5802,68 @@
5779
5802
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
5780
5803
  <fo:block><xsl:apply-templates/></fo:block>
5781
5804
  </fo:table-cell>
5782
- </xsl:template><xsl:template name="processBibitem">
5783
-
5784
-
5785
-
5786
-
5805
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/><xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
5787
5806
 
5788
5807
 
5789
5808
 
5809
+ <fo:block id="{@id}">
5810
+ <xsl:apply-templates/>
5811
+ </fo:block>
5812
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
5813
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
5814
+
5815
+ </xsl:if>
5790
5816
 
5817
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
5818
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
5819
+ <fo:block break-after="page"/>
5820
+ </xsl:if>
5821
+ </xsl:if> -->
5791
5822
 
5823
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
5824
+ <xsl:apply-templates/>
5825
+ </fo:block>
5792
5826
 
5793
5827
 
5794
-
5795
5828
 
5796
5829
 
5797
-
5830
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
5831
+ <xsl:call-template name="bibitem"/>
5832
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
5798
5833
 
5834
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
5835
+ <xsl:call-template name="processBibitem"/>
5836
+ </fo:block>
5837
+
5799
5838
 
5839
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
5800
5840
 
5801
- <!-- end MPFD bibitem processing -->
5802
5841
 
5803
- <!-- start M3D bibitem processing -->
5842
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
5843
+ <xsl:call-template name="processBibitem"/>
5844
+ </fo:block>
5845
+
5804
5846
 
5847
+ </xsl:template><xsl:template name="processBibitem">
5805
5848
 
5806
-
5807
5849
 
5850
+ <fo:inline padding-right="5mm">[<xsl:value-of select="un:docidentifier"/>]</fo:inline><xsl:value-of select="un:docidentifier"/>
5851
+ <xsl:if test="un:title">
5852
+ <fo:inline font-style="italic">
5853
+ <xsl:text>, </xsl:text>
5854
+ <xsl:choose>
5855
+ <xsl:when test="un:title[@type = 'main' and @language = 'en']">
5856
+ <xsl:apply-templates select="un:title[@type = 'main' and @language = 'en']"/>
5857
+ </xsl:when>
5858
+ <xsl:otherwise>
5859
+ <xsl:apply-templates select="un:title"/>
5860
+ </xsl:otherwise>
5861
+ </xsl:choose>
5862
+ </fo:inline>
5863
+ </xsl:if>
5864
+ <xsl:apply-templates select="un:formattedref"/>
5865
+
5866
+
5808
5867
  </xsl:template><xsl:template name="processBibitemDocId">
5809
5868
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5810
5869
  <xsl:choose>
@@ -5861,6 +5920,50 @@
5861
5920
  <xsl:value-of select="substring(.,1,1)"/>
5862
5921
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
5863
5922
  <fo:inline><xsl:apply-templates/></fo:inline>
5923
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
5924
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
5925
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
5926
+ <xsl:apply-templates/>
5927
+ </fo:inline>
5928
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
5929
+ <fo:footnote>
5930
+ <xsl:variable name="number">
5931
+
5932
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
5933
+
5934
+ </xsl:variable>
5935
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
5936
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
5937
+ <xsl:value-of select="$number"/>
5938
+
5939
+ </fo:basic-link>
5940
+ </fo:inline>
5941
+ <fo:footnote-body>
5942
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
5943
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
5944
+ <xsl:value-of select="$number"/>
5945
+
5946
+ </fo:inline>
5947
+ <xsl:apply-templates/>
5948
+ </fo:block>
5949
+ </fo:footnote-body>
5950
+ </fo:footnote>
5951
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
5952
+ <xsl:text> edition </xsl:text>
5953
+ <xsl:value-of select="."/>
5954
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
5955
+ <xsl:text> (</xsl:text>
5956
+ <fo:inline xsl:use-attribute-sets="link-style">
5957
+ <fo:basic-link external-destination="." fox:alt-text=".">
5958
+ <xsl:value-of select="."/>
5959
+ </fo:basic-link>
5960
+ </fo:inline>
5961
+ <xsl:text>)</xsl:text>
5962
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
5963
+
5964
+ <xsl:text>, </xsl:text>
5965
+
5966
+ <xsl:apply-templates/>
5864
5967
  </xsl:template><xsl:template match="*[local-name() = 'form']">
5865
5968
  <fo:block>
5866
5969
  <xsl:apply-templates/>
@@ -5933,24 +6036,7 @@
5933
6036
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
5934
6037
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
5935
6038
  <xsl:otherwise><!-- default value -->
5936
-
5937
-
5938
-
5939
-
5940
-
5941
-
5942
-
5943
-
5944
-
5945
-
5946
-
5947
-
5948
-
5949
-
5950
-
5951
-
5952
6039
  3
5953
-
5954
6040
  </xsl:otherwise>
5955
6041
  </xsl:choose>
5956
6042
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -6048,6 +6134,65 @@
6048
6134
  <xsl:copy-of select="."/>
6049
6135
  </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
6050
6136
  <xsl:call-template name="title"/>
6137
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
6138
+
6139
+
6140
+
6141
+ <!-- display name before box -->
6142
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
6143
+ <xsl:call-template name="displayAdmonitionName"/>
6144
+ </fo:block>
6145
+
6146
+
6147
+ <!-- text in the box -->
6148
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
6149
+
6150
+
6151
+
6152
+
6153
+
6154
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
6155
+
6156
+
6157
+ <fo:block-container margin-left="0mm" margin-right="0mm">
6158
+ <fo:block>
6159
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6160
+ </fo:block>
6161
+ </fo:block-container>
6162
+
6163
+ </fo:block-container>
6164
+
6165
+ </fo:block-container>
6166
+
6167
+ </xsl:template><xsl:template name="displayAdmonitionName">
6168
+
6169
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6170
+ <xsl:if test="not(*[local-name() = 'name'])">
6171
+ <xsl:apply-templates select="@type"/>
6172
+ </xsl:if>
6173
+
6174
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
6175
+ <xsl:apply-templates/>
6176
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
6177
+ <xsl:variable name="admonition_type_">
6178
+ <xsl:call-template name="getLocalizedString">
6179
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
6180
+ </xsl:call-template>
6181
+ </xsl:variable>
6182
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
6183
+ <xsl:value-of select="$admonition_type"/>
6184
+ <xsl:if test="$admonition_type = ''">
6185
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
6186
+ </xsl:if>
6187
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
6188
+
6189
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
6190
+
6191
+
6192
+
6193
+ <xsl:apply-templates/>
6194
+ </fo:block>
6195
+
6051
6196
  </xsl:template><xsl:template name="convertDate">
6052
6197
  <xsl:param name="date"/>
6053
6198
  <xsl:param name="format" select="'short'"/>
@@ -6056,78 +6201,39 @@
6056
6201
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
6057
6202
  <xsl:variable name="monthStr">
6058
6203
  <xsl:choose>
6059
- <xsl:when test="$month = '01'">January</xsl:when>
6060
- <xsl:when test="$month = '02'">February</xsl:when>
6061
- <xsl:when test="$month = '03'">March</xsl:when>
6062
- <xsl:when test="$month = '04'">April</xsl:when>
6063
- <xsl:when test="$month = '05'">May</xsl:when>
6064
- <xsl:when test="$month = '06'">June</xsl:when>
6065
- <xsl:when test="$month = '07'">July</xsl:when>
6066
- <xsl:when test="$month = '08'">August</xsl:when>
6067
- <xsl:when test="$month = '09'">September</xsl:when>
6068
- <xsl:when test="$month = '10'">October</xsl:when>
6069
- <xsl:when test="$month = '11'">November</xsl:when>
6070
- <xsl:when test="$month = '12'">December</xsl:when>
6071
- </xsl:choose>
6072
- </xsl:variable>
6073
- <xsl:variable name="result">
6074
- <xsl:choose>
6075
- <xsl:when test="$format = 'ddMMyyyy'">
6076
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6077
- <xsl:text> </xsl:text>
6078
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6079
- </xsl:when>
6080
- <xsl:when test="$format = 'ddMM'">
6081
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6082
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6083
- </xsl:when>
6084
- <xsl:when test="$format = 'short' or $day = ''">
6085
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6086
- </xsl:when>
6087
- <xsl:otherwise>
6088
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6089
- </xsl:otherwise>
6204
+ <xsl:when test="$month = '01'">january</xsl:when>
6205
+ <xsl:when test="$month = '02'">february</xsl:when>
6206
+ <xsl:when test="$month = '03'">march</xsl:when>
6207
+ <xsl:when test="$month = '04'">april</xsl:when>
6208
+ <xsl:when test="$month = '05'">may</xsl:when>
6209
+ <xsl:when test="$month = '06'">june</xsl:when>
6210
+ <xsl:when test="$month = '07'">july</xsl:when>
6211
+ <xsl:when test="$month = '08'">august</xsl:when>
6212
+ <xsl:when test="$month = '09'">september</xsl:when>
6213
+ <xsl:when test="$month = '10'">october</xsl:when>
6214
+ <xsl:when test="$month = '11'">november</xsl:when>
6215
+ <xsl:when test="$month = '12'">december</xsl:when>
6090
6216
  </xsl:choose>
6091
6217
  </xsl:variable>
6092
- <xsl:value-of select="$result"/>
6093
- </xsl:template><xsl:template name="convertDateLocalized">
6094
- <xsl:param name="date"/>
6095
- <xsl:param name="format" select="'short'"/>
6096
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
6097
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
6098
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
6099
- <xsl:variable name="monthStr">
6100
- <xsl:choose>
6101
- <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
6102
- <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
6103
- <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
6104
- <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
6105
- <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
6106
- <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
6107
- <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
6108
- <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
6109
- <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
6110
- <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
6111
- <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
6112
- <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
6113
- </xsl:choose>
6218
+ <xsl:variable name="monthStr_localized">
6219
+ <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
6114
6220
  </xsl:variable>
6115
6221
  <xsl:variable name="result">
6116
6222
  <xsl:choose>
6117
6223
  <xsl:when test="$format = 'ddMMyyyy'">
6118
6224
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6119
6225
  <xsl:text> </xsl:text>
6120
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6226
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
6121
6227
  </xsl:when>
6122
6228
  <xsl:when test="$format = 'ddMM'">
6123
6229
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6124
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6230
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
6125
6231
  </xsl:when>
6126
6232
  <xsl:when test="$format = 'short' or $day = ''">
6127
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6233
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
6128
6234
  </xsl:when>
6129
6235
  <xsl:otherwise>
6130
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6236
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
6131
6237
  </xsl:otherwise>
6132
6238
  </xsl:choose>
6133
6239
  </xsl:variable>
@@ -6180,13 +6286,8 @@
6180
6286
  <xsl:variable name="title">
6181
6287
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6182
6288
 
6183
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
6184
-
6185
-
6186
-
6187
-
6188
-
6189
-
6289
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
6290
+
6190
6291
  </xsl:for-each>
6191
6292
  </xsl:variable>
6192
6293
  <xsl:choose>
@@ -6201,21 +6302,18 @@
6201
6302
  <dc:creator>
6202
6303
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6203
6304
 
6204
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6205
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6206
- <xsl:if test="position() != last()">; </xsl:if>
6207
- </xsl:for-each>
6208
-
6209
-
6210
-
6305
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6306
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6307
+ <xsl:if test="position() != last()">; </xsl:if>
6308
+ </xsl:for-each>
6309
+
6211
6310
  </xsl:for-each>
6212
6311
  </dc:creator>
6213
6312
  <dc:description>
6214
6313
  <xsl:variable name="abstract">
6215
6314
 
6216
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6217
-
6218
-
6315
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6316
+
6219
6317
  </xsl:variable>
6220
6318
  <xsl:value-of select="normalize-space($abstract)"/>
6221
6319
  </dc:description>
@@ -6235,7 +6333,6 @@
6235
6333
  <xsl:value-of select="../@id"/>
6236
6334
  </xsl:when>
6237
6335
  <xsl:otherwise>
6238
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
6239
6336
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
6240
6337
  </xsl:otherwise>
6241
6338
  </xsl:choose>
@@ -6261,9 +6358,6 @@
6261
6358
  <xsl:when test="ancestor::*[local-name() = 'preface']">
6262
6359
  <xsl:value-of select="$level_total - 2"/>
6263
6360
  </xsl:when>
6264
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
6265
- <xsl:value-of select="$level_total - 1"/>
6266
- </xsl:when> -->
6267
6361
  <xsl:when test="ancestor::*[local-name() = 'sections']">
6268
6362
  <xsl:value-of select="$level_total - 1"/>
6269
6363
  </xsl:when>
@@ -6453,7 +6547,6 @@
6453
6547
  <xsl:value-of select="$key_"/>
6454
6548
  </xsl:otherwise>
6455
6549
  </xsl:choose>
6456
-
6457
6550
  </xsl:template><xsl:template name="setTrackChangesStyles">
6458
6551
  <xsl:param name="isAdded"/>
6459
6552
  <xsl:param name="isDeleted"/>
@@ -6476,7 +6569,6 @@
6476
6569
  <xsl:if test="local-name() = 'table'">
6477
6570
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
6478
6571
  </xsl:if>
6479
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
6480
6572
  <xsl:attribute name="padding">2mm</xsl:attribute>
6481
6573
  </xsl:if>
6482
6574
  </xsl:otherwise>
@@ -6496,15 +6588,18 @@
6496
6588
  </xsl:choose>
6497
6589
  </xsl:template><xsl:template name="setTextAlignment">
6498
6590
  <xsl:param name="default">left</xsl:param>
6591
+ <xsl:variable name="align" select="normalize-space(@align)"/>
6499
6592
  <xsl:attribute name="text-align">
6500
6593
  <xsl:choose>
6501
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
6594
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
6595
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
6596
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
6502
6597
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
6503
6598
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
6504
6599
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6505
6600
  </xsl:choose>
6506
6601
  </xsl:attribute>
6507
- <xsl:if test="@align = 'indent'">
6602
+ <xsl:if test="$align = 'indent'">
6508
6603
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
6509
6604
  </xsl:if>
6510
6605
  </xsl:template><xsl:template name="number-to-words">