metanorma-ribose 2.1.1 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -320,12 +320,13 @@
320
320
  <!-- background image -->
321
321
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
322
322
  <fo:block>
323
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
323
+ <!-- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/> -->
324
+ <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" height="{$pageHeight}mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
324
325
  </fo:block>
325
326
  </fo:block-container>
326
327
 
327
328
  <!-- Ribose logo -->
328
- <fo:block-container absolute-position="fixed" left="171mm" top="246mm" height="30mm" width="40mm">
329
+ <fo:block-container absolute-position="fixed" left="171mm" top="{$pageHeight - 33.4}mm" height="30mm" width="40mm"> <!-- top="246mm" -->
329
330
  <fo:block>
330
331
  <fo:instream-foreign-object content-width="32mm" fox:alt-text="Ribose Logo">
331
332
  <xsl:copy-of select="$Ribose-Logo"/>
@@ -333,7 +334,7 @@
333
334
  </fo:block>
334
335
  </fo:block-container>
335
336
 
336
- <fo:block-container absolute-position="fixed" left="0mm" top="227mm" height="41mm" display-align="after">
337
+ <fo:block-container absolute-position="fixed" left="0mm" top="{$pageHeight - 52.4}mm" height="41mm" display-align="after"> <!-- top="227mm" -->
337
338
  <fo:block font-size="10pt" line-height="1.4">
338
339
  <fo:table table-layout="fixed" width="100%">
339
340
  <fo:table-column column-width="proportional-column-width(13)"/>
@@ -392,7 +393,7 @@
392
393
  </fo:block-container>
393
394
 
394
395
  <!-- title and version -->
395
- <fo:block-container height="60mm" display-align="center">
396
+ <fo:block-container margin-top="{$pageHeight - 279.4}mm" height="60mm" display-align="center">
396
397
  <xsl:variable name="title" select="/rsd:rsd-standard/rsd:bibdata/rsd:title[@language = $lang]"/>
397
398
  <xsl:if test="string-length($title) &gt; 80">
398
399
  <xsl:attribute name="margin-right">-30mm</xsl:attribute>
@@ -1212,14 +1213,41 @@
1212
1213
 
1213
1214
 
1214
1215
 
1215
- <xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
1216
+ <xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:variable name="table_widths_from_if_calculated_">
1217
+ <xsl:for-each select="$table_widths_from_if//table">
1218
+ <xsl:copy>
1219
+ <xsl:copy-of select="@*"/>
1220
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
1221
+ </xsl:copy>
1222
+ </xsl:for-each>
1223
+ </xsl:variable><xsl:variable name="table_widths_from_if_calculated" select="xalan:nodeset($table_widths_from_if_calculated_)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
1216
1224
  false
1217
1225
  </xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
1218
1226
  <xsl:call-template name="getLang"/>
1219
- </xsl:variable><xsl:variable name="pageWidth_">
1220
- 215.9
1227
+ </xsl:variable><xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/><xsl:variable name="papersize_width_">
1228
+ <xsl:choose>
1229
+ <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
1230
+ <xsl:when test="$papersize = 'a4'">210</xsl:when>
1231
+ </xsl:choose>
1232
+ </xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
1233
+ <xsl:choose>
1234
+ <xsl:when test="$papersize = 'letter'">279.4</xsl:when>
1235
+ <xsl:when test="$papersize = 'a4'">297</xsl:when>
1236
+ </xsl:choose>
1237
+ </xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
1238
+ <xsl:choose>
1239
+ <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
1240
+ <xsl:otherwise>
1241
+ 215.9
1242
+ </xsl:otherwise>
1243
+ </xsl:choose>
1221
1244
  </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
1222
- 279.4
1245
+ <xsl:choose>
1246
+ <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
1247
+ <xsl:otherwise>
1248
+ 279.4
1249
+ </xsl:otherwise>
1250
+ </xsl:choose>
1223
1251
  </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
1224
1252
  29
1225
1253
  </xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
@@ -1331,7 +1359,8 @@
1331
1359
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1332
1360
  </xsl:otherwise>
1333
1361
  </xsl:choose>
1334
- </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">
1362
+ </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">
1363
+
1335
1364
 
1336
1365
 
1337
1366
 
@@ -1347,7 +1376,8 @@
1347
1376
 
1348
1377
 
1349
1378
 
1350
- <xsl:attribute name="font-family">OpenSans, STIX Two Math</xsl:attribute>
1379
+ <xsl:attribute name="font-family">OpenSans, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
1380
+ <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
1351
1381
  <xsl:attribute name="font-weight">300</xsl:attribute>
1352
1382
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1353
1383
  <xsl:attribute name="color">rgb(88, 88, 90)</xsl:attribute>
@@ -1364,17 +1394,60 @@
1364
1394
  </xsl:variable>
1365
1395
  <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
1366
1396
 
1397
+ <xsl:variable name="font_family_generic" select="$root-style_/root-style/@font-family-generic"/>
1398
+
1367
1399
  <xsl:for-each select="$root-style_/root-style/@*">
1400
+
1368
1401
  <xsl:choose>
1369
- <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
1402
+ <xsl:when test="local-name() = 'font-family-generic'"><!-- skip, it's using for determine 'sans' or 'serif' --></xsl:when>
1403
+ <xsl:when test="local-name() = 'font-family'">
1404
+
1405
+ <xsl:variable name="font_regional_prefix">
1406
+ <xsl:choose>
1407
+ <xsl:when test="$font_family_generic = 'Sans'">Noto Sans</xsl:when>
1408
+ <xsl:otherwise>Noto Serif</xsl:otherwise>
1409
+ </xsl:choose>
1410
+ </xsl:variable>
1411
+
1370
1412
  <xsl:attribute name="{local-name()}">
1371
- <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
1413
+
1414
+ <xsl:variable name="font_extended">
1415
+ <xsl:choose>
1416
+ <xsl:when test="$lang = 'zh'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
1417
+ <xsl:when test="$lang = 'hk'"><xsl:value-of select="$font_regional_prefix"/> HK</xsl:when>
1418
+ <xsl:when test="$lang = 'jp'"><xsl:value-of select="$font_regional_prefix"/> JP</xsl:when>
1419
+ <xsl:when test="$lang = 'kr'"><xsl:value-of select="$font_regional_prefix"/> KR</xsl:when>
1420
+ <xsl:when test="$lang = 'sc'"><xsl:value-of select="$font_regional_prefix"/> SC</xsl:when>
1421
+ <xsl:when test="$lang = 'tc'"><xsl:value-of select="$font_regional_prefix"/> TC</xsl:when>
1422
+ </xsl:choose>
1423
+ </xsl:variable>
1424
+ <xsl:if test="normalize-space($font_extended) != ''">
1425
+ <xsl:value-of select="$font_regional_prefix"/><xsl:text>, </xsl:text>
1426
+ <xsl:value-of select="$font_extended"/><xsl:text>, </xsl:text>
1427
+ </xsl:if>
1428
+
1429
+ <xsl:value-of select="."/>
1430
+
1431
+ <xsl:if test="$additional_fonts != ''">
1432
+ <xsl:text>, </xsl:text><xsl:value-of select="$additional_fonts"/>
1433
+ </xsl:if>
1372
1434
  </xsl:attribute>
1373
1435
  </xsl:when>
1374
1436
  <xsl:otherwise>
1375
1437
  <xsl:copy-of select="."/>
1376
1438
  </xsl:otherwise>
1377
1439
  </xsl:choose>
1440
+
1441
+ <!-- <xsl:choose>
1442
+ <xsl:when test="local-name() = 'font-family'">
1443
+ <xsl:attribute name="{local-name()}">
1444
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
1445
+ </xsl:attribute>
1446
+ </xsl:when>
1447
+ <xsl:otherwise>
1448
+ <xsl:copy-of select="."/>
1449
+ </xsl:otherwise>
1450
+ </xsl:choose> -->
1378
1451
  </xsl:for-each>
1379
1452
  </xsl:template><xsl:attribute-set name="copyright-statement-style">
1380
1453
 
@@ -1455,11 +1528,12 @@
1455
1528
 
1456
1529
 
1457
1530
 
1531
+
1458
1532
 
1459
1533
 
1460
1534
 
1461
1535
 
1462
- <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
1536
+ <xsl:attribute name="font-family">Source Code Pro, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1463
1537
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1464
1538
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1465
1539
  <xsl:attribute name="line-height">113%</xsl:attribute>
@@ -1474,7 +1548,10 @@
1474
1548
 
1475
1549
  </xsl:attribute-set><xsl:attribute-set name="requirement-style">
1476
1550
 
1551
+
1477
1552
  </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
1553
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1554
+
1478
1555
 
1479
1556
  </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
1480
1557
 
@@ -1500,6 +1577,7 @@
1500
1577
 
1501
1578
 
1502
1579
 
1580
+
1503
1581
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1504
1582
 
1505
1583
 
@@ -1517,6 +1595,7 @@
1517
1595
 
1518
1596
 
1519
1597
 
1598
+
1520
1599
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1521
1600
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1522
1601
 
@@ -1540,6 +1619,7 @@
1540
1619
 
1541
1620
 
1542
1621
 
1622
+
1543
1623
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1544
1624
  <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1545
1625
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
@@ -1571,6 +1651,7 @@
1571
1651
 
1572
1652
 
1573
1653
 
1654
+
1574
1655
 
1575
1656
 
1576
1657
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -1579,6 +1660,7 @@
1579
1660
 
1580
1661
  </xsl:attribute-set><xsl:variable name="table-border_">
1581
1662
 
1663
+
1582
1664
  </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
1583
1665
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
1584
1666
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -1600,6 +1682,7 @@
1600
1682
 
1601
1683
 
1602
1684
 
1685
+
1603
1686
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1604
1687
 
1605
1688
 
@@ -1628,6 +1711,7 @@
1628
1711
 
1629
1712
 
1630
1713
 
1714
+
1631
1715
  <xsl:attribute name="border">0pt solid black</xsl:attribute>
1632
1716
  <xsl:attribute name="font-size">9.5pt</xsl:attribute> <!-- 8pt -->
1633
1717
 
@@ -1639,6 +1723,7 @@
1639
1723
 
1640
1724
 
1641
1725
 
1726
+
1642
1727
 
1643
1728
 
1644
1729
 
@@ -1723,6 +1808,7 @@
1723
1808
 
1724
1809
 
1725
1810
 
1811
+
1726
1812
  <xsl:attribute name="border">0pt solid black</xsl:attribute>
1727
1813
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
1728
1814
 
@@ -1740,7 +1826,7 @@
1740
1826
 
1741
1827
 
1742
1828
 
1743
-
1829
+
1744
1830
 
1745
1831
 
1746
1832
 
@@ -1757,6 +1843,7 @@
1757
1843
 
1758
1844
 
1759
1845
 
1846
+
1760
1847
  <xsl:attribute name="font-size">8pt</xsl:attribute>
1761
1848
 
1762
1849
  </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
@@ -1767,6 +1854,8 @@
1767
1854
 
1768
1855
 
1769
1856
 
1857
+
1858
+
1770
1859
  </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
1771
1860
  <xsl:attribute name="font-size">80%</xsl:attribute>
1772
1861
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
@@ -1782,6 +1871,7 @@
1782
1871
 
1783
1872
 
1784
1873
 
1874
+
1785
1875
  </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
1786
1876
  <xsl:attribute name="text-indent">0</xsl:attribute>
1787
1877
  <xsl:attribute name="start-indent">0</xsl:attribute>
@@ -1816,10 +1906,32 @@
1816
1906
 
1817
1907
 
1818
1908
 
1909
+
1819
1910
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
1820
1911
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1821
1912
  <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1822
1913
 
1914
+ </xsl:attribute-set><xsl:attribute-set name="dl-name-style">
1915
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1916
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+
1929
+
1930
+
1931
+
1932
+ <xsl:attribute name="font-weight">300</xsl:attribute>
1933
+ <xsl:attribute name="color">black</xsl:attribute>
1934
+
1823
1935
  </xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
1824
1936
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
1825
1937
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
@@ -1861,6 +1973,7 @@
1861
1973
 
1862
1974
 
1863
1975
 
1976
+
1864
1977
 
1865
1978
 
1866
1979
 
@@ -1906,7 +2019,8 @@
1906
2019
 
1907
2020
 
1908
2021
 
1909
-
2022
+
2023
+
1910
2024
 
1911
2025
 
1912
2026
 
@@ -1922,6 +2036,7 @@
1922
2036
  </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1923
2037
 
1924
2038
 
2039
+
1925
2040
 
1926
2041
 
1927
2042
 
@@ -1938,6 +2053,8 @@
1938
2053
  <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1939
2054
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1940
2055
 
2056
+ </xsl:attribute-set><xsl:attribute-set name="termnote-p-style">
2057
+
1941
2058
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1942
2059
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
1943
2060
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
@@ -1997,6 +2114,7 @@
1997
2114
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1998
2115
 
1999
2116
 
2117
+
2000
2118
 
2001
2119
 
2002
2120
 
@@ -2045,6 +2163,7 @@
2045
2163
 
2046
2164
 
2047
2165
 
2166
+
2048
2167
  <xsl:attribute name="text-align">left</xsl:attribute>
2049
2168
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
2050
2169
 
@@ -2066,19 +2185,19 @@
2066
2185
  </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2067
2186
 
2068
2187
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2188
+ <xsl:attribute name="width">100%</xsl:attribute>
2189
+ <xsl:attribute name="content-height">100%</xsl:attribute>
2190
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
2069
2191
 
2070
2192
 
2071
- <xsl:attribute name="width">100%</xsl:attribute>
2072
2193
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2073
- <xsl:attribute name="scaling">uniform</xsl:attribute>
2074
2194
 
2075
2195
 
2076
2196
 
2077
-
2078
-
2197
+
2079
2198
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
2080
2199
 
2081
- <xsl:attribute name="font-family">Source Code Pro</xsl:attribute>
2200
+ <xsl:attribute name="font-family">Source Code Pro, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2082
2201
 
2083
2202
 
2084
2203
 
@@ -2172,10 +2291,30 @@
2172
2291
 
2173
2292
 
2174
2293
 
2294
+
2175
2295
  <xsl:attribute name="provisional-distance-between-starts">6mm</xsl:attribute>
2176
2296
 
2177
2297
 
2178
2298
 
2299
+ </xsl:attribute-set><xsl:attribute-set name="list-name-style">
2300
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2301
+
2302
+
2303
+
2304
+
2305
+
2306
+
2307
+
2308
+
2309
+
2310
+
2311
+
2312
+
2313
+
2314
+
2315
+ <xsl:attribute name="font-weight">300</xsl:attribute>
2316
+ <xsl:attribute name="color">black</xsl:attribute>
2317
+
2179
2318
  </xsl:attribute-set><xsl:attribute-set name="list-item-style">
2180
2319
 
2181
2320
 
@@ -2229,6 +2368,7 @@
2229
2368
 
2230
2369
 
2231
2370
 
2371
+
2232
2372
  <xsl:attribute name="font-size">65%</xsl:attribute>
2233
2373
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2234
2374
 
@@ -2255,6 +2395,7 @@
2255
2395
 
2256
2396
 
2257
2397
 
2398
+
2258
2399
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2259
2400
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2260
2401
  <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
@@ -2279,6 +2420,7 @@
2279
2420
 
2280
2421
 
2281
2422
 
2423
+
2282
2424
  <xsl:attribute name="font-size">60%</xsl:attribute>
2283
2425
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2284
2426
 
@@ -2297,6 +2439,7 @@
2297
2439
 
2298
2440
 
2299
2441
 
2442
+
2300
2443
  <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
2301
2444
  <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
2302
2445
  <xsl:attribute name="margin-left">16mm</xsl:attribute>
@@ -2306,6 +2449,9 @@
2306
2449
 
2307
2450
 
2308
2451
  </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
2452
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2453
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2454
+
2309
2455
 
2310
2456
 
2311
2457
 
@@ -2314,8 +2460,6 @@
2314
2460
 
2315
2461
 
2316
2462
 
2317
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2318
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2319
2463
  <xsl:attribute name="padding">2mm</xsl:attribute>
2320
2464
  <xsl:attribute name="padding-top">3mm</xsl:attribute>
2321
2465
 
@@ -2352,6 +2496,7 @@
2352
2496
 
2353
2497
 
2354
2498
 
2499
+
2355
2500
  <xsl:attribute name="font-style">italic</xsl:attribute>
2356
2501
 
2357
2502
 
@@ -2385,6 +2530,10 @@
2385
2530
 
2386
2531
 
2387
2532
 
2533
+ <!-- <xsl:if test="$namespace = 'ieee'">
2534
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2535
+ <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
2536
+ </xsl:if> -->
2388
2537
 
2389
2538
 
2390
2539
 
@@ -2414,6 +2563,7 @@
2414
2563
 
2415
2564
 
2416
2565
 
2566
+
2417
2567
  <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2418
2568
  <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
2419
2569
 
@@ -2442,6 +2592,7 @@
2442
2592
 
2443
2593
 
2444
2594
 
2595
+
2445
2596
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2446
2597
 
2447
2598
 
@@ -2462,6 +2613,7 @@
2462
2613
 
2463
2614
 
2464
2615
 
2616
+
2465
2617
  <xsl:attribute name="font-size">60%</xsl:attribute>
2466
2618
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2467
2619
 
@@ -2481,6 +2633,7 @@
2481
2633
 
2482
2634
 
2483
2635
 
2636
+
2484
2637
  <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
2485
2638
 
2486
2639
  </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
@@ -2594,13 +2747,13 @@
2594
2747
 
2595
2748
  </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">
2596
2749
  <xsl:variable name="nodes_preface_">
2597
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2750
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2598
2751
  <node id="{@id}"/>
2599
2752
  </xsl:for-each>
2600
2753
  </xsl:variable>
2601
2754
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
2602
2755
 
2603
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2756
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2604
2757
  <xsl:sort select="@displayorder" data-type="number"/>
2605
2758
 
2606
2759
  <!-- process Section's title -->
@@ -2666,7 +2819,7 @@
2666
2819
  </xsl:for-each>
2667
2820
  </figures>
2668
2821
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2669
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2822
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2670
2823
  <xsl:sort select="@displayorder" data-type="number"/>
2671
2824
  <xsl:apply-templates select="."/>
2672
2825
  </xsl:for-each>
@@ -2914,6 +3067,8 @@
2914
3067
 
2915
3068
 
2916
3069
 
3070
+
3071
+
2917
3072
 
2918
3073
 
2919
3074
 
@@ -2950,6 +3105,8 @@
2950
3105
 
2951
3106
 
2952
3107
 
3108
+
3109
+
2953
3110
  </xsl:element>
2954
3111
  </xsl:variable>
2955
3112
 
@@ -3095,23 +3252,29 @@
3095
3252
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
3096
3253
  <xsl:param name="continued"/>
3097
3254
  <xsl:if test="normalize-space() != ''">
3098
- <fo:block xsl:use-attribute-sets="table-name-style">
3099
-
3100
-
3101
-
3102
-
3255
+
3256
+
3103
3257
 
3104
- <xsl:choose>
3105
- <xsl:when test="$continued = 'true'">
3258
+ <fo:block xsl:use-attribute-sets="table-name-style">
3259
+
3106
3260
 
3107
- </xsl:when>
3108
- <xsl:otherwise>
3109
- <xsl:apply-templates/>
3110
- </xsl:otherwise>
3111
- </xsl:choose>
3112
-
3261
+
3262
+
3263
+
3264
+ <xsl:choose>
3265
+ <xsl:when test="$continued = 'true'">
3266
+
3267
+ </xsl:when>
3268
+ <xsl:otherwise>
3269
+ <xsl:apply-templates/>
3270
+ </xsl:otherwise>
3271
+ </xsl:choose>
3272
+
3273
+
3274
+ </fo:block>
3275
+
3113
3276
 
3114
- </fo:block>
3277
+
3115
3278
  </xsl:if>
3116
3279
  </xsl:template><xsl:template name="calculate-columns-numbers">
3117
3280
  <xsl:param name="table-row"/>
@@ -3274,8 +3437,9 @@
3274
3437
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
3275
3438
  </xsl:if>
3276
3439
  </xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
3277
- <xsl:param name="table"/>
3278
- <xsl:param name="if">false</xsl:param> <!-- via intermediate format -->
3440
+ <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
3441
+
3442
+ <!-- via intermediate format -->
3279
3443
 
3280
3444
  <!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
3281
3445
 
@@ -3286,9 +3450,8 @@
3286
3450
  <!-- get current table id -->
3287
3451
  <xsl:variable name="table_id" select="@id"/>
3288
3452
  <!-- find table by id in the file 'table_widths' -->
3289
- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
3290
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/>
3291
-
3453
+ <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
3454
+ <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
3292
3455
 
3293
3456
  <!-- table='<xsl:copy-of select="$table"/>' -->
3294
3457
  <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
@@ -3296,24 +3459,13 @@
3296
3459
  <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
3297
3460
 
3298
3461
  <xsl:variable name="table_with_cell_widths_">
3299
- <xsl:choose>
3300
- <xsl:when test="$if = 'true' and normalize-space($table-if) != ''"> <!-- if we read column's width from IF and there is table in IF -->
3301
-
3302
- <!-- Example: <column>10</column>
3303
- <column>11</column>
3304
- -->
3305
- <xsl:apply-templates select="$table-if" mode="determine_cell_widths-if"/>
3306
- </xsl:when>
3307
- <xsl:otherwise>
3308
- <xsl:apply-templates select="xalan:nodeset($table)" mode="determine_cell_widths"/>
3309
- </xsl:otherwise>
3310
- </xsl:choose>
3462
+ <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
3311
3463
  </xsl:variable>
3312
3464
  <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
3313
3465
 
3314
- <xsl:if test="$table_if_debug = 'true'">
3466
+ <!-- <xsl:if test="$table_if_debug = 'true'">
3315
3467
  <xsl:copy-of select="$table_with_cell_widths"/>
3316
- </xsl:if>
3468
+ </xsl:if> -->
3317
3469
 
3318
3470
 
3319
3471
  <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
@@ -3359,8 +3511,12 @@
3359
3511
 
3360
3512
  <xsl:variable name="page_width">
3361
3513
  <xsl:choose>
3362
- <xsl:when test="$if = 'true'"><xsl:value-of select="$table-if/@page-width"/></xsl:when>
3363
- <xsl:otherwise>75</xsl:otherwise>
3514
+ <xsl:when test="$parent_table_page-width != ''">
3515
+ <xsl:value-of select="$parent_table_page-width"/>
3516
+ </xsl:when>
3517
+ <xsl:otherwise>
3518
+ <xsl:value-of select="@page-width"/>
3519
+ </xsl:otherwise>
3364
3520
  </xsl:choose>
3365
3521
  </xsl:variable>
3366
3522
 
@@ -3368,9 +3524,6 @@
3368
3524
  <table_width>
3369
3525
  <xsl:copy-of select="$table_widths"/>
3370
3526
  </table_width>
3371
- <!-- <debug>$table_widths/@width_min=<xsl:value-of select="$table_widths/table/@width_min"/></debug>
3372
- <debug>$table_widths/@width_max=<xsl:value-of select="$table_widths/table/@width_max"/></debug>
3373
- -->
3374
3527
  <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
3375
3528
  </xsl:if>
3376
3529
 
@@ -3381,11 +3534,11 @@
3381
3534
  <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
3382
3535
  <!-- call old algorithm -->
3383
3536
  <case1/>
3384
- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
3537
+ <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
3385
3538
  <xsl:call-template name="calculate-column-widths-proportional">
3386
3539
  <xsl:with-param name="cols-count" select="$cols-count"/>
3387
3540
  <xsl:with-param name="table" select="$table"/>
3388
- </xsl:call-template>
3541
+ </xsl:call-template> -->
3389
3542
  </xsl:when>
3390
3543
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
3391
3544
  <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
@@ -3429,95 +3582,49 @@
3429
3582
  <xsl:otherwise><unknown_case/></xsl:otherwise>
3430
3583
  </xsl:choose>
3431
3584
 
3585
+ </xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
3432
3586
 
3433
- </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths">
3434
- <xsl:copy>
3435
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths"/>
3436
- </xsl:copy>
3437
- </xsl:template><xsl:template match="td | th" mode="determine_cell_widths">
3438
- <xsl:copy>
3439
- <xsl:copy-of select="@*"/>
3587
+ <!-- if nested 'dl' or 'table' -->
3588
+ <xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
3589
+ <parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
3440
3590
 
3441
- <!-- The maximum width is given by the widest line. -->
3442
- <xsl:variable name="widths_max">
3443
- <xsl:for-each select=".//*[local-name() = 'p']">
3444
- <xsl:call-template name="add_width"/>
3445
- </xsl:for-each>
3446
- <xsl:if test="not(*[local-name() = 'p'])">
3447
- <xsl:call-template name="add_width"/>
3448
- </xsl:if>
3449
- </xsl:variable>
3450
- <xsl:variable name="width_max">
3451
- <xsl:for-each select="xalan:nodeset($widths_max)//width">
3452
- <xsl:sort select="." data-type="number" order="descending"/>
3453
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3454
- </xsl:for-each>
3455
- </xsl:variable>
3456
- <xsl:attribute name="width_max">
3457
- <xsl:value-of select="$width_max"/>
3458
- </xsl:attribute>
3591
+ <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
3459
3592
 
3460
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
3461
- <!-- To do: image width -->
3462
- <xsl:variable name="td_text">
3463
- <xsl:apply-templates select="." mode="td_text"/>
3464
- </xsl:variable>
3465
- <xsl:variable name="words">
3466
- <xsl:variable name="string_with_added_zerospaces">
3467
- <xsl:call-template name="add-zero-spaces-java">
3468
- <xsl:with-param name="text" select="$td_text"/>
3469
- </xsl:call-template>
3593
+ <xsl:variable name="parent_table_page-width_">
3594
+ <xsl:if test="$parent_table_id != ''">
3595
+ <!-- determine column number in the parent table -->
3596
+ <xsl:variable name="parent_table_column_number">
3597
+ <xsl:choose>
3598
+ <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
3599
+ <xsl:otherwise> <!-- parent is table -->
3600
+ <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
3601
+ </xsl:otherwise>
3602
+ </xsl:choose>
3470
3603
  </xsl:variable>
3471
- <xsl:call-template name="tokenize">
3472
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
3473
- </xsl:call-template>
3474
- </xsl:variable>
3475
-
3476
- <xsl:variable name="max_word_length">
3477
- <xsl:call-template name="max_length">
3478
- <xsl:with-param name="words" select="xalan:nodeset($words)"/>
3479
- </xsl:call-template>
3480
- </xsl:variable>
3481
- <xsl:variable name="width_min">
3482
- <xsl:value-of select="$max_word_length"/>
3483
- </xsl:variable>
3484
- <xsl:attribute name="width_min">
3485
- <xsl:value-of select="$width_min"/>
3486
- </xsl:attribute>
3487
- <!-- width_max="1" width_min="1.5"> --> <!-- see 'tokenize' template, multiply 1.5 for all latin capitals -->
3488
- <xsl:if test="$width_min &gt; $width_max">
3489
- <xsl:attribute name="width_max">
3490
- <xsl:value-of select="$width_min"/>
3491
- </xsl:attribute>
3492
- </xsl:if>
3493
- <xsl:if test="$width_min = 0">
3494
- <xsl:attribute name="width_min">1</xsl:attribute>
3604
+ <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
3605
+ <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3495
3606
  </xsl:if>
3496
-
3497
- <xsl:apply-templates select="node()" mode="determine_cell_widths"/>
3498
-
3499
- </xsl:copy>
3500
- </xsl:template><xsl:template name="add_width">
3501
- <xsl:variable name="p_text"><xsl:apply-templates select="." mode="td_text"/></xsl:variable>
3502
- <xsl:variable name="p_text_len_" select="string-length(normalize-space($p_text))"/>
3503
-
3504
- <xsl:variable name="p_text_len">
3505
- <xsl:choose>
3506
- <xsl:when test="normalize-space(translate($p_text, concat($upper,'0123456789'), '')) = ''"> <!-- english word in CAPITAL letters -->
3507
- <xsl:value-of select="$p_text_len_ * 1.5"/>
3508
- </xsl:when>
3509
- <xsl:otherwise><xsl:value-of select="$p_text_len_"/></xsl:otherwise>
3510
- </xsl:choose>
3511
3607
  </xsl:variable>
3608
+ <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
3512
3609
 
3513
- <xsl:variable name="math_addon_text">
3514
- <xsl:for-each select=".//*[local-name() = 'math']">
3515
- <xsl:apply-templates mode="td_text"/>
3516
- </xsl:for-each>
3517
- </xsl:variable>
3518
- <xsl:variable name="math_addon_length" select="string-length(normalize-space($math_addon_text)) * 0.2"/> <!-- plus 20% -->
3610
+ <!-- get current table id -->
3611
+ <xsl:variable name="table_id" select="@id"/>
3612
+
3613
+ <xsl:choose>
3614
+ <xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
3615
+ <!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
3616
+ <xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
3617
+ </xsl:when>
3618
+ <xsl:otherwise>
3619
+ <!-- recalculate columns width based on parent table width -->
3620
+ <xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
3621
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm">
3622
+ <xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
3623
+ </xsl:call-template>
3624
+ </xsl:for-each>
3625
+ </xsl:otherwise>
3626
+ </xsl:choose>
3519
3627
 
3520
- <width><xsl:value-of select="$p_text_len + $math_addon_length"/></width>
3521
3628
  </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
3522
3629
  <xsl:copy>
3523
3630
  <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
@@ -3565,12 +3672,18 @@
3565
3672
  <fo:table-row>
3566
3673
  <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">
3567
3674
 
3568
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3569
- <xsl:with-param name="continued">true</xsl:with-param>
3570
- </xsl:apply-templates>
3571
3675
 
3572
3676
 
3573
3677
 
3678
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3679
+ <xsl:with-param name="continued">true</xsl:with-param>
3680
+ </xsl:apply-templates>
3681
+
3682
+
3683
+
3684
+
3685
+
3686
+
3574
3687
  </fo:table-cell>
3575
3688
  </fo:table-row>
3576
3689
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3610,77 +3723,91 @@
3610
3723
  </xsl:choose>
3611
3724
  </xsl:variable>
3612
3725
 
3613
- <fo:table keep-with-previous="always">
3614
- <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3615
- <xsl:variable name="name" select="local-name()"/>
3726
+
3727
+ <xsl:variable name="tableWithNotesAndFootnotes">
3728
+
3729
+ <fo:table keep-with-previous="always">
3730
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3731
+ <xsl:variable name="name" select="local-name()"/>
3732
+ <xsl:choose>
3733
+ <xsl:when test="$name = 'border-top'">
3734
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3735
+ </xsl:when>
3736
+ <xsl:when test="$name = 'border'">
3737
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3738
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3739
+ </xsl:when>
3740
+ <xsl:otherwise>
3741
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3742
+ </xsl:otherwise>
3743
+ </xsl:choose>
3744
+ </xsl:for-each>
3745
+
3746
+
3747
+
3616
3748
  <xsl:choose>
3617
- <xsl:when test="$name = 'border-top'">
3618
- <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3619
- </xsl:when>
3620
- <xsl:when test="$name = 'border'">
3621
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3622
- <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3749
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3750
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3751
+ <fo:table-column column-width="{@width}"/>
3752
+ </xsl:for-each>
3623
3753
  </xsl:when>
3624
3754
  <xsl:otherwise>
3625
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3755
+ <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3756
+ <xsl:call-template name="insertTableColumnWidth">
3757
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3758
+ </xsl:call-template>
3626
3759
  </xsl:otherwise>
3627
3760
  </xsl:choose>
3628
- </xsl:for-each>
3629
-
3630
-
3631
-
3632
- <xsl:choose>
3633
- <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3634
- <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
3635
- <fo:table-column column-width="{@width}"/>
3636
- </xsl:for-each>
3637
- </xsl:when>
3638
- <xsl:otherwise>
3639
- <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3640
- <xsl:call-template name="insertTableColumnWidth">
3641
- <xsl:with-param name="colwidths" select="$colwidths"/>
3642
- </xsl:call-template>
3643
- </xsl:otherwise>
3644
- </xsl:choose>
3645
-
3646
- <fo:table-body>
3647
- <fo:table-row>
3648
- <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3649
-
3650
-
3761
+
3762
+ <fo:table-body>
3763
+ <fo:table-row>
3764
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3765
+
3766
+
3651
3767
 
3652
-
3653
-
3654
- <!-- fn will be processed inside 'note' processing -->
3655
-
3656
-
3657
-
3658
-
3659
-
3660
-
3661
- <!-- for BSI (not PAS) display Notes before footnotes -->
3662
-
3663
-
3664
- <!-- except gb and bsi -->
3665
-
3666
- <xsl:apply-templates select="../*[local-name()='note']"/>
3667
3768
 
3668
-
3669
-
3670
- <!-- horizontal row separator -->
3671
-
3672
-
3673
- <!-- fn processing -->
3674
- <xsl:call-template name="table_fn_display"/>
3675
-
3676
- <!-- for PAS display Notes after footnotes -->
3677
-
3678
-
3679
- </fo:table-cell>
3680
- </fo:table-row>
3681
- </fo:table-body>
3682
-
3683
- </fo:table>
3769
+
3770
+ <!-- fn will be processed inside 'note' processing -->
3771
+
3772
+
3773
+
3774
+
3775
+
3776
+
3777
+ <!-- for BSI (not PAS) display Notes before footnotes -->
3778
+
3779
+
3780
+ <!-- except gb and bsi -->
3781
+
3782
+ <xsl:apply-templates select="../*[local-name()='note']"/>
3783
+
3784
+
3785
+
3786
+ <!-- horizontal row separator -->
3787
+
3788
+
3789
+ <!-- fn processing -->
3790
+
3791
+ <xsl:call-template name="table_fn_display"/>
3792
+
3793
+
3794
+
3795
+ <!-- for PAS display Notes after footnotes -->
3796
+
3797
+
3798
+ </fo:table-cell>
3799
+ </fo:table-row>
3800
+ </fo:table-body>
3801
+
3802
+ </fo:table>
3803
+ </xsl:variable>
3804
+
3805
+ <xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''">
3806
+ <xsl:copy-of select="$tableWithNotesAndFootnotes"/>
3807
+ </xsl:if>
3808
+
3809
+
3810
+
3684
3811
  </xsl:if>
3685
3812
  </xsl:template><xsl:template match="*[local-name()='tbody']">
3686
3813
 
@@ -3769,6 +3896,9 @@
3769
3896
 
3770
3897
 
3771
3898
 
3899
+
3900
+
3901
+
3772
3902
 
3773
3903
 
3774
3904
  <xsl:call-template name="setTableRowAttributes"/>
@@ -3787,6 +3917,8 @@
3787
3917
 
3788
3918
 
3789
3919
 
3920
+
3921
+
3790
3922
  <xsl:variable name="number"><xsl:number/></xsl:variable>
3791
3923
  <xsl:if test="$number mod 2 = 0">
3792
3924
  <xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
@@ -3874,6 +4006,8 @@
3874
4006
 
3875
4007
 
3876
4008
 
4009
+
4010
+
3877
4011
 
3878
4012
 
3879
4013
 
@@ -3945,7 +4079,11 @@
3945
4079
 
3946
4080
  <xsl:variable name="gen_id" select="generate-id(.)"/>
3947
4081
  <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
3948
- <xsl:variable name="reference" select="@reference"/>
4082
+ <xsl:variable name="reference_">
4083
+ <xsl:value-of select="@reference"/>
4084
+ <xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
4085
+ </xsl:variable>
4086
+ <xsl:variable name="reference" select="normalize-space($reference_)"/>
3949
4087
  <!-- fn sequence number in document -->
3950
4088
  <xsl:variable name="current_fn_number">
3951
4089
  <xsl:choose>
@@ -3965,6 +4103,7 @@
3965
4103
  <xsl:variable name="footnote_inline">
3966
4104
  <fo:inline xsl:use-attribute-sets="fn-num-style">
3967
4105
 
4106
+
3968
4107
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
3969
4108
  <xsl:value-of select="$current_fn_number_text"/>
3970
4109
  </fo:basic-link>
@@ -3986,8 +4125,12 @@
3986
4125
  <fo:block xsl:use-attribute-sets="fn-body-style">
3987
4126
 
3988
4127
 
4128
+
3989
4129
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
3990
4130
 
4131
+
4132
+
4133
+
3991
4134
  <xsl:value-of select="$current_fn_number_text"/>
3992
4135
  </fo:inline>
3993
4136
  <xsl:apply-templates/>
@@ -4020,7 +4163,7 @@
4020
4163
  <xsl:copy-of select="node()"/>
4021
4164
  </fn>
4022
4165
  </xsl:for-each>
4023
- <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']/*">
4166
+ <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']/*">
4024
4167
  <xsl:sort select="@displayorder" data-type="number"/>
4025
4168
  <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])]">
4026
4169
  <!-- copy unique fn -->
@@ -4303,11 +4446,19 @@
4303
4446
 
4304
4447
 
4305
4448
 
4449
+
4450
+ <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
4451
+ <xsl:attribute name="margin-top">0</xsl:attribute>
4452
+ </xsl:if>
4453
+
4306
4454
  <fo:block>
4307
4455
 
4308
4456
 
4309
4457
 
4310
4458
 
4459
+ <xsl:apply-templates select="*[local-name() = 'name']">
4460
+ <xsl:with-param name="process">true</xsl:with-param>
4461
+ </xsl:apply-templates>
4311
4462
 
4312
4463
  <xsl:if test="$isGenerateTableIF = 'true'">
4313
4464
  <!-- to determine start of table -->
@@ -4330,6 +4481,7 @@
4330
4481
  </xsl:choose>
4331
4482
 
4332
4483
 
4484
+
4333
4485
  <xsl:choose>
4334
4486
  <xsl:when test="$isGenerateTableIF = 'true'">
4335
4487
  <!-- generate IF for table widths -->
@@ -4458,6 +4610,18 @@
4458
4610
  </xsl:if> <!-- END: a few components -->
4459
4611
  </fo:block-container>
4460
4612
  </fo:block-container>
4613
+
4614
+ <xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
4615
+ <xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
4616
+ </xsl:if>
4617
+
4618
+ </xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
4619
+ <xsl:param name="process">false</xsl:param>
4620
+ <xsl:if test="$process = 'true'">
4621
+ <fo:block xsl:use-attribute-sets="dl-name-style">
4622
+ <xsl:apply-templates/>
4623
+ </fo:block>
4624
+ </xsl:if>
4461
4625
  </xsl:template><xsl:template name="setColumnWidth_dl">
4462
4626
  <xsl:param name="colwidths"/>
4463
4627
  <xsl:param name="maxlength_dt"/>
@@ -4466,6 +4630,11 @@
4466
4630
  <!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
4467
4631
 
4468
4632
  <xsl:choose>
4633
+ <xsl:when test="xalan:nodeset($colwidths)/autolayout">
4634
+ <xsl:call-template name="insertTableColumnWidth">
4635
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4636
+ </xsl:call-template>
4637
+ </xsl:when>
4469
4638
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
4470
4639
  <fo:table-column column-width="50%"/>
4471
4640
  <fo:table-column column-width="50%"/>
@@ -4718,12 +4887,24 @@
4718
4887
  </td>
4719
4888
  <td>
4720
4889
 
4721
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()"/>
4890
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4891
+
4892
+ <!-- get paragraphs from nested 'dl' -->
4893
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4894
+
4722
4895
 
4723
4896
  </td>
4724
4897
  </tr>
4725
4898
 
4726
- </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='em']">
4899
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
4900
+ <xsl:for-each select="*[local-name() = 'dt']">
4901
+ <p>
4902
+ <xsl:copy-of select="node()"/>
4903
+ <xsl:text> </xsl:text>
4904
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
4905
+ </p>
4906
+ </xsl:for-each>
4907
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
4727
4908
  <fo:inline font-style="italic">
4728
4909
  <xsl:apply-templates/>
4729
4910
  </fo:inline>
@@ -4759,7 +4940,7 @@
4759
4940
 
4760
4941
 
4761
4942
 
4762
-
4943
+ <!-- 10 -->
4763
4944
 
4764
4945
 
4765
4946
 
@@ -5636,6 +5817,12 @@
5636
5817
  </xsl:variable>
5637
5818
  <fo:inline xsl:use-attribute-sets="link-style">
5638
5819
 
5820
+ <xsl:if test="starts-with(normalize-space(@target), 'mailto:')">
5821
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
5822
+ </xsl:if>
5823
+
5824
+
5825
+
5639
5826
 
5640
5827
 
5641
5828
 
@@ -5648,6 +5835,7 @@
5648
5835
  </xsl:if>
5649
5836
 
5650
5837
 
5838
+
5651
5839
  <xsl:choose>
5652
5840
  <xsl:when test="$target_text = ''">
5653
5841
  <xsl:apply-templates/>
@@ -5860,6 +6048,7 @@
5860
6048
 
5861
6049
 
5862
6050
 
6051
+
5863
6052
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5864
6053
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
5865
6054
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -5881,6 +6070,7 @@
5881
6070
  </xsl:when>
5882
6071
  <xsl:otherwise>
5883
6072
 
6073
+
5884
6074
  <xsl:text>:</xsl:text>
5885
6075
 
5886
6076
 
@@ -5900,6 +6090,7 @@
5900
6090
  </xsl:when>
5901
6091
  <xsl:otherwise>
5902
6092
 
6093
+
5903
6094
  <xsl:text>:</xsl:text>
5904
6095
 
5905
6096
 
@@ -5911,7 +6102,19 @@
5911
6102
  <xsl:value-of select="$suffix"/>
5912
6103
  </xsl:if>
5913
6104
  </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
5914
- <fo:inline><xsl:apply-templates/></fo:inline>
6105
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
6106
+ <xsl:choose>
6107
+ <xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
6108
+ <fo:inline xsl:use-attribute-sets="termnote-p-style">
6109
+ <xsl:apply-templates/>
6110
+ </fo:inline>
6111
+ </xsl:when>
6112
+ <xsl:otherwise>
6113
+ <fo:block xsl:use-attribute-sets="termnote-p-style">
6114
+ <xsl:apply-templates/>
6115
+ </fo:block>
6116
+ </xsl:otherwise>
6117
+ </xsl:choose>
5915
6118
  </xsl:template><xsl:template match="*[local-name() = 'terms']">
5916
6119
  <!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
5917
6120
  <fo:block id="{@id}">
@@ -6666,6 +6869,9 @@
6666
6869
  <fo:block xsl:use-attribute-sets="figure-name-style">
6667
6870
 
6668
6871
 
6872
+
6873
+
6874
+
6669
6875
  <xsl:apply-templates/>
6670
6876
  </fo:block>
6671
6877
  </xsl:if>
@@ -6726,9 +6932,9 @@
6726
6932
  <xsl:apply-templates/>
6727
6933
  </xsl:otherwise>
6728
6934
  </xsl:choose>
6729
- </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">
6935
+ </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">
6730
6936
  <xsl:value-of select="."/>
6731
- </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
6937
+ </xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
6732
6938
  <xsl:text> </xsl:text>
6733
6939
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
6734
6940
  <xsl:copy>
@@ -6801,9 +7007,12 @@
6801
7007
 
6802
7008
 
6803
7009
 
7010
+ <!-- 9 -->
6804
7011
 
6805
7012
 
6806
-
7013
+ <!-- <xsl:if test="$namespace = 'ieee'">
7014
+ <xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if>
7015
+ </xsl:if> -->
6807
7016
 
6808
7017
 
6809
7018
 
@@ -6901,7 +7110,7 @@
6901
7110
  <xsl:for-each select="xalan:nodeset($text_step4)/node()">
6902
7111
  <xsl:choose>
6903
7112
  <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
6904
- <xsl:call-template name="interspers">
7113
+ <xsl:call-template name="interspers-java">
6905
7114
  <xsl:with-param name="str" select="."/>
6906
7115
  </xsl:call-template>
6907
7116
  </xsl:when>
@@ -6951,6 +7160,10 @@
6951
7160
  <xsl:with-param name="char" select="$char"/>
6952
7161
  </xsl:call-template>
6953
7162
  </xsl:if>
7163
+ </xsl:template><xsl:template name="interspers-java">
7164
+ <xsl:param name="str"/>
7165
+ <xsl:param name="char" select="$zero_width_space"/>
7166
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
6954
7167
  </xsl:template><xsl:template match="*" mode="syntax_highlight">
6955
7168
  <xsl:apply-templates mode="syntax_highlight"/>
6956
7169
  </xsl:template><xsl:variable name="syntax_highlight_styles_">
@@ -7260,10 +7473,14 @@
7260
7473
  </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
7261
7474
  <xsl:variable name="element">inline
7262
7475
 
7476
+
7263
7477
  </xsl:variable>
7264
7478
  <xsl:choose>
7265
7479
  <xsl:when test="contains($element, 'block')">
7266
7480
  <fo:block xsl:use-attribute-sets="example-p-style">
7481
+
7482
+
7483
+
7267
7484
  <xsl:apply-templates/>
7268
7485
  </fo:block>
7269
7486
  </xsl:when>
@@ -7381,6 +7598,7 @@
7381
7598
  </xsl:if>
7382
7599
  <fo:block xsl:use-attribute-sets="example-p-style">
7383
7600
 
7601
+
7384
7602
  <xsl:apply-templates/>
7385
7603
  </fo:block>
7386
7604
  </fo:block-container>
@@ -7537,6 +7755,8 @@
7537
7755
 
7538
7756
 
7539
7757
 
7758
+
7759
+
7540
7760
  <fo:basic-link fox:alt-text="{@citeas}">
7541
7761
  <xsl:if test="normalize-space(@citeas) = ''">
7542
7762
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
@@ -7597,6 +7817,7 @@
7597
7817
 
7598
7818
 
7599
7819
 
7820
+
7600
7821
  1.5
7601
7822
 
7602
7823
 
@@ -7906,6 +8127,11 @@
7906
8127
  </xsl:otherwise>
7907
8128
  </xsl:choose>
7908
8129
  </xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
8130
+
8131
+ <xsl:apply-templates select="*[local-name() = 'name']">
8132
+ <xsl:with-param name="process">true</xsl:with-param>
8133
+ </xsl:apply-templates>
8134
+
7909
8135
  <fo:list-block xsl:use-attribute-sets="list-style">
7910
8136
 
7911
8137
 
@@ -7916,12 +8142,23 @@
7916
8142
 
7917
8143
 
7918
8144
 
8145
+ <xsl:if test="*[local-name() = 'name']">
8146
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
8147
+ </xsl:if>
8148
+
7919
8149
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
7920
8150
  </fo:list-block>
7921
8151
  <!-- <xsl:for-each select="./iho:note">
7922
8152
  <xsl:call-template name="note"/>
7923
8153
  </xsl:for-each> -->
7924
8154
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
8155
+ </xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
8156
+ <xsl:param name="process">false</xsl:param>
8157
+ <xsl:if test="$process = 'true'">
8158
+ <fo:block xsl:use-attribute-sets="list-name-style">
8159
+ <xsl:apply-templates/>
8160
+ </fo:block>
8161
+ </xsl:if>
7925
8162
  </xsl:template><xsl:template match="*[local-name()='li']">
7926
8163
  <fo:list-item xsl:use-attribute-sets="list-item-style">
7927
8164
  <xsl:copy-of select="@id"/>
@@ -7933,6 +8170,8 @@
7933
8170
 
7934
8171
 
7935
8172
 
8173
+
8174
+
7936
8175
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7937
8176
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7938
8177
  <xsl:call-template name="append_add-style"/>
@@ -8190,7 +8429,7 @@
8190
8429
  </fo:block>
8191
8430
 
8192
8431
 
8193
- </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
8432
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
8194
8433
 
8195
8434
 
8196
8435
  <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
@@ -8199,73 +8438,46 @@
8199
8438
  <fo:block>
8200
8439
  <fo:inline>
8201
8440
 
8202
- <xsl:number format="1."/>
8441
+ <xsl:number format="1." count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
8203
8442
 
8204
8443
  </fo:inline>
8205
8444
  </fo:block>
8206
8445
  </fo:list-item-label>
8207
8446
  <fo:list-item-body start-indent="body-start()">
8208
8447
  <fo:block>
8209
- <xsl:if test="rsd:docidentifier">
8448
+ <xsl:variable name="docidentifier">
8210
8449
  <xsl:choose>
8211
8450
  <xsl:when test="rsd:docidentifier/@type = 'metanorma'"/>
8212
- <xsl:otherwise><fo:inline><xsl:value-of select="rsd:docidentifier[not(@type = 'metanorma-ordinal')]"/>, </fo:inline></xsl:otherwise>
8451
+ <xsl:otherwise>
8452
+ <xsl:value-of select="rsd:docidentifier[not(@type = 'metanorma-ordinal')]"/>
8453
+ </xsl:otherwise>
8213
8454
  </xsl:choose>
8455
+ </xsl:variable>
8456
+ <xsl:value-of select="$docidentifier"/>
8457
+ <xsl:if test="normalize-space($docidentifier) != '' and rsd:formattedref">
8458
+ <xsl:text>, </xsl:text>
8214
8459
  </xsl:if>
8215
- <xsl:choose>
8216
- <xsl:when test="rsd:title[@type = 'main' and @language = 'en']">
8217
- <xsl:apply-templates select="rsd:title[@type = 'main' and @language = 'en']"/>
8218
- </xsl:when>
8219
- <xsl:otherwise>
8220
- <xsl:apply-templates select="rsd:title"/>
8221
- </xsl:otherwise>
8222
- </xsl:choose>
8223
8460
  <xsl:apply-templates select="rsd:formattedref"/>
8224
8461
  </fo:block>
8225
8462
  </fo:list-item-body>
8226
8463
  </fo:list-item>
8227
8464
  </fo:list-block>
8465
+ <!-- rsd -->
8228
8466
 
8229
8467
 
8230
8468
  </xsl:template><xsl:template name="processBibitem">
8231
8469
 
8232
8470
 
8471
+ <!-- start RSD bibitem processing -->
8233
8472
  <xsl:if test=".//rsd:fn">
8234
8473
  <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
8235
8474
  </xsl:if>
8236
- <xsl:value-of select="rsd:docidentifier"/>
8475
+ <xsl:variable name="docidentifier" select="rsd:docidentifier"/>
8476
+ <xsl:value-of select="$docidentifier"/>
8237
8477
  <xsl:apply-templates select="rsd:note"/>
8238
- <xsl:if test="rsd:docidentifier">, </xsl:if>
8239
- <xsl:choose>
8240
- <xsl:when test="rsd:formattedref">
8241
- <xsl:apply-templates select="rsd:formattedref"/>
8242
- </xsl:when>
8243
- <xsl:otherwise>
8244
- <xsl:for-each select="rsd:contributor[rsd:role/@type='publisher']/rsd:organization/rsd:name">
8245
- <xsl:apply-templates/>
8246
- <xsl:if test="position() != last()">, </xsl:if>
8247
- <xsl:if test="position() = last()">: </xsl:if>
8248
- </xsl:for-each>
8249
- <!-- rsd:docidentifier -->
8250
-
8251
- <xsl:choose>
8252
- <xsl:when test="rsd:title[@type = 'main' and @language = 'en']">
8253
- <fo:inline><xsl:apply-templates select="rsd:title[@type = 'main' and @language = 'en']"/><xsl:text>. </xsl:text></fo:inline>
8254
- </xsl:when>
8255
- <xsl:otherwise>
8256
- <fo:inline><xsl:apply-templates select="rsd:title"/><xsl:text>. </xsl:text></fo:inline>
8257
- </xsl:otherwise>
8258
- </xsl:choose>
8259
-
8260
- <xsl:for-each select="rsd:contributor[rsd:role/@type='publisher']/rsd:organization/rsd:name">
8261
- <xsl:apply-templates/>
8262
- <xsl:if test="position() != last()">, </xsl:if>
8263
- </xsl:for-each>
8264
- <xsl:if test="rsd:date[@type='published']/rsd:on">
8265
- <xsl:text> (</xsl:text><xsl:value-of select="rsd:date[@type='published']/rsd:on"/><xsl:text>)</xsl:text>
8266
- </xsl:if>
8267
- </xsl:otherwise>
8268
- </xsl:choose>
8478
+ <xsl:if test="normalize-space($docidentifier) != '' and rsd:formattedref">, </xsl:if>
8479
+ <xsl:apply-templates select="rsd:formattedref"/>
8480
+ <!-- END RSD bibitem processing -->
8269
8481
 
8270
8482
  </xsl:template><xsl:template name="processBibitemDocId">
8271
8483
  <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')]"/>
@@ -8574,12 +8786,16 @@
8574
8786
  <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
8575
8787
 
8576
8788
 
8789
+
8790
+
8577
8791
 
8578
8792
 
8579
8793
 
8580
8794
  <fo:block-container xsl:use-attribute-sets="admonition-container-style">
8581
8795
 
8582
8796
 
8797
+
8798
+
8583
8799
  <fo:block xsl:use-attribute-sets="admonition-name-style">
8584
8800
  <xsl:call-template name="displayAdmonitionName"/>
8585
8801
  </fo:block>
@@ -8592,25 +8808,32 @@
8592
8808
  </fo:block-container>
8593
8809
 
8594
8810
  </xsl:template><xsl:template name="displayAdmonitionName">
8595
-
8811
+ <xsl:param name="sep"/> <!-- Example: ' - ' -->
8812
+ <!-- <xsl:choose>
8813
+ <xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8814
+ <xsl:choose>
8815
+ <xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
8816
+ <xsl:otherwise>
8817
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8818
+ </xsl:otherwise>
8819
+ </xsl:choose>
8820
+ </xsl:when>
8821
+ <xsl:otherwise>
8596
8822
  <xsl:apply-templates select="*[local-name() = 'name']"/>
8597
8823
  <xsl:if test="not(*[local-name() = 'name'])">
8598
8824
  <xsl:apply-templates select="@type"/>
8599
8825
  </xsl:if>
8600
-
8601
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
8602
- <xsl:apply-templates/>
8603
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
8604
- <xsl:variable name="admonition_type_">
8605
- <xsl:call-template name="getLocalizedString">
8606
- <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
8607
- </xsl:call-template>
8826
+ </xsl:otherwise>
8827
+ </xsl:choose> -->
8828
+ <xsl:variable name="name">
8829
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8608
8830
  </xsl:variable>
8609
- <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
8610
- <xsl:value-of select="$admonition_type"/>
8611
- <xsl:if test="$admonition_type = ''">
8612
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
8831
+ <xsl:copy-of select="$name"/>
8832
+ <xsl:if test="normalize-space($name) != ''">
8833
+ <xsl:value-of select="$sep"/>
8613
8834
  </xsl:if>
8835
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
8836
+ <xsl:apply-templates/>
8614
8837
  </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
8615
8838
 
8616
8839
  <fo:block xsl:use-attribute-sets="admonition-p-style">
@@ -8781,6 +9004,8 @@
8781
9004
  </xsl:when>
8782
9005
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
8783
9006
  </xsl:choose>
9007
+ </xsl:template><xsl:template match="*[local-name() = 'lang_none']">
9008
+ <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
8784
9009
  </xsl:template><xsl:template name="printEdition">
8785
9010
  <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
8786
9011
  <xsl:text> </xsl:text>
@@ -8887,6 +9112,27 @@
8887
9112
  </xsl:when>
8888
9113
  <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
8889
9114
  </xsl:choose>
9115
+ </xsl:template><xsl:template name="getMonthLocalizedByNum">
9116
+ <xsl:param name="num"/>
9117
+ <xsl:variable name="monthStr">
9118
+ <xsl:choose>
9119
+ <xsl:when test="$num = '01'">january</xsl:when>
9120
+ <xsl:when test="$num = '02'">february</xsl:when>
9121
+ <xsl:when test="$num = '03'">march</xsl:when>
9122
+ <xsl:when test="$num = '04'">april</xsl:when>
9123
+ <xsl:when test="$num = '05'">may</xsl:when>
9124
+ <xsl:when test="$num = '06'">june</xsl:when>
9125
+ <xsl:when test="$num = '07'">july</xsl:when>
9126
+ <xsl:when test="$num = '08'">august</xsl:when>
9127
+ <xsl:when test="$num = '09'">september</xsl:when>
9128
+ <xsl:when test="$num = '10'">october</xsl:when>
9129
+ <xsl:when test="$num = '11'">november</xsl:when>
9130
+ <xsl:when test="$num = '12'">december</xsl:when>
9131
+ </xsl:choose>
9132
+ </xsl:variable>
9133
+ <xsl:call-template name="getLocalizedString">
9134
+ <xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param>
9135
+ </xsl:call-template>
8890
9136
  </xsl:template><xsl:template name="insertKeywords">
8891
9137
  <xsl:param name="sorting" select="'true'"/>
8892
9138
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -8958,7 +9204,7 @@
8958
9204
  <dc:description>
8959
9205
  <xsl:variable name="abstract">
8960
9206
 
8961
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
9207
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
8962
9208
 
8963
9209
  </xsl:variable>
8964
9210
  <xsl:value-of select="normalize-space($abstract)"/>
@@ -9083,6 +9329,7 @@
9083
9329
 
9084
9330
 
9085
9331
 
9332
+
9086
9333
  <xsl:value-of select="document('')//*/namespace::rsd"/>
9087
9334
 
9088
9335