metanorma-un 0.9.2 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -974,7 +974,7 @@
974
974
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
975
975
  </xsl:otherwise>
976
976
  </xsl:choose>
977
- </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:attribute-set name="root-style">
977
+ </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="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable><xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable><xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable><xsl:attribute-set name="root-style">
978
978
 
979
979
 
980
980
 
@@ -991,7 +991,9 @@
991
991
 
992
992
 
993
993
 
994
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
994
+
995
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
996
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
995
997
  <xsl:attribute name="font-size">10pt</xsl:attribute>
996
998
 
997
999
  </xsl:attribute-set><xsl:template name="insertRootStyle">
@@ -1005,17 +1007,60 @@
1005
1007
  </xsl:variable>
1006
1008
  <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
1007
1009
 
1010
+ <xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
1011
+
1008
1012
  <xsl:for-each select="$root-style_/root-style/@*">
1013
+
1009
1014
  <xsl:choose>
1010
- <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
1015
+ <xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
1016
+ <xsl:when test="local-name() = 'font-family'">
1017
+
1018
+ <xsl:variable name="font_regional_prefix">
1019
+ <xsl:choose>
1020
+ <xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
1021
+ <xsl:otherwise>Noto Serif</xsl:otherwise>
1022
+ </xsl:choose>
1023
+ </xsl:variable>
1024
+
1011
1025
  <xsl:attribute name="{local-name()}">
1012
- <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
1026
+
1027
+ <xsl:variable name="font_extended">
1028
+ <xsl:choose>
1029
+ <xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
1030
+ <xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
1031
+ <xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
1032
+ <xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
1033
+ <xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
1034
+ <xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
1035
+ </xsl:choose>
1036
+ </xsl:variable>
1037
+ <xsl:if test="normalize-space($font_extended) != ''">
1038
+ <xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
1039
+ <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1040
+ </xsl:if>
1041
+
1042
+ <xsl:value-of select="."/>
1043
+
1044
+ <xsl:if test="$additional_fonts != ''">
1045
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1046
+ </xsl:if>
1013
1047
  </xsl:attribute>
1014
1048
  </xsl:when>
1015
1049
  <xsl:otherwise>
1016
1050
  <xsl:copy-of select="."/>
1017
1051
  </xsl:otherwise>
1018
1052
  </xsl:choose>
1053
+
1054
+ <!-- <xsl:choose>
1055
+ <xsl:when test="local-name() = 'font-family'">
1056
+ <xsl:attribute name="{local-name()}">
1057
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
1058
+ </xsl:attribute>
1059
+ </xsl:when>
1060
+ <xsl:otherwise>
1061
+ <xsl:copy-of select="."/>
1062
+ </xsl:otherwise>
1063
+ </xsl:choose> -->
1019
1064
  </xsl:for-each>
1020
1065
  </xsl:template><xsl:attribute-set name="copyright-statement-style">
1021
1066
 
@@ -1086,13 +1131,14 @@
1086
1131
 
1087
1132
 
1088
1133
 
1134
+
1089
1135
 
1090
1136
 
1091
1137
 
1092
1138
 
1093
1139
 
1094
1140
 
1095
- <xsl:attribute name="font-family">Courier New</xsl:attribute>
1141
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1096
1142
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1097
1143
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1098
1144
 
@@ -1104,7 +1150,10 @@
1104
1150
 
1105
1151
  </xsl:attribute-set><xsl:attribute-set name="requirement-style">
1106
1152
 
1153
+
1107
1154
  </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
1155
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1156
+
1108
1157
 
1109
1158
  </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1110
1159
 
@@ -1130,6 +1179,7 @@
1130
1179
 
1131
1180
 
1132
1181
 
1182
+
1133
1183
 
1134
1184
  </xsl:attribute-set><xsl:attribute-set name="example-style">
1135
1185
 
@@ -1145,6 +1195,7 @@
1145
1195
 
1146
1196
 
1147
1197
 
1198
+
1148
1199
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1149
1200
 
1150
1201
 
@@ -1164,6 +1215,7 @@
1164
1215
 
1165
1216
 
1166
1217
 
1218
+
1167
1219
 
1168
1220
 
1169
1221
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -1200,10 +1252,12 @@
1200
1252
 
1201
1253
 
1202
1254
 
1255
+
1203
1256
 
1204
1257
 
1205
1258
  </xsl:attribute-set><xsl:variable name="table-border_">
1206
1259
 
1260
+
1207
1261
  </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1208
1262
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1209
1263
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -1225,6 +1279,7 @@
1225
1279
 
1226
1280
 
1227
1281
 
1282
+
1228
1283
 
1229
1284
 
1230
1285
 
@@ -1254,6 +1309,7 @@
1254
1309
 
1255
1310
 
1256
1311
 
1312
+
1257
1313
 
1258
1314
 
1259
1315
 
@@ -1263,6 +1319,7 @@
1263
1319
 
1264
1320
 
1265
1321
 
1322
+
1266
1323
 
1267
1324
 
1268
1325
 
@@ -1342,6 +1399,7 @@
1342
1399
 
1343
1400
 
1344
1401
 
1402
+
1345
1403
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
1346
1404
 
1347
1405
 
@@ -1357,7 +1415,7 @@
1357
1415
 
1358
1416
 
1359
1417
 
1360
-
1418
+
1361
1419
 
1362
1420
 
1363
1421
 
@@ -1372,6 +1430,7 @@
1372
1430
 
1373
1431
 
1374
1432
 
1433
+
1375
1434
  </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
1376
1435
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1377
1436
 
@@ -1380,6 +1439,8 @@
1380
1439
 
1381
1440
 
1382
1441
 
1442
+
1443
+
1383
1444
  </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1384
1445
  <xsl:attribute name="font-size">80%</xsl:attribute>
1385
1446
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
@@ -1395,6 +1456,7 @@
1395
1456
 
1396
1457
 
1397
1458
 
1459
+
1398
1460
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1399
1461
 
1400
1462
  </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
@@ -1429,6 +1491,7 @@
1429
1491
 
1430
1492
 
1431
1493
 
1494
+
1432
1495
  </xsl:attribute-set><xsl:attribute-set name="dl-name-style">
1433
1496
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1434
1497
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -1437,6 +1500,7 @@
1437
1500
 
1438
1501
 
1439
1502
 
1503
+
1440
1504
 
1441
1505
 
1442
1506
 
@@ -1477,6 +1541,7 @@
1477
1541
 
1478
1542
 
1479
1543
 
1544
+
1480
1545
 
1481
1546
 
1482
1547
 
@@ -1516,7 +1581,8 @@
1516
1581
 
1517
1582
 
1518
1583
 
1519
-
1584
+
1585
+
1520
1586
 
1521
1587
 
1522
1588
 
@@ -1535,6 +1601,7 @@
1535
1601
  </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1536
1602
 
1537
1603
 
1604
+
1538
1605
 
1539
1606
 
1540
1607
 
@@ -1547,6 +1614,8 @@
1547
1614
 
1548
1615
 
1549
1616
 
1617
+ </xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
1618
+
1550
1619
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1551
1620
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1552
1621
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -1587,6 +1656,7 @@
1587
1656
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1588
1657
 
1589
1658
 
1659
+
1590
1660
 
1591
1661
 
1592
1662
 
@@ -1633,6 +1703,7 @@
1633
1703
 
1634
1704
 
1635
1705
 
1706
+
1636
1707
  </xsl:attribute-set><xsl:attribute-set name="formula-stem-number-style">
1637
1708
  <xsl:attribute name="text-align">right</xsl:attribute>
1638
1709
 
@@ -1654,16 +1725,16 @@
1654
1725
  </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1655
1726
 
1656
1727
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1728
+ <xsl:attribute name="width">100%</xsl:attribute>
1729
+ <xsl:attribute name="content-height">100%</xsl:attribute>
1730
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
1657
1731
 
1658
1732
 
1659
- <xsl:attribute name="width">100%</xsl:attribute>
1660
1733
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1661
- <xsl:attribute name="scaling">uniform</xsl:attribute>
1662
1734
 
1663
1735
 
1664
1736
 
1665
-
1666
-
1737
+
1667
1738
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1668
1739
 
1669
1740
 
@@ -1742,6 +1813,7 @@
1742
1813
 
1743
1814
 
1744
1815
 
1816
+
1745
1817
  <xsl:attribute name="provisional-distance-between-starts">3mm</xsl:attribute>
1746
1818
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
1747
1819
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
@@ -1808,6 +1880,7 @@
1808
1880
 
1809
1881
 
1810
1882
 
1883
+
1811
1884
  <xsl:attribute name="font-size">55%</xsl:attribute>
1812
1885
  <xsl:attribute name="vertical-align">super</xsl:attribute>
1813
1886
 
@@ -1834,6 +1907,7 @@
1834
1907
 
1835
1908
 
1836
1909
 
1910
+
1837
1911
  <xsl:attribute name="font-size">9pt</xsl:attribute>
1838
1912
  <xsl:attribute name="line-height">125%</xsl:attribute>
1839
1913
 
@@ -1856,6 +1930,7 @@
1856
1930
 
1857
1931
 
1858
1932
 
1933
+
1859
1934
  <xsl:attribute name="font-size">60%</xsl:attribute>
1860
1935
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
1861
1936
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -1875,6 +1950,7 @@
1875
1950
 
1876
1951
 
1877
1952
 
1953
+
1878
1954
  <xsl:attribute name="border">0.25pt solid black</xsl:attribute>
1879
1955
  <xsl:attribute name="margin-top">7mm</xsl:attribute>
1880
1956
  <xsl:attribute name="margin-left">-9mm</xsl:attribute>
@@ -1883,6 +1959,9 @@
1883
1959
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
1884
1960
 
1885
1961
  </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
1962
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1963
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1964
+
1886
1965
 
1887
1966
 
1888
1967
 
@@ -1932,6 +2011,7 @@
1932
2011
 
1933
2012
 
1934
2013
 
2014
+
1935
2015
  <xsl:attribute name="text-align">justify</xsl:attribute>
1936
2016
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1937
2017
 
@@ -1965,6 +2045,10 @@
1965
2045
 
1966
2046
 
1967
2047
 
2048
+ <!-- <xsl:if test="$namespace = 'ieee'">
2049
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2050
+ <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
2051
+ </xsl:if> -->
1968
2052
 
1969
2053
 
1970
2054
 
@@ -1991,13 +2075,16 @@
1991
2075
 
1992
2076
 
1993
2077
 
2078
+
1994
2079
  </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
1995
2080
 
1996
2081
 
2082
+
1997
2083
  </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
1998
2084
 
1999
2085
 
2000
2086
 
2087
+
2001
2088
  </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
2002
2089
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2003
2090
  <xsl:attribute name="font-size">65%</xsl:attribute>
@@ -2017,6 +2104,7 @@
2017
2104
 
2018
2105
 
2019
2106
 
2107
+
2020
2108
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2021
2109
 
2022
2110
  </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
@@ -2037,6 +2125,7 @@
2037
2125
 
2038
2126
 
2039
2127
 
2128
+
2040
2129
  <xsl:attribute name="font-size">60%</xsl:attribute>
2041
2130
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2042
2131
 
@@ -2055,6 +2144,7 @@
2055
2144
 
2056
2145
 
2057
2146
 
2147
+
2058
2148
  </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
2059
2149
 
2060
2150
 
@@ -2486,6 +2576,8 @@
2486
2576
 
2487
2577
 
2488
2578
 
2579
+
2580
+
2489
2581
 
2490
2582
 
2491
2583
 
@@ -2534,6 +2626,8 @@
2534
2626
 
2535
2627
 
2536
2628
 
2629
+
2630
+
2537
2631
  <xsl:if test="ancestor::*[local-name()='sections']">
2538
2632
  <xsl:attribute name="border-top">1.5pt solid black</xsl:attribute>
2539
2633
  <xsl:attribute name="border-bottom">1.5pt solid black</xsl:attribute>
@@ -2626,6 +2720,14 @@
2626
2720
 
2627
2721
 
2628
2722
 
2723
+ <xsl:if test="*[local-name()='bookmark']"> <!-- special case: table/bookmark -->
2724
+ <fo:block keep-with-previous="always" line-height="0.1">
2725
+ <xsl:for-each select="*[local-name()='bookmark']">
2726
+ <xsl:call-template name="bookmark"/>
2727
+ </xsl:for-each>
2728
+ </fo:block>
2729
+ </xsl:if>
2730
+
2629
2731
  </fo:block-container>
2630
2732
  </xsl:variable>
2631
2733
 
@@ -2681,23 +2783,29 @@
2681
2783
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2682
2784
  <xsl:param name="continued"/>
2683
2785
  <xsl:if test="normalize-space() != ''">
2684
- <fo:block xsl:use-attribute-sets="table-name-style">
2685
-
2686
-
2687
-
2688
-
2786
+
2787
+
2689
2788
 
2690
- <xsl:choose>
2691
- <xsl:when test="$continued = 'true'">
2789
+ <fo:block xsl:use-attribute-sets="table-name-style">
2790
+
2692
2791
 
2693
- </xsl:when>
2694
- <xsl:otherwise>
2695
- <xsl:apply-templates/>
2696
- </xsl:otherwise>
2697
- </xsl:choose>
2698
-
2792
+
2793
+
2794
+
2795
+ <xsl:choose>
2796
+ <xsl:when test="$continued = 'true'">
2797
+
2798
+ </xsl:when>
2799
+ <xsl:otherwise>
2800
+ <xsl:apply-templates/>
2801
+ </xsl:otherwise>
2802
+ </xsl:choose>
2803
+
2804
+
2805
+ </fo:block>
2806
+
2699
2807
 
2700
- </fo:block>
2808
+
2701
2809
  </xsl:if>
2702
2810
  </xsl:template><xsl:template name="calculate-columns-numbers">
2703
2811
  <xsl:param name="table-row"/>
@@ -3095,12 +3203,18 @@
3095
3203
  <fo:table-row>
3096
3204
  <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">
3097
3205
 
3098
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3099
- <xsl:with-param name="continued">true</xsl:with-param>
3100
- </xsl:apply-templates>
3101
3206
 
3102
3207
 
3103
3208
 
3209
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3210
+ <xsl:with-param name="continued">true</xsl:with-param>
3211
+ </xsl:apply-templates>
3212
+
3213
+
3214
+
3215
+
3216
+
3217
+
3104
3218
  </fo:table-cell>
3105
3219
  </fo:table-row>
3106
3220
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3140,77 +3254,91 @@
3140
3254
  </xsl:choose>
3141
3255
  </xsl:variable>
3142
3256
 
3143
- <fo:table keep-with-previous="always">
3144
- <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3145
- <xsl:variable name="name" select="local-name()"/>
3257
+
3258
+ <xsl:variable name="tableWithNotesAndFootnotes">
3259
+
3260
+ <fo:table keep-with-previous="always">
3261
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3262
+ <xsl:variable name="name" select="local-name()"/>
3263
+ <xsl:choose>
3264
+ <xsl:when test="$name = 'border-top'">
3265
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3266
+ </xsl:when>
3267
+ <xsl:when test="$name = 'border'">
3268
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3269
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3270
+ </xsl:when>
3271
+ <xsl:otherwise>
3272
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3273
+ </xsl:otherwise>
3274
+ </xsl:choose>
3275
+ </xsl:for-each>
3276
+
3277
+
3278
+
3146
3279
  <xsl:choose>
3147
- <xsl:when test="$name = 'border-top'">
3148
- <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3149
- </xsl:when>
3150
- <xsl:when test="$name = 'border'">
3151
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3152
- <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3280
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3281
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3282
+ <fo:table-column column-width="{@width}"/>
3283
+ </xsl:for-each>
3153
3284
  </xsl:when>
3154
3285
  <xsl:otherwise>
3155
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3286
+ <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3287
+ <xsl:call-template name="insertTableColumnWidth">
3288
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3289
+ </xsl:call-template>
3156
3290
  </xsl:otherwise>
3157
3291
  </xsl:choose>
3158
- </xsl:for-each>
3159
-
3160
-
3161
-
3162
- <xsl:choose>
3163
- <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3164
- <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3165
- <fo:table-column column-width="{@width}"/>
3166
- </xsl:for-each>
3167
- </xsl:when>
3168
- <xsl:otherwise>
3169
- <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3170
- <xsl:call-template name="insertTableColumnWidth">
3171
- <xsl:with-param name="colwidths" select="$colwidths"/>
3172
- </xsl:call-template>
3173
- </xsl:otherwise>
3174
- </xsl:choose>
3175
-
3176
- <fo:table-body>
3177
- <fo:table-row>
3178
- <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3179
-
3180
-
3292
+
3293
+ <fo:table-body>
3294
+ <fo:table-row>
3295
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3296
+
3297
+
3181
3298
 
3182
-
3183
-
3184
- <!-- fn will be processed inside 'note' processing -->
3185
-
3186
-
3187
-
3188
-
3189
-
3190
-
3191
- <!-- for BSI (not PAS) display Notes before footnotes -->
3192
-
3193
-
3194
- <!-- except gb and bsi -->
3195
-
3196
- <xsl:apply-templates select="../*[local-name()='note']"/>
3197
3299
 
3198
-
3199
-
3200
- <!-- horizontal row separator -->
3201
-
3202
-
3203
- <!-- fn processing -->
3204
- <xsl:call-template name="table_fn_display"/>
3205
-
3206
- <!-- for PAS display Notes after footnotes -->
3207
-
3208
-
3209
- </fo:table-cell>
3210
- </fo:table-row>
3211
- </fo:table-body>
3212
-
3213
- </fo:table>
3300
+
3301
+ <!-- fn will be processed inside 'note' processing -->
3302
+
3303
+
3304
+
3305
+
3306
+
3307
+
3308
+ <!-- for BSI (not PAS) display Notes before footnotes -->
3309
+
3310
+
3311
+ <!-- except gb and bsi -->
3312
+
3313
+ <xsl:apply-templates select="../*[local-name()='note']"/>
3314
+
3315
+
3316
+
3317
+ <!-- horizontal row separator -->
3318
+
3319
+
3320
+ <!-- fn processing -->
3321
+
3322
+ <xsl:call-template name="table_fn_display"/>
3323
+
3324
+
3325
+
3326
+ <!-- for PAS display Notes after footnotes -->
3327
+
3328
+
3329
+ </fo:table-cell>
3330
+ </fo:table-row>
3331
+ </fo:table-body>
3332
+
3333
+ </fo:table>
3334
+ </xsl:variable>
3335
+
3336
+ <xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''">
3337
+ <xsl:copy-of select="$tableWithNotesAndFootnotes"/>
3338
+ </xsl:if>
3339
+
3340
+
3341
+
3214
3342
  </xsl:if>
3215
3343
  </xsl:template><xsl:template match="*[local-name()='tbody']">
3216
3344
 
@@ -3299,6 +3427,9 @@
3299
3427
 
3300
3428
 
3301
3429
 
3430
+
3431
+
3432
+
3302
3433
 
3303
3434
 
3304
3435
  <xsl:call-template name="setTableRowAttributes"/>
@@ -3318,6 +3449,8 @@
3318
3449
 
3319
3450
 
3320
3451
 
3452
+
3453
+
3321
3454
  <xsl:call-template name="setTableRowAttributes"/>
3322
3455
  <xsl:apply-templates/>
3323
3456
  </fo:table-row>
@@ -3414,6 +3547,8 @@
3414
3547
 
3415
3548
 
3416
3549
 
3550
+
3551
+
3417
3552
 
3418
3553
 
3419
3554
 
@@ -3494,7 +3629,11 @@
3494
3629
 
3495
3630
  <xsl:variable name="gen_id" select="generate-id(.)"/>
3496
3631
  <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
3497
- <xsl:variable name="reference" select="@reference"/>
3632
+ <xsl:variable name="reference_">
3633
+ <xsl:value-of select="@reference"/>
3634
+ <xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
3635
+ </xsl:variable>
3636
+ <xsl:variable name="reference" select="normalize-space($reference_)"/>
3498
3637
  <!-- fn sequence number in document -->
3499
3638
  <xsl:variable name="current_fn_number">
3500
3639
  <xsl:choose>
@@ -3514,6 +3653,7 @@
3514
3653
  <xsl:variable name="footnote_inline">
3515
3654
  <fo:inline xsl:use-attribute-sets="fn-num-style">
3516
3655
 
3656
+
3517
3657
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3518
3658
  <xsl:value-of select="$current_fn_number_text"/>
3519
3659
  </fo:basic-link>
@@ -3535,8 +3675,12 @@
3535
3675
  <fo:block xsl:use-attribute-sets="fn-body-style">
3536
3676
 
3537
3677
 
3678
+
3538
3679
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3539
3680
 
3681
+
3682
+
3683
+
3540
3684
  <xsl:value-of select="$current_fn_number_text"/>
3541
3685
  </fo:inline>
3542
3686
  <xsl:apply-templates/>
@@ -3569,7 +3713,7 @@
3569
3713
  <xsl:copy-of select="node()"/>
3570
3714
  </fn>
3571
3715
  </xsl:for-each>
3572
- <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']/*">
3716
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='boilerplate']/* | 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']/*">
3573
3717
  <xsl:sort select="@displayorder" data-type="number"/>
3574
3718
  <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])]">
3575
3719
  <!-- copy unique fn -->
@@ -5210,6 +5354,13 @@
5210
5354
  </xsl:variable>
5211
5355
  <fo:inline xsl:use-attribute-sets="link-style">
5212
5356
 
5357
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
5358
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5359
+ </xsl:if>
5360
+
5361
+
5362
+
5363
+
5213
5364
 
5214
5365
 
5215
5366
 
@@ -5441,6 +5592,7 @@
5441
5592
 
5442
5593
 
5443
5594
 
5595
+
5444
5596
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5445
5597
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
5446
5598
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -5462,6 +5614,7 @@
5462
5614
  </xsl:when>
5463
5615
  <xsl:otherwise>
5464
5616
 
5617
+
5465
5618
  <xsl:text>:</xsl:text>
5466
5619
 
5467
5620
 
@@ -5481,6 +5634,7 @@
5481
5634
  </xsl:when>
5482
5635
  <xsl:otherwise>
5483
5636
 
5637
+
5484
5638
 
5485
5639
  <xsl:text> – </xsl:text>
5486
5640
 
@@ -5492,7 +5646,19 @@
5492
5646
  <xsl:value-of select="$suffix"/>
5493
5647
  </xsl:if>
5494
5648
  </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
5495
- <fo:inline><xsl:apply-templates/></fo:inline>
5649
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
5650
+ <xsl:choose>
5651
+ <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
5652
+ <fo:inline xsl:use-attribute-sets="termnote-p-style">
5653
+ <xsl:apply-templates/>
5654
+ </fo:inline>
5655
+ </xsl:when>
5656
+ <xsl:otherwise>
5657
+ <fo:block xsl:use-attribute-sets="termnote-p-style">
5658
+ <xsl:apply-templates/>
5659
+ </fo:block>
5660
+ </xsl:otherwise>
5661
+ </xsl:choose>
5496
5662
  </xsl:template><xsl:template match="*[local-name() = 'terms']">
5497
5663
  <!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
5498
5664
  <fo:block id="{@id}">
@@ -6252,6 +6418,9 @@
6252
6418
  <fo:block xsl:use-attribute-sets="figure-name-style">
6253
6419
 
6254
6420
 
6421
+
6422
+
6423
+
6255
6424
  <xsl:apply-templates/>
6256
6425
  </fo:block>
6257
6426
  </xsl:if>
@@ -6312,9 +6481,9 @@
6312
6481
  <xsl:apply-templates/>
6313
6482
  </xsl:otherwise>
6314
6483
  </xsl:choose>
6315
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref']" mode="contents">
6484
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref'] | *[local-name() = 'eref']" mode="contents">
6316
6485
  <xsl:value-of select="."/>
6317
- </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
6486
+ </xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
6318
6487
  <xsl:text> </xsl:text>
6319
6488
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
6320
6489
  <xsl:copy>
@@ -6388,6 +6557,9 @@
6388
6557
  <!-- 9 -->
6389
6558
 
6390
6559
 
6560
+ <!-- <xsl:if test="$namespace = 'ieee'">
6561
+ <xsl:if test="$current_template = 'standard'">8</xsl:if>
6562
+ </xsl:if> -->
6391
6563
 
6392
6564
 
6393
6565
 
@@ -6832,10 +7004,14 @@
6832
7004
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
6833
7005
  <xsl:variable name="element">inline
6834
7006
 
7007
+
6835
7008
  </xsl:variable>
6836
7009
  <xsl:choose>
6837
7010
  <xsl:when test="contains($element, 'block')">
6838
7011
  <fo:block xsl:use-attribute-sets="example-p-style">
7012
+
7013
+
7014
+
6839
7015
  <xsl:apply-templates/>
6840
7016
  </fo:block>
6841
7017
  </xsl:when>
@@ -6943,6 +7119,7 @@
6943
7119
  </xsl:if>
6944
7120
  <fo:block xsl:use-attribute-sets="example-p-style">
6945
7121
 
7122
+
6946
7123
  <xsl:if test="$num = 1">
6947
7124
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
6948
7125
  </xsl:if>
@@ -7103,6 +7280,8 @@
7103
7280
 
7104
7281
 
7105
7282
 
7283
+
7284
+
7106
7285
  <fo:basic-link fox:alt-text="{@citeas}">
7107
7286
  <xsl:if test="normalize-space(@citeas) = ''">
7108
7287
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
@@ -7166,6 +7345,7 @@
7166
7345
 
7167
7346
 
7168
7347
 
7348
+
7169
7349
  <xsl:choose>
7170
7350
  <xsl:when test="ancestor::un:annex and $depth &gt;= 2">9.5</xsl:when>
7171
7351
  <xsl:when test="ancestor::un:sections">9.5</xsl:when>
@@ -7525,6 +7705,8 @@
7525
7705
 
7526
7706
 
7527
7707
 
7708
+
7709
+
7528
7710
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7529
7711
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7530
7712
  <xsl:call-template name="append_add-style"/>
@@ -7709,7 +7891,7 @@
7709
7891
  </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/text()">
7710
7892
  <!-- to split by '_' and other chars -->
7711
7893
  <xsl:call-template name="add-zero-spaces-java"/>
7712
- </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
7894
+ </xsl:template><xsl:template match="*[local-name() = 'table']/*[local-name() = 'bookmark']" priority="2"/><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
7713
7895
  <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
7714
7896
  <fo:inline id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:inline>
7715
7897
  <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
@@ -7780,7 +7962,7 @@
7780
7962
  </fo:block>
7781
7963
 
7782
7964
 
7783
- </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
7965
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
7784
7966
 
7785
7967
 
7786
7968
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
@@ -8101,6 +8283,8 @@
8101
8283
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
8102
8284
 
8103
8285
 
8286
+
8287
+
8104
8288
  <fo:block xsl:use-attribute-sets="admonition-name-style">
8105
8289
  <xsl:call-template name="displayAdmonitionName"/>
8106
8290
  </fo:block>
@@ -8111,6 +8295,8 @@
8111
8295
  <fo:block-container xsl:use-attribute-sets="admonition-container-style">
8112
8296
 
8113
8297
 
8298
+
8299
+
8114
8300
  <fo:block-container margin-left="0mm" margin-right="0mm">
8115
8301
  <fo:block>
8116
8302
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
@@ -8318,6 +8504,8 @@
8318
8504
  </xsl:when>
8319
8505
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
8320
8506
  </xsl:choose>
8507
+ </xsl:template><xsl:template match="*[local-name() = 'lang_none']">
8508
+ <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
8321
8509
  </xsl:template><xsl:template name="printEdition">
8322
8510
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
8323
8511
  <xsl:text> </xsl:text>
@@ -8424,8 +8612,30 @@
8424
8612
  </xsl:when>
8425
8613
  <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
8426
8614
  </xsl:choose>
8615
+ </xsl:template><xsl:template name="getMonthLocalizedByNum">
8616
+ <xsl:param name="num"/>
8617
+ <xsl:variable name="monthStr">
8618
+ <xsl:choose>
8619
+ <xsl:when test="$num = '01'">january</xsl:when>
8620
+ <xsl:when test="$num = '02'">february</xsl:when>
8621
+ <xsl:when test="$num = '03'">march</xsl:when>
8622
+ <xsl:when test="$num = '04'">april</xsl:when>
8623
+ <xsl:when test="$num = '05'">may</xsl:when>
8624
+ <xsl:when test="$num = '06'">june</xsl:when>
8625
+ <xsl:when test="$num = '07'">july</xsl:when>
8626
+ <xsl:when test="$num = '08'">august</xsl:when>
8627
+ <xsl:when test="$num = '09'">september</xsl:when>
8628
+ <xsl:when test="$num = '10'">october</xsl:when>
8629
+ <xsl:when test="$num = '11'">november</xsl:when>
8630
+ <xsl:when test="$num = '12'">december</xsl:when>
8631
+ </xsl:choose>
8632
+ </xsl:variable>
8633
+ <xsl:call-template name="getLocalizedString">
8634
+ <xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
8635
+ </xsl:call-template>
8427
8636
  </xsl:template><xsl:template name="insertKeywords">
8428
8637
  <xsl:param name="sorting" select="'true'"/>
8638
+ <xsl:param name="meta" select="'false'"/>
8429
8639
  <xsl:param name="charAtEnd" select="'.'"/>
8430
8640
  <xsl:param name="charDelim" select="', '"/>
8431
8641
  <xsl:choose>
@@ -8433,6 +8643,7 @@
8433
8643
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
8434
8644
  <xsl:sort data-type="text" order="ascending"/>
8435
8645
  <xsl:call-template name="insertKeyword">
8646
+ <xsl:with-param name="meta" select="$meta"/>
8436
8647
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
8437
8648
  <xsl:with-param name="charDelim" select="$charDelim"/>
8438
8649
  </xsl:call-template>
@@ -8441,6 +8652,7 @@
8441
8652
  <xsl:otherwise>
8442
8653
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
8443
8654
  <xsl:call-template name="insertKeyword">
8655
+ <xsl:with-param name="meta" select="$meta"/>
8444
8656
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
8445
8657
  <xsl:with-param name="charDelim" select="$charDelim"/>
8446
8658
  </xsl:call-template>
@@ -8450,7 +8662,15 @@
8450
8662
  </xsl:template><xsl:template name="insertKeyword">
8451
8663
  <xsl:param name="charAtEnd"/>
8452
8664
  <xsl:param name="charDelim"/>
8453
- <xsl:apply-templates/>
8665
+ <xsl:param name="meta"/>
8666
+ <xsl:choose>
8667
+ <xsl:when test="$meta = 'true'">
8668
+ <xsl:value-of select="."/>
8669
+ </xsl:when>
8670
+ <xsl:otherwise>
8671
+ <xsl:apply-templates/>
8672
+ </xsl:otherwise>
8673
+ </xsl:choose>
8454
8674
  <xsl:choose>
8455
8675
  <xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
8456
8676
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
@@ -8495,13 +8715,15 @@
8495
8715
  <dc:description>
8496
8716
  <xsl:variable name="abstract">
8497
8717
 
8498
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
8718
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
8499
8719
 
8500
8720
  </xsl:variable>
8501
8721
  <xsl:value-of select="normalize-space($abstract)"/>
8502
8722
  </dc:description>
8503
8723
  <pdf:Keywords>
8504
- <xsl:call-template name="insertKeywords"/>
8724
+ <xsl:call-template name="insertKeywords">
8725
+ <xsl:with-param name="meta">true</xsl:with-param>
8726
+ </xsl:call-template>
8505
8727
  </pdf:Keywords>
8506
8728
  </rdf:Description>
8507
8729
  <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
@@ -8617,6 +8839,7 @@
8617
8839
 
8618
8840
 
8619
8841
 
8842
+
8620
8843
  <xsl:value-of select="document('')//*/namespace::un"/>
8621
8844
 
8622
8845