metanorma-ribose 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -68,7 +68,7 @@
68
68
 
69
69
  <xsl:template match="/">
70
70
  <xsl:call-template name="namespaceCheck"/>
71
- <fo:root font-family="OpenSans, STIX Two Math" font-weight="300" font-size="11pt" color="rgb(88, 88, 90)" xml:lang="{$lang}">
71
+ <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
72
72
  <fo:layout-master-set>
73
73
 
74
74
  <!-- Cover page -->
@@ -360,7 +360,7 @@
360
360
  <fo:block>
361
361
  <xsl:apply-templates select="/rsd:rsd-standard/rsd:bibdata/rsd:ext/rsd:security"/>
362
362
  <fo:block>
363
- <xsl:call-template name="convertDateLocalized">
363
+ <xsl:call-template name="convertDate">
364
364
  <xsl:with-param name="date" select="/rsd:rsd-standard/rsd:bibdata/rsd:date[@type = 'published']/rsd:on"/>
365
365
  <xsl:with-param name="format" select="'Month DD, YYYY'"/>
366
366
  </xsl:call-template>
@@ -524,10 +524,6 @@
524
524
  <!-- ============================= -->
525
525
  <!-- CONTENTS -->
526
526
  <!-- ============================= -->
527
- <xsl:template match="node()" mode="contents">
528
- <xsl:apply-templates mode="contents"/>
529
- </xsl:template>
530
-
531
527
 
532
528
  <!-- element with title -->
533
529
  <xsl:template match="*[rsd:title]" mode="contents">
@@ -853,117 +849,6 @@
853
849
  </xsl:template>
854
850
 
855
851
 
856
-
857
- <xsl:template match="rsd:bibitem">
858
- <fo:block id="{@id}" margin-bottom="12pt" font-weight="normal"> <!-- start-indent="12mm" text-indent="-12mm" -->
859
- <xsl:if test=".//rsd:fn">
860
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
861
- </xsl:if>
862
- <!-- <xsl:if test="rsd:docidentifier">
863
- <xsl:if test="rsd:docidentifier/@type != 'IETF' and rsd:docidentifier/@type != 'ISO'">
864
- <xsl:value-of select="rsd:docidentifier/@type"/><xsl:text> </xsl:text>
865
- </xsl:if>
866
- <xsl:value-of select="rsd:docidentifier"/>
867
- </xsl:if> -->
868
- <xsl:value-of select="rsd:docidentifier"/>
869
- <xsl:apply-templates select="rsd:note"/>
870
- <xsl:if test="rsd:docidentifier">, </xsl:if>
871
- <xsl:choose>
872
- <xsl:when test="rsd:formattedref">
873
- <xsl:apply-templates select="rsd:formattedref"/>
874
- </xsl:when>
875
- <xsl:otherwise>
876
- <xsl:for-each select="rsd:contributor[rsd:role/@type='publisher']/rsd:organization/rsd:name">
877
- <xsl:apply-templates/>
878
- <xsl:if test="position() != last()">, </xsl:if>
879
- <xsl:if test="position() = last()">: </xsl:if>
880
- </xsl:for-each>
881
- <!-- rsd:docidentifier -->
882
-
883
- <fo:inline font-style="italic">
884
- <xsl:choose>
885
- <xsl:when test="rsd:title[@type = 'main' and @language = 'en']">
886
- <xsl:value-of select="rsd:title[@type = 'main' and @language = 'en']"/><xsl:text>. </xsl:text>
887
- </xsl:when>
888
- <xsl:otherwise>
889
- <xsl:value-of select="rsd:title"/><xsl:text>. </xsl:text>
890
- </xsl:otherwise>
891
- </xsl:choose>
892
- </fo:inline>
893
- <xsl:for-each select="rsd:contributor[rsd:role/@type='publisher']/rsd:organization/rsd:name">
894
- <xsl:apply-templates/>
895
- <xsl:if test="position() != last()">, </xsl:if>
896
- </xsl:for-each>
897
- <xsl:if test="rsd:date[@type='published']/rsd:on">
898
- <xsl:text> (</xsl:text><xsl:value-of select="rsd:date[@type='published']/rsd:on"/><xsl:text>)</xsl:text>
899
- </xsl:if>
900
- </xsl:otherwise>
901
- </xsl:choose>
902
- </fo:block>
903
- </xsl:template>
904
-
905
-
906
- <xsl:template match="rsd:bibitem/rsd:note" priority="2">
907
- <fo:footnote>
908
- <xsl:variable name="number">
909
- <xsl:choose>
910
- <xsl:when test="ancestor::rsd:references[preceding-sibling::rsd:references]">
911
- <xsl:number level="any" count="rsd:references[preceding-sibling::rsd:references]//rsd:bibitem/rsd:note"/>
912
- </xsl:when>
913
- <xsl:otherwise>
914
- <xsl:number level="any" count="rsd:bibitem/rsd:note"/>
915
- </xsl:otherwise>
916
- </xsl:choose>
917
- </xsl:variable>
918
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super"> <!-- 60% baseline-shift="35%" -->
919
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
920
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
921
- </fo:basic-link>
922
- </fo:inline>
923
- <fo:footnote-body>
924
- <fo:block font-size="10pt" margin-bottom="12pt" start-indent="0pt" color="rgb(168, 170, 173)">
925
- <fo:inline id="{generate-id()}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"><!-- baseline-shift="30%" padding-right="9mm" alignment-baseline="hanging" -->
926
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
927
- </fo:inline>
928
- <xsl:apply-templates/>
929
- </fo:block>
930
- </fo:footnote-body>
931
- </fo:footnote>
932
- </xsl:template>
933
-
934
-
935
- <xsl:template match="rsd:references[not(@normative='true')]/rsd:bibitem">
936
- <fo:list-block margin-bottom="4pt" provisional-distance-between-starts="8mm">
937
- <fo:list-item>
938
- <fo:list-item-label end-indent="label-end()">
939
- <fo:block>
940
- <fo:inline id="{@id}">
941
- <xsl:number format="1."/> <!-- [1] -->
942
- </fo:inline>
943
- </fo:block>
944
- </fo:list-item-label>
945
- <fo:list-item-body start-indent="body-start()">
946
- <fo:block>
947
- <xsl:if test="rsd:docidentifier">
948
- <xsl:choose>
949
- <xsl:when test="rsd:docidentifier/@type = 'metanorma'"/>
950
- <xsl:otherwise><fo:inline><xsl:value-of select="rsd:docidentifier[not(@type = 'metanorma-ordinal')]"/>, </fo:inline></xsl:otherwise>
951
- </xsl:choose>
952
- </xsl:if>
953
- <xsl:choose>
954
- <xsl:when test="rsd:title[@type = 'main' and @language = 'en']">
955
- <xsl:apply-templates select="rsd:title[@type = 'main' and @language = 'en']"/>
956
- </xsl:when>
957
- <xsl:otherwise>
958
- <xsl:apply-templates select="rsd:title"/>
959
- </xsl:otherwise>
960
- </xsl:choose>
961
- <xsl:apply-templates select="rsd:formattedref"/>
962
- </fo:block>
963
- </fo:list-item-body>
964
- </fo:list-item>
965
- </fo:list-block>
966
- </xsl:template>
967
852
 
968
853
 
969
854
 
@@ -1054,8 +939,8 @@
1054
939
  <fo:list-item-label><fo:block/></fo:list-item-label>
1055
940
  <fo:list-item-body>
1056
941
  <fo:block>
1057
- <xsl:apply-templates select="rsd:name" mode="presentation"/>
1058
- <xsl:apply-templates/>
942
+ <xsl:apply-templates select="rsd:name"/>
943
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1059
944
  </fo:block>
1060
945
  </fo:list-item-body>
1061
946
  </fo:list-item>
@@ -1080,7 +965,7 @@
1080
965
  <xsl:if test="preceding-sibling::*[1][self::rsd:name]">
1081
966
  <xsl:attribute name="space-before">11mm</xsl:attribute>
1082
967
  <fo:inline padding-right="1mm">
1083
- <xsl:apply-templates select="ancestor::rsd:term[1]/rsd:name" mode="presentation"/>
968
+ <xsl:apply-templates select="ancestor::rsd:term[1]/rsd:name"/>
1084
969
  </fo:inline>
1085
970
  </xsl:if>
1086
971
 
@@ -1116,9 +1001,7 @@
1116
1001
  </fo:block>
1117
1002
  </xsl:template>
1118
1003
 
1119
-
1120
- <xsl:template match="rsd:references[not(@normative='true')]/rsd:title" priority="2"/>
1121
- <xsl:template match="rsd:references[not(@normative='true')]">
1004
+ <xsl:template match="rsd:references[not(@normative='true')]" priority="3">
1122
1005
  <fo:block break-after="page"/>
1123
1006
  <fo:block id="{@id}">
1124
1007
  <fo:table width="100%" table-layout="fixed">
@@ -1141,7 +1024,7 @@
1141
1024
  <fo:table-row>
1142
1025
  <fo:table-cell text-align="left">
1143
1026
  <fo:block>
1144
- <xsl:apply-templates/>
1027
+ <xsl:apply-templates select="node()[not(local-name() = 'title')]"/>
1145
1028
  </fo:block>
1146
1029
  </fo:table-cell>
1147
1030
  </fo:table-row>
@@ -1150,41 +1033,7 @@
1150
1033
 
1151
1034
  </fo:block>
1152
1035
  </xsl:template>
1153
-
1154
- <!-- <xsl:template match="rsd:references[@id = '_bibliography']/rsd:bibitem/rsd:title"> [position() &gt; 1]-->
1155
- <xsl:template match="rsd:references[not(@normative='true')]/rsd:bibitem/rsd:title">
1156
- <fo:inline font-style="italic">
1157
- <xsl:apply-templates/>
1158
- </fo:inline>
1159
- </xsl:template>
1160
-
1161
-
1162
- <!-- <xsl:template match="rsd:note/rsd:p" name="note">
1163
- <fo:block font-size="10pt" margin-top="12pt" margin-bottom="12pt" line-height="115%">
1164
- <xsl:if test="ancestor::rsd:ul or ancestor::rsd:ol and not(ancestor::rsd:note[1]/following-sibling::*)">
1165
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1166
- </xsl:if>
1167
- <fo:inline padding-right="4mm">
1168
- <xsl:apply-templates select="../rsd:name" mode="presentation"/>
1169
- </fo:inline>
1170
- <xsl:apply-templates />
1171
- </fo:block>
1172
- </xsl:template>
1173
- -->
1174
-
1175
1036
 
1176
- <xsl:template match="rsd:admonition">
1177
- <fo:block-container border="0.5pt solid rgb(79, 129, 189)" color="rgb(79, 129, 189)" margin-left="16mm" margin-right="16mm" margin-bottom="12pt">
1178
- <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
1179
- <fo:block font-size="11pt" margin-bottom="6pt" font-weight="normal" font-style="italic" text-align="center">
1180
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
1181
- </fo:block>
1182
- <fo:block font-style="italic">
1183
- <xsl:apply-templates/>
1184
- </fo:block>
1185
- </fo:block-container>
1186
- </fo:block-container>
1187
- </xsl:template>
1188
1037
 
1189
1038
  <xsl:template match="rsd:formula/rsd:stem">
1190
1039
  <fo:block margin-top="6pt" margin-bottom="12pt">
@@ -1200,7 +1049,7 @@
1200
1049
  </fo:table-cell>
1201
1050
  <fo:table-cell display-align="center">
1202
1051
  <fo:block text-align="right">
1203
- <xsl:apply-templates select="../rsd:name" mode="presentation"/>
1052
+ <xsl:apply-templates select="../rsd:name" mode="formula_number"/>
1204
1053
  </fo:block>
1205
1054
  </fo:table-cell>
1206
1055
  </fo:table-row>
@@ -1463,22 +1312,18 @@
1463
1312
 
1464
1313
 
1465
1314
 
1466
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
1315
+ <xsl:variable name="titles_">
1467
1316
 
1468
1317
  <title-edition lang="en">
1469
1318
 
1470
-
1471
- <xsl:text>Version</xsl:text>
1472
-
1319
+ <xsl:text>Version</xsl:text>
1320
+
1473
1321
  </title-edition>
1474
1322
 
1475
1323
  <title-edition lang="fr">
1476
-
1477
- <xsl:text>Édition </xsl:text>
1478
-
1324
+ <xsl:text>Édition </xsl:text>
1479
1325
  </title-edition>
1480
1326
 
1481
-
1482
1327
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
1483
1328
  <title-toc lang="en">
1484
1329
 
@@ -1486,10 +1331,13 @@
1486
1331
 
1487
1332
  </title-toc>
1488
1333
  <title-toc lang="fr">
1334
+ <xsl:text>Sommaire</xsl:text>
1335
+ </title-toc>
1336
+ <title-toc lang="zh">
1489
1337
 
1338
+ <xsl:text>Contents</xsl:text>
1339
+
1490
1340
  </title-toc>
1491
-
1492
-
1493
1341
 
1494
1342
  <title-descriptors lang="en">Descriptors</title-descriptors>
1495
1343
 
@@ -1505,12 +1353,8 @@
1505
1353
  </title-part>
1506
1354
  <title-part lang="zh">第 # 部分:</title-part>
1507
1355
 
1508
- <title-subpart lang="en">
1509
-
1510
- </title-subpart>
1511
- <title-subpart lang="fr">
1512
-
1513
- </title-subpart>
1356
+ <title-subpart lang="en">Sub-part #</title-subpart>
1357
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
1514
1358
 
1515
1359
  <title-list-tables lang="en">List of Tables</title-list-tables>
1516
1360
 
@@ -1525,7 +1369,7 @@
1525
1369
  <title-continued lang="en">(continued)</title-continued>
1526
1370
  <title-continued lang="fr">(continué)</title-continued>
1527
1371
 
1528
- </xsl:variable><xsl:variable name="bibdata">
1372
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
1529
1373
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1530
1374
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1531
1375
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1554,6 +1398,25 @@
1554
1398
  </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">
1555
1399
 
1556
1400
 
1401
+
1402
+
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+ <xsl:attribute name="font-family">OpenSans, STIX Two Math</xsl:attribute>
1415
+ <xsl:attribute name="font-weight">300</xsl:attribute>
1416
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1417
+ <xsl:attribute name="color">rgb(88, 88, 90)</xsl:attribute>
1418
+
1419
+
1557
1420
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1558
1421
 
1559
1422
 
@@ -1564,16 +1427,21 @@
1564
1427
 
1565
1428
 
1566
1429
 
1430
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
1431
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1432
+
1433
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1434
+
1567
1435
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1568
1436
  <xsl:attribute name="white-space">pre</xsl:attribute>
1569
1437
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1570
1438
  <xsl:attribute name="role">Code</xsl:attribute>
1571
1439
 
1572
1440
 
1573
- <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1574
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1575
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1576
- <xsl:attribute name="line-height">113%</xsl:attribute>
1441
+
1442
+
1443
+
1444
+
1577
1445
 
1578
1446
 
1579
1447
 
@@ -1582,6 +1450,13 @@
1582
1450
 
1583
1451
 
1584
1452
 
1453
+ <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1454
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1455
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1456
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1457
+
1458
+
1459
+
1585
1460
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1586
1461
 
1587
1462
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1694,59 +1569,45 @@
1694
1569
 
1695
1570
  </xsl:attribute-set><xsl:variable name="table-border_">
1696
1571
 
1697
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1698
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1699
-
1572
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1573
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1574
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1575
+
1700
1576
 
1701
1577
 
1702
1578
 
1703
1579
 
1704
-
1705
1580
 
1706
1581
 
1707
1582
 
1708
-
1709
1583
 
1710
1584
 
1711
1585
 
1712
1586
 
1713
- <xsl:attribute name="font-size">13pt</xsl:attribute>
1714
- <xsl:attribute name="font-weight">300</xsl:attribute>
1715
- <xsl:attribute name="color">black</xsl:attribute>
1716
- <xsl:attribute name="text-align">left</xsl:attribute>
1717
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1718
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1719
1587
 
1720
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1721
1588
 
1722
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
1723
1589
 
1724
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1725
1590
 
1726
1591
 
1727
1592
 
1728
- <xsl:attribute name="font-size">12pt</xsl:attribute>
1729
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1730
- <xsl:attribute name="color">black</xsl:attribute>
1731
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1732
1593
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1733
1594
 
1734
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1595
+
1735
1596
 
1736
1597
 
1598
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
1599
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
1600
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
1601
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1602
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1737
1603
 
1738
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1739
- <xsl:attribute name="color">black</xsl:attribute>
1740
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1741
1604
 
1742
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1743
1605
 
1744
1606
 
1745
1607
 
1746
1608
 
1747
1609
 
1748
1610
 
1749
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
1750
1611
 
1751
1612
 
1752
1613
 
@@ -1754,135 +1615,149 @@
1754
1615
 
1755
1616
 
1756
1617
 
1757
- </xsl:attribute-set><xsl:attribute-set name="note-style">
1758
1618
 
1759
1619
 
1760
1620
 
1621
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
1622
+ <xsl:attribute name="font-size">9.5pt</xsl:attribute> <!-- 8pt -->
1761
1623
 
1762
-
1763
1624
 
1764
1625
 
1626
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1627
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1628
+
1765
1629
 
1766
1630
 
1767
1631
 
1768
1632
 
1633
+
1769
1634
 
1770
1635
 
1771
1636
 
1637
+
1772
1638
 
1773
1639
 
1774
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1775
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1776
1640
 
1777
- </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1778
1641
 
1642
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
1643
+ <xsl:attribute name="font-weight">300</xsl:attribute>
1644
+ <xsl:attribute name="color">black</xsl:attribute>
1645
+ <xsl:attribute name="text-align">left</xsl:attribute>
1646
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1647
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1779
1648
 
1649
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
1650
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
1780
1651
 
1781
1652
 
1782
1653
 
1783
1654
 
1655
+ <xsl:attribute name="min-height">8.5mm</xsl:attribute>
1784
1656
 
1657
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
1658
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1785
1659
 
1786
1660
 
1787
1661
 
1788
1662
 
1789
1663
 
1790
1664
 
1791
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1792
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1793
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1794
1665
 
1795
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1666
+
1796
1667
 
1668
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1669
+ <xsl:attribute name="background-color">rgb(32, 98, 169)</xsl:attribute>
1670
+ <xsl:attribute name="color">white</xsl:attribute>
1797
1671
 
1672
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1798
1673
 
1799
1674
 
1800
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1801
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1802
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1803
1675
 
1804
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1676
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
1677
+
1678
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
1679
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1680
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1681
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1682
+ <xsl:attribute name="display-align">center</xsl:attribute>
1805
1683
 
1806
1684
 
1807
1685
 
1808
-
1809
1686
 
1810
1687
 
1811
1688
 
1812
1689
 
1813
1690
 
1814
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1815
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1816
1691
 
1817
1692
 
1818
1693
 
1694
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1695
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
1819
1696
 
1820
1697
 
1821
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1822
1698
 
1699
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
1700
+ <xsl:attribute name="display-align">center</xsl:attribute>
1701
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1702
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1823
1703
 
1824
1704
 
1825
1705
 
1826
1706
 
1827
1707
 
1828
1708
 
1829
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1830
1709
 
1831
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1832
1710
 
1833
-
1834
1711
 
1835
1712
 
1836
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1837
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1838
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1839
-
1840
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
1841
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
1842
1713
 
1843
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1844
- <xsl:attribute name="margin-left">13mm</xsl:attribute>
1845
- <xsl:attribute name="margin-right">12mm</xsl:attribute>
1714
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
1715
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1846
1716
 
1847
1717
 
1848
1718
 
1719
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1720
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1721
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
1722
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1723
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1849
1724
 
1850
1725
 
1851
1726
 
1852
1727
 
1853
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1854
1728
 
1855
- <xsl:attribute name="text-align">right</xsl:attribute>
1856
- <xsl:attribute name="margin-right">25mm</xsl:attribute>
1857
1729
 
1858
-
1859
-
1860
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1861
1730
 
1731
+
1862
1732
 
1863
1733
 
1864
1734
 
1735
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
1865
1736
 
1737
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
1738
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1739
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1866
1740
 
1867
1741
 
1868
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1869
1742
 
1870
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
1871
1743
 
1872
1744
 
1873
1745
 
1874
1746
 
1875
1747
 
1876
- </xsl:attribute-set><xsl:attribute-set name="term-style">
1748
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1877
1749
 
1878
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1750
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1751
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1879
1752
 
1880
1753
 
1881
-
1882
1754
 
1883
1755
 
1884
1756
 
1885
1757
 
1758
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1759
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1760
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1886
1761
 
1887
1762
 
1888
1763
 
@@ -1890,55 +1765,282 @@
1890
1765
 
1891
1766
 
1892
1767
 
1893
- <xsl:attribute name="font-size">13pt</xsl:attribute>
1894
- <xsl:attribute name="font-weight">300</xsl:attribute>
1895
- <xsl:attribute name="color">black</xsl:attribute>
1896
- <xsl:attribute name="text-align">left</xsl:attribute>
1897
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1898
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1899
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1900
1768
 
1901
1769
 
1902
-
1903
1770
 
1904
1771
 
1905
1772
 
1906
-
1907
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
1773
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
1774
+ <xsl:attribute name="text-indent">0</xsl:attribute>
1775
+ <xsl:attribute name="start-indent">0</xsl:attribute>
1908
1776
 
1909
- </xsl:attribute-set><xsl:attribute-set name="image-style">
1910
- <xsl:attribute name="text-align">center</xsl:attribute>
1911
1777
 
1778
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
1912
1779
 
1780
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
1781
+ <xsl:attribute name="font-size">80%</xsl:attribute>
1782
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
1783
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
1913
1784
 
1785
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
1786
+ <xsl:attribute name="text-align">justify</xsl:attribute>
1787
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1914
1788
 
1789
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1915
1790
 
1916
1791
 
1917
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1792
+ <xsl:attribute name="min-height">7mm</xsl:attribute>
1918
1793
 
1919
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1794
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
1795
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1920
1796
 
1921
1797
 
1922
- <xsl:attribute name="width">100%</xsl:attribute>
1923
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1924
- <xsl:attribute name="scaling">uniform</xsl:attribute>
1925
1798
 
1926
1799
 
1927
1800
 
1928
-
1929
-
1930
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
1931
1801
 
1932
- <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1933
1802
 
1934
1803
 
1935
1804
 
1936
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1937
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1938
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1939
- <xsl:attribute name="text-align">center</xsl:attribute>
1940
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1941
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1805
+
1806
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
1807
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1808
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1809
+
1810
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1811
+
1812
+
1813
+
1814
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1815
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1816
+ <xsl:attribute name="color">black</xsl:attribute>
1817
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1818
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1819
+
1820
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1821
+
1822
+
1823
+
1824
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1825
+ <xsl:attribute name="color">black</xsl:attribute>
1826
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1827
+
1828
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
1829
+
1830
+
1831
+
1832
+
1833
+
1834
+
1835
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
1836
+
1837
+
1838
+
1839
+
1840
+
1841
+
1842
+
1843
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+
1850
+
1851
+
1852
+
1853
+
1854
+
1855
+
1856
+
1857
+
1858
+
1859
+
1860
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1861
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1862
+
1863
+ </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1864
+
1865
+
1866
+
1867
+
1868
+
1869
+
1870
+
1871
+
1872
+
1873
+
1874
+
1875
+
1876
+
1877
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1878
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1879
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1880
+
1881
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1882
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
1883
+
1884
+
1885
+
1886
+
1887
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1888
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1889
+
1890
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1891
+
1892
+
1893
+
1894
+
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1901
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1902
+
1903
+
1904
+
1905
+
1906
+
1907
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1908
+
1909
+
1910
+
1911
+
1912
+
1913
+
1914
+
1915
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1916
+
1917
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1918
+
1919
+
1920
+
1921
+
1922
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1923
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1924
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1925
+
1926
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
1927
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
1928
+
1929
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1930
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
1931
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
1932
+
1933
+
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1940
+
1941
+ <xsl:attribute name="text-align">right</xsl:attribute>
1942
+ <xsl:attribute name="margin-right">25mm</xsl:attribute>
1943
+
1944
+
1945
+
1946
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1947
+
1948
+
1949
+
1950
+
1951
+
1952
+
1953
+
1954
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1955
+
1956
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
1957
+
1958
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1959
+
1960
+
1961
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
1962
+
1963
+
1964
+
1965
+
1966
+
1967
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
1968
+
1969
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
1970
+ <!-- background for image -->
1971
+ <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
1972
+ <xsl:attribute name="padding-left">11mm</xsl:attribute>
1973
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1974
+ <xsl:attribute name="padding-right">11mm</xsl:attribute>
1975
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1976
+ <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
1977
+ <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
1978
+ <xsl:attribute name="margin-bottom">3mm</xsl:attribute>
1979
+
1980
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1981
+
1982
+
1983
+
1984
+
1985
+
1986
+
1987
+
1988
+
1989
+
1990
+
1991
+
1992
+
1993
+
1994
+
1995
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
1996
+ <xsl:attribute name="font-weight">300</xsl:attribute>
1997
+ <xsl:attribute name="color">black</xsl:attribute>
1998
+ <xsl:attribute name="text-align">left</xsl:attribute>
1999
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2000
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2001
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2002
+
2003
+
2004
+
2005
+
2006
+
2007
+
2008
+
2009
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
2010
+
2011
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
2012
+ <xsl:attribute name="text-align">center</xsl:attribute>
2013
+
2014
+
2015
+
2016
+
2017
+
2018
+
2019
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2020
+
2021
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2022
+
2023
+
2024
+ <xsl:attribute name="width">100%</xsl:attribute>
2025
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2026
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
2027
+
2028
+
2029
+
2030
+
2031
+
2032
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
2033
+
2034
+ <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
2035
+
2036
+
2037
+
2038
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2039
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2040
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2041
+ <xsl:attribute name="text-align">center</xsl:attribute>
2042
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2043
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1942
2044
 
1943
2045
  <xsl:attribute name="font-size">13pt</xsl:attribute>
1944
2046
  <xsl:attribute name="font-weight">300</xsl:attribute>
@@ -1993,6 +2095,21 @@
1993
2095
 
1994
2096
  </xsl:attribute-set><xsl:attribute-set name="toc-style">
1995
2097
  <xsl:attribute name="line-height">135%</xsl:attribute>
2098
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
2099
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2100
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2101
+
2102
+
2103
+
2104
+
2105
+
2106
+
2107
+
2108
+ <xsl:attribute name="font-size">70%</xsl:attribute>
2109
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2110
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2111
+
2112
+
1996
2113
  </xsl:attribute-set><xsl:attribute-set name="fn-style">
1997
2114
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1998
2115
  </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
@@ -2011,23 +2128,203 @@
2011
2128
 
2012
2129
 
2013
2130
 
2014
- <xsl:attribute name="font-size">65%</xsl:attribute>
2015
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2131
+ <xsl:attribute name="font-size">65%</xsl:attribute>
2132
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2133
+
2134
+
2135
+
2136
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
2137
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2138
+ <xsl:attribute name="font-style">normal</xsl:attribute>
2139
+ <xsl:attribute name="text-indent">0</xsl:attribute>
2140
+ <xsl:attribute name="start-indent">0</xsl:attribute>
2141
+
2142
+
2143
+
2144
+
2145
+
2146
+
2147
+
2148
+
2149
+
2150
+
2151
+
2152
+
2153
+
2154
+
2155
+
2156
+
2157
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2158
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2159
+ <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
2160
+ <xsl:attribute name="text-align">left</xsl:attribute>
2161
+
2162
+
2163
+
2164
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
2165
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2166
+
2167
+
2168
+
2169
+
2170
+
2171
+
2172
+
2173
+
2174
+
2175
+
2176
+
2177
+
2178
+
2179
+
2180
+
2181
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2182
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2183
+
2184
+
2185
+
2186
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
2187
+
2188
+
2189
+
2190
+
2191
+
2192
+
2193
+
2194
+
2195
+
2196
+
2197
+
2198
+
2199
+ <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
2200
+ <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
2201
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
2202
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
2203
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2204
+
2205
+
2206
+
2207
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
2208
+
2209
+
2210
+
2211
+
2212
+
2213
+
2214
+
2215
+
2216
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2217
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2218
+ <xsl:attribute name="padding">2mm</xsl:attribute>
2219
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
2220
+
2221
+
2222
+
2223
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
2224
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2225
+
2226
+
2227
+
2228
+
2229
+
2230
+
2231
+
2232
+
2233
+
2234
+
2235
+
2236
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2237
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2238
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2239
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2240
+ <xsl:attribute name="text-align">center</xsl:attribute>
2241
+
2242
+
2243
+
2244
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
2245
+
2246
+
2247
+
2248
+
2249
+
2250
+
2251
+
2252
+
2253
+
2254
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2255
+
2256
+
2257
+
2258
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
2259
+
2260
+
2261
+
2262
+
2263
+
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+
2273
+
2274
+
2275
+
2276
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2277
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2278
+
2279
+
2280
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
2281
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2282
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2283
+
2284
+
2285
+
2286
+
2287
+
2288
+
2289
+
2290
+
2291
+
2292
+
2293
+
2294
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2295
+ <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
2296
+
2297
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
2298
+
2299
+
2300
+
2301
+
2302
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
2303
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2304
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2305
+
2306
+
2307
+
2308
+
2309
+
2310
+
2016
2311
 
2017
2312
 
2018
2313
 
2019
- </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
2020
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2021
- <xsl:attribute name="font-style">normal</xsl:attribute>
2022
- <xsl:attribute name="text-indent">0</xsl:attribute>
2023
- <xsl:attribute name="start-indent">0</xsl:attribute>
2024
2314
 
2025
2315
 
2316
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2317
+ <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
2026
2318
 
2319
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
2027
2320
 
2028
2321
 
2322
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
2029
2323
 
2030
2324
 
2325
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
2326
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2327
+ <xsl:attribute name="font-size">65%</xsl:attribute>
2031
2328
 
2032
2329
 
2033
2330
 
@@ -2037,14 +2334,16 @@
2037
2334
 
2038
2335
 
2039
2336
 
2040
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2041
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2042
- <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
2043
- <xsl:attribute name="text-align">left</xsl:attribute>
2044
2337
 
2045
2338
 
2046
2339
 
2047
- </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
2340
+
2341
+
2342
+
2343
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2344
+
2345
+
2346
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
2048
2347
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2049
2348
 
2050
2349
 
@@ -2065,31 +2364,32 @@
2065
2364
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2066
2365
 
2067
2366
 
2367
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
2368
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2369
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2370
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
2371
+
2372
+
2373
+
2374
+
2375
+
2376
+
2377
+
2378
+
2379
+
2380
+
2381
+
2382
+ <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
2383
+
2384
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
2385
+
2386
+
2068
2387
 
2069
- </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">
2070
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2071
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2072
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2073
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2074
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2075
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2388
+ </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">
2076
2389
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2077
2390
  <xsl:sort select="@displayorder" data-type="number"/>
2078
2391
  <xsl:apply-templates select="." mode="contents"/>
2079
2392
  </xsl:for-each>
2080
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2081
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2082
-
2083
- <!-- Normative references -->
2084
- <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"/>
2085
- <!-- Terms and definitions -->
2086
- <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"/>
2087
- <!-- Another main sections -->
2088
- <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"/>
2089
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
2090
- <!-- Bibliography -->
2091
- <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"/>
2092
-
2093
2393
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2094
2394
 
2095
2395
  <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']]">
@@ -2106,29 +2406,11 @@
2106
2406
  <xsl:sort select="@displayorder" data-type="number"/>
2107
2407
  <xsl:apply-templates select="." mode="contents"/>
2108
2408
  </xsl:for-each>
2109
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2110
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2111
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2112
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2113
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2114
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2115
2409
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2116
2410
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2117
2411
  <xsl:sort select="@displayorder" data-type="number"/>
2118
2412
  <xsl:apply-templates select="."/>
2119
2413
  </xsl:for-each>
2120
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2121
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2122
-
2123
- <!-- Normative references -->
2124
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
2125
- <!-- Terms and definitions -->
2126
- <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']]"/>
2127
- <!-- Another main sections -->
2128
- <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'])]"/>
2129
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2130
- <!-- Bibliography -->
2131
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2132
2414
  </xsl:template><xsl:template name="processMainSectionsDefault">
2133
2415
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2134
2416
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -2165,41 +2447,17 @@
2165
2447
  <xsl:call-template name="getSimpleTable"/>
2166
2448
  </xsl:variable>
2167
2449
 
2168
- <!-- <xsl:if test="$namespace = 'bipm'">
2169
- <fo:block>&#xA0;</fo:block>
2170
- </xsl:if> -->
2171
-
2172
2450
 
2173
2451
  <!-- Display table's name before table as standalone block -->
2174
2452
  <!-- $namespace = 'iso' or -->
2175
2453
 
2176
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2177
-
2178
-
2179
-
2454
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
2455
+
2180
2456
 
2181
2457
 
2182
-
2183
2458
 
2184
2459
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
2185
2460
 
2186
- <!-- <xsl:variable name="cols-count">
2187
- <xsl:choose>
2188
- <xsl:when test="*[local-name()='thead']">
2189
- <xsl:call-template name="calculate-columns-numbers">
2190
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2191
- </xsl:call-template>
2192
- </xsl:when>
2193
- <xsl:otherwise>
2194
- <xsl:call-template name="calculate-columns-numbers">
2195
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2196
- </xsl:call-template>
2197
- </xsl:otherwise>
2198
- </xsl:choose>
2199
- </xsl:variable> -->
2200
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2201
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2202
-
2203
2461
  <xsl:variable name="colwidths">
2204
2462
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2205
2463
  <xsl:call-template name="calculate-column-widths">
@@ -2210,17 +2468,8 @@
2210
2468
  </xsl:variable>
2211
2469
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2212
2470
 
2213
- <!-- <xsl:variable name="colwidths2">
2214
- <xsl:call-template name="calculate-column-widths">
2215
- <xsl:with-param name="cols-count" select="$cols-count"/>
2216
- </xsl:call-template>
2217
- </xsl:variable> -->
2218
-
2219
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2220
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
2221
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2222
2471
 
2223
- <xsl:variable name="margin-left">
2472
+ <xsl:variable name="margin-side">
2224
2473
  <xsl:choose>
2225
2474
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2226
2475
  <xsl:otherwise>0</xsl:otherwise>
@@ -2228,70 +2477,61 @@
2228
2477
  </xsl:variable>
2229
2478
 
2230
2479
 
2231
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2232
-
2233
-
2234
-
2235
-
2236
-
2237
-
2238
-
2239
-
2240
-
2480
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
2481
+
2241
2482
 
2483
+
2242
2484
 
2485
+
2243
2486
 
2487
+
2244
2488
 
2245
2489
 
2246
2490
 
2491
+
2247
2492
 
2248
2493
 
2249
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2250
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2251
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2252
2494
 
2253
2495
 
2254
2496
 
2497
+ <!-- end table block-container attributes -->
2255
2498
 
2256
2499
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
2257
2500
 
2258
2501
 
2502
+ <xsl:variable name="table_width_default">100%</xsl:variable>
2259
2503
  <xsl:variable name="table_width">
2260
2504
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2261
- 100%
2262
-
2263
-
2505
+ <xsl:value-of select="$table_width_default"/>
2264
2506
  </xsl:variable>
2265
2507
 
2508
+
2266
2509
  <xsl:variable name="table_attributes">
2267
- <attribute name="table-layout">fixed</attribute>
2268
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
2269
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2270
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2271
-
2272
-
2273
-
2274
-
2275
-
2276
-
2277
-
2278
-
2279
-
2280
-
2281
-
2282
-
2283
-
2284
-
2285
- <attribute name="border">0pt solid black</attribute>
2286
- <attribute name="font-size">9.5pt</attribute> <!-- 8pt -->
2287
-
2510
+
2511
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
2512
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2513
+
2514
+
2515
+
2516
+
2517
+
2518
+
2519
+
2520
+
2521
+
2522
+
2523
+
2524
+
2525
+
2526
+
2527
+ </xsl:element>
2288
2528
  </xsl:variable>
2289
2529
 
2290
2530
 
2291
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2531
+ <fo:table id="{@id}">
2292
2532
 
2293
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2294
- <xsl:attribute name="{@name}">
2533
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2534
+ <xsl:attribute name="{local-name()}">
2295
2535
  <xsl:value-of select="."/>
2296
2536
  </xsl:attribute>
2297
2537
  </xsl:for-each>
@@ -2302,7 +2542,6 @@
2302
2542
  </xsl:if>
2303
2543
 
2304
2544
 
2305
-
2306
2545
  <xsl:choose>
2307
2546
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2308
2547
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -2328,7 +2567,7 @@
2328
2567
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2329
2568
  </xsl:when>
2330
2569
  <xsl:otherwise>
2331
- <xsl:apply-templates/>
2570
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2332
2571
  </xsl:otherwise>
2333
2572
  </xsl:choose>
2334
2573
 
@@ -2343,25 +2582,6 @@
2343
2582
  </xsl:call-template>
2344
2583
  </xsl:for-each>
2345
2584
 
2346
- <!-- insert footer as table -->
2347
- <!-- <fo:table>
2348
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2349
- <xsl:attribute name="{@name}">
2350
- <xsl:value-of select="."/>
2351
- </xsl:attribute>
2352
- </xsl:for-each>
2353
-
2354
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2355
- <xsl:choose>
2356
- <xsl:when test=". = 1 or . = 0">
2357
- <fo:table-column column-width="proportional-column-width(2)"/>
2358
- </xsl:when>
2359
- <xsl:otherwise>
2360
- <fo:table-column column-width="proportional-column-width({.})"/>
2361
- </xsl:otherwise>
2362
- </xsl:choose>
2363
- </xsl:for-each>
2364
- </fo:table>-->
2365
2585
 
2366
2586
 
2367
2587
 
@@ -2422,18 +2642,17 @@
2422
2642
  </xsl:otherwise>
2423
2643
  </xsl:choose>
2424
2644
 
2425
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
2645
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2426
2646
  <xsl:param name="continued"/>
2427
2647
  <xsl:if test="normalize-space() != ''">
2428
2648
  <fo:block xsl:use-attribute-sets="table-name-style">
2429
-
2649
+
2430
2650
 
2431
2651
 
2432
2652
 
2433
2653
 
2434
2654
  <xsl:choose>
2435
2655
  <xsl:when test="$continued = 'true'">
2436
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2437
2656
 
2438
2657
  </xsl:when>
2439
2658
  <xsl:otherwise>
@@ -2496,13 +2715,6 @@
2496
2715
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
2497
2716
  <xsl:variable name="td_text">
2498
2717
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2499
-
2500
- <!-- <xsl:if test="$namespace = 'bipm'">
2501
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
2502
- <word><xsl:value-of select="normalize-space(.)"/></word>
2503
- </xsl:for-each>
2504
- </xsl:if> -->
2505
-
2506
2718
  </xsl:variable>
2507
2719
  <xsl:variable name="words">
2508
2720
  <xsl:variable name="string_with_added_zerospaces">
@@ -2539,7 +2751,6 @@
2539
2751
  </xsl:otherwise>
2540
2752
  </xsl:choose>
2541
2753
  </xsl:variable>
2542
-
2543
2754
 
2544
2755
  <column>
2545
2756
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -2575,7 +2786,6 @@
2575
2786
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2576
2787
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2577
2788
  <xsl:param name="cols-count"/>
2578
- <!-- font-weight="bold" -->
2579
2789
  <fo:table-header>
2580
2790
 
2581
2791
 
@@ -2587,13 +2797,12 @@
2587
2797
  <fo:table-row>
2588
2798
  <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">
2589
2799
 
2590
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2800
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
2591
2801
  <xsl:with-param name="continued">true</xsl:with-param>
2592
2802
  </xsl:apply-templates>
2593
2803
 
2594
2804
 
2595
2805
 
2596
-
2597
2806
  </fo:table-cell>
2598
2807
  </fo:table-row>
2599
2808
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -2609,64 +2818,6 @@
2609
2818
  <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2610
2819
  </fo:table-footer>
2611
2820
  </xsl:if>
2612
- </xsl:template><xsl:template name="insertTableFooter2">
2613
- <xsl:param name="cols-count"/>
2614
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2615
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2616
-
2617
- <fo:table-footer>
2618
-
2619
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2620
-
2621
- <!-- if there are note(s) or fn(s) then create footer row -->
2622
- <xsl:if test="$isNoteOrFnExist = 'true'">
2623
-
2624
-
2625
-
2626
- <fo:table-row>
2627
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2628
-
2629
-
2630
-
2631
- <!-- fn will be processed inside 'note' processing -->
2632
-
2633
-
2634
-
2635
-
2636
-
2637
-
2638
- <!-- except gb -->
2639
-
2640
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2641
-
2642
-
2643
- <!-- show Note under table in preface (ex. abstract) sections -->
2644
- <!-- empty, because notes show at page side in main sections -->
2645
- <!-- <xsl:if test="$namespace = 'bipm'">
2646
- <xsl:choose>
2647
- <xsl:when test="ancestor::*[local-name()='preface']">
2648
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2649
- </xsl:when>
2650
- <xsl:otherwise>
2651
- <fo:block/>
2652
- </xsl:otherwise>
2653
- </xsl:choose>
2654
- </xsl:if> -->
2655
-
2656
-
2657
- <!-- horizontal row separator -->
2658
-
2659
-
2660
- <!-- fn processing -->
2661
- <xsl:call-template name="fn_display"/>
2662
-
2663
- </fo:table-cell>
2664
- </fo:table-row>
2665
-
2666
- </xsl:if>
2667
- </fo:table-footer>
2668
-
2669
- </xsl:if>
2670
2821
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2671
2822
  <xsl:param name="table_attributes"/>
2672
2823
  <xsl:param name="colwidths"/>
@@ -2692,17 +2843,18 @@
2692
2843
  </xsl:variable>
2693
2844
 
2694
2845
  <fo:table keep-with-previous="always">
2695
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2846
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2847
+ <xsl:variable name="name" select="local-name()"/>
2696
2848
  <xsl:choose>
2697
- <xsl:when test="@name = 'border-top'">
2698
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
2849
+ <xsl:when test="$name = 'border-top'">
2850
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
2699
2851
  </xsl:when>
2700
- <xsl:when test="@name = 'border'">
2701
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2852
+ <xsl:when test="$name = 'border'">
2853
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2702
2854
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2703
2855
  </xsl:when>
2704
2856
  <xsl:otherwise>
2705
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2857
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2706
2858
  </xsl:otherwise>
2707
2859
  </xsl:choose>
2708
2860
  </xsl:for-each>
@@ -2731,9 +2883,10 @@
2731
2883
 
2732
2884
  <fo:table-body>
2733
2885
  <fo:table-row>
2734
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2886
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
2735
2887
 
2736
2888
 
2889
+
2737
2890
 
2738
2891
 
2739
2892
  <!-- fn will be processed inside 'note' processing -->
@@ -2743,39 +2896,20 @@
2743
2896
 
2744
2897
 
2745
2898
 
2746
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2747
-
2748
-
2749
-
2750
-
2751
2899
  <!-- for BSI (not PAS) display Notes before footnotes -->
2752
2900
 
2753
2901
 
2754
- <!-- except gb -->
2755
-
2756
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2757
-
2902
+ <!-- except gb and bsi -->
2758
2903
 
2759
- <!-- <xsl:if test="$namespace = 'bipm'">
2760
- <xsl:choose>
2761
- <xsl:when test="ancestor::*[local-name()='preface']">
2762
- show Note under table in preface (ex. abstract) sections
2763
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2764
- </xsl:when>
2765
- <xsl:otherwise>
2766
- empty, because notes show at page side in main sections
2767
- <fo:block/>
2768
- </xsl:otherwise>
2769
- </xsl:choose>
2770
- </xsl:if> -->
2904
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2905
+
2771
2906
 
2772
2907
 
2773
2908
  <!-- horizontal row separator -->
2774
2909
 
2775
2910
 
2776
2911
  <!-- fn processing -->
2777
- <xsl:call-template name="fn_display"/>
2778
-
2912
+ <xsl:call-template name="table_fn_display"/>
2779
2913
 
2780
2914
  <!-- for PAS display Notes after footnotes -->
2781
2915
 
@@ -2817,119 +2951,89 @@
2817
2951
 
2818
2952
 
2819
2953
  <xsl:apply-templates/>
2820
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2821
-
2954
+
2822
2955
  </fo:table-body>
2823
2956
 
2824
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2825
- <xsl:choose>
2826
- <xsl:when test="substring-after(., '—') != ''">
2827
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2828
- </xsl:when>
2829
- <xsl:otherwise>
2830
- <xsl:value-of select="."/>
2831
- </xsl:otherwise>
2832
- </xsl:choose>
2833
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2834
- <xsl:apply-templates mode="presentation_name"/>
2835
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2836
- <xsl:apply-templates select="."/>
2837
- </xsl:template><xsl:template match="*[local-name()='tr']">
2838
- <xsl:variable name="parent-name" select="local-name(..)"/>
2839
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2840
- <fo:table-row min-height="4mm">
2841
- <xsl:if test="$parent-name = 'thead'">
2842
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2843
-
2844
-
2845
-
2846
-
2847
-
2848
-
2849
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2850
- <xsl:attribute name="color">black</xsl:attribute>
2851
-
2852
-
2853
-
2854
- </xsl:if>
2855
- <xsl:if test="$parent-name = 'tfoot'">
2856
-
2857
-
2858
-
2859
- </xsl:if>
2860
-
2861
-
2862
-
2863
-
2864
-
2865
- <xsl:attribute name="min-height">8.5mm</xsl:attribute>
2866
- <xsl:if test="$parent-name = 'thead'">
2867
- <xsl:attribute name="background-color">rgb(32, 98, 169)</xsl:attribute>
2868
- <xsl:attribute name="color">white</xsl:attribute>
2869
- </xsl:if>
2870
- <xsl:if test="$parent-name = 'tbody'">
2871
- <xsl:variable name="number"><xsl:number/></xsl:variable>
2872
- <xsl:if test="$number mod 2 = 0">
2873
- <xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
2874
- </xsl:if>
2875
- </xsl:if>
2876
-
2877
-
2878
-
2879
-
2880
-
2881
-
2882
- <!-- <xsl:if test="$namespace = 'bipm'">
2883
- <xsl:attribute name="height">8mm</xsl:attribute>
2884
- </xsl:if> -->
2885
-
2886
- <xsl:apply-templates/>
2887
- </fo:table-row>
2888
- </xsl:template><xsl:template match="*[local-name()='th']">
2889
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2890
- <xsl:attribute name="text-align">
2891
- <xsl:choose>
2892
- <xsl:when test="@align">
2893
- <xsl:call-template name="setAlignment"/>
2894
- <!-- <xsl:value-of select="@align"/> -->
2895
- </xsl:when>
2896
- <xsl:otherwise>center</xsl:otherwise>
2897
- </xsl:choose>
2898
- </xsl:attribute>
2957
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2958
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2959
+
2960
+
2899
2961
 
2900
2962
 
2963
+
2964
+
2965
+
2966
+ <xsl:call-template name="setTableRowAttributes"/>
2967
+
2968
+ <xsl:apply-templates/>
2969
+ </fo:table-row>
2970
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
2971
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
2901
2972
 
2973
+ <xsl:call-template name="setTableRowAttributes"/>
2974
+ <xsl:apply-templates/>
2975
+ </fo:table-row>
2976
+ </xsl:template><xsl:template match="*[local-name()='tr']">
2977
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
2978
+
2902
2979
 
2980
+
2903
2981
 
2982
+ <xsl:variable name="number"><xsl:number/></xsl:variable>
2983
+ <xsl:if test="$number mod 2 = 0">
2984
+ <xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
2985
+ </xsl:if>
2904
2986
 
2987
+
2988
+ <xsl:call-template name="setTableRowAttributes"/>
2989
+ <xsl:apply-templates/>
2990
+ </fo:table-row>
2991
+ </xsl:template><xsl:template name="setTableRowAttributes">
2992
+
2993
+
2994
+
2995
+
2996
+
2997
+
2998
+
2999
+
3000
+ </xsl:template><xsl:template match="*[local-name()='th']">
3001
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
3002
+ <xsl:call-template name="setTextAlignment">
3003
+ <xsl:with-param name="default">center</xsl:with-param>
3004
+ </xsl:call-template>
2905
3005
 
2906
3006
 
2907
3007
 
2908
3008
 
3009
+
2909
3010
 
2910
3011
 
2911
3012
 
2912
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2913
- <xsl:attribute name="border">0pt solid black</xsl:attribute>
2914
3013
 
2915
- <xsl:if test="$lang = 'ar'">
2916
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
2917
- </xsl:if>
2918
- <xsl:if test="@colspan">
2919
- <xsl:attribute name="number-columns-spanned">
2920
- <xsl:value-of select="@colspan"/>
2921
- </xsl:attribute>
2922
- </xsl:if>
2923
- <xsl:if test="@rowspan">
2924
- <xsl:attribute name="number-rows-spanned">
2925
- <xsl:value-of select="@rowspan"/>
2926
- </xsl:attribute>
3014
+
3015
+ <xsl:if test="$lang = 'ar'">
3016
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2927
3017
  </xsl:if>
2928
- <xsl:call-template name="display-align"/>
3018
+
3019
+ <xsl:call-template name="setTableCellAttributes"/>
3020
+
2929
3021
  <fo:block>
2930
3022
  <xsl:apply-templates/>
2931
3023
  </fo:block>
2932
3024
  </fo:table-cell>
3025
+ </xsl:template><xsl:template name="setTableCellAttributes">
3026
+ <xsl:if test="@colspan">
3027
+ <xsl:attribute name="number-columns-spanned">
3028
+ <xsl:value-of select="@colspan"/>
3029
+ </xsl:attribute>
3030
+ </xsl:if>
3031
+ <xsl:if test="@rowspan">
3032
+ <xsl:attribute name="number-rows-spanned">
3033
+ <xsl:value-of select="@rowspan"/>
3034
+ </xsl:attribute>
3035
+ </xsl:if>
3036
+ <xsl:call-template name="display-align"/>
2933
3037
  </xsl:template><xsl:template name="display-align">
2934
3038
  <xsl:if test="@valign">
2935
3039
  <xsl:attribute name="display-align">
@@ -2942,22 +3046,18 @@
2942
3046
  </xsl:attribute>
2943
3047
  </xsl:if>
2944
3048
  </xsl:template><xsl:template match="*[local-name()='td']">
2945
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2946
- <xsl:attribute name="text-align">
2947
- <xsl:choose>
2948
- <xsl:when test="@align">
2949
- <xsl:call-template name="setAlignment"/>
2950
- <!-- <xsl:value-of select="@align"/> -->
2951
- </xsl:when>
2952
- <xsl:otherwise>left</xsl:otherwise>
2953
- </xsl:choose>
2954
- </xsl:attribute>
3049
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
3050
+ <xsl:call-template name="setTextAlignment">
3051
+ <xsl:with-param name="default">left</xsl:with-param>
3052
+ </xsl:call-template>
3053
+
2955
3054
  <xsl:if test="$lang = 'ar'">
2956
3055
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2957
3056
  </xsl:if>
2958
3057
 
2959
3058
 
2960
3059
 
3060
+ <!-- bsi -->
2961
3061
 
2962
3062
 
2963
3063
 
@@ -2966,63 +3066,51 @@
2966
3066
 
2967
3067
 
2968
3068
 
3069
+
2969
3070
 
2970
3071
 
2971
3072
 
2972
- <xsl:attribute name="border">0pt solid black</xsl:attribute>
2973
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2974
3073
 
2975
3074
 
2976
3075
 
2977
- <xsl:if test=".//*[local-name() = 'table']">
3076
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
2978
3077
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2979
3078
  </xsl:if>
2980
- <xsl:if test="@colspan">
2981
- <xsl:attribute name="number-columns-spanned">
2982
- <xsl:value-of select="@colspan"/>
2983
- </xsl:attribute>
2984
- </xsl:if>
2985
- <xsl:if test="@rowspan">
2986
- <xsl:attribute name="number-rows-spanned">
2987
- <xsl:value-of select="@rowspan"/>
2988
- </xsl:attribute>
2989
- </xsl:if>
2990
- <xsl:call-template name="display-align"/>
3079
+
3080
+ <xsl:call-template name="setTableCellAttributes"/>
3081
+
2991
3082
  <fo:block>
2992
-
3083
+
3084
+
3085
+
2993
3086
  <xsl:apply-templates/>
2994
3087
  </fo:block>
2995
3088
  </fo:table-cell>
2996
3089
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
3090
+
3091
+ <fo:block xsl:use-attribute-sets="table-note-style">
3092
+
3093
+
3094
+
3095
+
2997
3096
 
2998
-
2999
- <fo:block font-size="10pt" margin-bottom="12pt">
3000
-
3001
-
3097
+ <!-- Table's note name (NOTE, for example) -->
3098
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
3002
3099
 
3003
3100
 
3004
3101
 
3005
3102
 
3006
3103
 
3007
- <xsl:attribute name="font-size">8pt</xsl:attribute>
3008
3104
 
3009
3105
 
3010
- <!-- Table's note name (NOTE, for example) -->
3011
-
3012
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
3013
-
3014
-
3015
-
3106
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3016
3107
 
3017
-
3018
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3019
-
3020
- </fo:inline>
3021
-
3022
-
3023
-
3024
- <xsl:apply-templates mode="process"/>
3025
- </fo:block>
3108
+ </fo:inline>
3109
+
3110
+
3111
+
3112
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
3113
+ </fo:block>
3026
3114
 
3027
3115
  </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">
3028
3116
  <xsl:apply-templates/>
@@ -3102,8 +3190,7 @@
3102
3190
  <xsl:copy-of select="$footnote_inline"/>
3103
3191
  <fo:footnote-body>
3104
3192
 
3105
- <fo:block-container text-indent="0" start-indent="0">
3106
-
3193
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3107
3194
 
3108
3195
  <fo:block xsl:use-attribute-sets="fn-body-style">
3109
3196
 
@@ -3122,7 +3209,7 @@
3122
3209
  <xsl:copy-of select="$footnote_inline"/>
3123
3210
  </xsl:otherwise>
3124
3211
  </xsl:choose>
3125
- </xsl:template><xsl:template name="fn_display">
3212
+ </xsl:template><xsl:template name="table_fn_display">
3126
3213
  <xsl:variable name="references">
3127
3214
 
3128
3215
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -3133,31 +3220,26 @@
3133
3220
  <xsl:for-each select="xalan:nodeset($references)//fn">
3134
3221
  <xsl:variable name="reference" select="@reference"/>
3135
3222
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3136
- <fo:block margin-bottom="12pt">
3223
+ <fo:block xsl:use-attribute-sets="table-fn-style">
3137
3224
 
3138
3225
 
3139
3226
 
3140
-
3141
-
3142
-
3143
-
3144
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
3227
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
3145
3228
 
3146
3229
 
3147
3230
 
3148
3231
 
3149
3232
 
3233
+ <xsl:value-of select="@reference"/>
3150
3234
 
3151
3235
 
3152
3236
 
3153
- <xsl:value-of select="@reference"/>
3154
3237
 
3155
3238
 
3156
3239
 
3157
- </fo:inline>
3158
- <fo:inline>
3159
3240
 
3160
- <!-- <xsl:apply-templates /> -->
3241
+ </fo:inline>
3242
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
3161
3243
  <xsl:copy-of select="./node()"/>
3162
3244
  </fo:inline>
3163
3245
  </fo:block>
@@ -3169,15 +3251,7 @@
3169
3251
 
3170
3252
  <xsl:apply-templates/>
3171
3253
  </fn>
3172
- </xsl:template><xsl:template name="fn_name_display">
3173
- <!-- <xsl:variable name="references">
3174
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3175
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3176
- <xsl:apply-templates />
3177
- </fn>
3178
- </xsl:for-each>
3179
- </xsl:variable>
3180
- $references=<xsl:copy-of select="$references"/> -->
3254
+ </xsl:template><xsl:template name="table_name_fn_display">
3181
3255
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3182
3256
  <xsl:variable name="reference" select="@reference"/>
3183
3257
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -3186,9 +3260,7 @@
3186
3260
  </fo:block>
3187
3261
  </xsl:for-each>
3188
3262
  </xsl:template><xsl:template name="fn_display_figure">
3189
- <xsl:variable name="key_iso">
3190
- <!-- and (not(@class) or @class !='pseudocode') -->
3191
- </xsl:variable>
3263
+
3192
3264
  <xsl:variable name="references">
3193
3265
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
3194
3266
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -3196,50 +3268,52 @@
3196
3268
  </fn>
3197
3269
  </xsl:for-each>
3198
3270
  </xsl:variable>
3271
+
3272
+ <xsl:if test="xalan:nodeset($references)//fn">
3199
3273
 
3200
- <!-- current hierarchy is 'figure' element -->
3201
- <xsl:variable name="following_dl_colwidths">
3202
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3203
- <xsl:variable name="html-table">
3204
- <xsl:variable name="doc_ns">
3274
+ <xsl:variable name="key_iso">
3275
+
3276
+ </xsl:variable>
3277
+
3278
+ <!-- current hierarchy is 'figure' element -->
3279
+ <xsl:variable name="following_dl_colwidths">
3280
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3281
+ <xsl:variable name="html-table">
3282
+ <xsl:variable name="doc_ns">
3283
+
3284
+ </xsl:variable>
3285
+ <xsl:variable name="ns">
3286
+ <xsl:choose>
3287
+ <xsl:when test="normalize-space($doc_ns) != ''">
3288
+ <xsl:value-of select="normalize-space($doc_ns)"/>
3289
+ </xsl:when>
3290
+ <xsl:otherwise>
3291
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
3292
+ </xsl:otherwise>
3293
+ </xsl:choose>
3294
+ </xsl:variable>
3205
3295
 
3206
- </xsl:variable>
3207
- <xsl:variable name="ns">
3208
- <xsl:choose>
3209
- <xsl:when test="normalize-space($doc_ns) != ''">
3210
- <xsl:value-of select="normalize-space($doc_ns)"/>
3211
- </xsl:when>
3212
- <xsl:otherwise>
3213
- <xsl:value-of select="substring-before(name(/*), '-')"/>
3214
- </xsl:otherwise>
3215
- </xsl:choose>
3216
- </xsl:variable>
3217
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3218
- <!-- <xsl:element name="{$ns}:table"> -->
3219
3296
  <xsl:for-each select="*[local-name() = 'dl'][1]">
3220
3297
  <tbody>
3221
3298
  <xsl:apply-templates mode="dl"/>
3222
3299
  </tbody>
3223
3300
  </xsl:for-each>
3224
- <!-- </xsl:element> -->
3225
- </xsl:variable>
3226
-
3227
- <xsl:call-template name="calculate-column-widths">
3228
- <xsl:with-param name="cols-count" select="2"/>
3229
- <xsl:with-param name="table" select="$html-table"/>
3230
- </xsl:call-template>
3231
-
3232
- </xsl:if>
3233
- </xsl:variable>
3234
-
3235
-
3236
- <xsl:variable name="maxlength_dt">
3237
- <xsl:for-each select="*[local-name() = 'dl'][1]">
3238
- <xsl:call-template name="getMaxLength_dt"/>
3239
- </xsl:for-each>
3240
- </xsl:variable>
3241
-
3242
- <xsl:if test="xalan:nodeset($references)//fn">
3301
+ </xsl:variable>
3302
+
3303
+ <xsl:call-template name="calculate-column-widths">
3304
+ <xsl:with-param name="cols-count" select="2"/>
3305
+ <xsl:with-param name="table" select="$html-table"/>
3306
+ </xsl:call-template>
3307
+
3308
+ </xsl:if>
3309
+ </xsl:variable>
3310
+
3311
+ <xsl:variable name="maxlength_dt">
3312
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
3313
+ <xsl:call-template name="getMaxLength_dt"/>
3314
+ </xsl:for-each>
3315
+ </xsl:variable>
3316
+
3243
3317
  <fo:block>
3244
3318
  <fo:table width="95%" table-layout="fixed">
3245
3319
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -3266,20 +3340,18 @@
3266
3340
  <fo:table-row>
3267
3341
  <fo:table-cell>
3268
3342
  <fo:block>
3269
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
3270
-
3343
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
3271
3344
  <xsl:value-of select="@reference"/>
3272
3345
  </fo:inline>
3273
3346
  </fo:block>
3274
3347
  </fo:table-cell>
3275
3348
  <fo:table-cell>
3276
- <fo:block text-align="justify" margin-bottom="12pt">
3277
-
3349
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
3278
3350
  <xsl:if test="normalize-space($key_iso) = 'true'">
3279
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
3351
+
3352
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
3353
+
3280
3354
  </xsl:if>
3281
-
3282
- <!-- <xsl:apply-templates /> -->
3283
3355
  <xsl:copy-of select="./node()"/>
3284
3356
  </fo:block>
3285
3357
  </fo:table-cell>
@@ -3292,21 +3364,11 @@
3292
3364
  </xsl:if>
3293
3365
 
3294
3366
  </xsl:template><xsl:template match="*[local-name()='fn']">
3295
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3296
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
3297
-
3298
-
3299
-
3300
-
3301
-
3302
-
3303
-
3367
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
3368
+
3304
3369
 
3305
3370
 
3306
3371
 
3307
- <xsl:attribute name="font-size">70%</xsl:attribute>
3308
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3309
- <xsl:attribute name="font-style">italic</xsl:attribute>
3310
3372
 
3311
3373
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
3312
3374
 
@@ -3327,10 +3389,10 @@
3327
3389
  <xsl:variable name="isDeleted" select="@deleted"/>
3328
3390
  <fo:block-container>
3329
3391
 
3330
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3331
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3332
- </xsl:if>
3333
-
3392
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3393
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3394
+ </xsl:if>
3395
+
3334
3396
 
3335
3397
  <xsl:if test="parent::*[local-name() = 'note']">
3336
3398
  <xsl:attribute name="margin-left">
@@ -3347,11 +3409,11 @@
3347
3409
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3348
3410
  </xsl:call-template>
3349
3411
 
3350
- <fo:block-container>
3351
-
3352
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3353
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3412
+ <fo:block-container margin-left="0mm">
3413
+
3354
3414
 
3415
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3416
+
3355
3417
 
3356
3418
  <xsl:variable name="parent" select="local-name(..)"/>
3357
3419
 
@@ -3362,20 +3424,19 @@
3362
3424
  <xsl:choose>
3363
3425
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3364
3426
 
3365
-
3366
- <fo:block margin-bottom="12pt" text-align="left">
3367
-
3368
- <xsl:variable name="title-where">
3369
- <xsl:call-template name="getLocalizedString">
3370
- <xsl:with-param name="key">where</xsl:with-param>
3371
- </xsl:call-template>
3372
- </xsl:variable>
3373
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3374
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
3375
- <xsl:text/>
3376
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3377
- </fo:block>
3378
-
3427
+ <fo:block margin-bottom="12pt" text-align="left">
3428
+
3429
+ <xsl:variable name="title-where">
3430
+ <xsl:call-template name="getLocalizedString">
3431
+ <xsl:with-param name="key">where</xsl:with-param>
3432
+ </xsl:call-template>
3433
+ </xsl:variable>
3434
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3435
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
3436
+ <xsl:text/>
3437
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3438
+ </fo:block>
3439
+
3379
3440
  </xsl:when>
3380
3441
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3381
3442
  <fo:block margin-bottom="12pt" text-align="left">
@@ -3425,9 +3486,7 @@
3425
3486
  <fo:table width="95%" table-layout="fixed">
3426
3487
 
3427
3488
  <xsl:choose>
3428
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
3429
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3430
- </xsl:when>
3489
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
3431
3490
  <xsl:when test="normalize-space($key_iso) = 'true'">
3432
3491
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3433
3492
 
@@ -3448,12 +3507,9 @@
3448
3507
  </xsl:otherwise>
3449
3508
  </xsl:choose>
3450
3509
  </xsl:variable>
3451
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3452
- <!-- <xsl:element name="{$ns}:table"> -->
3453
- <tbody>
3454
- <xsl:apply-templates mode="dl"/>
3455
- </tbody>
3456
- <!-- </xsl:element> -->
3510
+ <tbody>
3511
+ <xsl:apply-templates mode="dl"/>
3512
+ </tbody>
3457
3513
  </xsl:variable>
3458
3514
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
3459
3515
  <xsl:variable name="colwidths">
@@ -3533,8 +3589,6 @@
3533
3589
  </xsl:for-each>
3534
3590
  </xsl:otherwise>
3535
3591
  </xsl:choose>
3536
- <!-- <fo:table-column column-width="15%"/>
3537
- <fo:table-column column-width="85%"/> -->
3538
3592
  </xsl:otherwise>
3539
3593
  </xsl:choose>
3540
3594
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -3549,12 +3603,6 @@
3549
3603
  </xsl:for-each>
3550
3604
  </xsl:variable>
3551
3605
  <xsl:variable name="maxLength">
3552
- <!-- <xsl:for-each select="*[local-name()='dt']">
3553
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3554
- <xsl:if test="position() = 1">
3555
- <xsl:value-of select="string-length(normalize-space(.))"/>
3556
- </xsl:if>
3557
- </xsl:for-each> -->
3558
3606
  <xsl:for-each select="xalan:nodeset($lengths)/length">
3559
3607
  <xsl:sort select="." data-type="number" order="descending"/>
3560
3608
  <xsl:if test="position() = 1">
@@ -3580,12 +3628,12 @@
3580
3628
  <xsl:if test="normalize-space($key_iso) = 'true'">
3581
3629
  <xsl:attribute name="margin-top">0</xsl:attribute>
3582
3630
  </xsl:if>
3583
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3631
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3584
3632
  </fo:block>
3585
3633
  </fo:table-cell>
3586
3634
  <fo:table-cell>
3587
3635
  <fo:block>
3588
- <xsl:apply-templates/>
3636
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3589
3637
  </fo:block>
3590
3638
  </fo:table-cell>
3591
3639
  </fo:table-row>
@@ -3596,82 +3644,37 @@
3596
3644
  </td>
3597
3645
  <td>
3598
3646
 
3599
-
3600
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3601
-
3647
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3648
+
3602
3649
  </td>
3603
3650
  </tr>
3604
3651
 
3605
3652
  </xsl:template><xsl:template match="*[local-name()='dt']">
3606
3653
  <xsl:param name="key_iso"/>
3607
3654
 
3608
- <fo:table-row>
3609
-
3610
-
3611
- <xsl:attribute name="min-height">7mm</xsl:attribute>
3612
-
3655
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
3613
3656
  <fo:table-cell>
3614
3657
 
3615
- <fo:block margin-top="6pt">
3658
+ <fo:block xsl:use-attribute-sets="dt-style">
3616
3659
  <xsl:copy-of select="@id"/>
3617
3660
 
3618
-
3619
3661
  <xsl:if test="normalize-space($key_iso) = 'true'">
3620
3662
  <xsl:attribute name="margin-top">0</xsl:attribute>
3621
-
3622
3663
  </xsl:if>
3623
3664
 
3624
3665
 
3625
3666
 
3626
-
3627
-
3628
-
3629
-
3630
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
3631
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3632
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
3633
-
3634
3667
  <xsl:apply-templates/>
3635
- <!-- <xsl:if test="$namespace = 'gb'">
3636
- <xsl:if test="ancestor::*[local-name()='formula']">
3637
- <xsl:text>—</xsl:text>
3638
- </xsl:if>
3639
- </xsl:if> -->
3640
3668
  </fo:block>
3641
3669
  </fo:table-cell>
3642
3670
  <fo:table-cell>
3643
3671
  <fo:block>
3644
3672
 
3645
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3646
- <xsl:if test="local-name(*[1]) != 'stem'">
3647
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3648
- </xsl:if>
3649
- </xsl:if> -->
3650
-
3651
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3652
-
3673
+
3674
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3653
3675
  </fo:block>
3654
3676
  </fo:table-cell>
3655
3677
  </fo:table-row>
3656
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3657
- <xsl:if test="local-name(*[1]) = 'stem'">
3658
- <fo:table-row>
3659
- <fo:table-cell>
3660
- <fo:block margin-top="6pt">
3661
- <xsl:if test="normalize-space($key_iso) = 'true'">
3662
- <xsl:attribute name="margin-top">0</xsl:attribute>
3663
- </xsl:if>
3664
- <xsl:text>&#xA0;</xsl:text>
3665
- </fo:block>
3666
- </fo:table-cell>
3667
- <fo:table-cell>
3668
- <fo:block>
3669
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3670
- </fo:block>
3671
- </fo:table-cell>
3672
- </fo:table-row>
3673
- </xsl:if>
3674
- </xsl:if> -->
3675
3678
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3676
3679
  <xsl:apply-templates/>
3677
3680
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -3705,6 +3708,7 @@
3705
3708
  </fo:inline>
3706
3709
  </xsl:template><xsl:template match="*[local-name()='tt']">
3707
3710
  <fo:inline xsl:use-attribute-sets="tt-style">
3711
+
3708
3712
  <xsl:variable name="_font-size">
3709
3713
 
3710
3714
 
@@ -3746,15 +3750,21 @@
3746
3750
  <xsl:apply-templates/>
3747
3751
  </fo:inline>
3748
3752
  </xsl:template><xsl:template match="*[local-name()='add']">
3753
+ <xsl:param name="skip">true</xsl:param>
3749
3754
  <xsl:choose>
3750
3755
  <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
3751
- <fo:inline>
3752
- <xsl:call-template name="insertTag">
3753
- <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3754
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3755
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3756
- </xsl:call-template>
3757
- </fo:inline>
3756
+ <xsl:choose>
3757
+ <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>
3758
+ <xsl:otherwise>
3759
+ <fo:inline>
3760
+ <xsl:call-template name="insertTag">
3761
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
3762
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
3763
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
3764
+ </xsl:call-template>
3765
+ </fo:inline>
3766
+ </xsl:otherwise>
3767
+ </xsl:choose>
3758
3768
  </xsl:when>
3759
3769
  <xsl:when test="@amendment">
3760
3770
  <fo:inline>
@@ -3797,8 +3807,6 @@
3797
3807
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
3798
3808
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
3799
3809
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
3800
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
3801
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
3802
3810
  <xsl:attribute name="height">5mm</xsl:attribute>
3803
3811
  <xsl:attribute name="content-width">100%</xsl:attribute>
3804
3812
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -4016,14 +4024,6 @@
4016
4024
 
4017
4025
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
4018
4026
 
4019
- <!-- <xsl:choose>
4020
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
4021
-
4022
- </xsl:when>
4023
- <xsl:otherwise>
4024
- <xsl:copy-of select="current()"/>
4025
- </xsl:otherwise>
4026
- </xsl:choose> -->
4027
4027
  </xsl:variable>
4028
4028
  <xsl:copy-of select="$simple-table"/>
4029
4029
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -4142,8 +4142,6 @@
4142
4142
  <xsl:choose>
4143
4143
  <xsl:when test="contains($str2, ' ')">
4144
4144
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
4145
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
4146
- <xsl:value-of select="substring($substr, 2)"/> -->
4147
4145
  <xsl:call-template name="capitalize">
4148
4146
  <xsl:with-param name="str" select="$substr"/>
4149
4147
  </xsl:call-template>
@@ -4153,8 +4151,6 @@
4153
4151
  </xsl:call-template>
4154
4152
  </xsl:when>
4155
4153
  <xsl:otherwise>
4156
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
4157
- <xsl:value-of select="substring($str2, 2)"/> -->
4158
4154
  <xsl:call-template name="capitalize">
4159
4155
  <xsl:with-param name="str" select="$str2"/>
4160
4156
  </xsl:call-template>
@@ -4182,6 +4178,7 @@
4182
4178
  <xsl:apply-templates select="." mode="mathml"/>
4183
4179
  </xsl:variable>
4184
4180
  <fo:instream-foreign-object fox:alt-text="Math">
4181
+
4185
4182
 
4186
4183
 
4187
4184
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -4213,7 +4210,7 @@
4213
4210
  </xsl:attribute>
4214
4211
 
4215
4212
 
4216
- <!-- <xsl:copy-of select="."/> -->
4213
+
4217
4214
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
4218
4215
  </fo:instream-foreign-object>
4219
4216
  </fo:inline>
@@ -4271,6 +4268,10 @@
4271
4268
  <fo:inline xsl:use-attribute-sets="link-style">
4272
4269
 
4273
4270
 
4271
+
4272
+
4273
+
4274
+
4274
4275
  <xsl:if test="ancestor::*[local-name() = 'bibitem']">
4275
4276
  <xsl:attribute name="color">black</xsl:attribute>
4276
4277
  <xsl:attribute name="text-decoration">none</xsl:attribute>
@@ -4335,7 +4336,6 @@
4335
4336
  </fo:inline>
4336
4337
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
4337
4338
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
4338
-
4339
4339
  <xsl:apply-templates/>
4340
4340
  </fo:basic-link>
4341
4341
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -4363,13 +4363,18 @@
4363
4363
  <fo:inline>
4364
4364
  <xsl:apply-templates/>
4365
4365
  </fo:inline>
4366
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
4366
+ </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 -->
4367
4367
  <xsl:if test="normalize-space() != ''">
4368
4368
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
4369
4369
  </xsl:if>
4370
4370
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
4371
4371
 
4372
4372
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
4373
+
4374
+
4375
+
4376
+
4377
+
4373
4378
 
4374
4379
 
4375
4380
 
@@ -4378,39 +4383,49 @@
4378
4383
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4379
4384
  </xsl:if>
4380
4385
 
4386
+
4381
4387
 
4382
4388
 
4383
4389
  <fo:block-container margin-left="0mm">
4390
+
4384
4391
 
4385
4392
 
4386
4393
 
4394
+
4387
4395
 
4388
-
4389
-
4390
-
4391
-
4392
- <fo:block>
4393
-
4394
-
4395
-
4396
-
4397
-
4396
+ <fo:block>
4397
+
4398
+
4398
4399
 
4399
- <fo:inline xsl:use-attribute-sets="note-name-style">
4400
4400
 
4401
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4402
- </fo:inline>
4403
- <xsl:apply-templates/>
4404
- </fo:block>
4405
-
4406
-
4401
+
4402
+
4403
+
4404
+ <fo:inline xsl:use-attribute-sets="note-name-style">
4405
+
4406
+
4407
+
4408
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
4409
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4410
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
4411
+ <xsl:with-param name="skip">false</xsl:with-param>
4412
+ </xsl:apply-templates>
4413
+ </xsl:if>
4414
+
4415
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4416
+
4417
+ </fo:inline>
4418
+
4419
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4420
+ </fo:block>
4421
+
4407
4422
  </fo:block-container>
4408
4423
  </fo:block-container>
4409
4424
 
4410
4425
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
4411
4426
  <xsl:variable name="num"><xsl:number/></xsl:variable>
4412
4427
  <xsl:choose>
4413
- <xsl:when test="$num = 1">
4428
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
4414
4429
  <fo:inline xsl:use-attribute-sets="note-p-style">
4415
4430
  <xsl:apply-templates/>
4416
4431
  </fo:inline>
@@ -4425,12 +4440,16 @@
4425
4440
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
4426
4441
 
4427
4442
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4443
+
4444
+
4445
+
4446
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4428
4447
 
4429
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4430
4448
  </fo:inline>
4431
- <xsl:apply-templates/>
4449
+
4450
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4432
4451
  </fo:block>
4433
- </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">
4452
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
4434
4453
  <xsl:param name="sfx"/>
4435
4454
  <xsl:variable name="suffix">
4436
4455
  <xsl:choose>
@@ -4449,7 +4468,7 @@
4449
4468
  <xsl:apply-templates/>
4450
4469
  <xsl:value-of select="$suffix"/>
4451
4470
  </xsl:if>
4452
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
4471
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
4453
4472
  <xsl:param name="sfx"/>
4454
4473
  <xsl:variable name="suffix">
4455
4474
  <xsl:choose>
@@ -4476,25 +4495,23 @@
4476
4495
  <xsl:apply-templates/>
4477
4496
  </fo:block>
4478
4497
  </xsl:template><xsl:template match="*[local-name() = 'term']">
4479
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
4480
4498
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4481
4499
 
4482
4500
 
4501
+
4502
+
4483
4503
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
4484
4504
 
4485
4505
  </xsl:if>
4486
- <xsl:apply-templates/>
4506
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4487
4507
  </fo:block>
4488
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
4508
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
4489
4509
  <xsl:if test="normalize-space() != ''">
4490
4510
  <xsl:variable name="level">
4491
4511
  <xsl:call-template name="getLevelTermName"/>
4492
4512
  </xsl:variable>
4493
4513
  <fo:inline role="H{$level}">
4494
4514
  <xsl:apply-templates/>
4495
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
4496
- <xsl:text>.</xsl:text>
4497
- </xsl:if> -->
4498
4515
  </fo:inline>
4499
4516
  </xsl:if>
4500
4517
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -4507,20 +4524,12 @@
4507
4524
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4508
4525
  </xsl:call-template>
4509
4526
 
4510
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4527
+ <!-- show figure's name BEFORE image -->
4528
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4511
4529
 
4512
- <fo:block>
4513
- <!-- background for image -->
4514
- <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
4515
- <xsl:attribute name="padding-left">11mm</xsl:attribute>
4516
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4517
- <xsl:attribute name="padding-right">11mm</xsl:attribute>
4518
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4519
- <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
4520
- <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
4521
- <xsl:attribute name="margin-bottom">3mm</xsl:attribute>
4522
-
4523
- <xsl:apply-templates/>
4530
+
4531
+ <fo:block xsl:use-attribute-sets="figure-style">
4532
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4524
4533
  </fo:block>
4525
4534
  <xsl:call-template name="fn_display_figure"/>
4526
4535
  <xsl:for-each select="*[local-name() = 'note']">
@@ -4528,12 +4537,13 @@
4528
4537
  </xsl:for-each>
4529
4538
 
4530
4539
 
4540
+
4531
4541
  </fo:block-container>
4532
4542
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4533
4543
  <fo:block id="{@id}">
4534
- <xsl:apply-templates/>
4544
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4535
4545
  </fo:block>
4536
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4546
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4537
4547
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
4538
4548
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
4539
4549
  <xsl:apply-templates/>
@@ -4640,9 +4650,7 @@
4640
4650
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
4641
4651
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
4642
4652
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
4643
- <!-- width=<xsl:value-of select="$width"/> -->
4644
4653
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
4645
- <!-- height=<xsl:value-of select="$height"/> -->
4646
4654
  <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">
4647
4655
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
4648
4656
  <xsl:call-template name="svg_cross">
@@ -4912,7 +4920,7 @@
4912
4920
  </fo:basic-link>
4913
4921
  </fo:block>
4914
4922
  </fo:block-container>
4915
- </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">
4923
+ </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">
4916
4924
  <xsl:apply-templates mode="contents"/>
4917
4925
  <xsl:text> </xsl:text>
4918
4926
  </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">
@@ -5065,8 +5073,6 @@
5065
5073
 
5066
5074
 
5067
5075
 
5068
-
5069
-
5070
5076
  </fo:bookmark-tree>
5071
5077
  </xsl:if>
5072
5078
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -5137,7 +5143,7 @@
5137
5143
  <xsl:apply-templates mode="bookmark"/>
5138
5144
  </xsl:otherwise>
5139
5145
  </xsl:choose>
5140
- </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">
5146
+ </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']">
5141
5147
  <xsl:if test="normalize-space() != ''">
5142
5148
  <fo:block xsl:use-attribute-sets="figure-name-style">
5143
5149
 
@@ -5153,12 +5159,6 @@
5153
5159
  <!-- <xsl:text> </xsl:text> -->
5154
5160
  </xsl:template><xsl:template name="getSection">
5155
5161
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5156
- <!--
5157
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
5158
- <xsl:value-of select="."/>
5159
- </xsl:for-each>
5160
- -->
5161
-
5162
5162
  </xsl:template><xsl:template name="getName">
5163
5163
  <xsl:choose>
5164
5164
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -5227,18 +5227,23 @@
5227
5227
  <xsl:apply-templates mode="contents_item">
5228
5228
  <xsl:with-param name="mode" select="$mode"/>
5229
5229
  </xsl:apply-templates>
5230
- </xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
5230
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
5231
5231
  <xsl:param name="mode">bookmarks</xsl:param>
5232
- <xsl:if test="$mode = 'contents'">
5233
- <xsl:copy>
5234
- <xsl:apply-templates mode="contents_item"/>
5235
- </xsl:copy>
5236
- </xsl:if>
5232
+ <xsl:choose>
5233
+ <xsl:when test="starts-with(text(), $ace_tag)">
5234
+ <xsl:if test="$mode = 'contents'">
5235
+ <xsl:copy>
5236
+ <xsl:apply-templates mode="contents_item"/>
5237
+ </xsl:copy>
5238
+ </xsl:if>
5239
+ </xsl:when>
5240
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
5241
+ </xsl:choose>
5237
5242
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
5238
5243
 
5239
- <fo:block-container margin-left="0mm">
5244
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
5240
5245
  <xsl:copy-of select="@id"/>
5241
- <xsl:attribute name="space-after">12pt</xsl:attribute>
5246
+
5242
5247
  <xsl:if test="parent::*[local-name() = 'note']">
5243
5248
  <xsl:attribute name="margin-left">
5244
5249
  <xsl:choose>
@@ -5251,7 +5256,7 @@
5251
5256
  <fo:block-container margin-left="0mm">
5252
5257
 
5253
5258
 
5254
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5259
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name BEFORE content -->
5255
5260
 
5256
5261
 
5257
5262
 
@@ -5280,6 +5285,7 @@
5280
5285
 
5281
5286
 
5282
5287
  </xsl:variable>
5288
+
5283
5289
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
5284
5290
  <xsl:if test="$font-size != ''">
5285
5291
  <xsl:attribute name="font-size">
@@ -5301,7 +5307,6 @@
5301
5307
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
5302
5308
  <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
5303
5309
  <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
5304
- <!-- <xsl:attribute name="margin-bottom">3mm</xsl:attribute> -->
5305
5310
  <xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
5306
5311
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
5307
5312
  </xsl:if>
@@ -5310,10 +5315,10 @@
5310
5315
 
5311
5316
 
5312
5317
 
5313
- <xsl:apply-templates/>
5318
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5314
5319
  </fo:block>
5315
5320
 
5316
-
5321
+
5317
5322
 
5318
5323
 
5319
5324
 
@@ -5326,7 +5331,7 @@
5326
5331
  <xsl:call-template name="add-zero-spaces-java">
5327
5332
  <xsl:with-param name="text" select="$text"/>
5328
5333
  </xsl:call-template>
5329
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
5334
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
5330
5335
  <xsl:if test="normalize-space() != ''">
5331
5336
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
5332
5337
  <xsl:apply-templates/>
@@ -5334,10 +5339,10 @@
5334
5339
  </xsl:if>
5335
5340
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
5336
5341
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
5337
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5338
- <xsl:apply-templates/>
5342
+ <xsl:apply-templates select="*[local-name()='name']"/>
5343
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5339
5344
  </fo:block>
5340
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
5345
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
5341
5346
  <xsl:if test="normalize-space() != ''">
5342
5347
  <fo:block xsl:use-attribute-sets="permission-name-style">
5343
5348
  <xsl:apply-templates/>
@@ -5350,13 +5355,13 @@
5350
5355
  </fo:block>
5351
5356
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
5352
5357
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
5353
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5354
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
5355
- <xsl:apply-templates select="@obligation" mode="presentation"/>
5356
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
5357
- <xsl:apply-templates/>
5358
+ <xsl:apply-templates select="*[local-name()='name']"/>
5359
+ <xsl:apply-templates select="*[local-name()='label']"/>
5360
+ <xsl:apply-templates select="@obligation"/>
5361
+ <xsl:apply-templates select="*[local-name()='subject']"/>
5362
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
5358
5363
  </fo:block>
5359
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
5364
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
5360
5365
  <xsl:if test="normalize-space() != ''">
5361
5366
  <fo:block xsl:use-attribute-sets="requirement-name-style">
5362
5367
 
@@ -5364,20 +5369,24 @@
5364
5369
 
5365
5370
  </fo:block>
5366
5371
  </xsl:if>
5367
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
5372
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
5368
5373
  <fo:block xsl:use-attribute-sets="requirement-label-style">
5369
5374
  <xsl:apply-templates/>
5370
5375
  </fo:block>
5371
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
5376
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
5372
5377
  <fo:block>
5373
5378
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
5374
5379
  </fo:block>
5380
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
5381
+ <fo:block xsl:use-attribute-sets="subject-style">
5382
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5383
+ </fo:block>
5375
5384
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
5376
5385
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5377
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5378
- <xsl:apply-templates/>
5386
+ <xsl:apply-templates select="*[local-name()='name']"/>
5387
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5379
5388
  </fo:block>
5380
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
5389
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
5381
5390
  <xsl:if test="normalize-space() != ''">
5382
5391
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
5383
5392
  <xsl:apply-templates/>
@@ -5388,10 +5397,6 @@
5388
5397
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5389
5398
  <xsl:apply-templates/>
5390
5399
  </fo:block>
5391
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
5392
- <fo:block xsl:use-attribute-sets="subject-style">
5393
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5394
- </fo:block>
5395
5400
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
5396
5401
  <fo:block xsl:use-attribute-sets="subject-style">
5397
5402
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -5435,8 +5440,6 @@
5435
5440
  </xsl:variable>
5436
5441
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
5437
5442
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
5438
- <!-- <fo:table-column column-width="35mm"/>
5439
- <fo:table-column column-width="115mm"/> -->
5440
5443
  <fo:table-column column-width="30%"/>
5441
5444
  <fo:table-column column-width="70%"/>
5442
5445
  </xsl:if>
@@ -5446,7 +5449,7 @@
5446
5449
  <xsl:if test=".//*[local-name() = 'fn']">
5447
5450
  <xsl:for-each select="*[local-name() = 'tbody']">
5448
5451
  <fo:block font-size="90%" border-bottom="1pt solid black">
5449
- <xsl:call-template name="fn_display"/>
5452
+ <xsl:call-template name="table_fn_display"/>
5450
5453
  </fo:block>
5451
5454
  </xsl:for-each>
5452
5455
  </xsl:if>
@@ -5463,7 +5466,6 @@
5463
5466
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
5464
5467
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
5465
5468
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
5466
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
5467
5469
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
5468
5470
  </xsl:if>
5469
5471
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -5476,34 +5478,11 @@
5476
5478
  </fo:table-row>
5477
5479
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
5478
5480
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
5479
- <xsl:attribute name="text-align">
5480
- <xsl:choose>
5481
- <xsl:when test="@align">
5482
- <xsl:value-of select="@align"/>
5483
- </xsl:when>
5484
- <xsl:otherwise>left</xsl:otherwise>
5485
- </xsl:choose>
5486
- </xsl:attribute>
5487
- <xsl:if test="@colspan">
5488
- <xsl:attribute name="number-columns-spanned">
5489
- <xsl:value-of select="@colspan"/>
5490
- </xsl:attribute>
5491
- </xsl:if>
5492
- <xsl:if test="@rowspan">
5493
- <xsl:attribute name="number-rows-spanned">
5494
- <xsl:value-of select="@rowspan"/>
5495
- </xsl:attribute>
5496
- </xsl:if>
5497
- <xsl:call-template name="display-align"/>
5481
+ <xsl:call-template name="setTextAlignment">
5482
+ <xsl:with-param name="default">left</xsl:with-param>
5483
+ </xsl:call-template>
5498
5484
 
5499
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5500
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5501
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
5502
- </xsl:if>
5503
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
5504
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5505
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5506
- </xsl:if> -->
5485
+ <xsl:call-template name="setTableCellAttributes"/>
5507
5486
 
5508
5487
  <fo:block>
5509
5488
  <xsl:apply-templates/>
@@ -5515,37 +5494,15 @@
5515
5494
  <xsl:attribute name="padding">0mm</xsl:attribute>
5516
5495
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
5517
5496
  </xsl:if>
5518
- <xsl:attribute name="text-align">
5519
- <xsl:choose>
5520
- <xsl:when test="@align">
5521
- <xsl:value-of select="@align"/>
5522
- </xsl:when>
5523
- <xsl:otherwise>left</xsl:otherwise>
5524
- </xsl:choose>
5525
- </xsl:attribute>
5497
+ <xsl:call-template name="setTextAlignment">
5498
+ <xsl:with-param name="default">left</xsl:with-param>
5499
+ </xsl:call-template>
5500
+
5526
5501
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
5527
5502
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5528
5503
  </xsl:if>
5529
- <xsl:if test="@colspan">
5530
- <xsl:attribute name="number-columns-spanned">
5531
- <xsl:value-of select="@colspan"/>
5532
- </xsl:attribute>
5533
- </xsl:if>
5534
- <xsl:if test="@rowspan">
5535
- <xsl:attribute name="number-rows-spanned">
5536
- <xsl:value-of select="@rowspan"/>
5537
- </xsl:attribute>
5538
- </xsl:if>
5539
- <xsl:call-template name="display-align"/>
5540
5504
 
5541
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5542
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
5543
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5544
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
5545
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5546
- </xsl:if>
5547
- </xsl:if> -->
5548
- <!-- 2nd line and below -->
5505
+ <xsl:call-template name="setTableCellAttributes"/>
5549
5506
 
5550
5507
  <fo:block>
5551
5508
  <xsl:apply-templates/>
@@ -5557,15 +5514,15 @@
5557
5514
  <xsl:apply-templates/>
5558
5515
  </fo:block>
5559
5516
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
5560
- <fo:block> <!-- margin-bottom="10pt" -->
5517
+ <fo:block>
5561
5518
  <xsl:apply-templates/>
5562
5519
  </fo:block>
5563
5520
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
5564
5521
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
5565
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5566
- <xsl:apply-templates/>
5522
+ <xsl:apply-templates select="*[local-name()='name']"/>
5523
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5567
5524
  </fo:block>
5568
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
5525
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
5569
5526
  <xsl:if test="normalize-space() != ''">
5570
5527
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5571
5528
  <xsl:apply-templates/>:
@@ -5596,9 +5553,7 @@
5596
5553
 
5597
5554
  <xsl:variable name="fo_element">
5598
5555
  <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5599
-
5600
5556
  inline
5601
-
5602
5557
  </xsl:variable>
5603
5558
 
5604
5559
  <!-- display 'EXAMPLE' -->
@@ -5676,6 +5631,8 @@
5676
5631
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5677
5632
  <fo:block xsl:use-attribute-sets="termsource-style">
5678
5633
 
5634
+
5635
+
5679
5636
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5680
5637
  <xsl:variable name="termsource_text">
5681
5638
  <xsl:apply-templates/>
@@ -5713,11 +5670,7 @@
5713
5670
  <xsl:value-of select="."/>
5714
5671
  </xsl:if>
5715
5672
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
5716
- <fo:inline>
5717
-
5718
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
5719
-
5720
-
5673
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
5721
5674
  <xsl:value-of select="."/>
5722
5675
  </fo:inline>
5723
5676
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -5760,7 +5713,6 @@
5760
5713
  <fo:block-container margin-left="0mm">
5761
5714
 
5762
5715
  <fo:block xsl:use-attribute-sets="quote-style">
5763
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
5764
5716
 
5765
5717
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5766
5718
  </fo:block>
@@ -5803,15 +5755,13 @@
5803
5755
  </xsl:variable>
5804
5756
 
5805
5757
  <xsl:choose>
5806
- <xsl:when test="normalize-space($bibitemid) != ''">
5758
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
5807
5759
  <fo:inline xsl:use-attribute-sets="eref-style">
5808
5760
  <xsl:if test="@type = 'footnote'">
5809
-
5810
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5811
- <xsl:attribute name="font-size">80%</xsl:attribute>
5812
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5813
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5814
-
5761
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5762
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5763
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5764
+ <xsl:attribute name="font-size">80%</xsl:attribute>
5815
5765
 
5816
5766
  </xsl:if>
5817
5767
 
@@ -5828,7 +5778,6 @@
5828
5778
 
5829
5779
 
5830
5780
 
5831
-
5832
5781
  </xsl:if>
5833
5782
 
5834
5783
 
@@ -5881,8 +5830,6 @@
5881
5830
  </xsl:choose>
5882
5831
  </xsl:variable>
5883
5832
 
5884
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
5885
-
5886
5833
  <xsl:choose>
5887
5834
  <xsl:when test="$lang = 'zh'">
5888
5835
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -5938,7 +5885,6 @@
5938
5885
  <xsl:apply-templates/>
5939
5886
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5940
5887
  <fo:inline> <xsl:apply-templates/></fo:inline>
5941
- <!-- <fo:block>&#xA0;</fo:block> -->
5942
5888
  <fo:block/>
5943
5889
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5944
5890
 
@@ -5979,11 +5925,6 @@
5979
5925
  <xsl:apply-templates/>
5980
5926
  </fo:block>
5981
5927
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
5982
- <fo:block id="{@id}">
5983
- <xsl:apply-templates/>
5984
- </fo:block>
5985
- </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']">
5986
-
5987
5928
  <fo:block id="{@id}">
5988
5929
  <xsl:apply-templates/>
5989
5930
  </fo:block>
@@ -6253,32 +6194,119 @@
6253
6194
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
6254
6195
  <fo:block><xsl:apply-templates/></fo:block>
6255
6196
  </fo:table-cell>
6256
- </xsl:template><xsl:template name="processBibitem">
6257
-
6258
-
6259
-
6260
-
6197
+ </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">
6261
6198
 
6262
6199
 
6263
6200
 
6201
+ <fo:block id="{@id}">
6202
+ <xsl:apply-templates/>
6203
+ </fo:block>
6204
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
6205
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
6206
+
6207
+ <fo:block break-after="page"/>
6208
+
6209
+ </xsl:if>
6264
6210
 
6211
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
6212
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
6213
+ <fo:block break-after="page"/>
6214
+ </xsl:if>
6215
+ </xsl:if> -->
6265
6216
 
6217
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
6218
+ <xsl:apply-templates/>
6219
+ </fo:block>
6266
6220
 
6267
6221
 
6268
-
6269
6222
 
6270
6223
 
6271
-
6224
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
6225
+ <xsl:call-template name="bibitem"/>
6226
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
6272
6227
 
6228
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
6229
+ <xsl:call-template name="processBibitem"/>
6230
+ </fo:block>
6231
+
6273
6232
 
6233
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
6274
6234
 
6275
- <!-- end MPFD bibitem processing -->
6276
6235
 
6277
- <!-- start M3D bibitem processing -->
6236
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
6237
+ <fo:list-item>
6238
+ <fo:list-item-label end-indent="label-end()">
6239
+ <fo:block>
6240
+ <fo:inline>
6241
+
6242
+ <xsl:number format="1."/>
6243
+
6244
+ </fo:inline>
6245
+ </fo:block>
6246
+ </fo:list-item-label>
6247
+ <fo:list-item-body start-indent="body-start()">
6248
+ <fo:block>
6249
+ <xsl:if test="rsd:docidentifier">
6250
+ <xsl:choose>
6251
+ <xsl:when test="rsd:docidentifier/@type = 'metanorma'"/>
6252
+ <xsl:otherwise><fo:inline><xsl:value-of select="rsd:docidentifier[not(@type = 'metanorma-ordinal')]"/>, </fo:inline></xsl:otherwise>
6253
+ </xsl:choose>
6254
+ </xsl:if>
6255
+ <xsl:choose>
6256
+ <xsl:when test="rsd:title[@type = 'main' and @language = 'en']">
6257
+ <xsl:apply-templates select="rsd:title[@type = 'main' and @language = 'en']"/>
6258
+ </xsl:when>
6259
+ <xsl:otherwise>
6260
+ <xsl:apply-templates select="rsd:title"/>
6261
+ </xsl:otherwise>
6262
+ </xsl:choose>
6263
+ <xsl:apply-templates select="rsd:formattedref"/>
6264
+ </fo:block>
6265
+ </fo:list-item-body>
6266
+ </fo:list-item>
6267
+ </fo:list-block>
6268
+
6278
6269
 
6270
+ </xsl:template><xsl:template name="processBibitem">
6279
6271
 
6280
-
6281
6272
 
6273
+ <xsl:if test=".//rsd:fn">
6274
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
6275
+ </xsl:if>
6276
+ <xsl:value-of select="rsd:docidentifier"/>
6277
+ <xsl:apply-templates select="rsd:note"/>
6278
+ <xsl:if test="rsd:docidentifier">, </xsl:if>
6279
+ <xsl:choose>
6280
+ <xsl:when test="rsd:formattedref">
6281
+ <xsl:apply-templates select="rsd:formattedref"/>
6282
+ </xsl:when>
6283
+ <xsl:otherwise>
6284
+ <xsl:for-each select="rsd:contributor[rsd:role/@type='publisher']/rsd:organization/rsd:name">
6285
+ <xsl:apply-templates/>
6286
+ <xsl:if test="position() != last()">, </xsl:if>
6287
+ <xsl:if test="position() = last()">: </xsl:if>
6288
+ </xsl:for-each>
6289
+ <!-- rsd:docidentifier -->
6290
+
6291
+ <xsl:choose>
6292
+ <xsl:when test="rsd:title[@type = 'main' and @language = 'en']">
6293
+ <fo:inline><xsl:apply-templates select="rsd:title[@type = 'main' and @language = 'en']"/><xsl:text>. </xsl:text></fo:inline>
6294
+ </xsl:when>
6295
+ <xsl:otherwise>
6296
+ <fo:inline><xsl:apply-templates select="rsd:title"/><xsl:text>. </xsl:text></fo:inline>
6297
+ </xsl:otherwise>
6298
+ </xsl:choose>
6299
+
6300
+ <xsl:for-each select="rsd:contributor[rsd:role/@type='publisher']/rsd:organization/rsd:name">
6301
+ <xsl:apply-templates/>
6302
+ <xsl:if test="position() != last()">, </xsl:if>
6303
+ </xsl:for-each>
6304
+ <xsl:if test="rsd:date[@type='published']/rsd:on">
6305
+ <xsl:text> (</xsl:text><xsl:value-of select="rsd:date[@type='published']/rsd:on"/><xsl:text>)</xsl:text>
6306
+ </xsl:if>
6307
+ </xsl:otherwise>
6308
+ </xsl:choose>
6309
+
6282
6310
  </xsl:template><xsl:template name="processBibitemDocId">
6283
6311
  <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')]"/>
6284
6312
  <xsl:choose>
@@ -6335,6 +6363,55 @@
6335
6363
  <xsl:value-of select="substring(.,1,1)"/>
6336
6364
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
6337
6365
  <fo:inline><xsl:apply-templates/></fo:inline>
6366
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
6367
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
6368
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
6369
+ <xsl:apply-templates/>
6370
+ </fo:inline>
6371
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
6372
+ <fo:footnote>
6373
+ <xsl:variable name="number">
6374
+
6375
+ <xsl:choose>
6376
+ <xsl:when test="ancestor::*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]">
6377
+ <xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6378
+ </xsl:when>
6379
+ <xsl:otherwise>
6380
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6381
+ </xsl:otherwise>
6382
+ </xsl:choose>
6383
+
6384
+ </xsl:variable>
6385
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
6386
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
6387
+ <xsl:value-of select="$number"/>
6388
+
6389
+ </fo:basic-link>
6390
+ </fo:inline>
6391
+ <fo:footnote-body>
6392
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
6393
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
6394
+ <xsl:value-of select="$number"/>
6395
+
6396
+ </fo:inline>
6397
+ <xsl:apply-templates/>
6398
+ </fo:block>
6399
+ </fo:footnote-body>
6400
+ </fo:footnote>
6401
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
6402
+ <xsl:text> edition </xsl:text>
6403
+ <xsl:value-of select="."/>
6404
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
6405
+ <xsl:text> (</xsl:text>
6406
+ <fo:inline xsl:use-attribute-sets="link-style">
6407
+ <fo:basic-link external-destination="." fox:alt-text=".">
6408
+ <xsl:value-of select="."/>
6409
+ </fo:basic-link>
6410
+ </fo:inline>
6411
+ <xsl:text>)</xsl:text>
6412
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
6413
+
6414
+ <xsl:apply-templates/>
6338
6415
  </xsl:template><xsl:template match="*[local-name() = 'form']">
6339
6416
  <fo:block>
6340
6417
  <xsl:apply-templates/>
@@ -6407,24 +6484,7 @@
6407
6484
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
6408
6485
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
6409
6486
  <xsl:otherwise><!-- default value -->
6410
-
6411
-
6412
-
6413
-
6414
-
6415
-
6416
-
6417
-
6418
-
6419
-
6420
-
6421
-
6422
-
6423
-
6424
-
6425
6487
  2
6426
-
6427
-
6428
6488
  </xsl:otherwise>
6429
6489
  </xsl:choose>
6430
6490
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -6522,6 +6582,62 @@
6522
6582
  <xsl:copy-of select="."/>
6523
6583
  </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
6524
6584
  <xsl:call-template name="title"/>
6585
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
6586
+
6587
+
6588
+
6589
+
6590
+
6591
+ <!-- text in the box -->
6592
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
6593
+
6594
+
6595
+
6596
+
6597
+
6598
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
6599
+
6600
+
6601
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
6602
+ <xsl:call-template name="displayAdmonitionName"/>
6603
+ </fo:block>
6604
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
6605
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6606
+ </fo:block>
6607
+
6608
+ </fo:block-container>
6609
+
6610
+ </fo:block-container>
6611
+
6612
+ </xsl:template><xsl:template name="displayAdmonitionName">
6613
+
6614
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6615
+ <xsl:if test="not(*[local-name() = 'name'])">
6616
+ <xsl:apply-templates select="@type"/>
6617
+ </xsl:if>
6618
+
6619
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
6620
+ <xsl:apply-templates/>
6621
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
6622
+ <xsl:variable name="admonition_type_">
6623
+ <xsl:call-template name="getLocalizedString">
6624
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
6625
+ </xsl:call-template>
6626
+ </xsl:variable>
6627
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
6628
+ <xsl:value-of select="$admonition_type"/>
6629
+ <xsl:if test="$admonition_type = ''">
6630
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
6631
+ </xsl:if>
6632
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
6633
+
6634
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
6635
+
6636
+
6637
+
6638
+ <xsl:apply-templates/>
6639
+ </fo:block>
6640
+
6525
6641
  </xsl:template><xsl:template name="convertDate">
6526
6642
  <xsl:param name="date"/>
6527
6643
  <xsl:param name="format" select="'short'"/>
@@ -6530,78 +6646,39 @@
6530
6646
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
6531
6647
  <xsl:variable name="monthStr">
6532
6648
  <xsl:choose>
6533
- <xsl:when test="$month = '01'">January</xsl:when>
6534
- <xsl:when test="$month = '02'">February</xsl:when>
6535
- <xsl:when test="$month = '03'">March</xsl:when>
6536
- <xsl:when test="$month = '04'">April</xsl:when>
6537
- <xsl:when test="$month = '05'">May</xsl:when>
6538
- <xsl:when test="$month = '06'">June</xsl:when>
6539
- <xsl:when test="$month = '07'">July</xsl:when>
6540
- <xsl:when test="$month = '08'">August</xsl:when>
6541
- <xsl:when test="$month = '09'">September</xsl:when>
6542
- <xsl:when test="$month = '10'">October</xsl:when>
6543
- <xsl:when test="$month = '11'">November</xsl:when>
6544
- <xsl:when test="$month = '12'">December</xsl:when>
6545
- </xsl:choose>
6546
- </xsl:variable>
6547
- <xsl:variable name="result">
6548
- <xsl:choose>
6549
- <xsl:when test="$format = 'ddMMyyyy'">
6550
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6551
- <xsl:text> </xsl:text>
6552
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6553
- </xsl:when>
6554
- <xsl:when test="$format = 'ddMM'">
6555
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6556
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6557
- </xsl:when>
6558
- <xsl:when test="$format = 'short' or $day = ''">
6559
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6560
- </xsl:when>
6561
- <xsl:otherwise>
6562
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6563
- </xsl:otherwise>
6649
+ <xsl:when test="$month = '01'">january</xsl:when>
6650
+ <xsl:when test="$month = '02'">february</xsl:when>
6651
+ <xsl:when test="$month = '03'">march</xsl:when>
6652
+ <xsl:when test="$month = '04'">april</xsl:when>
6653
+ <xsl:when test="$month = '05'">may</xsl:when>
6654
+ <xsl:when test="$month = '06'">june</xsl:when>
6655
+ <xsl:when test="$month = '07'">july</xsl:when>
6656
+ <xsl:when test="$month = '08'">august</xsl:when>
6657
+ <xsl:when test="$month = '09'">september</xsl:when>
6658
+ <xsl:when test="$month = '10'">october</xsl:when>
6659
+ <xsl:when test="$month = '11'">november</xsl:when>
6660
+ <xsl:when test="$month = '12'">december</xsl:when>
6564
6661
  </xsl:choose>
6565
6662
  </xsl:variable>
6566
- <xsl:value-of select="$result"/>
6567
- </xsl:template><xsl:template name="convertDateLocalized">
6568
- <xsl:param name="date"/>
6569
- <xsl:param name="format" select="'short'"/>
6570
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
6571
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
6572
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
6573
- <xsl:variable name="monthStr">
6574
- <xsl:choose>
6575
- <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>
6576
- <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>
6577
- <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>
6578
- <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>
6579
- <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>
6580
- <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>
6581
- <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>
6582
- <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>
6583
- <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>
6584
- <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>
6585
- <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>
6586
- <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>
6587
- </xsl:choose>
6663
+ <xsl:variable name="monthStr_localized">
6664
+ <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>
6588
6665
  </xsl:variable>
6589
6666
  <xsl:variable name="result">
6590
6667
  <xsl:choose>
6591
6668
  <xsl:when test="$format = 'ddMMyyyy'">
6592
6669
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6593
6670
  <xsl:text> </xsl:text>
6594
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6671
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
6595
6672
  </xsl:when>
6596
6673
  <xsl:when test="$format = 'ddMM'">
6597
6674
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6598
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6675
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
6599
6676
  </xsl:when>
6600
6677
  <xsl:when test="$format = 'short' or $day = ''">
6601
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6678
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
6602
6679
  </xsl:when>
6603
6680
  <xsl:otherwise>
6604
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6681
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
6605
6682
  </xsl:otherwise>
6606
6683
  </xsl:choose>
6607
6684
  </xsl:variable>
@@ -6653,14 +6730,9 @@
6653
6730
  <dc:title>
6654
6731
  <xsl:variable name="title">
6655
6732
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6656
-
6657
-
6658
-
6659
-
6660
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
6661
-
6662
-
6663
6733
 
6734
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
6735
+
6664
6736
  </xsl:for-each>
6665
6737
  </xsl:variable>
6666
6738
  <xsl:choose>
@@ -6675,21 +6747,18 @@
6675
6747
  <dc:creator>
6676
6748
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6677
6749
 
6678
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6679
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6680
- <xsl:if test="position() != last()">; </xsl:if>
6681
- </xsl:for-each>
6682
-
6683
-
6684
-
6750
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6751
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6752
+ <xsl:if test="position() != last()">; </xsl:if>
6753
+ </xsl:for-each>
6754
+
6685
6755
  </xsl:for-each>
6686
6756
  </dc:creator>
6687
6757
  <dc:description>
6688
6758
  <xsl:variable name="abstract">
6689
6759
 
6690
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6691
-
6692
-
6760
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6761
+
6693
6762
  </xsl:variable>
6694
6763
  <xsl:value-of select="normalize-space($abstract)"/>
6695
6764
  </dc:description>
@@ -6709,7 +6778,6 @@
6709
6778
  <xsl:value-of select="../@id"/>
6710
6779
  </xsl:when>
6711
6780
  <xsl:otherwise>
6712
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
6713
6781
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
6714
6782
  </xsl:otherwise>
6715
6783
  </xsl:choose>
@@ -6735,9 +6803,6 @@
6735
6803
  <xsl:when test="ancestor::*[local-name() = 'preface']">
6736
6804
  <xsl:value-of select="$level_total - 2"/>
6737
6805
  </xsl:when>
6738
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
6739
- <xsl:value-of select="$level_total - 1"/>
6740
- </xsl:when> -->
6741
6806
  <xsl:when test="ancestor::*[local-name() = 'sections']">
6742
6807
  <xsl:value-of select="$level_total - 1"/>
6743
6808
  </xsl:when>
@@ -6927,7 +6992,6 @@
6927
6992
  <xsl:value-of select="$key_"/>
6928
6993
  </xsl:otherwise>
6929
6994
  </xsl:choose>
6930
-
6931
6995
  </xsl:template><xsl:template name="setTrackChangesStyles">
6932
6996
  <xsl:param name="isAdded"/>
6933
6997
  <xsl:param name="isDeleted"/>
@@ -6950,7 +7014,6 @@
6950
7014
  <xsl:if test="local-name() = 'table'">
6951
7015
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
6952
7016
  </xsl:if>
6953
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
6954
7017
  <xsl:attribute name="padding">2mm</xsl:attribute>
6955
7018
  </xsl:if>
6956
7019
  </xsl:otherwise>
@@ -6970,15 +7033,18 @@
6970
7033
  </xsl:choose>
6971
7034
  </xsl:template><xsl:template name="setTextAlignment">
6972
7035
  <xsl:param name="default">left</xsl:param>
7036
+ <xsl:variable name="align" select="normalize-space(@align)"/>
6973
7037
  <xsl:attribute name="text-align">
6974
7038
  <xsl:choose>
6975
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
7039
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
7040
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
7041
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
6976
7042
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
6977
7043
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
6978
7044
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6979
7045
  </xsl:choose>
6980
7046
  </xsl:attribute>
6981
- <xsl:if test="@align = 'indent'">
7047
+ <xsl:if test="$align = 'indent'">
6982
7048
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
6983
7049
  </xsl:if>
6984
7050
  </xsl:template><xsl:template name="number-to-words">