metanorma-ribose 1.8.3 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,8 @@
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
8
  <xsl:param name="basepath"/>
9
9
 
10
+ <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
11
+
10
12
  <xsl:variable name="pageWidth" select="215.9"/>
11
13
  <xsl:variable name="pageHeight" select="279.4"/>
12
14
  <xsl:variable name="marginLeftRight1" select="29"/>
@@ -66,7 +68,7 @@
66
68
 
67
69
  <xsl:template match="/">
68
70
  <xsl:call-template name="namespaceCheck"/>
69
- <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}">
70
72
  <fo:layout-master-set>
71
73
 
72
74
  <!-- Cover page -->
@@ -358,7 +360,7 @@
358
360
  <fo:block>
359
361
  <xsl:apply-templates select="/rsd:rsd-standard/rsd:bibdata/rsd:ext/rsd:security"/>
360
362
  <fo:block>
361
- <xsl:call-template name="convertDateLocalized">
363
+ <xsl:call-template name="convertDate">
362
364
  <xsl:with-param name="date" select="/rsd:rsd-standard/rsd:bibdata/rsd:date[@type = 'published']/rsd:on"/>
363
365
  <xsl:with-param name="format" select="'Month DD, YYYY'"/>
364
366
  </xsl:call-template>
@@ -435,8 +437,8 @@
435
437
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
436
438
  <xsl:attribute name="color">black</xsl:attribute>
437
439
  </xsl:if>
438
- <xsl:if test="@level = 2">
439
- <xsl:attribute name="margin-left">16.5mm</xsl:attribute>
440
+ <xsl:if test="@level &gt;= 2">
441
+ <xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * 16.5"/>mm</xsl:attribute>
440
442
  <xsl:attribute name="space-before">4pt</xsl:attribute>
441
443
  <xsl:attribute name="space-after">5pt</xsl:attribute>
442
444
  </xsl:if>
@@ -522,10 +524,6 @@
522
524
  <!-- ============================= -->
523
525
  <!-- CONTENTS -->
524
526
  <!-- ============================= -->
525
- <xsl:template match="node()" mode="contents">
526
- <xsl:apply-templates mode="contents"/>
527
- </xsl:template>
528
-
529
527
 
530
528
  <!-- element with title -->
531
529
  <xsl:template match="*[rsd:title]" mode="contents">
@@ -537,7 +535,7 @@
537
535
 
538
536
  <xsl:variable name="display">
539
537
  <xsl:choose>
540
- <xsl:when test="$level &gt;= 3">false</xsl:when>
538
+ <xsl:when test="$level &gt; $toc_level">false</xsl:when>
541
539
  <xsl:otherwise>true</xsl:otherwise>
542
540
  </xsl:choose>
543
541
  </xsl:variable>
@@ -843,33 +841,7 @@
843
841
  </xsl:if>
844
842
  </xsl:template>
845
843
 
846
- <!--
847
- <fn reference="1">
848
- <p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
849
- </fn>
850
- -->
851
- <xsl:template match="rsd:title/rsd:fn | rsd:p/rsd:fn[not(ancestor::rsd:table)]" priority="2">
852
- <fo:footnote keep-with-previous.within-line="always">
853
- <xsl:variable name="number" select="@reference"/>
854
-
855
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
856
- <fo:basic-link internal-destination="footnote_{@reference}" fox:alt-text="footnote {@reference}">
857
- <xsl:value-of select="$number"/><!-- + count(//rsd:bibitem/rsd:note) -->
858
- </fo:basic-link>
859
- </fo:inline>
860
- <fo:footnote-body>
861
- <fo:block font-size="10pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" color="rgb(168, 170, 173)" text-align="left">
862
- <fo:inline id="footnote_{@reference}" keep-with-next.within-line="always" font-size="60%" vertical-align="super">
863
- <xsl:value-of select="$number "/><!-- + count(//rsd:bibitem/rsd:note) -->
864
- </fo:inline>
865
- <xsl:for-each select="rsd:p">
866
- <xsl:apply-templates/>
867
- </xsl:for-each>
868
- </fo:block>
869
- </fo:footnote-body>
870
- </fo:footnote>
871
- </xsl:template>
872
-
844
+
873
845
  <xsl:template match="rsd:fn/rsd:p">
874
846
  <fo:block>
875
847
  <xsl:apply-templates/>
@@ -877,117 +849,6 @@
877
849
  </xsl:template>
878
850
 
879
851
 
880
-
881
- <xsl:template match="rsd:bibitem">
882
- <fo:block id="{@id}" margin-bottom="12pt" font-weight="normal"> <!-- start-indent="12mm" text-indent="-12mm" -->
883
- <xsl:if test=".//rsd:fn">
884
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
885
- </xsl:if>
886
- <!-- <xsl:if test="rsd:docidentifier">
887
- <xsl:if test="rsd:docidentifier/@type != 'IETF' and rsd:docidentifier/@type != 'ISO'">
888
- <xsl:value-of select="rsd:docidentifier/@type"/><xsl:text> </xsl:text>
889
- </xsl:if>
890
- <xsl:value-of select="rsd:docidentifier"/>
891
- </xsl:if> -->
892
- <xsl:value-of select="rsd:docidentifier"/>
893
- <xsl:apply-templates select="rsd:note"/>
894
- <xsl:if test="rsd:docidentifier">, </xsl:if>
895
- <xsl:choose>
896
- <xsl:when test="rsd:formattedref">
897
- <xsl:apply-templates select="rsd:formattedref"/>
898
- </xsl:when>
899
- <xsl:otherwise>
900
- <xsl:for-each select="rsd:contributor[rsd:role/@type='publisher']/rsd:organization/rsd:name">
901
- <xsl:apply-templates/>
902
- <xsl:if test="position() != last()">, </xsl:if>
903
- <xsl:if test="position() = last()">: </xsl:if>
904
- </xsl:for-each>
905
- <!-- rsd:docidentifier -->
906
-
907
- <fo:inline font-style="italic">
908
- <xsl:choose>
909
- <xsl:when test="rsd:title[@type = 'main' and @language = 'en']">
910
- <xsl:value-of select="rsd:title[@type = 'main' and @language = 'en']"/><xsl:text>. </xsl:text>
911
- </xsl:when>
912
- <xsl:otherwise>
913
- <xsl:value-of select="rsd:title"/><xsl:text>. </xsl:text>
914
- </xsl:otherwise>
915
- </xsl:choose>
916
- </fo:inline>
917
- <xsl:for-each select="rsd:contributor[rsd:role/@type='publisher']/rsd:organization/rsd:name">
918
- <xsl:apply-templates/>
919
- <xsl:if test="position() != last()">, </xsl:if>
920
- </xsl:for-each>
921
- <xsl:if test="rsd:date[@type='published']/rsd:on">
922
- <xsl:text> (</xsl:text><xsl:value-of select="rsd:date[@type='published']/rsd:on"/><xsl:text>)</xsl:text>
923
- </xsl:if>
924
- </xsl:otherwise>
925
- </xsl:choose>
926
- </fo:block>
927
- </xsl:template>
928
-
929
-
930
- <xsl:template match="rsd:bibitem/rsd:note" priority="2">
931
- <fo:footnote>
932
- <xsl:variable name="number">
933
- <xsl:choose>
934
- <xsl:when test="ancestor::rsd:references[preceding-sibling::rsd:references]">
935
- <xsl:number level="any" count="rsd:references[preceding-sibling::rsd:references]//rsd:bibitem/rsd:note"/>
936
- </xsl:when>
937
- <xsl:otherwise>
938
- <xsl:number level="any" count="rsd:bibitem/rsd:note"/>
939
- </xsl:otherwise>
940
- </xsl:choose>
941
- </xsl:variable>
942
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super"> <!-- 60% baseline-shift="35%" -->
943
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
944
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
945
- </fo:basic-link>
946
- </fo:inline>
947
- <fo:footnote-body>
948
- <fo:block font-size="10pt" margin-bottom="12pt" start-indent="0pt" color="rgb(168, 170, 173)">
949
- <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" -->
950
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
951
- </fo:inline>
952
- <xsl:apply-templates/>
953
- </fo:block>
954
- </fo:footnote-body>
955
- </fo:footnote>
956
- </xsl:template>
957
-
958
-
959
- <xsl:template match="rsd:references[not(@normative='true')]/rsd:bibitem">
960
- <fo:list-block margin-bottom="4pt" provisional-distance-between-starts="8mm">
961
- <fo:list-item>
962
- <fo:list-item-label end-indent="label-end()">
963
- <fo:block>
964
- <fo:inline id="{@id}">
965
- <xsl:number format="1."/> <!-- [1] -->
966
- </fo:inline>
967
- </fo:block>
968
- </fo:list-item-label>
969
- <fo:list-item-body start-indent="body-start()">
970
- <fo:block>
971
- <xsl:if test="rsd:docidentifier">
972
- <xsl:choose>
973
- <xsl:when test="rsd:docidentifier/@type = 'metanorma'"/>
974
- <xsl:otherwise><fo:inline><xsl:value-of select="rsd:docidentifier"/>, </fo:inline></xsl:otherwise>
975
- </xsl:choose>
976
- </xsl:if>
977
- <xsl:choose>
978
- <xsl:when test="rsd:title[@type = 'main' and @language = 'en']">
979
- <xsl:apply-templates select="rsd:title[@type = 'main' and @language = 'en']"/>
980
- </xsl:when>
981
- <xsl:otherwise>
982
- <xsl:apply-templates select="rsd:title"/>
983
- </xsl:otherwise>
984
- </xsl:choose>
985
- <xsl:apply-templates select="rsd:formattedref"/>
986
- </fo:block>
987
- </fo:list-item-body>
988
- </fo:list-item>
989
- </fo:list-block>
990
- </xsl:template>
991
852
 
992
853
 
993
854
 
@@ -1000,7 +861,7 @@
1000
861
  <fo:block-container>
1001
862
  <xsl:if test="$level &gt;= 3">
1002
863
  <!-- <xsl:variable name="list_level" select="count(ancestor-or-self::rsd:ul) + count(ancestor-or-self::rsd:ul)"/> -->
1003
- <xsl:attribute name="margin-left">13mm</xsl:attribute>
864
+ <!-- <xsl:attribute name="margin-left">13mm</xsl:attribute> -->
1004
865
  </xsl:if>
1005
866
  <fo:block-container margin-left="0mm">
1006
867
  <xsl:choose>
@@ -1018,7 +879,7 @@
1018
879
  </xsl:template>
1019
880
 
1020
881
  <xsl:template name="listProcessing">
1021
- <fo:list-block provisional-distance-between-starts="12mm">
882
+ <fo:list-block provisional-distance-between-starts="6mm"> <!-- 12mm -->
1022
883
  <xsl:if test="ancestor::rsd:ul | ancestor::rsd:ol">
1023
884
  <!-- <xsl:attribute name="margin-bottom">0pt</xsl:attribute> -->
1024
885
  </xsl:if>
@@ -1029,13 +890,17 @@
1029
890
  </fo:list-block>
1030
891
  </xsl:template>
1031
892
 
893
+
1032
894
  <xsl:template match="rsd:li">
1033
895
  <fo:list-item space-after="4pt">
1034
896
  <fo:list-item-label end-indent="label-end()">
1035
897
  <fo:block color="{$color_blue}" font-weight="bold">
1036
898
  <xsl:choose>
1037
- <xsl:when test="local-name(..) = 'ul' and (../ancestor::rsd:ul or ../ancestor::rsd:ol)">-</xsl:when> <!-- &#x2014; dash -->
1038
- <xsl:when test="local-name(..) = 'ul'">•</xsl:when> <!-- &#x2014; dash -->
899
+ <xsl:when test="local-name(..) = 'ul'">
900
+ <xsl:call-template name="setULLabel"/>
901
+ </xsl:when>
902
+ <!-- <xsl:when test="local-name(..) = 'ul' and (../ancestor::rsd:ul or ../ancestor::rsd:ol)">&#x2014;</xsl:when> --> <!-- - &#x2014; dash -->
903
+ <!-- <xsl:when test="local-name(..) = 'ul'">•</xsl:when> -->
1039
904
  <xsl:otherwise> <!-- for ordered lists -->
1040
905
  <xsl:choose>
1041
906
  <xsl:when test="../@type = 'arabic'">
@@ -1074,8 +939,8 @@
1074
939
  <fo:list-item-label><fo:block/></fo:list-item-label>
1075
940
  <fo:list-item-body>
1076
941
  <fo:block>
1077
- <xsl:apply-templates select="rsd:name" mode="presentation"/>
1078
- <xsl:apply-templates/>
942
+ <xsl:apply-templates select="rsd:name"/>
943
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
1079
944
  </fo:block>
1080
945
  </fo:list-item-body>
1081
946
  </fo:list-item>
@@ -1100,7 +965,7 @@
1100
965
  <xsl:if test="preceding-sibling::*[1][self::rsd:name]">
1101
966
  <xsl:attribute name="space-before">11mm</xsl:attribute>
1102
967
  <fo:inline padding-right="1mm">
1103
- <xsl:apply-templates select="ancestor::rsd:term[1]/rsd:name" mode="presentation"/>
968
+ <xsl:apply-templates select="ancestor::rsd:term[1]/rsd:name"/>
1104
969
  </fo:inline>
1105
970
  </xsl:if>
1106
971
 
@@ -1136,9 +1001,7 @@
1136
1001
  </fo:block>
1137
1002
  </xsl:template>
1138
1003
 
1139
-
1140
- <xsl:template match="rsd:references[not(@normative='true')]/rsd:title" priority="2"/>
1141
- <xsl:template match="rsd:references[not(@normative='true')]">
1004
+ <xsl:template match="rsd:references[not(@normative='true')]" priority="3">
1142
1005
  <fo:block break-after="page"/>
1143
1006
  <fo:block id="{@id}">
1144
1007
  <fo:table width="100%" table-layout="fixed">
@@ -1161,7 +1024,7 @@
1161
1024
  <fo:table-row>
1162
1025
  <fo:table-cell text-align="left">
1163
1026
  <fo:block>
1164
- <xsl:apply-templates/>
1027
+ <xsl:apply-templates select="node()[not(local-name() = 'title')]"/>
1165
1028
  </fo:block>
1166
1029
  </fo:table-cell>
1167
1030
  </fo:table-row>
@@ -1170,43 +1033,7 @@
1170
1033
 
1171
1034
  </fo:block>
1172
1035
  </xsl:template>
1173
-
1174
- <xsl:template match="rsd:references[not(@normative='true')]/rsd:bibitem" mode="contents"/>
1175
-
1176
- <!-- <xsl:template match="rsd:references[@id = '_bibliography']/rsd:bibitem/rsd:title"> [position() &gt; 1]-->
1177
- <xsl:template match="rsd:references[not(@normative='true')]/rsd:bibitem/rsd:title">
1178
- <fo:inline font-style="italic">
1179
- <xsl:apply-templates/>
1180
- </fo:inline>
1181
- </xsl:template>
1182
-
1183
-
1184
- <!-- <xsl:template match="rsd:note/rsd:p" name="note">
1185
- <fo:block font-size="10pt" margin-top="12pt" margin-bottom="12pt" line-height="115%">
1186
- <xsl:if test="ancestor::rsd:ul or ancestor::rsd:ol and not(ancestor::rsd:note[1]/following-sibling::*)">
1187
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1188
- </xsl:if>
1189
- <fo:inline padding-right="4mm">
1190
- <xsl:apply-templates select="../rsd:name" mode="presentation"/>
1191
- </fo:inline>
1192
- <xsl:apply-templates />
1193
- </fo:block>
1194
- </xsl:template>
1195
- -->
1196
-
1197
1036
 
1198
- <xsl:template match="rsd:admonition">
1199
- <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">
1200
- <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
1201
- <fo:block font-size="11pt" margin-bottom="6pt" font-weight="normal" font-style="italic" text-align="center">
1202
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
1203
- </fo:block>
1204
- <fo:block font-style="italic">
1205
- <xsl:apply-templates/>
1206
- </fo:block>
1207
- </fo:block-container>
1208
- </fo:block-container>
1209
- </xsl:template>
1210
1037
 
1211
1038
  <xsl:template match="rsd:formula/rsd:stem">
1212
1039
  <fo:block margin-top="6pt" margin-bottom="12pt">
@@ -1222,7 +1049,7 @@
1222
1049
  </fo:table-cell>
1223
1050
  <fo:table-cell display-align="center">
1224
1051
  <fo:block text-align="right">
1225
- <xsl:apply-templates select="../rsd:name" mode="presentation"/>
1052
+ <xsl:apply-templates select="../rsd:name" mode="formula_number"/>
1226
1053
  </fo:block>
1227
1054
  </fo:table-cell>
1228
1055
  </fo:table-row>
@@ -1485,55 +1312,32 @@
1485
1312
 
1486
1313
 
1487
1314
 
1488
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
1489
-
1490
- <title-annex lang="en">Annex </title-annex>
1491
- <title-annex lang="fr">Annexe </title-annex>
1492
-
1493
- <title-annex lang="zh">Annex </title-annex>
1494
-
1495
-
1315
+ <xsl:variable name="titles_">
1496
1316
 
1497
1317
  <title-edition lang="en">
1498
1318
 
1499
-
1500
- <xsl:text>Version</xsl:text>
1501
-
1319
+ <xsl:text>Version</xsl:text>
1320
+
1502
1321
  </title-edition>
1503
1322
 
1504
1323
  <title-edition lang="fr">
1505
-
1506
- <xsl:text>Édition </xsl:text>
1507
-
1324
+ <xsl:text>Édition </xsl:text>
1508
1325
  </title-edition>
1509
1326
 
1510
-
1327
+ <!-- These titles of Table of contents renders different than determined in localized-strings -->
1511
1328
  <title-toc lang="en">
1512
1329
 
1513
- <xsl:text>Contents</xsl:text>
1514
-
1515
1330
 
1516
1331
 
1517
1332
  </title-toc>
1518
1333
  <title-toc lang="fr">
1334
+ <xsl:text>Sommaire</xsl:text>
1335
+ </title-toc>
1336
+ <title-toc lang="zh">
1519
1337
 
1520
- <xsl:text>Sommaire</xsl:text>
1521
-
1522
-
1523
- </title-toc>
1524
-
1525
- <title-toc lang="zh">Contents</title-toc>
1526
-
1527
-
1528
-
1529
- <title-page lang="en">Page</title-page>
1530
- <title-page lang="fr">Page</title-page>
1531
-
1532
- <title-key lang="en">Key</title-key>
1533
- <title-key lang="fr">Légende</title-key>
1534
-
1535
- <title-where lang="en">where</title-where>
1536
- <title-where lang="fr">où</title-where>
1338
+ <xsl:text>Contents</xsl:text>
1339
+
1340
+ </title-toc>
1537
1341
 
1538
1342
  <title-descriptors lang="en">Descriptors</title-descriptors>
1539
1343
 
@@ -1549,32 +1353,9 @@
1549
1353
  </title-part>
1550
1354
  <title-part lang="zh">第 # 部分:</title-part>
1551
1355
 
1552
- <title-subpart lang="en">
1553
-
1554
- </title-subpart>
1555
- <title-subpart lang="fr">
1556
-
1557
- </title-subpart>
1558
-
1559
- <title-modified lang="en">modified</title-modified>
1560
- <title-modified lang="fr">modifiée</title-modified>
1356
+ <title-subpart lang="en">Sub-part #</title-subpart>
1357
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
1561
1358
 
1562
- <title-modified lang="zh">modified</title-modified>
1563
-
1564
-
1565
-
1566
- <title-source lang="en">
1567
-
1568
- <xsl:text>SOURCE</xsl:text>
1569
-
1570
-
1571
- </title-source>
1572
-
1573
- <title-keywords lang="en">Keywords</title-keywords>
1574
-
1575
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
1576
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
1577
-
1578
1359
  <title-list-tables lang="en">List of Tables</title-list-tables>
1579
1360
 
1580
1361
  <title-list-figures lang="en">List of Figures</title-list-figures>
@@ -1583,41 +1364,12 @@
1583
1364
 
1584
1365
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
1585
1366
 
1586
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
1587
-
1588
- <title-abstract lang="en">Abstract</title-abstract>
1589
-
1590
1367
  <title-summary lang="en">Summary</title-summary>
1591
1368
 
1592
- <title-in lang="en">in </title-in>
1593
-
1594
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
1595
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
1596
-
1597
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
1598
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
1599
-
1600
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
1601
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
1602
-
1603
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
1604
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
1605
-
1606
- <title-obligation-normative lang="en">normative</title-obligation-normative>
1607
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
1608
-
1609
- <title-caution lang="en">CAUTION</title-caution>
1610
- <title-caution lang="zh">注意</title-caution>
1611
-
1612
- <title-warning lang="en">WARNING</title-warning>
1613
- <title-warning lang="zh">警告</title-warning>
1614
-
1615
- <title-amendment lang="en">AMENDMENT</title-amendment>
1616
-
1617
1369
  <title-continued lang="en">(continued)</title-continued>
1618
1370
  <title-continued lang="fr">(continué)</title-continued>
1619
1371
 
1620
- </xsl:variable><xsl:variable name="bibdata">
1372
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
1621
1373
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1622
1374
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1623
1375
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -1646,6 +1398,25 @@
1646
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">
1647
1399
 
1648
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
+
1649
1420
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1650
1421
 
1651
1422
 
@@ -1656,16 +1427,21 @@
1656
1427
 
1657
1428
 
1658
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
+
1659
1435
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1660
1436
  <xsl:attribute name="white-space">pre</xsl:attribute>
1661
1437
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1662
1438
  <xsl:attribute name="role">Code</xsl:attribute>
1663
1439
 
1664
1440
 
1665
- <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1666
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1667
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1668
- <xsl:attribute name="line-height">113%</xsl:attribute>
1441
+
1442
+
1443
+
1444
+
1669
1445
 
1670
1446
 
1671
1447
 
@@ -1674,6 +1450,13 @@
1674
1450
 
1675
1451
 
1676
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
+
1677
1460
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1678
1461
 
1679
1462
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1724,6 +1507,7 @@
1724
1507
 
1725
1508
 
1726
1509
 
1510
+
1727
1511
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1728
1512
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1729
1513
 
@@ -1731,7 +1515,9 @@
1731
1515
 
1732
1516
 
1733
1517
 
1518
+
1734
1519
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1520
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1735
1521
 
1736
1522
 
1737
1523
 
@@ -1762,6 +1548,7 @@
1762
1548
 
1763
1549
 
1764
1550
 
1551
+
1765
1552
 
1766
1553
  <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1767
1554
 
@@ -1782,59 +1569,45 @@
1782
1569
 
1783
1570
  </xsl:attribute-set><xsl:variable name="table-border_">
1784
1571
 
1785
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
1786
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1787
-
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
+
1788
1576
 
1789
1577
 
1790
1578
 
1791
1579
 
1792
-
1793
1580
 
1794
1581
 
1795
1582
 
1796
-
1797
1583
 
1798
1584
 
1799
1585
 
1800
1586
 
1801
- <xsl:attribute name="font-size">13pt</xsl:attribute>
1802
- <xsl:attribute name="font-weight">300</xsl:attribute>
1803
- <xsl:attribute name="color">black</xsl:attribute>
1804
- <xsl:attribute name="text-align">left</xsl:attribute>
1805
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1806
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1807
1587
 
1808
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1809
1588
 
1810
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
1811
1589
 
1812
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1813
1590
 
1814
1591
 
1815
1592
 
1816
- <xsl:attribute name="font-size">12pt</xsl:attribute>
1817
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1818
- <xsl:attribute name="color">black</xsl:attribute>
1819
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1820
1593
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1821
1594
 
1822
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1595
+
1823
1596
 
1824
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>
1825
1603
 
1826
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1827
- <xsl:attribute name="color">black</xsl:attribute>
1828
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1829
1604
 
1830
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1831
1605
 
1832
1606
 
1833
1607
 
1834
1608
 
1835
1609
 
1836
1610
 
1837
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
1838
1611
 
1839
1612
 
1840
1613
 
@@ -1842,95 +1615,648 @@
1842
1615
 
1843
1616
 
1844
1617
 
1845
- </xsl:attribute-set><xsl:attribute-set name="note-style">
1846
1618
 
1847
1619
 
1848
1620
 
1621
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
1622
+ <xsl:attribute name="font-size">9.5pt</xsl:attribute> <!-- 8pt -->
1849
1623
 
1850
-
1851
1624
 
1852
1625
 
1626
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1627
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1628
+
1853
1629
 
1854
1630
 
1855
1631
 
1856
1632
 
1633
+
1857
1634
 
1858
1635
 
1859
1636
 
1637
+
1860
1638
 
1861
1639
 
1862
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1863
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1864
1640
 
1865
- </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">
1866
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>
1867
1648
 
1649
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
1650
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
1868
1651
 
1869
1652
 
1870
1653
 
1871
1654
 
1655
+ <xsl:attribute name="min-height">8.5mm</xsl:attribute>
1872
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>
1873
1659
 
1874
1660
 
1875
1661
 
1876
1662
 
1877
1663
 
1878
1664
 
1879
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1880
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1881
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1882
1665
 
1883
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
1666
+
1884
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>
1885
1671
 
1672
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
1886
1673
 
1887
1674
 
1888
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1889
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1890
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1891
1675
 
1892
- </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>
1893
1683
 
1894
1684
 
1895
1685
 
1896
-
1897
1686
 
1898
1687
 
1899
1688
 
1900
1689
 
1901
1690
 
1902
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1903
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1904
1691
 
1905
1692
 
1906
1693
 
1694
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1695
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
1907
1696
 
1908
1697
 
1909
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1910
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>
1911
1703
 
1912
1704
 
1913
1705
 
1914
1706
 
1915
1707
 
1916
1708
 
1917
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1918
1709
 
1919
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1920
1710
 
1921
-
1922
1711
 
1923
1712
 
1924
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1925
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1713
+
1714
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
1715
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1716
+
1717
+
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>
1724
+
1725
+
1726
+
1727
+
1728
+
1729
+
1730
+
1731
+
1732
+
1733
+
1734
+
1735
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
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>
1740
+
1741
+
1742
+
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1749
+
1750
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1751
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1752
+
1753
+
1754
+
1755
+
1756
+
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>
1761
+
1762
+
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+
1769
+
1770
+
1771
+
1772
+
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>
1776
+
1777
+
1778
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
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>
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>
1788
+
1789
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1790
+
1791
+
1792
+ <xsl:attribute name="min-height">7mm</xsl:attribute>
1793
+
1794
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
1795
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1796
+
1797
+
1798
+
1799
+
1800
+
1801
+
1802
+
1803
+
1804
+
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>
1926
1924
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1927
1925
 
1928
1926
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1929
1927
  <xsl:attribute name="role">BlockQuote</xsl:attribute>
1930
1928
 
1931
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1932
- <xsl:attribute name="margin-left">13mm</xsl:attribute>
1933
- <xsl:attribute name="margin-right">12mm</xsl:attribute>
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>
2044
+
2045
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
2046
+ <xsl:attribute name="font-weight">300</xsl:attribute>
2047
+ <xsl:attribute name="color">black</xsl:attribute>
2048
+ <xsl:attribute name="text-align">left</xsl:attribute>
2049
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2050
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2051
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2052
+
2053
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
2054
+
2055
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2056
+
2057
+
2058
+
2059
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2060
+ <xsl:attribute name="color">black</xsl:attribute>
2061
+
2062
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2063
+
2064
+
2065
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2066
+ <xsl:attribute name="color">black</xsl:attribute>
2067
+
2068
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
2069
+
2070
+
2071
+
2072
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2073
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
2074
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
2075
+
2076
+ </xsl:attribute-set><xsl:variable name="color-added-text">
2077
+ <xsl:text>rgb(0, 255, 0)</xsl:text>
2078
+ </xsl:variable><xsl:attribute-set name="add-style">
2079
+ <xsl:attribute name="color">red</xsl:attribute>
2080
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2081
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
2082
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
2083
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2084
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2085
+ </xsl:attribute-set><xsl:variable name="color-deleted-text">
2086
+ <xsl:text>red</xsl:text>
2087
+ </xsl:variable><xsl:attribute-set name="del-style">
2088
+ <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
2089
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2090
+ </xsl:attribute-set><xsl:attribute-set name="mathml-style">
2091
+ <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
2092
+
2093
+
2094
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
2095
+
2096
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
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
+
2113
+ </xsl:attribute-set><xsl:attribute-set name="fn-style">
2114
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2115
+ </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
2116
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2117
+
2118
+
2119
+
2120
+
2121
+
2122
+
2123
+
2124
+
2125
+
2126
+
2127
+
2128
+
2129
+
2130
+
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
+
1934
2260
 
1935
2261
 
1936
2262
 
@@ -1938,14 +2264,8 @@
1938
2264
 
1939
2265
 
1940
2266
 
1941
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1942
2267
 
1943
- <xsl:attribute name="text-align">right</xsl:attribute>
1944
- <xsl:attribute name="margin-right">25mm</xsl:attribute>
1945
2268
 
1946
-
1947
-
1948
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1949
2269
 
1950
2270
 
1951
2271
 
@@ -1953,158 +2273,123 @@
1953
2273
 
1954
2274
 
1955
2275
 
1956
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2276
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2277
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1957
2278
 
1958
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
1959
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>
1960
2283
 
1961
2284
 
1962
2285
 
1963
2286
 
1964
- </xsl:attribute-set><xsl:attribute-set name="term-style">
1965
2287
 
1966
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1967
2288
 
1968
2289
 
1969
-
1970
2290
 
1971
2291
 
1972
2292
 
1973
2293
 
2294
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2295
+ <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
1974
2296
 
2297
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
1975
2298
 
1976
2299
 
1977
2300
 
1978
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>
1979
2305
 
1980
2306
 
1981
- <xsl:attribute name="font-size">13pt</xsl:attribute>
1982
- <xsl:attribute name="font-weight">300</xsl:attribute>
1983
- <xsl:attribute name="color">black</xsl:attribute>
1984
- <xsl:attribute name="text-align">left</xsl:attribute>
1985
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1986
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1987
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1988
2307
 
1989
2308
 
1990
-
1991
2309
 
1992
2310
 
1993
2311
 
1994
-
1995
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
1996
2312
 
1997
- </xsl:attribute-set><xsl:attribute-set name="image-style">
1998
- <xsl:attribute name="text-align">center</xsl:attribute>
1999
2313
 
2000
2314
 
2001
2315
 
2316
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2317
+ <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
2002
2318
 
2319
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
2003
2320
 
2004
2321
 
2005
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2322
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
2006
2323
 
2007
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2008
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>
2009
2328
 
2010
- <xsl:attribute name="width">100%</xsl:attribute>
2011
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2012
- <xsl:attribute name="scaling">uniform</xsl:attribute>
2013
2329
 
2014
2330
 
2015
2331
 
2016
-
2017
-
2018
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
2019
2332
 
2020
- <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
2021
2333
 
2022
2334
 
2023
2335
 
2024
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2025
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2026
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2027
- <xsl:attribute name="text-align">center</xsl:attribute>
2028
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2029
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2030
2336
 
2031
- <xsl:attribute name="font-size">13pt</xsl:attribute>
2032
- <xsl:attribute name="font-weight">300</xsl:attribute>
2033
- <xsl:attribute name="color">black</xsl:attribute>
2034
- <xsl:attribute name="text-align">left</xsl:attribute>
2035
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2036
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2037
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2038
2337
 
2039
- </xsl:attribute-set><xsl:attribute-set name="domain-style">
2040
-
2041
- </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2042
2338
 
2043
2339
 
2044
2340
 
2045
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2046
- <xsl:attribute name="color">black</xsl:attribute>
2047
2341
 
2048
- </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2049
2342
 
2343
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2050
2344
 
2051
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2052
- <xsl:attribute name="color">black</xsl:attribute>
2053
2345
 
2054
- </xsl:attribute-set><xsl:attribute-set name="definition-style">
2346
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
2347
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2055
2348
 
2056
2349
 
2057
2350
 
2058
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2059
- <xsl:attribute name="space-before">12pt</xsl:attribute>
2060
- <xsl:attribute name="space-after">6pt</xsl:attribute>
2061
2351
 
2062
- </xsl:attribute-set><xsl:variable name="color-added-text">
2063
- <xsl:text>rgb(0, 255, 0)</xsl:text>
2064
- </xsl:variable><xsl:attribute-set name="add-style">
2065
- <xsl:attribute name="color">red</xsl:attribute>
2066
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2067
- <!-- <xsl:attribute name="color">black</xsl:attribute>
2068
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
2069
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
2070
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2071
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
2072
- <xsl:text>red</xsl:text>
2073
- </xsl:variable><xsl:attribute-set name="del-style">
2074
- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
2075
- <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2076
- </xsl:attribute-set><xsl:attribute-set name="mathml-style">
2077
- <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
2078
2352
 
2079
2353
 
2080
- </xsl:attribute-set><xsl:attribute-set name="list-style">
2081
2354
 
2082
- </xsl:attribute-set><xsl:attribute-set name="toc-style">
2083
- <xsl:attribute name="line-height">135%</xsl:attribute>
2084
- </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:template name="OLD_processPrefaceSectionsDefault_Contents">
2085
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2086
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2087
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2088
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2089
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2090
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2355
+
2356
+
2357
+
2358
+
2359
+
2360
+
2361
+
2362
+
2363
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2364
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2365
+
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
+
2387
+
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">
2091
2389
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2092
2390
  <xsl:sort select="@displayorder" data-type="number"/>
2093
2391
  <xsl:apply-templates select="." mode="contents"/>
2094
2392
  </xsl:for-each>
2095
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2096
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2097
-
2098
- <!-- Normative references -->
2099
- <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"/>
2100
- <!-- Terms and definitions -->
2101
- <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"/>
2102
- <!-- Another main sections -->
2103
- <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"/>
2104
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
2105
- <!-- Bibliography -->
2106
- <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"/>
2107
-
2108
2393
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2109
2394
 
2110
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']]">
@@ -2121,29 +2406,11 @@
2121
2406
  <xsl:sort select="@displayorder" data-type="number"/>
2122
2407
  <xsl:apply-templates select="." mode="contents"/>
2123
2408
  </xsl:for-each>
2124
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2125
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2126
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2127
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2128
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2129
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2130
2409
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2131
2410
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2132
2411
  <xsl:sort select="@displayorder" data-type="number"/>
2133
2412
  <xsl:apply-templates select="."/>
2134
2413
  </xsl:for-each>
2135
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2136
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2137
-
2138
- <!-- Normative references -->
2139
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
2140
- <!-- Terms and definitions -->
2141
- <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']]"/>
2142
- <!-- Another main sections -->
2143
- <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'])]"/>
2144
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2145
- <!-- Bibliography -->
2146
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2147
2414
  </xsl:template><xsl:template name="processMainSectionsDefault">
2148
2415
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2149
2416
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -2180,41 +2447,17 @@
2180
2447
  <xsl:call-template name="getSimpleTable"/>
2181
2448
  </xsl:variable>
2182
2449
 
2183
- <!-- <xsl:if test="$namespace = 'bipm'">
2184
- <fo:block>&#xA0;</fo:block>
2185
- </xsl:if> -->
2186
-
2187
2450
 
2188
2451
  <!-- Display table's name before table as standalone block -->
2189
2452
  <!-- $namespace = 'iso' or -->
2190
2453
 
2191
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2192
-
2193
-
2194
-
2454
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
2455
+
2195
2456
 
2196
2457
 
2197
-
2198
2458
 
2199
2459
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
2200
2460
 
2201
- <!-- <xsl:variable name="cols-count">
2202
- <xsl:choose>
2203
- <xsl:when test="*[local-name()='thead']">
2204
- <xsl:call-template name="calculate-columns-numbers">
2205
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2206
- </xsl:call-template>
2207
- </xsl:when>
2208
- <xsl:otherwise>
2209
- <xsl:call-template name="calculate-columns-numbers">
2210
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2211
- </xsl:call-template>
2212
- </xsl:otherwise>
2213
- </xsl:choose>
2214
- </xsl:variable> -->
2215
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2216
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2217
-
2218
2461
  <xsl:variable name="colwidths">
2219
2462
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2220
2463
  <xsl:call-template name="calculate-column-widths">
@@ -2225,17 +2468,8 @@
2225
2468
  </xsl:variable>
2226
2469
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2227
2470
 
2228
- <!-- <xsl:variable name="colwidths2">
2229
- <xsl:call-template name="calculate-column-widths">
2230
- <xsl:with-param name="cols-count" select="$cols-count"/>
2231
- </xsl:call-template>
2232
- </xsl:variable> -->
2233
-
2234
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
2235
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
2236
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
2237
2471
 
2238
- <xsl:variable name="margin-left">
2472
+ <xsl:variable name="margin-side">
2239
2473
  <xsl:choose>
2240
2474
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
2241
2475
  <xsl:otherwise>0</xsl:otherwise>
@@ -2243,70 +2477,61 @@
2243
2477
  </xsl:variable>
2244
2478
 
2245
2479
 
2246
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
2247
-
2248
-
2249
-
2250
-
2251
-
2252
-
2253
-
2254
-
2255
-
2480
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
2481
+
2256
2482
 
2483
+
2257
2484
 
2485
+
2258
2486
 
2487
+
2259
2488
 
2260
2489
 
2261
2490
 
2491
+
2262
2492
 
2263
2493
 
2264
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2265
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2266
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2267
2494
 
2268
2495
 
2269
2496
 
2497
+ <!-- end table block-container attributes -->
2270
2498
 
2271
2499
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
2272
2500
 
2273
2501
 
2502
+ <xsl:variable name="table_width_default">100%</xsl:variable>
2274
2503
  <xsl:variable name="table_width">
2275
2504
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
2276
- 100%
2277
-
2278
-
2505
+ <xsl:value-of select="$table_width_default"/>
2279
2506
  </xsl:variable>
2280
2507
 
2508
+
2281
2509
  <xsl:variable name="table_attributes">
2282
- <attribute name="table-layout">fixed</attribute>
2283
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
2284
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
2285
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
2286
-
2287
-
2288
-
2289
-
2290
-
2291
-
2292
-
2293
-
2294
-
2295
-
2296
-
2297
-
2298
-
2299
-
2300
- <attribute name="border">0pt solid black</attribute>
2301
- <attribute name="font-size">8pt</attribute>
2302
-
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>
2303
2528
  </xsl:variable>
2304
2529
 
2305
2530
 
2306
- <fo:table id="{@id}" table-omit-footer-at-break="true">
2531
+ <fo:table id="{@id}">
2307
2532
 
2308
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
2309
- <xsl:attribute name="{@name}">
2533
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2534
+ <xsl:attribute name="{local-name()}">
2310
2535
  <xsl:value-of select="."/>
2311
2536
  </xsl:attribute>
2312
2537
  </xsl:for-each>
@@ -2317,7 +2542,6 @@
2317
2542
  </xsl:if>
2318
2543
 
2319
2544
 
2320
-
2321
2545
  <xsl:choose>
2322
2546
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2323
2547
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -2343,7 +2567,7 @@
2343
2567
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2344
2568
  </xsl:when>
2345
2569
  <xsl:otherwise>
2346
- <xsl:apply-templates/>
2570
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2347
2571
  </xsl:otherwise>
2348
2572
  </xsl:choose>
2349
2573
 
@@ -2358,25 +2582,6 @@
2358
2582
  </xsl:call-template>
2359
2583
  </xsl:for-each>
2360
2584
 
2361
- <!-- insert footer as table -->
2362
- <!-- <fo:table>
2363
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
2364
- <xsl:attribute name="{@name}">
2365
- <xsl:value-of select="."/>
2366
- </xsl:attribute>
2367
- </xsl:for-each>
2368
-
2369
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2370
- <xsl:choose>
2371
- <xsl:when test=". = 1 or . = 0">
2372
- <fo:table-column column-width="proportional-column-width(2)"/>
2373
- </xsl:when>
2374
- <xsl:otherwise>
2375
- <fo:table-column column-width="proportional-column-width({.})"/>
2376
- </xsl:otherwise>
2377
- </xsl:choose>
2378
- </xsl:for-each>
2379
- </fo:table>-->
2380
2585
 
2381
2586
 
2382
2587
 
@@ -2437,18 +2642,17 @@
2437
2642
  </xsl:otherwise>
2438
2643
  </xsl:choose>
2439
2644
 
2440
- </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']">
2441
2646
  <xsl:param name="continued"/>
2442
2647
  <xsl:if test="normalize-space() != ''">
2443
2648
  <fo:block xsl:use-attribute-sets="table-name-style">
2444
-
2649
+
2445
2650
 
2446
2651
 
2447
2652
 
2448
2653
 
2449
2654
  <xsl:choose>
2450
2655
  <xsl:when test="$continued = 'true'">
2451
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2452
2656
 
2453
2657
  </xsl:when>
2454
2658
  <xsl:otherwise>
@@ -2511,13 +2715,6 @@
2511
2715
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
2512
2716
  <xsl:variable name="td_text">
2513
2717
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2514
-
2515
- <!-- <xsl:if test="$namespace = 'bipm'">
2516
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
2517
- <word><xsl:value-of select="normalize-space(.)"/></word>
2518
- </xsl:for-each>
2519
- </xsl:if> -->
2520
-
2521
2718
  </xsl:variable>
2522
2719
  <xsl:variable name="words">
2523
2720
  <xsl:variable name="string_with_added_zerospaces">
@@ -2554,7 +2751,6 @@
2554
2751
  </xsl:otherwise>
2555
2752
  </xsl:choose>
2556
2753
  </xsl:variable>
2557
-
2558
2754
 
2559
2755
  <column>
2560
2756
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -2590,7 +2786,6 @@
2590
2786
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2591
2787
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2592
2788
  <xsl:param name="cols-count"/>
2593
- <!-- font-weight="bold" -->
2594
2789
  <fo:table-header>
2595
2790
 
2596
2791
 
@@ -2602,13 +2797,12 @@
2602
2797
  <fo:table-row>
2603
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">
2604
2799
 
2605
- <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']">
2606
2801
  <xsl:with-param name="continued">true</xsl:with-param>
2607
2802
  </xsl:apply-templates>
2608
2803
 
2609
2804
 
2610
2805
 
2611
-
2612
2806
  </fo:table-cell>
2613
2807
  </fo:table-row>
2614
2808
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -2624,64 +2818,6 @@
2624
2818
  <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2625
2819
  </fo:table-footer>
2626
2820
  </xsl:if>
2627
- </xsl:template><xsl:template name="insertTableFooter2">
2628
- <xsl:param name="cols-count"/>
2629
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2630
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
2631
-
2632
- <fo:table-footer>
2633
-
2634
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2635
-
2636
- <!-- if there are note(s) or fn(s) then create footer row -->
2637
- <xsl:if test="$isNoteOrFnExist = 'true'">
2638
-
2639
-
2640
-
2641
- <fo:table-row>
2642
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2643
-
2644
-
2645
-
2646
- <!-- fn will be processed inside 'note' processing -->
2647
-
2648
-
2649
-
2650
-
2651
-
2652
-
2653
- <!-- except gb -->
2654
-
2655
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2656
-
2657
-
2658
- <!-- show Note under table in preface (ex. abstract) sections -->
2659
- <!-- empty, because notes show at page side in main sections -->
2660
- <!-- <xsl:if test="$namespace = 'bipm'">
2661
- <xsl:choose>
2662
- <xsl:when test="ancestor::*[local-name()='preface']">
2663
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2664
- </xsl:when>
2665
- <xsl:otherwise>
2666
- <fo:block/>
2667
- </xsl:otherwise>
2668
- </xsl:choose>
2669
- </xsl:if> -->
2670
-
2671
-
2672
- <!-- horizontal row separator -->
2673
-
2674
-
2675
- <!-- fn processing -->
2676
- <xsl:call-template name="fn_display"/>
2677
-
2678
- </fo:table-cell>
2679
- </fo:table-row>
2680
-
2681
- </xsl:if>
2682
- </fo:table-footer>
2683
-
2684
- </xsl:if>
2685
2821
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2686
2822
  <xsl:param name="table_attributes"/>
2687
2823
  <xsl:param name="colwidths"/>
@@ -2707,17 +2843,18 @@
2707
2843
  </xsl:variable>
2708
2844
 
2709
2845
  <fo:table keep-with-previous="always">
2710
- <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()"/>
2711
2848
  <xsl:choose>
2712
- <xsl:when test="@name = 'border-top'">
2713
- <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>
2714
2851
  </xsl:when>
2715
- <xsl:when test="@name = 'border'">
2716
- <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>
2717
2854
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2718
2855
  </xsl:when>
2719
2856
  <xsl:otherwise>
2720
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2857
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
2721
2858
  </xsl:otherwise>
2722
2859
  </xsl:choose>
2723
2860
  </xsl:for-each>
@@ -2746,9 +2883,10 @@
2746
2883
 
2747
2884
  <fo:table-body>
2748
2885
  <fo:table-row>
2749
- <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}">
2750
2887
 
2751
2888
 
2889
+
2752
2890
 
2753
2891
 
2754
2892
  <!-- fn will be processed inside 'note' processing -->
@@ -2758,39 +2896,20 @@
2758
2896
 
2759
2897
 
2760
2898
 
2761
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2762
-
2763
-
2764
-
2765
-
2766
2899
  <!-- for BSI (not PAS) display Notes before footnotes -->
2767
2900
 
2768
2901
 
2769
- <!-- except gb -->
2770
-
2771
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2902
+ <!-- except gb and bsi -->
2772
2903
 
2773
-
2774
- <!-- <xsl:if test="$namespace = 'bipm'">
2775
- <xsl:choose>
2776
- <xsl:when test="ancestor::*[local-name()='preface']">
2777
- show Note under table in preface (ex. abstract) sections
2778
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2779
- </xsl:when>
2780
- <xsl:otherwise>
2781
- empty, because notes show at page side in main sections
2782
- <fo:block/>
2783
- </xsl:otherwise>
2784
- </xsl:choose>
2785
- </xsl:if> -->
2904
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2905
+
2786
2906
 
2787
2907
 
2788
2908
  <!-- horizontal row separator -->
2789
2909
 
2790
2910
 
2791
2911
  <!-- fn processing -->
2792
- <xsl:call-template name="fn_display"/>
2793
-
2912
+ <xsl:call-template name="table_fn_display"/>
2794
2913
 
2795
2914
  <!-- for PAS display Notes after footnotes -->
2796
2915
 
@@ -2832,119 +2951,89 @@
2832
2951
 
2833
2952
 
2834
2953
  <xsl:apply-templates/>
2835
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
2954
+
2955
+ </fo:table-body>
2956
+
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
+
2961
+
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">
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">
2836
2978
 
2837
- </fo:table-body>
2979
+
2838
2980
 
2839
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
2840
- <xsl:choose>
2841
- <xsl:when test="substring-after(., '—') != ''">
2842
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
2843
- </xsl:when>
2844
- <xsl:otherwise>
2845
- <xsl:value-of select="."/>
2846
- </xsl:otherwise>
2847
- </xsl:choose>
2848
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
2849
- <xsl:apply-templates mode="presentation_name"/>
2850
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
2851
- <xsl:apply-templates select="."/>
2852
- </xsl:template><xsl:template match="*[local-name()='tr']">
2853
- <xsl:variable name="parent-name" select="local-name(..)"/>
2854
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2855
- <fo:table-row min-height="4mm">
2856
- <xsl:if test="$parent-name = 'thead'">
2857
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2858
-
2859
-
2860
-
2861
-
2862
-
2863
-
2864
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2865
- <xsl:attribute name="color">black</xsl:attribute>
2866
-
2867
-
2868
-
2869
- </xsl:if>
2870
- <xsl:if test="$parent-name = 'tfoot'">
2871
-
2872
-
2873
-
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>
2874
2985
  </xsl:if>
2875
-
2876
-
2877
-
2878
-
2879
-
2880
- <xsl:attribute name="min-height">8.5mm</xsl:attribute>
2881
- <xsl:if test="$parent-name = 'thead'">
2882
- <xsl:attribute name="background-color">rgb(32, 98, 169)</xsl:attribute>
2883
- <xsl:attribute name="color">white</xsl:attribute>
2884
- </xsl:if>
2885
- <xsl:if test="$parent-name = 'tbody'">
2886
- <xsl:variable name="number"><xsl:number/></xsl:variable>
2887
- <xsl:if test="$number mod 2 = 0">
2888
- <xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
2889
- </xsl:if>
2890
- </xsl:if>
2891
-
2892
-
2893
-
2894
-
2895
-
2896
-
2897
- <!-- <xsl:if test="$namespace = 'bipm'">
2898
- <xsl:attribute name="height">8mm</xsl:attribute>
2899
- </xsl:if> -->
2900
-
2986
+
2987
+
2988
+ <xsl:call-template name="setTableRowAttributes"/>
2901
2989
  <xsl:apply-templates/>
2902
2990
  </fo:table-row>
2991
+ </xsl:template><xsl:template name="setTableRowAttributes">
2992
+
2993
+
2994
+
2995
+
2996
+
2997
+
2998
+
2999
+
2903
3000
  </xsl:template><xsl:template match="*[local-name()='th']">
2904
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
2905
- <xsl:attribute name="text-align">
2906
- <xsl:choose>
2907
- <xsl:when test="@align">
2908
- <xsl:call-template name="setAlignment"/>
2909
- <!-- <xsl:value-of select="@align"/> -->
2910
- </xsl:when>
2911
- <xsl:otherwise>center</xsl:otherwise>
2912
- </xsl:choose>
2913
- </xsl:attribute>
2914
-
2915
-
2916
-
2917
-
2918
-
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>
2919
3005
 
2920
3006
 
2921
3007
 
2922
3008
 
3009
+
2923
3010
 
2924
3011
 
2925
3012
 
2926
3013
 
2927
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2928
- <xsl:attribute name="border">0pt solid black</xsl:attribute>
2929
3014
 
2930
3015
  <xsl:if test="$lang = 'ar'">
2931
3016
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2932
3017
  </xsl:if>
2933
- <xsl:if test="@colspan">
2934
- <xsl:attribute name="number-columns-spanned">
2935
- <xsl:value-of select="@colspan"/>
2936
- </xsl:attribute>
2937
- </xsl:if>
2938
- <xsl:if test="@rowspan">
2939
- <xsl:attribute name="number-rows-spanned">
2940
- <xsl:value-of select="@rowspan"/>
2941
- </xsl:attribute>
2942
- </xsl:if>
2943
- <xsl:call-template name="display-align"/>
3018
+
3019
+ <xsl:call-template name="setTableCellAttributes"/>
3020
+
2944
3021
  <fo:block>
2945
3022
  <xsl:apply-templates/>
2946
3023
  </fo:block>
2947
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"/>
2948
3037
  </xsl:template><xsl:template name="display-align">
2949
3038
  <xsl:if test="@valign">
2950
3039
  <xsl:attribute name="display-align">
@@ -2957,22 +3046,18 @@
2957
3046
  </xsl:attribute>
2958
3047
  </xsl:if>
2959
3048
  </xsl:template><xsl:template match="*[local-name()='td']">
2960
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2961
- <xsl:attribute name="text-align">
2962
- <xsl:choose>
2963
- <xsl:when test="@align">
2964
- <xsl:call-template name="setAlignment"/>
2965
- <!-- <xsl:value-of select="@align"/> -->
2966
- </xsl:when>
2967
- <xsl:otherwise>left</xsl:otherwise>
2968
- </xsl:choose>
2969
- </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
+
2970
3054
  <xsl:if test="$lang = 'ar'">
2971
3055
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2972
3056
  </xsl:if>
2973
3057
 
2974
3058
 
2975
3059
 
3060
+ <!-- bsi -->
2976
3061
 
2977
3062
 
2978
3063
 
@@ -2981,67 +3066,150 @@
2981
3066
 
2982
3067
 
2983
3068
 
3069
+
2984
3070
 
2985
3071
 
2986
3072
 
2987
- <xsl:attribute name="border">0pt solid black</xsl:attribute>
2988
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2989
3073
 
2990
3074
 
2991
3075
 
2992
- <xsl:if test=".//*[local-name() = 'table']">
3076
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
2993
3077
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2994
3078
  </xsl:if>
2995
- <xsl:if test="@colspan">
2996
- <xsl:attribute name="number-columns-spanned">
2997
- <xsl:value-of select="@colspan"/>
2998
- </xsl:attribute>
2999
- </xsl:if>
3000
- <xsl:if test="@rowspan">
3001
- <xsl:attribute name="number-rows-spanned">
3002
- <xsl:value-of select="@rowspan"/>
3003
- </xsl:attribute>
3004
- </xsl:if>
3005
- <xsl:call-template name="display-align"/>
3079
+
3080
+ <xsl:call-template name="setTableCellAttributes"/>
3081
+
3006
3082
  <fo:block>
3007
-
3083
+
3084
+
3085
+
3008
3086
  <xsl:apply-templates/>
3009
3087
  </fo:block>
3010
3088
  </fo:table-cell>
3011
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
+
3012
3096
 
3013
-
3014
- <fo:block font-size="10pt" margin-bottom="12pt">
3015
-
3097
+ <!-- Table's note name (NOTE, for example) -->
3098
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
3016
3099
 
3017
3100
 
3018
3101
 
3019
3102
 
3020
3103
 
3021
3104
 
3022
- <xsl:attribute name="font-size">8pt</xsl:attribute>
3023
3105
 
3024
-
3025
- <!-- Table's note name (NOTE, for example) -->
3026
-
3027
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
3028
-
3029
-
3030
-
3031
-
3106
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3032
3107
 
3033
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3034
-
3035
- </fo:inline>
3036
-
3037
-
3038
-
3039
- <xsl:apply-templates mode="process"/>
3040
- </fo:block>
3108
+ </fo:inline>
3109
+
3110
+
3111
+
3112
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
3113
+ </fo:block>
3041
3114
 
3042
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">
3043
3116
  <xsl:apply-templates/>
3044
- </xsl:template><xsl:template name="fn_display">
3117
+ </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
3118
+
3119
+ <!-- list of footnotes to calculate actual footnotes number -->
3120
+ <xsl:variable name="p_fn_">
3121
+ <xsl:choose>
3122
+ <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
3123
+ <fn gen_id="{generate-id(.)}">
3124
+ <xsl:copy-of select="@*"/>
3125
+ <xsl:copy-of select="node()"/>
3126
+ </fn>
3127
+ </xsl:when>
3128
+ <xsl:otherwise>
3129
+ <!-- itetation for:
3130
+ footnotes in bibdata/title
3131
+ footnotes in bibliography
3132
+ footnotes in document's body (except table's head/body/foot and figure text)
3133
+ -->
3134
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
3135
+ <fn gen_id="{generate-id(.)}">
3136
+ <xsl:copy-of select="@*"/>
3137
+ <xsl:copy-of select="node()"/>
3138
+ </fn>
3139
+ </xsl:for-each>
3140
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
3141
+ <xsl:sort select="@displayorder" data-type="number"/>
3142
+ <xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
3143
+ <!-- copy unique fn -->
3144
+ <fn gen_id="{generate-id(.)}">
3145
+ <xsl:copy-of select="@*"/>
3146
+ <xsl:copy-of select="node()"/>
3147
+ </fn>
3148
+ </xsl:for-each>
3149
+ </xsl:for-each>
3150
+ </xsl:otherwise>
3151
+ </xsl:choose>
3152
+ </xsl:variable>
3153
+ <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
3154
+
3155
+ <xsl:variable name="gen_id" select="generate-id(.)"/>
3156
+ <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
3157
+ <xsl:variable name="reference" select="@reference"/>
3158
+ <!-- fn sequence number in document -->
3159
+ <xsl:variable name="current_fn_number">
3160
+ <xsl:choose>
3161
+ <xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
3162
+ <xsl:otherwise>
3163
+ <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
3164
+ </xsl:otherwise>
3165
+ </xsl:choose>
3166
+ </xsl:variable>
3167
+ <xsl:variable name="current_fn_number_text">
3168
+ <xsl:value-of select="$current_fn_number"/>
3169
+
3170
+
3171
+ </xsl:variable>
3172
+
3173
+ <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
3174
+ <xsl:variable name="footnote_inline">
3175
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
3176
+
3177
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3178
+ <xsl:value-of select="$current_fn_number_text"/>
3179
+ </fo:basic-link>
3180
+ </fo:inline>
3181
+ </xsl:variable>
3182
+ <!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
3183
+ gen_id=<xsl:value-of select="$gen_id"/> -->
3184
+ <xsl:choose>
3185
+ <xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
3186
+ <xsl:copy-of select="$footnote_inline"/>
3187
+ </xsl:when>
3188
+ <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
3189
+ <fo:footnote xsl:use-attribute-sets="fn-style">
3190
+ <xsl:copy-of select="$footnote_inline"/>
3191
+ <fo:footnote-body>
3192
+
3193
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3194
+
3195
+ <fo:block xsl:use-attribute-sets="fn-body-style">
3196
+
3197
+
3198
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3199
+
3200
+ <xsl:value-of select="$current_fn_number_text"/>
3201
+ </fo:inline>
3202
+ <xsl:apply-templates/>
3203
+ </fo:block>
3204
+ </fo:block-container>
3205
+ </fo:footnote-body>
3206
+ </fo:footnote>
3207
+ </xsl:when>
3208
+ <xsl:otherwise>
3209
+ <xsl:copy-of select="$footnote_inline"/>
3210
+ </xsl:otherwise>
3211
+ </xsl:choose>
3212
+ </xsl:template><xsl:template name="table_fn_display">
3045
3213
  <xsl:variable name="references">
3046
3214
 
3047
3215
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -3052,31 +3220,26 @@
3052
3220
  <xsl:for-each select="xalan:nodeset($references)//fn">
3053
3221
  <xsl:variable name="reference" select="@reference"/>
3054
3222
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3055
- <fo:block margin-bottom="12pt">
3223
+ <fo:block xsl:use-attribute-sets="table-fn-style">
3056
3224
 
3057
3225
 
3058
3226
 
3059
-
3060
-
3061
-
3062
-
3063
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
3227
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
3064
3228
 
3065
3229
 
3066
3230
 
3067
3231
 
3068
3232
 
3233
+ <xsl:value-of select="@reference"/>
3069
3234
 
3070
3235
 
3071
3236
 
3072
- <xsl:value-of select="@reference"/>
3073
3237
 
3074
3238
 
3075
3239
 
3076
- </fo:inline>
3077
- <fo:inline>
3078
3240
 
3079
- <!-- <xsl:apply-templates /> -->
3241
+ </fo:inline>
3242
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
3080
3243
  <xsl:copy-of select="./node()"/>
3081
3244
  </fo:inline>
3082
3245
  </fo:block>
@@ -3088,15 +3251,7 @@
3088
3251
 
3089
3252
  <xsl:apply-templates/>
3090
3253
  </fn>
3091
- </xsl:template><xsl:template name="fn_name_display">
3092
- <!-- <xsl:variable name="references">
3093
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3094
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
3095
- <xsl:apply-templates />
3096
- </fn>
3097
- </xsl:for-each>
3098
- </xsl:variable>
3099
- $references=<xsl:copy-of select="$references"/> -->
3254
+ </xsl:template><xsl:template name="table_name_fn_display">
3100
3255
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
3101
3256
  <xsl:variable name="reference" select="@reference"/>
3102
3257
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -3105,9 +3260,7 @@
3105
3260
  </fo:block>
3106
3261
  </xsl:for-each>
3107
3262
  </xsl:template><xsl:template name="fn_display_figure">
3108
- <xsl:variable name="key_iso">
3109
- <!-- and (not(@class) or @class !='pseudocode') -->
3110
- </xsl:variable>
3263
+
3111
3264
  <xsl:variable name="references">
3112
3265
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
3113
3266
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -3115,50 +3268,52 @@
3115
3268
  </fn>
3116
3269
  </xsl:for-each>
3117
3270
  </xsl:variable>
3271
+
3272
+ <xsl:if test="xalan:nodeset($references)//fn">
3118
3273
 
3119
- <!-- current hierarchy is 'figure' element -->
3120
- <xsl:variable name="following_dl_colwidths">
3121
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3122
- <xsl:variable name="html-table">
3123
- <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>
3124
3295
 
3125
- </xsl:variable>
3126
- <xsl:variable name="ns">
3127
- <xsl:choose>
3128
- <xsl:when test="normalize-space($doc_ns) != ''">
3129
- <xsl:value-of select="normalize-space($doc_ns)"/>
3130
- </xsl:when>
3131
- <xsl:otherwise>
3132
- <xsl:value-of select="substring-before(name(/*), '-')"/>
3133
- </xsl:otherwise>
3134
- </xsl:choose>
3135
- </xsl:variable>
3136
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3137
- <!-- <xsl:element name="{$ns}:table"> -->
3138
3296
  <xsl:for-each select="*[local-name() = 'dl'][1]">
3139
3297
  <tbody>
3140
3298
  <xsl:apply-templates mode="dl"/>
3141
3299
  </tbody>
3142
3300
  </xsl:for-each>
3143
- <!-- </xsl:element> -->
3144
- </xsl:variable>
3145
-
3146
- <xsl:call-template name="calculate-column-widths">
3147
- <xsl:with-param name="cols-count" select="2"/>
3148
- <xsl:with-param name="table" select="$html-table"/>
3149
- </xsl:call-template>
3150
-
3151
- </xsl:if>
3152
- </xsl:variable>
3153
-
3154
-
3155
- <xsl:variable name="maxlength_dt">
3156
- <xsl:for-each select="*[local-name() = 'dl'][1]">
3157
- <xsl:call-template name="getMaxLength_dt"/>
3158
- </xsl:for-each>
3159
- </xsl:variable>
3160
-
3161
- <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
+
3162
3317
  <fo:block>
3163
3318
  <fo:table width="95%" table-layout="fixed">
3164
3319
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -3185,20 +3340,18 @@
3185
3340
  <fo:table-row>
3186
3341
  <fo:table-cell>
3187
3342
  <fo:block>
3188
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
3189
-
3343
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
3190
3344
  <xsl:value-of select="@reference"/>
3191
3345
  </fo:inline>
3192
3346
  </fo:block>
3193
3347
  </fo:table-cell>
3194
3348
  <fo:table-cell>
3195
- <fo:block text-align="justify" margin-bottom="12pt">
3196
-
3349
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
3197
3350
  <xsl:if test="normalize-space($key_iso) = 'true'">
3198
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
3351
+
3352
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
3353
+
3199
3354
  </xsl:if>
3200
-
3201
- <!-- <xsl:apply-templates /> -->
3202
3355
  <xsl:copy-of select="./node()"/>
3203
3356
  </fo:block>
3204
3357
  </fo:table-cell>
@@ -3211,21 +3364,11 @@
3211
3364
  </xsl:if>
3212
3365
 
3213
3366
  </xsl:template><xsl:template match="*[local-name()='fn']">
3214
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3215
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
3216
-
3217
-
3218
-
3219
-
3220
-
3221
-
3222
-
3367
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
3368
+
3223
3369
 
3224
3370
 
3225
3371
 
3226
- <xsl:attribute name="font-size">70%</xsl:attribute>
3227
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3228
- <xsl:attribute name="font-style">italic</xsl:attribute>
3229
3372
 
3230
3373
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
3231
3374
 
@@ -3235,6 +3378,8 @@
3235
3378
 
3236
3379
  </fo:basic-link>
3237
3380
  </fo:inline>
3381
+ </xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
3382
+ <fo:inline><xsl:value-of select="."/></fo:inline>
3238
3383
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
3239
3384
  <fo:inline>
3240
3385
  <xsl:apply-templates/>
@@ -3244,10 +3389,10 @@
3244
3389
  <xsl:variable name="isDeleted" select="@deleted"/>
3245
3390
  <fo:block-container>
3246
3391
 
3247
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3248
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3249
- </xsl:if>
3250
-
3392
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
3393
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
3394
+ </xsl:if>
3395
+
3251
3396
 
3252
3397
  <xsl:if test="parent::*[local-name() = 'note']">
3253
3398
  <xsl:attribute name="margin-left">
@@ -3264,11 +3409,11 @@
3264
3409
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3265
3410
  </xsl:call-template>
3266
3411
 
3267
- <fo:block-container>
3268
-
3269
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3270
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3412
+ <fo:block-container margin-left="0mm">
3413
+
3271
3414
 
3415
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
3416
+
3272
3417
 
3273
3418
  <xsl:variable name="parent" select="local-name(..)"/>
3274
3419
 
@@ -3279,23 +3424,19 @@
3279
3424
  <xsl:choose>
3280
3425
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3281
3426
 
3282
-
3283
- <fo:block margin-bottom="12pt" text-align="left">
3284
-
3285
- <xsl:variable name="title-where">
3286
-
3427
+ <fo:block margin-bottom="12pt" text-align="left">
3287
3428
 
3288
- <xsl:call-template name="getTitle">
3289
- <xsl:with-param name="name" select="'title-where'"/>
3429
+ <xsl:variable name="title-where">
3430
+ <xsl:call-template name="getLocalizedString">
3431
+ <xsl:with-param name="key">where</xsl:with-param>
3290
3432
  </xsl:call-template>
3291
-
3292
- </xsl:variable>
3293
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
3294
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
3295
- <xsl:text/>
3296
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3297
- </fo:block>
3298
-
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
+
3299
3440
  </xsl:when>
3300
3441
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3301
3442
  <fo:block margin-bottom="12pt" text-align="left">
@@ -3304,12 +3445,9 @@
3304
3445
 
3305
3446
 
3306
3447
  <xsl:variable name="title-where">
3307
-
3308
-
3309
- <xsl:call-template name="getTitle">
3310
- <xsl:with-param name="name" select="'title-where'"/>
3311
- </xsl:call-template>
3312
-
3448
+ <xsl:call-template name="getLocalizedString">
3449
+ <xsl:with-param name="key">where</xsl:with-param>
3450
+ </xsl:call-template>
3313
3451
  </xsl:variable>
3314
3452
  <xsl:value-of select="$title-where"/>
3315
3453
  </fo:block>
@@ -3324,12 +3462,9 @@
3324
3462
  <xsl:attribute name="color">black</xsl:attribute>
3325
3463
 
3326
3464
  <xsl:variable name="title-key">
3327
-
3328
-
3329
- <xsl:call-template name="getTitle">
3330
- <xsl:with-param name="name" select="'title-key'"/>
3331
- </xsl:call-template>
3332
-
3465
+ <xsl:call-template name="getLocalizedString">
3466
+ <xsl:with-param name="key">key</xsl:with-param>
3467
+ </xsl:call-template>
3333
3468
  </xsl:variable>
3334
3469
  <xsl:value-of select="$title-key"/>
3335
3470
  </fo:block>
@@ -3351,9 +3486,7 @@
3351
3486
  <fo:table width="95%" table-layout="fixed">
3352
3487
 
3353
3488
  <xsl:choose>
3354
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
3355
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
3356
- </xsl:when>
3489
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
3357
3490
  <xsl:when test="normalize-space($key_iso) = 'true'">
3358
3491
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3359
3492
 
@@ -3374,12 +3507,9 @@
3374
3507
  </xsl:otherwise>
3375
3508
  </xsl:choose>
3376
3509
  </xsl:variable>
3377
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
3378
- <!-- <xsl:element name="{$ns}:table"> -->
3379
- <tbody>
3380
- <xsl:apply-templates mode="dl"/>
3381
- </tbody>
3382
- <!-- </xsl:element> -->
3510
+ <tbody>
3511
+ <xsl:apply-templates mode="dl"/>
3512
+ </tbody>
3383
3513
  </xsl:variable>
3384
3514
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
3385
3515
  <xsl:variable name="colwidths">
@@ -3459,8 +3589,6 @@
3459
3589
  </xsl:for-each>
3460
3590
  </xsl:otherwise>
3461
3591
  </xsl:choose>
3462
- <!-- <fo:table-column column-width="15%"/>
3463
- <fo:table-column column-width="85%"/> -->
3464
3592
  </xsl:otherwise>
3465
3593
  </xsl:choose>
3466
3594
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -3475,12 +3603,6 @@
3475
3603
  </xsl:for-each>
3476
3604
  </xsl:variable>
3477
3605
  <xsl:variable name="maxLength">
3478
- <!-- <xsl:for-each select="*[local-name()='dt']">
3479
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
3480
- <xsl:if test="position() = 1">
3481
- <xsl:value-of select="string-length(normalize-space(.))"/>
3482
- </xsl:if>
3483
- </xsl:for-each> -->
3484
3606
  <xsl:for-each select="xalan:nodeset($lengths)/length">
3485
3607
  <xsl:sort select="." data-type="number" order="descending"/>
3486
3608
  <xsl:if test="position() = 1">
@@ -3506,12 +3628,12 @@
3506
3628
  <xsl:if test="normalize-space($key_iso) = 'true'">
3507
3629
  <xsl:attribute name="margin-top">0</xsl:attribute>
3508
3630
  </xsl:if>
3509
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3631
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3510
3632
  </fo:block>
3511
3633
  </fo:table-cell>
3512
3634
  <fo:table-cell>
3513
3635
  <fo:block>
3514
- <xsl:apply-templates/>
3636
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3515
3637
  </fo:block>
3516
3638
  </fo:table-cell>
3517
3639
  </fo:table-row>
@@ -3522,85 +3644,41 @@
3522
3644
  </td>
3523
3645
  <td>
3524
3646
 
3525
-
3526
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3527
-
3647
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3648
+
3528
3649
  </td>
3529
3650
  </tr>
3530
3651
 
3531
3652
  </xsl:template><xsl:template match="*[local-name()='dt']">
3532
3653
  <xsl:param name="key_iso"/>
3533
3654
 
3534
- <fo:table-row>
3535
-
3536
-
3537
- <xsl:attribute name="min-height">7mm</xsl:attribute>
3538
-
3655
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
3539
3656
  <fo:table-cell>
3540
3657
 
3541
- <fo:block margin-top="6pt">
3658
+ <fo:block xsl:use-attribute-sets="dt-style">
3542
3659
  <xsl:copy-of select="@id"/>
3543
3660
 
3544
-
3545
3661
  <xsl:if test="normalize-space($key_iso) = 'true'">
3546
3662
  <xsl:attribute name="margin-top">0</xsl:attribute>
3547
-
3548
3663
  </xsl:if>
3549
3664
 
3550
3665
 
3551
3666
 
3552
-
3553
-
3554
-
3555
-
3556
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
3557
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3558
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
3559
-
3560
3667
  <xsl:apply-templates/>
3561
- <!-- <xsl:if test="$namespace = 'gb'">
3562
- <xsl:if test="ancestor::*[local-name()='formula']">
3563
- <xsl:text>—</xsl:text>
3564
- </xsl:if>
3565
- </xsl:if> -->
3566
3668
  </fo:block>
3567
3669
  </fo:table-cell>
3568
3670
  <fo:table-cell>
3569
3671
  <fo:block>
3570
3672
 
3571
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3572
- <xsl:if test="local-name(*[1]) != 'stem'">
3573
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3574
- </xsl:if>
3575
- </xsl:if> -->
3576
-
3577
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3578
-
3673
+
3674
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3579
3675
  </fo:block>
3580
3676
  </fo:table-cell>
3581
3677
  </fo:table-row>
3582
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
3583
- <xsl:if test="local-name(*[1]) = 'stem'">
3584
- <fo:table-row>
3585
- <fo:table-cell>
3586
- <fo:block margin-top="6pt">
3587
- <xsl:if test="normalize-space($key_iso) = 'true'">
3588
- <xsl:attribute name="margin-top">0</xsl:attribute>
3589
- </xsl:if>
3590
- <xsl:text>&#xA0;</xsl:text>
3591
- </fo:block>
3592
- </fo:table-cell>
3593
- <fo:table-cell>
3594
- <fo:block>
3595
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3596
- </fo:block>
3597
- </fo:table-cell>
3598
- </fo:table-row>
3599
- </xsl:if>
3600
- </xsl:if> -->
3601
3678
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3602
3679
  <xsl:apply-templates/>
3603
3680
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
3681
+ <xsl:apply-templates select="@language"/>
3604
3682
  <xsl:apply-templates/>
3605
3683
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3606
3684
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
@@ -3611,8 +3689,10 @@
3611
3689
  </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
3612
3690
  <fo:inline font-weight="bold">
3613
3691
 
3614
- <xsl:attribute name="font-weight">normal</xsl:attribute>
3615
- <xsl:attribute name="color">black</xsl:attribute>
3692
+ <xsl:if test="not(parent::*[local-name() = 'termsource'])">
3693
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
3694
+ <xsl:attribute name="color">black</xsl:attribute>
3695
+ </xsl:if>
3616
3696
 
3617
3697
  <xsl:apply-templates/>
3618
3698
  </fo:inline>
@@ -3628,6 +3708,7 @@
3628
3708
  </fo:inline>
3629
3709
  </xsl:template><xsl:template match="*[local-name()='tt']">
3630
3710
  <fo:inline xsl:use-attribute-sets="tt-style">
3711
+
3631
3712
  <xsl:variable name="_font-size">
3632
3713
 
3633
3714
 
@@ -3646,7 +3727,7 @@
3646
3727
 
3647
3728
  <xsl:choose>
3648
3729
  <xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
3649
- <xsl:otherwise>110%</xsl:otherwise>
3730
+ <xsl:otherwise>95%</xsl:otherwise> <!-- 110% -->
3650
3731
  </xsl:choose>
3651
3732
 
3652
3733
 
@@ -3669,7 +3750,22 @@
3669
3750
  <xsl:apply-templates/>
3670
3751
  </fo:inline>
3671
3752
  </xsl:template><xsl:template match="*[local-name()='add']">
3753
+ <xsl:param name="skip">true</xsl:param>
3672
3754
  <xsl:choose>
3755
+ <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
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>
3768
+ </xsl:when>
3673
3769
  <xsl:when test="@amendment">
3674
3770
  <fo:inline>
3675
3771
  <xsl:call-template name="insertTag">
@@ -3704,7 +3800,6 @@
3704
3800
  </fo:inline>
3705
3801
  </xsl:otherwise>
3706
3802
  </xsl:choose>
3707
-
3708
3803
  </xsl:template><xsl:template name="insertTag">
3709
3804
  <xsl:param name="type"/>
3710
3805
  <xsl:param name="kind"/>
@@ -3712,22 +3807,20 @@
3712
3807
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
3713
3808
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
3714
3809
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
3715
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
3716
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
3717
3810
  <xsl:attribute name="height">5mm</xsl:attribute>
3718
3811
  <xsl:attribute name="content-width">100%</xsl:attribute>
3719
3812
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
3720
3813
  <xsl:attribute name="scaling">uniform</xsl:attribute>
3721
3814
  <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
3722
3815
  <g>
3723
- <xsl:if test="$type = 'closing'">
3816
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3724
3817
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
3725
3818
  </xsl:if>
3726
3819
  <polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
3727
3820
  <line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
3728
3821
  </g>
3729
3822
  <text font-family="Arial" x="15" y="57" font-size="40pt">
3730
- <xsl:if test="$type = 'closing'">
3823
+ <xsl:if test="$type = 'closing' or $type = 'end'">
3731
3824
  <xsl:attribute name="x">25</xsl:attribute>
3732
3825
  </xsl:if>
3733
3826
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
@@ -3931,14 +4024,6 @@
3931
4024
 
3932
4025
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3933
4026
 
3934
- <!-- <xsl:choose>
3935
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
3936
-
3937
- </xsl:when>
3938
- <xsl:otherwise>
3939
- <xsl:copy-of select="current()"/>
3940
- </xsl:otherwise>
3941
- </xsl:choose> -->
3942
4027
  </xsl:variable>
3943
4028
  <xsl:copy-of select="$simple-table"/>
3944
4029
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -4057,8 +4142,6 @@
4057
4142
  <xsl:choose>
4058
4143
  <xsl:when test="contains($str2, ' ')">
4059
4144
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
4060
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
4061
- <xsl:value-of select="substring($substr, 2)"/> -->
4062
4145
  <xsl:call-template name="capitalize">
4063
4146
  <xsl:with-param name="str" select="$substr"/>
4064
4147
  </xsl:call-template>
@@ -4068,8 +4151,6 @@
4068
4151
  </xsl:call-template>
4069
4152
  </xsl:when>
4070
4153
  <xsl:otherwise>
4071
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
4072
- <xsl:value-of select="substring($str2, 2)"/> -->
4073
4154
  <xsl:call-template name="capitalize">
4074
4155
  <xsl:with-param name="str" select="$str2"/>
4075
4156
  </xsl:call-template>
@@ -4097,6 +4178,7 @@
4097
4178
  <xsl:apply-templates select="." mode="mathml"/>
4098
4179
  </xsl:variable>
4099
4180
  <fo:instream-foreign-object fox:alt-text="Math">
4181
+
4100
4182
 
4101
4183
 
4102
4184
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -4128,7 +4210,7 @@
4128
4210
  </xsl:attribute>
4129
4211
 
4130
4212
 
4131
- <!-- <xsl:copy-of select="."/> -->
4213
+
4132
4214
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
4133
4215
  </fo:instream-foreign-object>
4134
4216
  </fo:inline>
@@ -4186,6 +4268,10 @@
4186
4268
  <fo:inline xsl:use-attribute-sets="link-style">
4187
4269
 
4188
4270
 
4271
+
4272
+
4273
+
4274
+
4189
4275
  <xsl:if test="ancestor::*[local-name() = 'bibitem']">
4190
4276
  <xsl:attribute name="color">black</xsl:attribute>
4191
4277
  <xsl:attribute name="text-decoration">none</xsl:attribute>
@@ -4226,9 +4312,9 @@
4226
4312
  <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
4227
4313
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
4228
4314
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
4229
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4315
+ <xsl:apply-templates select="*[local-name()='name']"/>
4230
4316
  </fo:block>
4231
- <xsl:apply-templates/>
4317
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
4232
4318
  </xsl:template><xsl:template match="*[local-name() = 'callout']">
4233
4319
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
4234
4320
  </xsl:template><xsl:template match="*[local-name() = 'annotation']">
@@ -4248,25 +4334,8 @@
4248
4334
  <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
4249
4335
  <xsl:apply-templates/>
4250
4336
  </fo:inline>
4251
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
4252
- <xsl:variable name="title-modified">
4253
-
4254
-
4255
- <xsl:call-template name="getTitle">
4256
- <xsl:with-param name="name" select="'title-modified'"/>
4257
- </xsl:call-template>
4258
-
4259
- </xsl:variable>
4260
-
4261
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
4262
- <xsl:choose>
4263
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
4264
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
4265
- </xsl:choose>
4266
- <xsl:apply-templates/>
4267
4337
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
4268
4338
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
4269
-
4270
4339
  <xsl:apply-templates/>
4271
4340
  </fo:basic-link>
4272
4341
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -4294,13 +4363,18 @@
4294
4363
  <fo:inline>
4295
4364
  <xsl:apply-templates/>
4296
4365
  </fo:inline>
4297
- </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 -->
4298
4367
  <xsl:if test="normalize-space() != ''">
4299
4368
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
4300
4369
  </xsl:if>
4301
4370
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
4302
4371
 
4303
4372
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
4373
+
4374
+
4375
+
4376
+
4377
+
4304
4378
 
4305
4379
 
4306
4380
 
@@ -4309,39 +4383,49 @@
4309
4383
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4310
4384
  </xsl:if>
4311
4385
 
4386
+
4312
4387
 
4313
4388
 
4314
4389
  <fo:block-container margin-left="0mm">
4390
+
4315
4391
 
4316
4392
 
4317
4393
 
4394
+
4318
4395
 
4319
-
4320
-
4321
-
4322
-
4323
- <fo:block>
4324
-
4325
-
4326
-
4327
-
4328
-
4396
+ <fo:block>
4397
+
4398
+
4329
4399
 
4330
- <fo:inline xsl:use-attribute-sets="note-name-style">
4331
4400
 
4332
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4333
- </fo:inline>
4334
- <xsl:apply-templates/>
4335
- </fo:block>
4336
-
4337
-
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
+
4338
4422
  </fo:block-container>
4339
4423
  </fo:block-container>
4340
4424
 
4341
4425
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
4342
4426
  <xsl:variable name="num"><xsl:number/></xsl:variable>
4343
4427
  <xsl:choose>
4344
- <xsl:when test="$num = 1">
4428
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
4345
4429
  <fo:inline xsl:use-attribute-sets="note-p-style">
4346
4430
  <xsl:apply-templates/>
4347
4431
  </fo:inline>
@@ -4356,12 +4440,16 @@
4356
4440
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
4357
4441
 
4358
4442
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4443
+
4444
+
4445
+
4446
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4359
4447
 
4360
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4361
4448
  </fo:inline>
4362
- <xsl:apply-templates/>
4449
+
4450
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4363
4451
  </fo:block>
4364
- </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']">
4365
4453
  <xsl:param name="sfx"/>
4366
4454
  <xsl:variable name="suffix">
4367
4455
  <xsl:choose>
@@ -4380,7 +4468,7 @@
4380
4468
  <xsl:apply-templates/>
4381
4469
  <xsl:value-of select="$suffix"/>
4382
4470
  </xsl:if>
4383
- </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']">
4384
4472
  <xsl:param name="sfx"/>
4385
4473
  <xsl:variable name="suffix">
4386
4474
  <xsl:choose>
@@ -4407,25 +4495,23 @@
4407
4495
  <xsl:apply-templates/>
4408
4496
  </fo:block>
4409
4497
  </xsl:template><xsl:template match="*[local-name() = 'term']">
4410
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
4411
4498
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4412
4499
 
4413
4500
 
4501
+
4502
+
4414
4503
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
4415
4504
 
4416
4505
  </xsl:if>
4417
- <xsl:apply-templates/>
4506
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4418
4507
  </fo:block>
4419
- </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']">
4420
4509
  <xsl:if test="normalize-space() != ''">
4421
4510
  <xsl:variable name="level">
4422
4511
  <xsl:call-template name="getLevelTermName"/>
4423
4512
  </xsl:variable>
4424
4513
  <fo:inline role="H{$level}">
4425
4514
  <xsl:apply-templates/>
4426
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
4427
- <xsl:text>.</xsl:text>
4428
- </xsl:if> -->
4429
4515
  </fo:inline>
4430
4516
  </xsl:if>
4431
4517
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -4438,20 +4524,12 @@
4438
4524
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4439
4525
  </xsl:call-template>
4440
4526
 
4441
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4527
+ <!-- show figure's name BEFORE image -->
4528
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4442
4529
 
4443
- <fo:block>
4444
- <!-- background for image -->
4445
- <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
4446
- <xsl:attribute name="padding-left">11mm</xsl:attribute>
4447
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4448
- <xsl:attribute name="padding-right">11mm</xsl:attribute>
4449
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4450
- <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
4451
- <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
4452
- <xsl:attribute name="margin-bottom">3mm</xsl:attribute>
4453
-
4454
- <xsl:apply-templates/>
4530
+
4531
+ <fo:block xsl:use-attribute-sets="figure-style">
4532
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4455
4533
  </fo:block>
4456
4534
  <xsl:call-template name="fn_display_figure"/>
4457
4535
  <xsl:for-each select="*[local-name() = 'note']">
@@ -4459,12 +4537,13 @@
4459
4537
  </xsl:for-each>
4460
4538
 
4461
4539
 
4540
+
4462
4541
  </fo:block-container>
4463
4542
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
4464
4543
  <fo:block id="{@id}">
4465
- <xsl:apply-templates/>
4544
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4466
4545
  </fo:block>
4467
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4546
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4468
4547
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
4469
4548
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
4470
4549
  <xsl:apply-templates/>
@@ -4571,9 +4650,7 @@
4571
4650
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
4572
4651
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
4573
4652
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
4574
- <!-- width=<xsl:value-of select="$width"/> -->
4575
4653
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
4576
- <!-- height=<xsl:value-of select="$height"/> -->
4577
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">
4578
4655
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
4579
4656
  <xsl:call-template name="svg_cross">
@@ -4843,7 +4920,7 @@
4843
4920
  </fo:basic-link>
4844
4921
  </fo:block>
4845
4922
  </fo:block-container>
4846
- </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">
4847
4924
  <xsl:apply-templates mode="contents"/>
4848
4925
  <xsl:text> </xsl:text>
4849
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">
@@ -4855,11 +4932,58 @@
4855
4932
  <xsl:value-of select="."/>
4856
4933
  </xsl:template><xsl:template match="node()" mode="contents">
4857
4934
  <xsl:apply-templates mode="contents"/>
4935
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
4936
+ <xsl:variable name="level">
4937
+ <xsl:call-template name="getLevel">
4938
+ <xsl:with-param name="depth" select="@depth"/>
4939
+ </xsl:call-template>
4940
+ </xsl:variable>
4941
+
4942
+ <xsl:variable name="section">
4943
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4944
+ </xsl:variable>
4945
+
4946
+ <xsl:variable name="type">floating-title</xsl:variable>
4947
+
4948
+ <xsl:variable name="display">
4949
+ <xsl:choose>
4950
+ <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
4951
+ <xsl:when test="$level &lt;= $toc_level">true</xsl:when>
4952
+ <xsl:otherwise>false</xsl:otherwise>
4953
+ </xsl:choose>
4954
+ </xsl:variable>
4955
+
4956
+ <xsl:variable name="skip">false</xsl:variable>
4957
+
4958
+ <xsl:if test="$skip = 'false'">
4959
+
4960
+ <xsl:variable name="title">
4961
+ <xsl:choose>
4962
+ <xsl:when test="*[local-name() = 'tab']">
4963
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4964
+ </xsl:when>
4965
+ <xsl:otherwise>
4966
+ <xsl:copy-of select="node()"/>
4967
+ </xsl:otherwise>
4968
+ </xsl:choose>
4969
+ </xsl:variable>
4970
+
4971
+ <xsl:variable name="root">
4972
+ <xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
4973
+ <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
4974
+ </xsl:variable>
4975
+
4976
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
4977
+ <title>
4978
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
4979
+ </title>
4980
+ </item>
4981
+ </xsl:if>
4858
4982
  </xsl:template><xsl:template match="node()" mode="bookmarks">
4859
4983
  <xsl:apply-templates mode="bookmarks"/>
4860
4984
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4861
4985
  <xsl:apply-templates select="."/>
4862
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4986
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4863
4987
  <xsl:apply-templates mode="bookmarks"/>
4864
4988
  </xsl:template><xsl:template name="addBookmarks">
4865
4989
  <xsl:param name="contents"/>
@@ -4949,8 +5073,6 @@
4949
5073
 
4950
5074
 
4951
5075
 
4952
-
4953
-
4954
5076
  </fo:bookmark-tree>
4955
5077
  </xsl:if>
4956
5078
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -5021,7 +5143,7 @@
5021
5143
  <xsl:apply-templates mode="bookmark"/>
5022
5144
  </xsl:otherwise>
5023
5145
  </xsl:choose>
5024
- </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']">
5025
5147
  <xsl:if test="normalize-space() != ''">
5026
5148
  <fo:block xsl:use-attribute-sets="figure-name-style">
5027
5149
 
@@ -5030,16 +5152,13 @@
5030
5152
  </fo:block>
5031
5153
  </xsl:if>
5032
5154
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
5033
- <xsl:apply-templates mode="contents_item"/>
5155
+ <xsl:param name="mode">bookmarks</xsl:param>
5156
+ <xsl:apply-templates mode="contents_item">
5157
+ <xsl:with-param name="mode" select="$mode"/>
5158
+ </xsl:apply-templates>
5034
5159
  <!-- <xsl:text> </xsl:text> -->
5035
5160
  </xsl:template><xsl:template name="getSection">
5036
5161
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5037
- <!--
5038
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
5039
- <xsl:value-of select="."/>
5040
- </xsl:for-each>
5041
- -->
5042
-
5043
5162
  </xsl:template><xsl:template name="getName">
5044
5163
  <xsl:choose>
5045
5164
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -5103,11 +5222,28 @@
5103
5222
  <xsl:copy-of select="."/>
5104
5223
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
5105
5224
  <xsl:text> </xsl:text>
5225
+ </xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
5226
+ <xsl:param name="mode">bookmarks</xsl:param>
5227
+ <xsl:apply-templates mode="contents_item">
5228
+ <xsl:with-param name="mode" select="$mode"/>
5229
+ </xsl:apply-templates>
5230
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
5231
+ <xsl:param name="mode">bookmarks</xsl:param>
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>
5106
5242
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
5107
5243
 
5108
- <fo:block-container margin-left="0mm">
5244
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
5109
5245
  <xsl:copy-of select="@id"/>
5110
- <xsl:attribute name="space-after">12pt</xsl:attribute>
5246
+
5111
5247
  <xsl:if test="parent::*[local-name() = 'note']">
5112
5248
  <xsl:attribute name="margin-left">
5113
5249
  <xsl:choose>
@@ -5120,7 +5256,7 @@
5120
5256
  <fo:block-container margin-left="0mm">
5121
5257
 
5122
5258
 
5123
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5259
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name BEFORE content -->
5124
5260
 
5125
5261
 
5126
5262
 
@@ -5144,11 +5280,12 @@
5144
5280
 
5145
5281
  <xsl:choose>
5146
5282
  <xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
5147
- <xsl:otherwise>110%</xsl:otherwise>
5283
+ <xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
5148
5284
  </xsl:choose>
5149
5285
 
5150
5286
 
5151
5287
  </xsl:variable>
5288
+
5152
5289
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
5153
5290
  <xsl:if test="$font-size != ''">
5154
5291
  <xsl:attribute name="font-size">
@@ -5170,7 +5307,6 @@
5170
5307
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
5171
5308
  <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
5172
5309
  <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
5173
- <!-- <xsl:attribute name="margin-bottom">3mm</xsl:attribute> -->
5174
5310
  <xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
5175
5311
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
5176
5312
  </xsl:if>
@@ -5179,10 +5315,10 @@
5179
5315
 
5180
5316
 
5181
5317
 
5182
- <xsl:apply-templates/>
5318
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5183
5319
  </fo:block>
5184
5320
 
5185
-
5321
+
5186
5322
 
5187
5323
 
5188
5324
 
@@ -5195,7 +5331,7 @@
5195
5331
  <xsl:call-template name="add-zero-spaces-java">
5196
5332
  <xsl:with-param name="text" select="$text"/>
5197
5333
  </xsl:call-template>
5198
- </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']">
5199
5335
  <xsl:if test="normalize-space() != ''">
5200
5336
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
5201
5337
  <xsl:apply-templates/>
@@ -5203,10 +5339,10 @@
5203
5339
  </xsl:if>
5204
5340
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
5205
5341
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
5206
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5207
- <xsl:apply-templates/>
5342
+ <xsl:apply-templates select="*[local-name()='name']"/>
5343
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5208
5344
  </fo:block>
5209
- </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']">
5210
5346
  <xsl:if test="normalize-space() != ''">
5211
5347
  <fo:block xsl:use-attribute-sets="permission-name-style">
5212
5348
  <xsl:apply-templates/>
@@ -5219,13 +5355,13 @@
5219
5355
  </fo:block>
5220
5356
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
5221
5357
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
5222
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5223
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
5224
- <xsl:apply-templates select="@obligation" mode="presentation"/>
5225
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
5226
- <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')]"/>
5227
5363
  </fo:block>
5228
- </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']">
5229
5365
  <xsl:if test="normalize-space() != ''">
5230
5366
  <fo:block xsl:use-attribute-sets="requirement-name-style">
5231
5367
 
@@ -5233,20 +5369,24 @@
5233
5369
 
5234
5370
  </fo:block>
5235
5371
  </xsl:if>
5236
- </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']">
5237
5373
  <fo:block xsl:use-attribute-sets="requirement-label-style">
5238
5374
  <xsl:apply-templates/>
5239
5375
  </fo:block>
5240
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
5376
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
5241
5377
  <fo:block>
5242
5378
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
5243
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>
5244
5384
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
5245
5385
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
5246
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5247
- <xsl:apply-templates/>
5386
+ <xsl:apply-templates select="*[local-name()='name']"/>
5387
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5248
5388
  </fo:block>
5249
- </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']">
5250
5390
  <xsl:if test="normalize-space() != ''">
5251
5391
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
5252
5392
  <xsl:apply-templates/>
@@ -5257,10 +5397,6 @@
5257
5397
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
5258
5398
  <xsl:apply-templates/>
5259
5399
  </fo:block>
5260
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
5261
- <fo:block xsl:use-attribute-sets="subject-style">
5262
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
5263
- </fo:block>
5264
5400
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
5265
5401
  <fo:block xsl:use-attribute-sets="subject-style">
5266
5402
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -5304,8 +5440,6 @@
5304
5440
  </xsl:variable>
5305
5441
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
5306
5442
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
5307
- <!-- <fo:table-column column-width="35mm"/>
5308
- <fo:table-column column-width="115mm"/> -->
5309
5443
  <fo:table-column column-width="30%"/>
5310
5444
  <fo:table-column column-width="70%"/>
5311
5445
  </xsl:if>
@@ -5315,7 +5449,7 @@
5315
5449
  <xsl:if test=".//*[local-name() = 'fn']">
5316
5450
  <xsl:for-each select="*[local-name() = 'tbody']">
5317
5451
  <fo:block font-size="90%" border-bottom="1pt solid black">
5318
- <xsl:call-template name="fn_display"/>
5452
+ <xsl:call-template name="table_fn_display"/>
5319
5453
  </fo:block>
5320
5454
  </xsl:for-each>
5321
5455
  </xsl:if>
@@ -5332,7 +5466,6 @@
5332
5466
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
5333
5467
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
5334
5468
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
5335
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
5336
5469
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
5337
5470
  </xsl:if>
5338
5471
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -5345,34 +5478,11 @@
5345
5478
  </fo:table-row>
5346
5479
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
5347
5480
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
5348
- <xsl:attribute name="text-align">
5349
- <xsl:choose>
5350
- <xsl:when test="@align">
5351
- <xsl:value-of select="@align"/>
5352
- </xsl:when>
5353
- <xsl:otherwise>left</xsl:otherwise>
5354
- </xsl:choose>
5355
- </xsl:attribute>
5356
- <xsl:if test="@colspan">
5357
- <xsl:attribute name="number-columns-spanned">
5358
- <xsl:value-of select="@colspan"/>
5359
- </xsl:attribute>
5360
- </xsl:if>
5361
- <xsl:if test="@rowspan">
5362
- <xsl:attribute name="number-rows-spanned">
5363
- <xsl:value-of select="@rowspan"/>
5364
- </xsl:attribute>
5365
- </xsl:if>
5366
- <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>
5367
5484
 
5368
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5369
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5370
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
5371
- </xsl:if>
5372
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
5373
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5374
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5375
- </xsl:if> -->
5485
+ <xsl:call-template name="setTableCellAttributes"/>
5376
5486
 
5377
5487
  <fo:block>
5378
5488
  <xsl:apply-templates/>
@@ -5384,37 +5494,15 @@
5384
5494
  <xsl:attribute name="padding">0mm</xsl:attribute>
5385
5495
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
5386
5496
  </xsl:if>
5387
- <xsl:attribute name="text-align">
5388
- <xsl:choose>
5389
- <xsl:when test="@align">
5390
- <xsl:value-of select="@align"/>
5391
- </xsl:when>
5392
- <xsl:otherwise>left</xsl:otherwise>
5393
- </xsl:choose>
5394
- </xsl:attribute>
5497
+ <xsl:call-template name="setTextAlignment">
5498
+ <xsl:with-param name="default">left</xsl:with-param>
5499
+ </xsl:call-template>
5500
+
5395
5501
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
5396
5502
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5397
5503
  </xsl:if>
5398
- <xsl:if test="@colspan">
5399
- <xsl:attribute name="number-columns-spanned">
5400
- <xsl:value-of select="@colspan"/>
5401
- </xsl:attribute>
5402
- </xsl:if>
5403
- <xsl:if test="@rowspan">
5404
- <xsl:attribute name="number-rows-spanned">
5405
- <xsl:value-of select="@rowspan"/>
5406
- </xsl:attribute>
5407
- </xsl:if>
5408
- <xsl:call-template name="display-align"/>
5409
5504
 
5410
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
5411
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
5412
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
5413
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
5414
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
5415
- </xsl:if>
5416
- </xsl:if> -->
5417
- <!-- 2nd line and below -->
5505
+ <xsl:call-template name="setTableCellAttributes"/>
5418
5506
 
5419
5507
  <fo:block>
5420
5508
  <xsl:apply-templates/>
@@ -5426,15 +5514,15 @@
5426
5514
  <xsl:apply-templates/>
5427
5515
  </fo:block>
5428
5516
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
5429
- <fo:block> <!-- margin-bottom="10pt" -->
5517
+ <fo:block>
5430
5518
  <xsl:apply-templates/>
5431
5519
  </fo:block>
5432
5520
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
5433
5521
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
5434
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5435
- <xsl:apply-templates/>
5522
+ <xsl:apply-templates select="*[local-name()='name']"/>
5523
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5436
5524
  </fo:block>
5437
- </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']">
5438
5526
  <xsl:if test="normalize-space() != ''">
5439
5527
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
5440
5528
  <xsl:apply-templates/>:
@@ -5463,42 +5551,46 @@
5463
5551
  </xsl:if>
5464
5552
 
5465
5553
 
5466
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5467
-
5468
- <xsl:variable name="element">
5469
-
5554
+ <xsl:variable name="fo_element">
5555
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5470
5556
  inline
5471
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
5472
5557
  </xsl:variable>
5473
5558
 
5559
+ <!-- display 'EXAMPLE' -->
5560
+ <xsl:apply-templates select="*[local-name()='name']">
5561
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5562
+ </xsl:apply-templates>
5563
+
5474
5564
  <xsl:choose>
5475
- <xsl:when test="contains(normalize-space($element), 'block')">
5476
- <fo:block xsl:use-attribute-sets="example-body-style">
5477
- <xsl:apply-templates/>
5478
- </fo:block>
5565
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
5566
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
5567
+ <fo:block-container margin-left="0mm" margin-right="0mm">
5568
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5569
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5570
+ </xsl:apply-templates>
5571
+ </fo:block-container>
5572
+ </fo:block-container>
5479
5573
  </xsl:when>
5480
5574
  <xsl:otherwise>
5481
5575
  <fo:inline>
5482
- <xsl:apply-templates/>
5576
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5577
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5578
+ </xsl:apply-templates>
5483
5579
  </fo:inline>
5484
5580
  </xsl:otherwise>
5485
5581
  </xsl:choose>
5486
5582
 
5487
5583
  </fo:block>
5488
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
5489
-
5490
- <xsl:variable name="element">
5491
-
5492
- inline
5493
- <xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
5494
- </xsl:variable>
5584
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
5585
+ <xsl:param name="fo_element">block</xsl:param>
5586
+
5495
5587
  <xsl:choose>
5496
5588
  <xsl:when test="ancestor::*[local-name() = 'appendix']">
5497
5589
  <fo:inline>
5498
5590
  <xsl:apply-templates/>
5499
5591
  </fo:inline>
5500
5592
  </xsl:when>
5501
- <xsl:when test="contains(normalize-space($element), 'block')">
5593
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
5502
5594
  <fo:block xsl:use-attribute-sets="example-name-style">
5503
5595
  <xsl:apply-templates/>
5504
5596
  </fo:block>
@@ -5511,19 +5603,20 @@
5511
5603
  </xsl:choose>
5512
5604
 
5513
5605
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
5606
+ <xsl:param name="fo_element">block</xsl:param>
5607
+
5514
5608
  <xsl:variable name="num"><xsl:number/></xsl:variable>
5515
5609
  <xsl:variable name="element">
5516
5610
 
5517
-
5518
5611
  <xsl:choose>
5519
5612
  <xsl:when test="$num = 1">inline</xsl:when>
5520
5613
  <xsl:otherwise>block</xsl:otherwise>
5521
5614
  </xsl:choose>
5522
5615
 
5523
-
5616
+ <xsl:value-of select="$fo_element"/>
5524
5617
  </xsl:variable>
5525
5618
  <xsl:choose>
5526
- <xsl:when test="normalize-space($element) = 'block'">
5619
+ <xsl:when test="starts-with(normalize-space($element), 'block')">
5527
5620
  <fo:block xsl:use-attribute-sets="example-p-style">
5528
5621
 
5529
5622
  <xsl:apply-templates/>
@@ -5538,63 +5631,70 @@
5538
5631
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
5539
5632
  <fo:block xsl:use-attribute-sets="termsource-style">
5540
5633
 
5634
+
5635
+
5541
5636
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
5542
5637
  <xsl:variable name="termsource_text">
5543
5638
  <xsl:apply-templates/>
5544
5639
  </xsl:variable>
5545
-
5546
- <xsl:choose>
5640
+ <xsl:copy-of select="$termsource_text"/>
5641
+ <!-- <xsl:choose>
5547
5642
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
5548
- <!-- <xsl:apply-templates /> -->
5549
5643
  <xsl:copy-of select="$termsource_text"/>
5550
5644
  </xsl:when>
5551
5645
  <xsl:otherwise>
5552
-
5553
-
5554
- <!-- <xsl:apply-templates /> -->
5646
+ <xsl:if test="$namespace = 'bsi'">
5647
+ <xsl:choose>
5648
+ <xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
5649
+ <xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
5650
+ </xsl:choose>
5651
+ </xsl:if>
5652
+ <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
5653
+ <xsl:text>[</xsl:text>
5654
+ </xsl:if>
5555
5655
  <xsl:copy-of select="$termsource_text"/>
5556
-
5557
-
5656
+ <xsl:if test="$namespace = 'bsi'">
5657
+ <xsl:choose>
5658
+ <xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
5659
+ <xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
5660
+ </xsl:choose>
5661
+ </xsl:if>
5662
+ <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
5663
+ <xsl:text>]</xsl:text>
5664
+ </xsl:if>
5558
5665
  </xsl:otherwise>
5559
- </xsl:choose>
5666
+ </xsl:choose> -->
5560
5667
  </fo:block>
5561
5668
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5562
5669
  <xsl:if test="normalize-space() != ''">
5563
5670
  <xsl:value-of select="."/>
5564
5671
  </xsl:if>
5565
- </xsl:template><xsl:variable name="localized.source">
5566
- <xsl:call-template name="getLocalizedString">
5567
- <xsl:with-param name="key">source</xsl:with-param>
5568
- </xsl:call-template>
5569
- </xsl:variable><xsl:template match="*[local-name() = 'origin']">
5672
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
5673
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
5674
+ <xsl:value-of select="."/>
5675
+ </fo:inline>
5676
+ </xsl:template><xsl:template match="*[local-name() = 'origin']">
5570
5677
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5571
5678
  <xsl:if test="normalize-space(@citeas) = ''">
5572
5679
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5573
5680
  </xsl:if>
5574
-
5575
-
5576
- <fo:inline>
5577
-
5578
-
5579
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5580
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
5581
-
5582
-
5583
-
5584
-
5585
- <xsl:value-of select="$localized.source"/>
5586
- <xsl:text>: </xsl:text>
5587
-
5588
-
5589
-
5590
-
5591
- </fo:inline>
5592
-
5593
5681
  <fo:inline xsl:use-attribute-sets="origin-style">
5594
5682
  <xsl:apply-templates/>
5595
5683
  </fo:inline>
5596
-
5597
- </fo:basic-link>
5684
+ </fo:basic-link>
5685
+ </xsl:template><xsl:template match="*[local-name() = 'modification']">
5686
+ <xsl:variable name="title-modified">
5687
+ <xsl:call-template name="getLocalizedString">
5688
+ <xsl:with-param name="key">modified</xsl:with-param>
5689
+ </xsl:call-template>
5690
+ </xsl:variable>
5691
+
5692
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
5693
+ <xsl:choose>
5694
+ <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
5695
+ <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
5696
+ </xsl:choose>
5697
+ <xsl:apply-templates/>
5598
5698
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
5599
5699
  <fo:inline><xsl:apply-templates/></fo:inline>
5600
5700
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
@@ -5613,7 +5713,6 @@
5613
5713
  <fo:block-container margin-left="0mm">
5614
5714
 
5615
5715
  <fo:block xsl:use-attribute-sets="quote-style">
5616
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
5617
5716
 
5618
5717
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
5619
5718
  </fo:block>
@@ -5656,15 +5755,13 @@
5656
5755
  </xsl:variable>
5657
5756
 
5658
5757
  <xsl:choose>
5659
- <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 -->
5660
5759
  <fo:inline xsl:use-attribute-sets="eref-style">
5661
5760
  <xsl:if test="@type = 'footnote'">
5662
-
5663
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5664
- <xsl:attribute name="font-size">80%</xsl:attribute>
5665
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5666
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5667
-
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>
5668
5765
 
5669
5766
  </xsl:if>
5670
5767
 
@@ -5681,7 +5778,6 @@
5681
5778
 
5682
5779
 
5683
5780
 
5684
-
5685
5781
  </xsl:if>
5686
5782
 
5687
5783
 
@@ -5734,8 +5830,6 @@
5734
5830
  </xsl:choose>
5735
5831
  </xsl:variable>
5736
5832
 
5737
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
5738
-
5739
5833
  <xsl:choose>
5740
5834
  <xsl:when test="$lang = 'zh'">
5741
5835
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -5770,12 +5864,9 @@
5770
5864
  </fo:block>
5771
5865
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
5772
5866
  <xsl:variable name="title-deprecated">
5773
-
5774
- <xsl:call-template name="getLocalizedString">
5775
- <xsl:with-param name="key">deprecated</xsl:with-param>
5776
- </xsl:call-template>
5777
-
5778
-
5867
+ <xsl:call-template name="getLocalizedString">
5868
+ <xsl:with-param name="key">deprecated</xsl:with-param>
5869
+ </xsl:call-template>
5779
5870
  </xsl:variable>
5780
5871
  <fo:block xsl:use-attribute-sets="deprecates-style">
5781
5872
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -5784,6 +5875,8 @@
5784
5875
  <xsl:if test="*[local-name() = 'strong']">
5785
5876
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5786
5877
  </xsl:if>
5878
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
5879
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
5787
5880
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
5788
5881
  <fo:block xsl:use-attribute-sets="definition-style">
5789
5882
  <xsl:apply-templates/>
@@ -5792,7 +5885,6 @@
5792
5885
  <xsl:apply-templates/>
5793
5886
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
5794
5887
  <fo:inline> <xsl:apply-templates/></fo:inline>
5795
- <!-- <fo:block>&#xA0;</fo:block> -->
5796
5888
  <fo:block/>
5797
5889
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
5798
5890
 
@@ -5833,11 +5925,6 @@
5833
5925
  <xsl:apply-templates/>
5834
5926
  </fo:block>
5835
5927
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
5836
- <fo:block id="{@id}">
5837
- <xsl:apply-templates/>
5838
- </fo:block>
5839
- </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']">
5840
-
5841
5928
  <fo:block id="{@id}">
5842
5929
  <xsl:apply-templates/>
5843
5930
  </fo:block>
@@ -5854,6 +5941,53 @@
5854
5941
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
5855
5942
  <!-- 0xA0 to space replacement -->
5856
5943
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
5944
+ </xsl:template><xsl:variable name="ul_labels_">
5945
+
5946
+
5947
+
5948
+
5949
+
5950
+
5951
+
5952
+
5953
+
5954
+
5955
+
5956
+
5957
+
5958
+
5959
+
5960
+ <label level="1" font-size="75%">o</label> <!-- white circle -->
5961
+ <label level="2">—</label> <!-- em dash -->
5962
+ <label level="3" font-size="140%">•</label> <!-- bullet -->
5963
+
5964
+
5965
+
5966
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
5967
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
5968
+ <xsl:variable name="list_level">
5969
+ <xsl:choose>
5970
+ <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
5971
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
5972
+ </xsl:choose>
5973
+ </xsl:variable>
5974
+ <xsl:choose>
5975
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
5976
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
5977
+ </xsl:when>
5978
+ <xsl:when test="$list_level mod 3 = 0">
5979
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
5980
+ </xsl:when>
5981
+ <xsl:when test="$list_level mod 2 = 0">
5982
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
5983
+ </xsl:when>
5984
+ <xsl:otherwise>
5985
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
5986
+ </xsl:otherwise>
5987
+ </xsl:choose>
5988
+ </xsl:template><xsl:template match="label" mode="ul_labels">
5989
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
5990
+ <xsl:value-of select="."/>
5857
5991
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
5858
5992
  <xsl:choose>
5859
5993
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
@@ -6060,20 +6194,121 @@
6060
6194
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
6061
6195
  <fo:block><xsl:apply-templates/></fo:block>
6062
6196
  </fo:table-cell>
6063
- </xsl:template><xsl:template name="processBibitem">
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">
6198
+
6199
+
6064
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>
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> -->
6216
+
6217
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
6218
+ <xsl:apply-templates/>
6219
+ </fo:block>
6065
6220
 
6066
6221
 
6067
-
6068
6222
 
6069
6223
 
6070
-
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">
6227
+
6228
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
6229
+ <xsl:call-template name="processBibitem"/>
6230
+ </fo:block>
6231
+
6232
+
6233
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
6234
+
6071
6235
 
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
+
6072
6269
 
6270
+ </xsl:template><xsl:template name="processBibitem">
6073
6271
 
6074
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
+
6075
6310
  </xsl:template><xsl:template name="processBibitemDocId">
6076
- <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
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')]"/>
6077
6312
  <xsl:choose>
6078
6313
  <xsl:when test="normalize-space($_doc_ident) != ''">
6079
6314
  <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
@@ -6087,7 +6322,7 @@
6087
6322
  <xsl:if test="$type != ''">
6088
6323
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
6089
6324
  </xsl:if> -->
6090
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
6325
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
6091
6326
  </xsl:otherwise>
6092
6327
  </xsl:choose>
6093
6328
  </xsl:template><xsl:template name="processPersonalAuthor">
@@ -6128,6 +6363,55 @@
6128
6363
  <xsl:value-of select="substring(.,1,1)"/>
6129
6364
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
6130
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/>
6131
6415
  </xsl:template><xsl:template match="*[local-name() = 'form']">
6132
6416
  <fo:block>
6133
6417
  <xsl:apply-templates/>
@@ -6192,7 +6476,18 @@
6192
6476
  <fo:block-container border="1pt solid black" width="50%">
6193
6477
  <fo:block> </fo:block>
6194
6478
  </fo:block-container>
6195
- </xsl:template><xsl:template match="*[local-name() = 'toc']">
6479
+ </xsl:template><xsl:variable name="toc_level">
6480
+ <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
6481
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
6482
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
6483
+ <xsl:choose>
6484
+ <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
6485
+ <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
6486
+ <xsl:otherwise><!-- default value -->
6487
+ 2
6488
+ </xsl:otherwise>
6489
+ </xsl:choose>
6490
+ </xsl:variable><xsl:template match="*[local-name() = 'toc']">
6196
6491
  <xsl:param name="colwidths"/>
6197
6492
  <xsl:variable name="colwidths_">
6198
6493
  <xsl:choose>
@@ -6272,7 +6567,7 @@
6272
6567
  </td>
6273
6568
  </xsl:for-each>
6274
6569
  <td>333</td> <!-- page number, just for fill -->
6275
- </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6570
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
6276
6571
  <fo:inline padding-right="5mm"> </fo:inline>
6277
6572
  <fo:inline><xsl:apply-templates/></fo:inline>
6278
6573
  </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
@@ -6283,6 +6578,66 @@
6283
6578
  </svg>
6284
6579
  </fo:instream-foreign-object>
6285
6580
  </fo:inline>
6581
+ </xsl:template><xsl:template match="@language">
6582
+ <xsl:copy-of select="."/>
6583
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
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
+
6286
6641
  </xsl:template><xsl:template name="convertDate">
6287
6642
  <xsl:param name="date"/>
6288
6643
  <xsl:param name="format" select="'short'"/>
@@ -6291,78 +6646,39 @@
6291
6646
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
6292
6647
  <xsl:variable name="monthStr">
6293
6648
  <xsl:choose>
6294
- <xsl:when test="$month = '01'">January</xsl:when>
6295
- <xsl:when test="$month = '02'">February</xsl:when>
6296
- <xsl:when test="$month = '03'">March</xsl:when>
6297
- <xsl:when test="$month = '04'">April</xsl:when>
6298
- <xsl:when test="$month = '05'">May</xsl:when>
6299
- <xsl:when test="$month = '06'">June</xsl:when>
6300
- <xsl:when test="$month = '07'">July</xsl:when>
6301
- <xsl:when test="$month = '08'">August</xsl:when>
6302
- <xsl:when test="$month = '09'">September</xsl:when>
6303
- <xsl:when test="$month = '10'">October</xsl:when>
6304
- <xsl:when test="$month = '11'">November</xsl:when>
6305
- <xsl:when test="$month = '12'">December</xsl:when>
6306
- </xsl:choose>
6307
- </xsl:variable>
6308
- <xsl:variable name="result">
6309
- <xsl:choose>
6310
- <xsl:when test="$format = 'ddMMyyyy'">
6311
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6312
- <xsl:text> </xsl:text>
6313
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6314
- </xsl:when>
6315
- <xsl:when test="$format = 'ddMM'">
6316
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6317
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6318
- </xsl:when>
6319
- <xsl:when test="$format = 'short' or $day = ''">
6320
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6321
- </xsl:when>
6322
- <xsl:otherwise>
6323
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6324
- </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>
6325
6661
  </xsl:choose>
6326
6662
  </xsl:variable>
6327
- <xsl:value-of select="$result"/>
6328
- </xsl:template><xsl:template name="convertDateLocalized">
6329
- <xsl:param name="date"/>
6330
- <xsl:param name="format" select="'short'"/>
6331
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
6332
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
6333
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
6334
- <xsl:variable name="monthStr">
6335
- <xsl:choose>
6336
- <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>
6337
- <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>
6338
- <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>
6339
- <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>
6340
- <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>
6341
- <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>
6342
- <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>
6343
- <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>
6344
- <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>
6345
- <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>
6346
- <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>
6347
- <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>
6348
- </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>
6349
6665
  </xsl:variable>
6350
6666
  <xsl:variable name="result">
6351
6667
  <xsl:choose>
6352
6668
  <xsl:when test="$format = 'ddMMyyyy'">
6353
6669
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6354
6670
  <xsl:text> </xsl:text>
6355
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
6671
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
6356
6672
  </xsl:when>
6357
6673
  <xsl:when test="$format = 'ddMM'">
6358
6674
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6359
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
6675
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
6360
6676
  </xsl:when>
6361
6677
  <xsl:when test="$format = 'short' or $day = ''">
6362
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
6678
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
6363
6679
  </xsl:when>
6364
6680
  <xsl:otherwise>
6365
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
6681
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
6366
6682
  </xsl:otherwise>
6367
6683
  </xsl:choose>
6368
6684
  </xsl:variable>
@@ -6414,14 +6730,9 @@
6414
6730
  <dc:title>
6415
6731
  <xsl:variable name="title">
6416
6732
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6417
-
6418
-
6419
-
6420
-
6421
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
6422
-
6423
-
6424
6733
 
6734
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
6735
+
6425
6736
  </xsl:for-each>
6426
6737
  </xsl:variable>
6427
6738
  <xsl:choose>
@@ -6436,21 +6747,18 @@
6436
6747
  <dc:creator>
6437
6748
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
6438
6749
 
6439
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
6440
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
6441
- <xsl:if test="position() != last()">; </xsl:if>
6442
- </xsl:for-each>
6443
-
6444
-
6445
-
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
+
6446
6755
  </xsl:for-each>
6447
6756
  </dc:creator>
6448
6757
  <dc:description>
6449
6758
  <xsl:variable name="abstract">
6450
6759
 
6451
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6452
-
6453
-
6760
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
6761
+
6454
6762
  </xsl:variable>
6455
6763
  <xsl:value-of select="normalize-space($abstract)"/>
6456
6764
  </dc:description>
@@ -6470,7 +6778,6 @@
6470
6778
  <xsl:value-of select="../@id"/>
6471
6779
  </xsl:when>
6472
6780
  <xsl:otherwise>
6473
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
6474
6781
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
6475
6782
  </xsl:otherwise>
6476
6783
  </xsl:choose>
@@ -6496,9 +6803,6 @@
6496
6803
  <xsl:when test="ancestor::*[local-name() = 'preface']">
6497
6804
  <xsl:value-of select="$level_total - 2"/>
6498
6805
  </xsl:when>
6499
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
6500
- <xsl:value-of select="$level_total - 1"/>
6501
- </xsl:when> -->
6502
6806
  <xsl:when test="ancestor::*[local-name() = 'sections']">
6503
6807
  <xsl:value-of select="$level_total - 1"/>
6504
6808
  </xsl:when>
@@ -6640,9 +6944,15 @@
6640
6944
  </xsl:template><xsl:template name="getLocalizedString">
6641
6945
  <xsl:param name="key"/>
6642
6946
  <xsl:param name="formatted">false</xsl:param>
6947
+ <xsl:param name="lang"/>
6643
6948
 
6644
6949
  <xsl:variable name="curr_lang">
6645
- <xsl:call-template name="getLang"/>
6950
+ <xsl:choose>
6951
+ <xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
6952
+ <xsl:otherwise>
6953
+ <xsl:call-template name="getLang"/>
6954
+ </xsl:otherwise>
6955
+ </xsl:choose>
6646
6956
  </xsl:variable>
6647
6957
 
6648
6958
  <xsl:variable name="data_value">
@@ -6682,7 +6992,6 @@
6682
6992
  <xsl:value-of select="$key_"/>
6683
6993
  </xsl:otherwise>
6684
6994
  </xsl:choose>
6685
-
6686
6995
  </xsl:template><xsl:template name="setTrackChangesStyles">
6687
6996
  <xsl:param name="isAdded"/>
6688
6997
  <xsl:param name="isDeleted"/>
@@ -6705,7 +7014,6 @@
6705
7014
  <xsl:if test="local-name() = 'table'">
6706
7015
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
6707
7016
  </xsl:if>
6708
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
6709
7017
  <xsl:attribute name="padding">2mm</xsl:attribute>
6710
7018
  </xsl:if>
6711
7019
  </xsl:otherwise>
@@ -6725,15 +7033,18 @@
6725
7033
  </xsl:choose>
6726
7034
  </xsl:template><xsl:template name="setTextAlignment">
6727
7035
  <xsl:param name="default">left</xsl:param>
7036
+ <xsl:variable name="align" select="normalize-space(@align)"/>
6728
7037
  <xsl:attribute name="text-align">
6729
7038
  <xsl:choose>
6730
- <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>
6731
7042
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
6732
7043
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
6733
7044
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
6734
7045
  </xsl:choose>
6735
7046
  </xsl:attribute>
6736
- <xsl:if test="@align = 'indent'">
7047
+ <xsl:if test="$align = 'indent'">
6737
7048
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
6738
7049
  </xsl:if>
6739
7050
  </xsl:template><xsl:template name="number-to-words">
@@ -6832,4 +7143,14 @@
6832
7143
  </xsl:otherwise>
6833
7144
  </xsl:choose>
6834
7145
  </xsl:if>
7146
+ </xsl:template><xsl:template name="setAltText">
7147
+ <xsl:param name="value"/>
7148
+ <xsl:attribute name="fox:alt-text">
7149
+ <xsl:choose>
7150
+ <xsl:when test="normalize-space($value) != ''">
7151
+ <xsl:value-of select="$value"/>
7152
+ </xsl:when>
7153
+ <xsl:otherwise>_</xsl:otherwise>
7154
+ </xsl:choose>
7155
+ </xsl:attribute>
6835
7156
  </xsl:template></xsl:stylesheet>