metanorma-ribose 2.6.6 → 2.6.8

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.
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ribose="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ribose="https://www.metanorma.org/ns/standoc" xmlns:mn="https://www.metanorma.org/ns/xslt" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -18,7 +18,7 @@
18
18
  </xsl:variable>
19
19
 
20
20
  <xsl:variable name="contents_">
21
- <contents>
21
+ <mn:contents>
22
22
 
23
23
  <xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:abstract" mode="contents"/>
24
24
  <xsl:apply-templates select="/ribose:metanorma/ribose:preface/ribose:foreword" mode="contents"/>
@@ -30,7 +30,7 @@
30
30
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
31
31
 
32
32
  <xsl:call-template name="processTablesFigures_Contents"/>
33
- </contents>
33
+ </mn:contents>
34
34
  </xsl:variable>
35
35
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
36
36
 
@@ -56,7 +56,6 @@
56
56
  </xsl:variable>
57
57
 
58
58
  <xsl:template match="/">
59
- <xsl:call-template name="namespaceCheck"/>
60
59
  <fo:root xml:lang="{$lang}">
61
60
  <xsl:variable name="root-style">
62
61
  <root-style xsl:use-attribute-sets="root-style"/>
@@ -603,14 +602,14 @@
603
602
 
604
603
  <xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
605
604
 
606
- <xsl:if test="$contents//item[@display = 'true']">
605
+ <xsl:if test="$contents//mn:item[@display = 'true']">
607
606
 
608
607
  <fo:block-container margin-left="32mm" margin-right="-17mm">
609
608
  <fo:block-container margin-left="0mm" margin-right="0mm">
610
- <xsl:for-each select="$contents//item[@display = 'true']">
609
+ <xsl:for-each select="$contents//mn:item[@display = 'true']">
611
610
  <fo:block font-size="13pt" role="TOCI">
612
611
  <xsl:if test="@level = 1">
613
- <xsl:if test="preceding-sibling::item[@display = 'true' and @level = 1]">
612
+ <xsl:if test="preceding-sibling::mn:item[@display = 'true' and @level = 1]">
614
613
  <xsl:attribute name="space-before">16pt</xsl:attribute>
615
614
  </xsl:if>
616
615
  <xsl:attribute name="space-after">4pt</xsl:attribute>
@@ -624,10 +623,10 @@
624
623
  <xsl:attribute name="space-after">5pt</xsl:attribute>
625
624
  </xsl:if>
626
625
  <fo:block text-align-last="justify">
627
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
626
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}">
628
627
  <xsl:value-of select="@section"/>
629
628
  <xsl:text> </xsl:text>
630
- <xsl:apply-templates select="title"/>
629
+ <xsl:apply-templates select="mn:title"/>
631
630
  <xsl:text>  </xsl:text>
632
631
  <fo:inline>
633
632
  <fo:leader leader-pattern="rule" rule-thickness="0.2mm"/>
@@ -639,21 +638,21 @@
639
638
  </xsl:for-each>
640
639
 
641
640
  <!-- List of Tables -->
642
- <xsl:if test="$contents//tables/table">
641
+ <xsl:if test="$contents//mn:tables/mn:table">
643
642
  <xsl:call-template name="insertListOf_Title">
644
643
  <xsl:with-param name="title" select="$title-list-tables"/>
645
644
  </xsl:call-template>
646
- <xsl:for-each select="$contents//tables/table">
645
+ <xsl:for-each select="$contents//mn:tables/mn:table">
647
646
  <xsl:call-template name="insertListOf_Item"/>
648
647
  </xsl:for-each>
649
648
  </xsl:if>
650
649
 
651
650
  <!-- List of Figures -->
652
- <xsl:if test="$contents//figures/figure">
651
+ <xsl:if test="$contents//mn:figures/mn:figure">
653
652
  <xsl:call-template name="insertListOf_Title">
654
653
  <xsl:with-param name="title" select="$title-list-figures"/>
655
654
  </xsl:call-template>
656
- <xsl:for-each select="$contents//figures/figure">
655
+ <xsl:for-each select="$contents//mn:figures/mn:figure">
657
656
  <xsl:call-template name="insertListOf_Item"/>
658
657
  </xsl:for-each>
659
658
  </xsl:if>
@@ -735,12 +734,12 @@
735
734
  <xsl:value-of select="local-name()"/>
736
735
  </xsl:variable>
737
736
 
738
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
739
- <title>
737
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
738
+ <mn:title>
740
739
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
741
- </title>
740
+ </mn:title>
742
741
  <xsl:apply-templates mode="contents"/>
743
- </item>
742
+ </mn:item>
744
743
 
745
744
  </xsl:if>
746
745
 
@@ -1319,34 +1318,25 @@
1319
1318
  </xsl:if>
1320
1319
  </xsl:template>
1321
1320
 
1322
- <!-- <xsl:strip-space elements="ribose:xref"/> -->
1321
+ <!-- https://www.metanorma.org/ns/standoc -->
1322
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
1323
1323
 
1324
- <xsl:variable name="namespace_full_">
1325
- <xsl:choose>
1326
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
1327
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
1328
- </xsl:choose>
1329
- </xsl:variable>
1330
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
1324
+ <!-- https://www.metanorma.org/ns/xsl -->
1325
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
1331
1326
 
1332
- <xsl:variable name="root_element_">
1333
- <xsl:choose>
1334
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
1335
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
1336
- </xsl:choose>
1337
- </xsl:variable>
1338
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
1327
+ <xsl:variable name="root_element">metanorma</xsl:variable>
1339
1328
 
1329
+ <!---examples: 2013, 2024 -->
1340
1330
  <xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
1341
1331
 
1342
1332
  <!-- external parameters -->
1343
-
1344
1333
  <xsl:param name="svg_images"/> <!-- svg images array -->
1345
1334
  <xsl:variable name="images" select="document($svg_images)"/>
1346
1335
  <xsl:param name="basepath"/> <!-- base path for images -->
1347
1336
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
1348
1337
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
1349
1338
  <xsl:param name="output_path"/> <!-- output PDF file name -->
1339
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
1350
1340
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
1351
1341
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
1352
1342
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
@@ -1393,20 +1383,13 @@
1393
1383
 
1394
1384
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
1395
1385
 
1396
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
1397
- true
1386
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
1387
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
1398
1388
  </xsl:variable>
1399
1389
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
1400
1390
 
1401
- <xsl:variable name="isGenerateTableIF_">
1402
- <xsl:choose>
1403
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
1404
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
1405
- </xsl:when>
1406
- <xsl:otherwise>false</xsl:otherwise>
1407
- </xsl:choose>
1408
- </xsl:variable>
1409
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
1391
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
1392
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
1410
1393
 
1411
1394
  <xsl:variable name="lang">
1412
1395
  <xsl:call-template name="getLang"/>
@@ -1458,8 +1441,7 @@
1458
1441
  <xsl:variable name="pageWidth_">
1459
1442
  <xsl:choose>
1460
1443
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
1461
- <xsl:otherwise>
1462
- 215.9
1444
+ <xsl:otherwise>215.9
1463
1445
  </xsl:otherwise>
1464
1446
  </xsl:choose>
1465
1447
  </xsl:variable>
@@ -1469,8 +1451,7 @@
1469
1451
  <xsl:variable name="pageHeight_">
1470
1452
  <xsl:choose>
1471
1453
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
1472
- <xsl:otherwise>
1473
- 279.4
1454
+ <xsl:otherwise>279.4
1474
1455
  </xsl:otherwise>
1475
1456
  </xsl:choose>
1476
1457
  </xsl:variable>
@@ -1479,23 +1460,19 @@
1479
1460
  <!-- Page margins in mm (just digits, without 'mm')-->
1480
1461
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
1481
1462
  for example, left margin on odd page and right margin on even page -->
1482
- <xsl:variable name="marginLeftRight1_">
1483
- 29
1463
+ <xsl:variable name="marginLeftRight1_">29
1484
1464
  </xsl:variable>
1485
1465
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
1486
1466
 
1487
- <xsl:variable name="marginLeftRight2_">
1488
- 29
1467
+ <xsl:variable name="marginLeftRight2_">29
1489
1468
  </xsl:variable>
1490
1469
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
1491
1470
 
1492
- <xsl:variable name="marginTop_">
1493
- 14
1471
+ <xsl:variable name="marginTop_">14
1494
1472
  </xsl:variable>
1495
1473
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
1496
1474
 
1497
- <xsl:variable name="marginBottom_">
1498
- 22
1475
+ <xsl:variable name="marginBottom_">22
1499
1476
  </xsl:variable>
1500
1477
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
1501
1478
 
@@ -1544,13 +1521,10 @@
1544
1521
  <title-toc lang="zh">目次</title-toc>
1545
1522
 
1546
1523
  <title-part lang="en">
1547
-
1548
1524
  </title-part>
1549
1525
  <title-part lang="fr">
1550
-
1551
1526
  </title-part>
1552
1527
  <title-part lang="ru">
1553
-
1554
1528
  </title-part>
1555
1529
  <title-part lang="zh">第 # 部分:</title-part>
1556
1530
 
@@ -1604,6 +1578,7 @@
1604
1578
  <xsl:variable name="hair_space"> </xsl:variable>
1605
1579
  <xsl:variable name="en_dash">–</xsl:variable>
1606
1580
  <xsl:variable name="em_dash">—</xsl:variable>
1581
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
1607
1582
  <xsl:variable name="cr">&#13;</xsl:variable>
1608
1583
  <xsl:variable name="lf">
1609
1584
  </xsl:variable>
@@ -1645,13 +1620,11 @@
1645
1620
  <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>
1646
1621
  <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>
1647
1622
  <xsl:attribute-set name="root-style">
1648
-
1649
- <xsl:attribute name="font-family">OpenSans, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
1650
- <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
1651
- <xsl:attribute name="font-weight">300</xsl:attribute>
1652
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1653
- <xsl:attribute name="color">rgb(88, 88, 90)</xsl:attribute>
1654
-
1623
+ <xsl:attribute name="font-family">OpenSans, STIX Two Math, <xsl:value-of select="$font_noto_sans"/></xsl:attribute>
1624
+ <xsl:attribute name="font-family-generic">Sans</xsl:attribute>
1625
+ <xsl:attribute name="font-weight">300</xsl:attribute>
1626
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
1627
+ <xsl:attribute name="color">rgb(88, 88, 90)</xsl:attribute>
1655
1628
  </xsl:attribute-set> <!-- root-style -->
1656
1629
 
1657
1630
  <xsl:template name="insertRootStyle">
@@ -1739,28 +1712,22 @@
1739
1712
 
1740
1713
  <!-- Preface sections styles -->
1741
1714
  <xsl:attribute-set name="copyright-statement-style">
1742
-
1743
1715
  </xsl:attribute-set> <!-- copyright-statement-style -->
1744
1716
 
1745
1717
  <xsl:attribute-set name="copyright-statement-title-style">
1746
-
1747
1718
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
1748
1719
 
1749
1720
  <xsl:attribute-set name="copyright-statement-p-style">
1750
-
1751
1721
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
1752
1722
 
1753
1723
  <xsl:attribute-set name="license-statement-style">
1754
-
1755
1724
  </xsl:attribute-set>
1756
1725
 
1757
1726
  <xsl:attribute-set name="license-statement-title-style">
1758
1727
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1759
-
1760
1728
  </xsl:attribute-set> <!-- license-statement-title-style -->
1761
1729
 
1762
1730
  <xsl:attribute-set name="license-statement-p-style">
1763
-
1764
1731
  </xsl:attribute-set> <!-- license-statement-p-style -->
1765
1732
 
1766
1733
  <xsl:attribute-set name="legal-statement-style">
@@ -1769,117 +1736,93 @@
1769
1736
 
1770
1737
  <xsl:attribute-set name="legal-statement-title-style">
1771
1738
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1772
-
1773
- <xsl:attribute name="font-weight">normal</xsl:attribute>
1774
- <xsl:attribute name="padding-top">2mm</xsl:attribute>
1775
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1776
-
1739
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1740
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
1741
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1777
1742
  </xsl:attribute-set> <!-- legal-statement-title-style -->
1778
1743
 
1779
1744
  <xsl:attribute-set name="legal-statement-p-style">
1780
-
1781
1745
  </xsl:attribute-set> <!-- legal-statement-p-style -->
1782
1746
 
1783
1747
  <xsl:attribute-set name="feedback-statement-style">
1784
-
1785
1748
  </xsl:attribute-set> <!-- feedback-statement-style -->
1786
1749
 
1787
1750
  <xsl:attribute-set name="feedback-statement-title-style">
1788
1751
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1789
-
1790
1752
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
1791
1753
 
1792
1754
  <xsl:attribute-set name="feedback-statement-p-style">
1793
-
1794
1755
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
1795
1756
 
1796
1757
  <!-- End Preface sections styles -->
1797
1758
 
1798
1759
  <xsl:attribute-set name="link-style">
1799
-
1800
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1801
- <xsl:attribute name="font-weight">300</xsl:attribute><!-- bold -->
1802
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1803
-
1760
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1761
+ <xsl:attribute name="font-weight">300</xsl:attribute><!-- bold -->
1762
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1804
1763
  </xsl:attribute-set>
1805
1764
 
1806
1765
  <xsl:template name="refine_link-style">
1807
-
1808
- <xsl:if test="ancestor::*[local-name() = 'bibitem']">
1809
- <xsl:attribute name="color">black</xsl:attribute>
1810
- <xsl:attribute name="text-decoration">none</xsl:attribute>
1811
- <xsl:attribute name="font-weight">300</xsl:attribute>
1812
- </xsl:if>
1813
-
1766
+ <xsl:if test="ancestor::*[local-name() = 'bibitem']">
1767
+ <xsl:attribute name="color">black</xsl:attribute>
1768
+ <xsl:attribute name="text-decoration">none</xsl:attribute>
1769
+ <xsl:attribute name="font-weight">300</xsl:attribute>
1770
+ </xsl:if>
1814
1771
  </xsl:template> <!-- refine_link-style -->
1815
1772
 
1816
1773
  <xsl:attribute-set name="sourcecode-container-style">
1817
-
1818
- <xsl:attribute name="space-after">12pt</xsl:attribute>
1819
-
1774
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1820
1775
  </xsl:attribute-set>
1821
1776
 
1822
1777
  <xsl:attribute-set name="sourcecode-style">
1823
1778
  <xsl:attribute name="white-space">pre</xsl:attribute>
1824
1779
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1825
1780
  <xsl:attribute name="role">Code</xsl:attribute>
1826
-
1827
- <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1828
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1829
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1830
- <xsl:attribute name="line-height">113%</xsl:attribute>
1831
-
1781
+ <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1782
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1783
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1784
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1832
1785
  </xsl:attribute-set>
1833
1786
 
1834
- <xsl:template name="refine_sourcecode-style">
1835
- <!-- background for image -->
1836
- <xsl:if test="starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
1837
- <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
1838
- <xsl:attribute name="padding-left">11mm</xsl:attribute>
1839
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1840
- <xsl:attribute name="padding-right">11mm</xsl:attribute>
1841
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1842
- <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
1843
- <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
1844
- <xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
1845
- <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
1846
- </xsl:if>
1787
+ <xsl:template name="refine_sourcecode-style"> <!-- background for image -->
1788
+ <xsl:if test="starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
1789
+ <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
1790
+ <xsl:attribute name="padding-left">11mm</xsl:attribute>
1791
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1792
+ <xsl:attribute name="padding-right">11mm</xsl:attribute>
1793
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1794
+ <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
1795
+ <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
1796
+ <xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
1797
+ <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
1847
1798
  </xsl:if>
1848
-
1799
+ </xsl:if>
1849
1800
  </xsl:template> <!-- refine_sourcecode-style -->
1850
1801
 
1851
1802
  <xsl:attribute-set name="pre-style">
1852
1803
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1853
1804
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1854
-
1855
- <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1856
- <xsl:attribute name="line-height">113%</xsl:attribute>
1857
-
1805
+ <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1806
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1858
1807
  </xsl:attribute-set>
1859
1808
 
1860
1809
  <xsl:attribute-set name="permission-style">
1861
-
1862
1810
  </xsl:attribute-set>
1863
1811
 
1864
1812
  <xsl:attribute-set name="permission-name-style">
1865
-
1866
1813
  </xsl:attribute-set>
1867
1814
 
1868
1815
  <xsl:attribute-set name="permission-label-style">
1869
-
1870
1816
  </xsl:attribute-set>
1871
1817
 
1872
1818
  <xsl:attribute-set name="requirement-style">
1873
-
1874
1819
  </xsl:attribute-set>
1875
1820
 
1876
1821
  <xsl:attribute-set name="requirement-name-style">
1877
1822
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1878
-
1879
1823
  </xsl:attribute-set>
1880
1824
 
1881
1825
  <xsl:attribute-set name="requirement-label-style">
1882
-
1883
1826
  </xsl:attribute-set>
1884
1827
 
1885
1828
  <xsl:attribute-set name="subject-style">
@@ -1907,135 +1850,106 @@
1907
1850
  </xsl:attribute-set>
1908
1851
 
1909
1852
  <xsl:attribute-set name="recommendation-style">
1910
-
1911
1853
  </xsl:attribute-set>
1912
1854
 
1913
1855
  <xsl:attribute-set name="recommendation-name-style">
1914
-
1915
1856
  </xsl:attribute-set>
1916
1857
 
1917
1858
  <xsl:attribute-set name="recommendation-label-style">
1918
-
1919
1859
  </xsl:attribute-set>
1920
1860
 
1921
1861
  <xsl:attribute-set name="termexample-style">
1922
-
1923
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1924
-
1862
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1925
1863
  </xsl:attribute-set>
1926
1864
 
1927
1865
  <xsl:template name="refine_termexample-style">
1928
-
1929
1866
  </xsl:template>
1930
1867
 
1931
1868
  <xsl:attribute-set name="example-style">
1932
-
1933
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1934
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1935
-
1869
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1870
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1936
1871
  </xsl:attribute-set> <!-- example-style -->
1937
1872
 
1938
1873
  <xsl:template name="refine_example-style">
1939
-
1940
- <xsl:if test="ancestor::ribose:ul or ancestor::ribose:ol">
1941
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1942
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1943
- </xsl:if>
1944
-
1874
+ <xsl:if test="ancestor::ribose:ul or ancestor::ribose:ol">
1875
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
1876
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1877
+ </xsl:if>
1945
1878
  </xsl:template> <!-- refine_example-style -->
1946
1879
 
1947
1880
  <xsl:attribute-set name="example-body-style">
1948
-
1949
1881
  </xsl:attribute-set> <!-- example-body-style -->
1950
1882
 
1951
1883
  <xsl:attribute-set name="example-name-style">
1952
-
1953
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1954
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1955
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1956
-
1884
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1885
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1886
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1957
1887
  </xsl:attribute-set> <!-- example-name-style -->
1958
1888
 
1959
1889
  <xsl:template name="refine_example-name-style">
1960
-
1961
1890
  </xsl:template>
1962
1891
 
1963
1892
  <xsl:attribute-set name="example-p-style">
1964
-
1965
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1893
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
1966
1894
 
1967
1895
  </xsl:attribute-set> <!-- example-p-style -->
1968
1896
 
1969
1897
  <xsl:template name="refine_example-p-style">
1970
-
1971
1898
  </xsl:template> <!-- refine_example-p-style -->
1972
1899
 
1973
1900
  <xsl:attribute-set name="termexample-name-style">
1974
-
1975
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1976
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1977
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1978
-
1901
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1902
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1903
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
1979
1904
  </xsl:attribute-set> <!-- termexample-name-style -->
1980
1905
 
1981
1906
  <xsl:template name="refine_termexample-name-style">
1982
-
1983
1907
  </xsl:template>
1984
1908
 
1985
1909
  <!-- ========================== -->
1986
1910
  <!-- Table styles -->
1987
1911
  <!-- ========================== -->
1988
1912
  <xsl:variable name="table-border_">
1989
-
1990
1913
  </xsl:variable>
1991
1914
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
1992
1915
 
1993
1916
  <xsl:variable name="table-cell-border_">
1994
-
1995
1917
  </xsl:variable>
1996
1918
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
1997
1919
 
1998
1920
  <xsl:attribute-set name="table-container-style">
1999
1921
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2000
1922
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
2001
-
2002
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2003
-
1923
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2004
1924
  </xsl:attribute-set> <!-- table-container-style -->
2005
1925
 
2006
1926
  <xsl:template name="refine_table-container-style">
2007
1927
  <xsl:param name="margin-side"/>
2008
-
2009
1928
  <!-- end table block-container attributes -->
2010
1929
  </xsl:template> <!-- refine_table-container-style -->
2011
1930
 
2012
1931
  <xsl:attribute-set name="table-style">
2013
1932
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
2014
1933
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
2015
-
2016
- <xsl:attribute name="border">0pt solid black</xsl:attribute>
2017
- <xsl:attribute name="font-size">9.5pt</xsl:attribute> <!-- 8pt -->
2018
-
1934
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
1935
+ <xsl:attribute name="font-size">9.5pt</xsl:attribute> <!-- 8pt -->
2019
1936
  </xsl:attribute-set><!-- table-style -->
2020
1937
 
2021
1938
  <xsl:template name="refine_table-style">
2022
1939
  <xsl:param name="margin-side"/>
2023
1940
 
2024
1941
  <xsl:call-template name="setBordersTableArray"/>
2025
-
2026
1942
  </xsl:template> <!-- refine_table-style -->
2027
1943
 
2028
1944
  <xsl:attribute-set name="table-name-style">
2029
1945
  <xsl:attribute name="role">Caption</xsl:attribute>
2030
1946
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2031
-
2032
- <xsl:attribute name="font-size">13pt</xsl:attribute>
2033
- <xsl:attribute name="font-weight">300</xsl:attribute>
2034
- <xsl:attribute name="color">black</xsl:attribute>
2035
- <xsl:attribute name="text-align">left</xsl:attribute>
2036
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2037
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2038
-
1947
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
1948
+ <xsl:attribute name="font-weight">300</xsl:attribute>
1949
+ <xsl:attribute name="color">black</xsl:attribute>
1950
+ <xsl:attribute name="text-align">left</xsl:attribute>
1951
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
1952
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2039
1953
  </xsl:attribute-set> <!-- table-name-style -->
2040
1954
 
2041
1955
  <xsl:template name="refine_table-name-style">
@@ -2043,37 +1957,29 @@
2043
1957
  <xsl:if test="$continued = 'true'">
2044
1958
  <xsl:attribute name="role">SKIP</xsl:attribute>
2045
1959
  </xsl:if>
2046
-
2047
1960
  </xsl:template> <!-- refine_table-name-style -->
2048
1961
 
2049
1962
  <xsl:attribute-set name="table-row-style">
2050
1963
  <xsl:attribute name="min-height">4mm</xsl:attribute>
2051
-
2052
- <xsl:attribute name="min-height">8.5mm</xsl:attribute>
2053
-
1964
+ <xsl:attribute name="min-height">8.5mm</xsl:attribute>
2054
1965
  </xsl:attribute-set>
2055
1966
 
2056
1967
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
2057
1968
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2058
-
2059
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2060
- <xsl:attribute name="background-color">rgb(32, 98, 169)</xsl:attribute>
2061
- <xsl:attribute name="color">white</xsl:attribute>
2062
-
1969
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1970
+ <xsl:attribute name="background-color">rgb(32, 98, 169)</xsl:attribute>
1971
+ <xsl:attribute name="color">white</xsl:attribute>
2063
1972
  </xsl:attribute-set>
2064
1973
 
2065
1974
  <xsl:template name="refine_table-header-row-style">
2066
1975
 
2067
1976
  <xsl:call-template name="setBordersTableArray"/>
2068
-
2069
1977
  </xsl:template> <!-- refine_table-header-row-style -->
2070
1978
 
2071
1979
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
2072
-
2073
1980
  </xsl:attribute-set>
2074
1981
 
2075
1982
  <xsl:template name="refine_table-footer-row-style">
2076
-
2077
1983
  </xsl:template> <!-- refine_table-footer-row-style -->
2078
1984
 
2079
1985
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -2083,12 +1989,10 @@
2083
1989
  <xsl:template name="refine_table-body-row-style">
2084
1990
 
2085
1991
  <xsl:call-template name="setBordersTableArray"/>
2086
-
2087
- <xsl:variable name="number"><xsl:number/></xsl:variable>
2088
- <xsl:if test="$number mod 2 = 0">
2089
- <xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
2090
- </xsl:if>
2091
-
1992
+ <xsl:variable name="number"><xsl:number/></xsl:variable>
1993
+ <xsl:if test="$number mod 2 = 0">
1994
+ <xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
1995
+ </xsl:if>
2092
1996
  </xsl:template> <!-- refine_table-body-row-style -->
2093
1997
 
2094
1998
  <xsl:attribute-set name="table-header-cell-style">
@@ -2096,10 +2000,8 @@
2096
2000
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2097
2001
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2098
2002
  <xsl:attribute name="display-align">center</xsl:attribute>
2099
-
2100
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2101
- <xsl:attribute name="border">0pt solid black</xsl:attribute>
2102
-
2003
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2004
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
2103
2005
  </xsl:attribute-set> <!-- table-header-cell-style -->
2104
2006
 
2105
2007
  <xsl:template name="refine_table-header-cell-style">
@@ -2111,17 +2013,14 @@
2111
2013
  </xsl:if>
2112
2014
 
2113
2015
  <xsl:call-template name="setTableCellAttributes"/>
2114
-
2115
2016
  </xsl:template> <!-- refine_table-header-cell-style -->
2116
2017
 
2117
2018
  <xsl:attribute-set name="table-cell-style">
2118
2019
  <xsl:attribute name="display-align">center</xsl:attribute>
2119
2020
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2120
2021
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2121
-
2122
- <xsl:attribute name="border">0pt solid black</xsl:attribute>
2123
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2124
-
2022
+ <xsl:attribute name="border">0pt solid black</xsl:attribute>
2023
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
2125
2024
  </xsl:attribute-set> <!-- table-cell-style -->
2126
2025
 
2127
2026
  <xsl:template name="refine_table-cell-style">
@@ -2130,8 +2029,6 @@
2130
2029
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2131
2030
  </xsl:if>
2132
2031
 
2133
- <!-- bsi -->
2134
-
2135
2032
  <xsl:call-template name="setBordersTableArray"/>
2136
2033
 
2137
2034
  </xsl:template> <!-- refine_table-cell-style -->
@@ -2141,58 +2038,45 @@
2141
2038
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
2142
2039
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2143
2040
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
2144
-
2145
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2146
-
2041
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
2147
2042
  </xsl:attribute-set> <!-- table-footer-cell-style -->
2148
2043
 
2149
2044
  <xsl:template name="refine_table-footer-cell-style">
2150
-
2151
2045
  </xsl:template> <!-- refine_table-footer-cell-style -->
2152
2046
 
2153
2047
  <xsl:attribute-set name="table-note-style">
2154
2048
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2155
2049
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2156
-
2157
- <xsl:attribute name="font-size">8pt</xsl:attribute>
2158
-
2050
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
2159
2051
  </xsl:attribute-set><!-- table-note-style -->
2160
2052
 
2161
2053
  <xsl:template name="refine_table-note-style">
2162
-
2163
2054
  </xsl:template> <!-- refine_table-note-style -->
2164
2055
 
2165
2056
  <xsl:attribute-set name="table-fn-style">
2166
2057
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2167
-
2168
2058
  </xsl:attribute-set> <!-- table-fn-style -->
2169
2059
 
2170
2060
  <xsl:template name="refine_table-fn-style">
2171
-
2172
2061
  </xsl:template>
2173
2062
 
2174
2063
  <xsl:attribute-set name="table-fn-number-style">
2175
2064
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
2176
-
2177
2065
  </xsl:attribute-set> <!-- table-fn-number-style -->
2178
2066
 
2179
2067
  <xsl:attribute-set name="table-fmt-fn-label-style">
2180
2068
  <xsl:attribute name="font-size">80%</xsl:attribute>
2181
-
2182
2069
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
2183
2070
 
2184
2071
  <xsl:template name="refine_table-fmt-fn-label-style">
2185
-
2186
2072
  </xsl:template>
2187
2073
 
2188
2074
  <xsl:attribute-set name="fn-container-body-style">
2189
2075
  <xsl:attribute name="text-indent">0</xsl:attribute>
2190
2076
  <xsl:attribute name="start-indent">0</xsl:attribute>
2191
-
2192
2077
  </xsl:attribute-set>
2193
2078
 
2194
2079
  <xsl:attribute-set name="table-fn-body-style">
2195
-
2196
2080
  </xsl:attribute-set>
2197
2081
 
2198
2082
  <xsl:attribute-set name="figure-fn-number-style">
@@ -2202,17 +2086,14 @@
2202
2086
  <xsl:attribute-set name="figure-fmt-fn-label-style">
2203
2087
  <xsl:attribute name="font-size">80%</xsl:attribute>
2204
2088
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2205
-
2206
2089
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
2207
2090
 
2208
2091
  <xsl:template name="refine_figure-fmt-fn-label-style">
2209
-
2210
2092
  </xsl:template>
2211
2093
 
2212
2094
  <xsl:attribute-set name="figure-fn-body-style">
2213
2095
  <xsl:attribute name="text-align">justify</xsl:attribute>
2214
2096
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2215
-
2216
2097
  </xsl:attribute-set>
2217
2098
  <!-- ========================== -->
2218
2099
  <!-- END Table styles -->
@@ -2223,51 +2104,39 @@
2223
2104
  <!-- ========================== -->
2224
2105
 
2225
2106
  <xsl:attribute-set name="dl-block-style">
2226
-
2227
2107
  </xsl:attribute-set>
2228
2108
 
2229
2109
  <xsl:attribute-set name="dt-row-style">
2230
-
2231
- <xsl:attribute name="min-height">7mm</xsl:attribute>
2232
-
2110
+ <xsl:attribute name="min-height">7mm</xsl:attribute>
2233
2111
  </xsl:attribute-set>
2234
2112
 
2235
2113
  <xsl:attribute-set name="dt-cell-style">
2236
-
2237
2114
  </xsl:attribute-set>
2238
2115
 
2239
2116
  <xsl:template name="refine_dt-cell-style">
2240
-
2241
2117
  </xsl:template> <!-- refine_dt-cell-style -->
2242
2118
 
2243
2119
  <xsl:attribute-set name="dt-block-style">
2244
2120
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
2245
-
2246
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2247
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2248
-
2121
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2122
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2249
2123
  </xsl:attribute-set>
2250
2124
 
2251
2125
  <xsl:template name="refine_dt-block-style">
2252
-
2253
2126
  </xsl:template> <!-- refine_dt-block-style -->
2254
2127
 
2255
2128
  <xsl:attribute-set name="dl-name-style">
2256
2129
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2257
2130
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2258
-
2259
- <xsl:attribute name="font-weight">300</xsl:attribute>
2260
- <xsl:attribute name="color">black</xsl:attribute>
2261
-
2131
+ <xsl:attribute name="font-weight">300</xsl:attribute>
2132
+ <xsl:attribute name="color">black</xsl:attribute>
2262
2133
  </xsl:attribute-set> <!-- dl-name-style -->
2263
2134
 
2264
2135
  <xsl:attribute-set name="dd-cell-style">
2265
2136
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
2266
-
2267
2137
  </xsl:attribute-set>
2268
2138
 
2269
2139
  <xsl:template name="refine_dd-cell-style">
2270
-
2271
2140
  </xsl:template> <!-- refine_dd-cell-style -->
2272
2141
 
2273
2142
  <!-- ========================== -->
@@ -2275,266 +2144,202 @@
2275
2144
  <!-- ========================== -->
2276
2145
 
2277
2146
  <xsl:attribute-set name="appendix-style">
2278
-
2279
- <xsl:attribute name="font-size">12pt</xsl:attribute>
2280
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2281
- <xsl:attribute name="color">black</xsl:attribute>
2282
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2283
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2284
-
2147
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
2148
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2149
+ <xsl:attribute name="color">black</xsl:attribute>
2150
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2151
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2285
2152
  </xsl:attribute-set>
2286
2153
 
2287
2154
  <xsl:attribute-set name="appendix-example-style">
2288
-
2289
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2290
- <xsl:attribute name="color">black</xsl:attribute>
2291
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2292
-
2155
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2156
+ <xsl:attribute name="color">black</xsl:attribute>
2157
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2293
2158
  </xsl:attribute-set>
2294
2159
 
2295
2160
  <xsl:attribute-set name="xref-style">
2296
-
2297
2161
  </xsl:attribute-set>
2298
2162
 
2299
2163
  <xsl:attribute-set name="eref-style">
2300
-
2301
2164
  </xsl:attribute-set>
2302
2165
 
2303
2166
  <xsl:template name="refine_eref-style">
2304
2167
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
2305
2168
  <xsl:variable name="text" select="normalize-space()"/>
2306
-
2307
2169
  </xsl:template> <!-- refine_eref-style -->
2308
2170
 
2309
2171
  <xsl:attribute-set name="note-style">
2310
-
2311
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2312
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2313
-
2172
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2173
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2314
2174
  </xsl:attribute-set>
2315
2175
 
2316
2176
  <xsl:template name="refine_note-style">
2317
-
2318
- <xsl:if test="ancestor::ribose:ul or ancestor::ribose:ol and not(ancestor::ribose:note[1]/following-sibling::*)">
2319
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2320
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2321
- </xsl:if>
2322
-
2177
+ <xsl:if test="ancestor::ribose:ul or ancestor::ribose:ol and not(ancestor::ribose:note[1]/following-sibling::*)">
2178
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2179
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2180
+ </xsl:if>
2323
2181
  </xsl:template>
2324
2182
 
2325
2183
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
2326
2184
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
2327
2185
 
2328
2186
  <xsl:attribute-set name="note-name-style">
2329
-
2330
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2331
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2332
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
2333
-
2187
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2188
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2189
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
2334
2190
  </xsl:attribute-set>
2335
2191
 
2336
2192
  <xsl:template name="refine_note-name-style">
2337
-
2338
2193
  </xsl:template> <!-- refine_note-name-style -->
2339
2194
 
2340
2195
  <xsl:attribute-set name="table-note-name-style">
2341
2196
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
2342
-
2343
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2344
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2345
-
2197
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2198
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2346
2199
  </xsl:attribute-set>
2347
2200
 
2348
2201
  <xsl:template name="refine_table-note-name-style">
2349
-
2350
2202
  </xsl:template> <!-- refine_table-note-name-style -->
2351
2203
 
2352
2204
  <xsl:attribute-set name="note-p-style">
2353
-
2354
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2355
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2356
-
2205
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2206
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2357
2207
  </xsl:attribute-set>
2358
2208
 
2359
2209
  <xsl:attribute-set name="termnote-style">
2360
-
2361
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2362
-
2210
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2363
2211
  </xsl:attribute-set>
2364
2212
 
2365
2213
  <xsl:template name="refine_termnote-style">
2366
-
2367
2214
  </xsl:template> <!-- refine_termnote-style -->
2368
2215
 
2369
2216
  <xsl:attribute-set name="termnote-name-style">
2370
-
2371
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2372
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2373
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
2374
-
2217
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2218
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2219
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
2375
2220
  </xsl:attribute-set>
2376
2221
 
2377
2222
  <xsl:template name="refine_termnote-name-style">
2378
-
2379
- <!-- <xsl:if test="$namespace = 'ieee'">
2380
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
2381
- </xsl:if> -->
2382
-
2383
2223
  </xsl:template>
2384
2224
 
2385
2225
  <xsl:attribute-set name="termnote-p-style">
2386
-
2387
2226
  </xsl:attribute-set>
2388
2227
 
2389
2228
  <xsl:attribute-set name="quote-style">
2390
2229
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
2391
2230
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
2392
-
2393
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2394
- <xsl:attribute name="margin-left">13mm</xsl:attribute>
2395
-
2231
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2232
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
2396
2233
  </xsl:attribute-set>
2397
2234
 
2398
2235
  <xsl:template name="refine_quote-style">
2399
-
2400
2236
  </xsl:template>
2401
2237
 
2402
2238
  <xsl:attribute-set name="quote-source-style">
2403
2239
  <xsl:attribute name="text-align">right</xsl:attribute>
2404
-
2405
- <xsl:attribute name="margin-right">25mm</xsl:attribute>
2406
-
2240
+ <xsl:attribute name="margin-right">25mm</xsl:attribute>
2407
2241
  </xsl:attribute-set>
2408
2242
 
2409
2243
  <xsl:attribute-set name="termsource-style">
2410
-
2411
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2412
-
2244
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2413
2245
  </xsl:attribute-set>
2414
2246
 
2415
2247
  <xsl:template name="refine_termsource-style">
2416
-
2417
2248
  </xsl:template> <!-- refine_termsource-style -->
2418
2249
 
2419
2250
  <xsl:attribute-set name="termsource-text-style">
2420
-
2421
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2422
-
2251
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2423
2252
  </xsl:attribute-set>
2424
2253
 
2425
2254
  <xsl:attribute-set name="origin-style">
2426
-
2427
2255
  </xsl:attribute-set>
2428
2256
 
2429
2257
  <xsl:attribute-set name="term-style">
2430
-
2431
2258
  </xsl:attribute-set>
2432
2259
 
2433
2260
  <xsl:attribute-set name="term-name-style">
2434
2261
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2435
2262
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2436
-
2437
2263
  </xsl:attribute-set>
2438
2264
 
2439
2265
  <xsl:attribute-set name="figure-block-style">
2440
2266
  <xsl:attribute name="role">SKIP</xsl:attribute>
2441
-
2442
2267
  </xsl:attribute-set>
2443
2268
 
2444
2269
  <xsl:template name="refine_figure-block-style">
2445
-
2446
2270
  </xsl:template>
2447
2271
 
2448
- <xsl:attribute-set name="figure-style">
2449
- <!-- background for image -->
2450
- <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
2451
- <xsl:attribute name="padding-left">11mm</xsl:attribute>
2452
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2453
- <xsl:attribute name="padding-right">11mm</xsl:attribute>
2454
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2455
- <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
2456
- <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
2457
- <xsl:attribute name="margin-bottom">3mm</xsl:attribute>
2458
-
2272
+ <xsl:attribute-set name="figure-style"> <!-- background for image -->
2273
+ <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
2274
+ <xsl:attribute name="padding-left">11mm</xsl:attribute>
2275
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2276
+ <xsl:attribute name="padding-right">11mm</xsl:attribute>
2277
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2278
+ <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
2279
+ <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
2280
+ <xsl:attribute name="margin-bottom">3mm</xsl:attribute>
2459
2281
  </xsl:attribute-set>
2460
2282
 
2461
2283
  <xsl:attribute-set name="figure-name-style">
2462
2284
  <xsl:attribute name="role">Caption</xsl:attribute>
2463
-
2464
- <xsl:attribute name="font-size">13pt</xsl:attribute>
2465
- <xsl:attribute name="font-weight">300</xsl:attribute>
2466
- <xsl:attribute name="color">black</xsl:attribute>
2467
- <xsl:attribute name="text-align">left</xsl:attribute>
2468
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2469
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2470
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2471
-
2285
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
2286
+ <xsl:attribute name="font-weight">300</xsl:attribute>
2287
+ <xsl:attribute name="color">black</xsl:attribute>
2288
+ <xsl:attribute name="text-align">left</xsl:attribute>
2289
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2290
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2291
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2472
2292
  </xsl:attribute-set>
2473
2293
 
2474
2294
  <xsl:template name="refine_figure-name-style">
2475
-
2476
2295
  </xsl:template> <!-- refine_figure-name-style -->
2477
2296
 
2478
2297
  <xsl:attribute-set name="figure-source-style">
2479
-
2480
2298
  </xsl:attribute-set>
2481
2299
 
2482
2300
  <!-- Formula's styles -->
2483
2301
  <xsl:attribute-set name="formula-style">
2484
2302
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
2485
2303
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2486
-
2487
2304
  </xsl:attribute-set> <!-- formula-style -->
2488
2305
 
2489
2306
  <xsl:attribute-set name="formula-stem-block-style">
2490
2307
  <xsl:attribute name="text-align">center</xsl:attribute>
2491
-
2492
- <xsl:attribute name="text-align">left</xsl:attribute>
2493
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
2494
-
2308
+ <xsl:attribute name="text-align">left</xsl:attribute>
2309
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
2495
2310
  </xsl:attribute-set> <!-- formula-stem-block-style -->
2496
2311
 
2497
2312
  <xsl:template name="refine_formula-stem-block-style">
2498
-
2499
2313
  </xsl:template> <!-- refine_formula-stem-block-style -->
2500
2314
 
2501
2315
  <xsl:attribute-set name="formula-stem-number-style">
2502
2316
  <xsl:attribute name="text-align">right</xsl:attribute>
2503
-
2504
2317
  </xsl:attribute-set> <!-- formula-stem-number-style -->
2505
2318
  <!-- End Formula's styles -->
2506
2319
 
2507
2320
  <xsl:template name="refine_formula-stem-number-style">
2508
-
2509
2321
  </xsl:template>
2510
2322
 
2511
2323
  <xsl:attribute-set name="image-style">
2512
2324
  <xsl:attribute name="role">SKIP</xsl:attribute>
2513
2325
  <xsl:attribute name="text-align">center</xsl:attribute>
2514
-
2515
2326
  </xsl:attribute-set>
2516
2327
 
2517
2328
  <xsl:template name="refine_image-style">
2518
-
2519
2329
  </xsl:template>
2520
2330
 
2521
2331
  <xsl:attribute-set name="figure-pseudocode-p-style">
2522
-
2523
2332
  </xsl:attribute-set>
2524
2333
 
2525
2334
  <xsl:attribute-set name="image-graphic-style">
2526
2335
  <xsl:attribute name="width">100%</xsl:attribute>
2527
2336
  <xsl:attribute name="content-height">100%</xsl:attribute>
2528
2337
  <xsl:attribute name="scaling">uniform</xsl:attribute>
2529
-
2530
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2531
-
2338
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
2532
2339
  </xsl:attribute-set>
2533
2340
 
2534
2341
  <xsl:attribute-set name="tt-style">
2535
-
2536
- <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2537
-
2342
+ <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2538
2343
  </xsl:attribute-set>
2539
2344
 
2540
2345
  <xsl:attribute-set name="sourcecode-name-style">
@@ -2543,68 +2348,55 @@
2543
2348
  <xsl:attribute name="text-align">center</xsl:attribute>
2544
2349
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2545
2350
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2546
-
2547
- <xsl:attribute name="font-size">13pt</xsl:attribute>
2548
- <xsl:attribute name="font-weight">300</xsl:attribute>
2549
- <xsl:attribute name="color">black</xsl:attribute>
2550
- <xsl:attribute name="text-align">left</xsl:attribute>
2551
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
2552
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2553
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2554
-
2351
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
2352
+ <xsl:attribute name="font-weight">300</xsl:attribute>
2353
+ <xsl:attribute name="color">black</xsl:attribute>
2354
+ <xsl:attribute name="text-align">left</xsl:attribute>
2355
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
2356
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2357
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2555
2358
  </xsl:attribute-set>
2556
2359
 
2557
2360
  <xsl:attribute-set name="preferred-block-style">
2558
-
2559
2361
  </xsl:attribute-set>
2560
2362
 
2561
2363
  <xsl:attribute-set name="preferred-term-style">
2562
2364
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2563
2365
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2564
-
2565
2366
  </xsl:attribute-set>
2566
2367
 
2567
2368
  <xsl:attribute-set name="domain-style">
2568
-
2569
2369
  </xsl:attribute-set>
2570
2370
 
2571
2371
  <xsl:attribute-set name="admitted-style">
2572
-
2573
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2574
- <xsl:attribute name="color">black</xsl:attribute>
2575
-
2372
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2373
+ <xsl:attribute name="color">black</xsl:attribute>
2576
2374
  </xsl:attribute-set>
2577
2375
 
2578
2376
  <xsl:attribute-set name="deprecates-style">
2579
-
2580
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2581
- <xsl:attribute name="color">black</xsl:attribute>
2582
-
2377
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2378
+ <xsl:attribute name="color">black</xsl:attribute>
2583
2379
  </xsl:attribute-set>
2584
2380
 
2585
2381
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
2586
2382
  </xsl:attribute-set>
2587
2383
 
2588
2384
  <xsl:attribute-set name="definition-style">
2589
-
2590
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2591
- <xsl:attribute name="space-before">12pt</xsl:attribute>
2592
- <xsl:attribute name="space-after">6pt</xsl:attribute>
2593
-
2385
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2386
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
2387
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
2594
2388
  </xsl:attribute-set>
2595
2389
 
2596
2390
  <xsl:variable name="color-added-text">
2597
2391
  <xsl:text>rgb(0, 255, 0)</xsl:text>
2598
2392
  </xsl:variable>
2599
2393
  <xsl:attribute-set name="add-style">
2600
-
2601
- <xsl:attribute name="color">red</xsl:attribute>
2602
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2603
- <!-- <xsl:attribute name="color">black</xsl:attribute>
2394
+ <xsl:attribute name="color">red</xsl:attribute>
2395
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2396
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
2604
2397
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
2605
2398
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
2606
2399
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2607
-
2608
2400
  </xsl:attribute-set>
2609
2401
 
2610
2402
  <xsl:variable name="add-style">
@@ -2624,60 +2416,44 @@
2624
2416
 
2625
2417
  <xsl:attribute-set name="mathml-style">
2626
2418
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
2627
-
2628
2419
  </xsl:attribute-set>
2629
2420
 
2630
2421
  <xsl:template name="refine_mathml-style">
2631
-
2632
2422
  </xsl:template>
2633
2423
 
2634
2424
  <xsl:attribute-set name="list-style">
2635
-
2636
- <xsl:attribute name="provisional-distance-between-starts">6mm</xsl:attribute>
2637
-
2425
+ <xsl:attribute name="provisional-distance-between-starts">6mm</xsl:attribute>
2638
2426
  </xsl:attribute-set> <!-- list-style -->
2639
2427
 
2640
2428
  <xsl:template name="refine_list-style">
2641
-
2642
2429
  </xsl:template> <!-- refine_list-style -->
2643
2430
 
2644
2431
  <xsl:attribute-set name="list-name-style">
2645
2432
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2646
-
2647
- <xsl:attribute name="font-weight">300</xsl:attribute>
2648
- <xsl:attribute name="color">black</xsl:attribute>
2649
-
2433
+ <xsl:attribute name="font-weight">300</xsl:attribute>
2434
+ <xsl:attribute name="color">black</xsl:attribute>
2650
2435
  </xsl:attribute-set> <!-- list-name-style -->
2651
2436
 
2652
2437
  <xsl:attribute-set name="list-item-style">
2653
-
2654
- <xsl:attribute name="space-after">4pt</xsl:attribute>
2655
-
2438
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
2656
2439
  </xsl:attribute-set>
2657
2440
 
2658
2441
  <xsl:template name="refine_list-item-style">
2659
-
2660
2442
  </xsl:template> <!-- refine_list-item-style -->
2661
2443
 
2662
2444
  <xsl:attribute-set name="list-item-label-style">
2663
-
2664
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2665
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2666
-
2445
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2446
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2667
2447
  </xsl:attribute-set>
2668
2448
 
2669
2449
  <xsl:template name="refine_list-item-label-style">
2670
-
2671
2450
  </xsl:template> <!-- refine_list-item-label-style -->
2672
2451
 
2673
2452
  <xsl:attribute-set name="list-item-body-style">
2674
-
2675
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
2676
-
2453
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
2677
2454
  </xsl:attribute-set>
2678
2455
 
2679
2456
  <xsl:template name="refine_list-item-body-style">
2680
-
2681
2457
  </xsl:template> <!-- refine_list-item-body-style -->
2682
2458
 
2683
2459
  <xsl:attribute-set name="toc-style">
@@ -2687,15 +2463,13 @@
2687
2463
  <xsl:attribute-set name="fn-reference-style">
2688
2464
  <xsl:attribute name="font-size">80%</xsl:attribute>
2689
2465
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2690
-
2691
- <xsl:attribute name="font-size">70%</xsl:attribute>
2692
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2693
- <xsl:attribute name="font-style">italic</xsl:attribute>
2466
+ <xsl:attribute name="font-size">70%</xsl:attribute>
2467
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2468
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2694
2469
 
2695
2470
  </xsl:attribute-set>
2696
2471
 
2697
2472
  <xsl:template name="refine_fn-reference-style">
2698
-
2699
2473
  </xsl:template> <!-- refine_fn-reference-style -->
2700
2474
 
2701
2475
  <xsl:attribute-set name="fn-style">
@@ -2704,10 +2478,8 @@
2704
2478
 
2705
2479
  <xsl:attribute-set name="fn-num-style">
2706
2480
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2707
-
2708
- <xsl:attribute name="font-size">65%</xsl:attribute>
2709
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2710
-
2481
+ <xsl:attribute name="font-size">65%</xsl:attribute>
2482
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2711
2483
  </xsl:attribute-set>
2712
2484
 
2713
2485
  <xsl:attribute-set name="fn-body-style">
@@ -2715,137 +2487,103 @@
2715
2487
  <xsl:attribute name="font-style">normal</xsl:attribute>
2716
2488
  <xsl:attribute name="text-indent">0</xsl:attribute>
2717
2489
  <xsl:attribute name="start-indent">0</xsl:attribute>
2718
-
2719
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2720
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2721
- <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
2722
- <xsl:attribute name="text-align">left</xsl:attribute>
2723
-
2490
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2491
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2492
+ <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
2493
+ <xsl:attribute name="text-align">left</xsl:attribute>
2724
2494
  </xsl:attribute-set>
2725
2495
 
2726
2496
  <xsl:template name="refine_fn-body-style">
2727
-
2728
2497
  </xsl:template> <!-- refine_fn-body-style -->
2729
2498
 
2730
2499
  <xsl:attribute-set name="fn-body-num-style">
2731
2500
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2732
-
2733
- <xsl:attribute name="font-size">60%</xsl:attribute>
2734
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2735
-
2501
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2502
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2736
2503
  </xsl:attribute-set> <!-- fn-body-num-style -->
2737
2504
 
2738
2505
  <xsl:template name="refine_fn-body-num-style">
2739
-
2740
2506
  </xsl:template> <!-- refine_fn-body-num-style -->
2741
2507
 
2742
2508
  <!-- admonition -->
2743
2509
  <xsl:attribute-set name="admonition-style">
2744
-
2745
- <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
2746
- <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
2747
- <xsl:attribute name="margin-left">16mm</xsl:attribute>
2748
- <xsl:attribute name="margin-right">16mm</xsl:attribute>
2749
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2750
-
2510
+ <xsl:attribute name="border">0.5pt solid rgb(79, 129, 189)</xsl:attribute>
2511
+ <xsl:attribute name="color">rgb(79, 129, 189)</xsl:attribute>
2512
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
2513
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
2514
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2751
2515
  </xsl:attribute-set> <!-- admonition-style -->
2752
2516
 
2753
2517
  <xsl:attribute-set name="admonition-container-style">
2754
2518
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
2755
2519
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
2756
-
2757
- <xsl:attribute name="padding">2mm</xsl:attribute>
2758
- <xsl:attribute name="padding-top">3mm</xsl:attribute>
2759
-
2520
+ <xsl:attribute name="padding">2mm</xsl:attribute>
2521
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
2760
2522
  </xsl:attribute-set> <!-- admonition-container-style -->
2761
2523
 
2762
2524
  <xsl:attribute-set name="admonition-name-style">
2763
2525
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2764
-
2765
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2766
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2767
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2768
- <xsl:attribute name="font-style">italic</xsl:attribute>
2769
- <xsl:attribute name="text-align">center</xsl:attribute>
2770
-
2526
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2527
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2528
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2529
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2530
+ <xsl:attribute name="text-align">center</xsl:attribute>
2771
2531
  </xsl:attribute-set> <!-- admonition-name-style -->
2772
2532
 
2773
2533
  <xsl:attribute-set name="admonition-p-style">
2774
-
2775
- <xsl:attribute name="font-style">italic</xsl:attribute>
2776
-
2534
+ <xsl:attribute name="font-style">italic</xsl:attribute>
2777
2535
  </xsl:attribute-set> <!-- admonition-p-style -->
2778
2536
  <!-- end admonition -->
2779
2537
 
2780
2538
  <!-- bibitem in Normative References (references/@normative="true") -->
2781
2539
  <xsl:attribute-set name="bibitem-normative-style">
2782
-
2783
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2784
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2785
-
2540
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2541
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2786
2542
  </xsl:attribute-set> <!-- bibitem-normative-style -->
2787
2543
 
2788
2544
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
2789
2545
  <xsl:attribute-set name="bibitem-normative-list-style">
2790
2546
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2791
2547
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2792
-
2793
- <!-- <xsl:if test="$namespace = 'ieee'">
2794
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2795
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
2796
- </xsl:if> -->
2797
-
2798
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2799
- <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
2800
-
2548
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2549
+ <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
2801
2550
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
2802
2551
 
2803
2552
  <xsl:attribute-set name="bibitem-non-normative-style">
2804
-
2805
2553
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
2806
2554
 
2807
2555
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
2808
2556
  <xsl:attribute-set name="bibitem-non-normative-list-style">
2809
2557
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
2810
2558
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2811
-
2812
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2813
- <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
2814
-
2559
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2560
+ <xsl:attribute name="provisional-distance-between-starts">8mm</xsl:attribute>
2815
2561
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
2816
2562
 
2817
2563
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
2818
2564
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2819
-
2820
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2821
-
2565
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
2822
2566
  </xsl:attribute-set>
2823
2567
 
2824
2568
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
2825
2569
  <xsl:attribute-set name="bibitem-normative-list-body-style">
2826
-
2827
2570
  </xsl:attribute-set>
2828
2571
 
2829
2572
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
2830
-
2831
2573
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
2832
2574
 
2833
2575
  <!-- footnote reference number for bibitem, in the text -->
2834
2576
  <xsl:attribute-set name="bibitem-note-fn-style">
2835
2577
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2836
2578
  <xsl:attribute name="font-size">65%</xsl:attribute>
2837
-
2838
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2839
-
2579
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2840
2580
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
2841
2581
 
2842
2582
  <!-- footnote number on the page bottom -->
2843
2583
  <xsl:attribute-set name="bibitem-note-fn-number-style">
2844
2584
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
2845
-
2846
- <xsl:attribute name="font-size">60%</xsl:attribute>
2847
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2848
-
2585
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2586
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2849
2587
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
2850
2588
 
2851
2589
  <!-- footnote body (text) on the page bottom -->
@@ -2853,13 +2591,10 @@
2853
2591
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2854
2592
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2855
2593
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
2856
-
2857
- <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
2858
-
2594
+ <xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
2859
2595
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
2860
2596
 
2861
2597
  <xsl:attribute-set name="references-non-normative-style">
2862
-
2863
2598
  </xsl:attribute-set> <!-- references-non-normative-style -->
2864
2599
 
2865
2600
  <!-- Highlight.js syntax GitHub styles -->
@@ -3019,12 +2754,10 @@
3019
2754
  <!-- Index section styles -->
3020
2755
  <xsl:attribute-set name="indexsect-title-style">
3021
2756
  <xsl:attribute name="role">H1</xsl:attribute>
3022
-
3023
2757
  </xsl:attribute-set>
3024
2758
 
3025
2759
  <xsl:attribute-set name="indexsect-clause-title-style">
3026
2760
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3027
-
3028
2761
  </xsl:attribute-set>
3029
2762
 
3030
2763
  <!-- End Index section styles -->
@@ -3101,47 +2834,47 @@
3101
2834
  </xsl:template>
3102
2835
 
3103
2836
  <xsl:template name="processTables_Contents">
3104
- <tables>
2837
+ <mn:tables>
3105
2838
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
3106
2839
  <xsl:choose>
3107
2840
  <xsl:when test="*[local-name() = 'fmt-name']">
3108
2841
  <xsl:variable name="fmt_name">
3109
2842
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
3110
2843
  </xsl:variable>
3111
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
2844
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
3112
2845
  <xsl:copy-of select="$fmt_name"/>
3113
- </table>
2846
+ </mn:table>
3114
2847
  </xsl:when>
3115
2848
  <xsl:otherwise>
3116
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
2849
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
3117
2850
  <xsl:copy-of select="*[local-name() = 'name']"/>
3118
- </table>
2851
+ </mn:table>
3119
2852
  </xsl:otherwise>
3120
2853
  </xsl:choose>
3121
2854
  </xsl:for-each>
3122
- </tables>
2855
+ </mn:tables>
3123
2856
  </xsl:template>
3124
2857
 
3125
2858
  <xsl:template name="processFigures_Contents">
3126
- <figures>
2859
+ <mn:figures>
3127
2860
  <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
3128
2861
  <xsl:choose>
3129
2862
  <xsl:when test="*[local-name() = 'fmt-name']">
3130
2863
  <xsl:variable name="fmt_name">
3131
2864
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
3132
2865
  </xsl:variable>
3133
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
2866
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
3134
2867
  <xsl:copy-of select="$fmt_name"/>
3135
- </figure>
2868
+ </mn:figure>
3136
2869
  </xsl:when>
3137
2870
  <xsl:otherwise>
3138
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
2871
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
3139
2872
  <xsl:copy-of select="*[local-name() = 'name']"/>
3140
- </figure>
2873
+ </mn:figure>
3141
2874
  </xsl:otherwise>
3142
2875
  </xsl:choose>
3143
2876
  </xsl:for-each>
3144
- </figures>
2877
+ </mn:figures>
3145
2878
  </xsl:template>
3146
2879
 
3147
2880
  <xsl:template name="processPrefaceSectionsDefault">
@@ -3160,7 +2893,6 @@
3160
2893
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3161
2894
  <xsl:sort select="@displayorder" data-type="number"/>
3162
2895
  <xsl:apply-templates select="."/>
3163
-
3164
2896
  </xsl:for-each>
3165
2897
 
3166
2898
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -3267,7 +2999,6 @@
3267
2999
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
3268
3000
  <xsl:sort select="@displayorder" data-type="number"/>
3269
3001
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
3270
-
3271
3002
  </xsl:for-each>
3272
3003
  </xsl:element>
3273
3004
  </xsl:element>
@@ -3401,7 +3132,6 @@
3401
3132
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
3402
3133
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
3403
3134
  </xsl:apply-templates>
3404
-
3405
3135
  </xsl:for-each>
3406
3136
  </xsl:element>
3407
3137
 
@@ -3441,19 +3171,17 @@
3441
3171
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
3442
3172
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
3443
3173
  <xsl:template match="text()" name="text">
3444
-
3445
- <xsl:choose>
3446
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
3447
- <xsl:otherwise>
3448
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
3449
- <xsl:call-template name="replace_fo_inline_tags">
3450
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
3451
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
3452
- <xsl:with-param name="text" select="$text"/>
3453
- </xsl:call-template>
3454
- </xsl:otherwise>
3455
- </xsl:choose>
3456
-
3174
+ <xsl:choose>
3175
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
3176
+ <xsl:otherwise>
3177
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
3178
+ <xsl:call-template name="replace_fo_inline_tags">
3179
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
3180
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
3181
+ <xsl:with-param name="text" select="$text"/>
3182
+ </xsl:call-template>
3183
+ </xsl:otherwise>
3184
+ </xsl:choose>
3457
3185
  </xsl:template>
3458
3186
 
3459
3187
  <xsl:template name="replace_fo_inline_tags">
@@ -3507,7 +3235,7 @@
3507
3235
  <xsl:with-param name="keep_sep">true</xsl:with-param>
3508
3236
  </xsl:call-template>
3509
3237
  </xsl:variable>
3510
- <xsl:for-each select="xalan:nodeset($items)/item">
3238
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
3511
3239
  <xsl:choose>
3512
3240
  <xsl:when test=". = $sep">
3513
3241
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -3536,17 +3264,13 @@
3536
3264
  </xsl:template> <!-- copyright-statement -->
3537
3265
 
3538
3266
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
3539
-
3540
- <!-- process in the template 'title' -->
3541
- <xsl:call-template name="title"/>
3542
-
3267
+ <!-- process in the template 'title' -->
3268
+ <xsl:call-template name="title"/>
3543
3269
  </xsl:template> <!-- copyright-statement//title -->
3544
3270
 
3545
3271
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
3546
-
3547
- <!-- process in the template 'paragraph' -->
3548
- <xsl:call-template name="paragraph"/>
3549
-
3272
+ <!-- process in the template 'paragraph' -->
3273
+ <xsl:call-template name="paragraph"/>
3550
3274
  </xsl:template> <!-- copyright-statement//p -->
3551
3275
 
3552
3276
  <xsl:template match="*[local-name()='license-statement']">
@@ -3556,47 +3280,39 @@
3556
3280
  </xsl:template> <!-- license-statement -->
3557
3281
 
3558
3282
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
3559
-
3560
- <!-- process in the template 'title' -->
3561
- <xsl:call-template name="title"/>
3562
-
3283
+ <!-- process in the template 'title' -->
3284
+ <xsl:call-template name="title"/>
3563
3285
  </xsl:template> <!-- license-statement/title -->
3564
3286
 
3565
3287
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
3566
-
3567
- <!-- process in the template 'paragraph' -->
3568
- <xsl:call-template name="paragraph"/>
3569
-
3288
+ <!-- process in the template 'paragraph' -->
3289
+ <xsl:call-template name="paragraph"/>
3570
3290
  </xsl:template> <!-- license-statement/p -->
3571
3291
 
3572
3292
  <xsl:template match="*[local-name()='legal-statement']">
3573
3293
  <xsl:param name="isLegacy">false</xsl:param>
3574
3294
  <fo:block xsl:use-attribute-sets="legal-statement-style">
3575
-
3576
3295
  <xsl:apply-templates/>
3577
3296
  </fo:block>
3578
3297
  </xsl:template> <!-- legal-statement -->
3579
3298
 
3580
3299
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
3581
-
3582
- <!-- ogc-white-paper rsd -->
3583
- <xsl:variable name="level">
3584
- <xsl:call-template name="getLevel"/>
3585
- </xsl:variable>
3586
- <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
3587
- <xsl:apply-templates/>
3588
- </fo:block>
3300
+ <!-- ogc-white-paper rsd -->
3301
+ <xsl:variable name="level">
3302
+ <xsl:call-template name="getLevel"/>
3303
+ </xsl:variable>
3304
+ <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
3305
+ <xsl:apply-templates/>
3306
+ </fo:block>
3589
3307
 
3590
3308
  </xsl:template> <!-- legal-statement/title -->
3591
3309
 
3592
3310
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
3593
3311
  <xsl:param name="margin"/>
3594
-
3595
- <!-- process in the template 'paragraph' -->
3596
- <xsl:call-template name="paragraph">
3597
- <xsl:with-param name="margin" select="$margin"/>
3598
- </xsl:call-template>
3599
-
3312
+ <!-- process in the template 'paragraph' -->
3313
+ <xsl:call-template name="paragraph">
3314
+ <xsl:with-param name="margin" select="$margin"/>
3315
+ </xsl:call-template>
3600
3316
  </xsl:template> <!-- legal-statement/p -->
3601
3317
 
3602
3318
  <xsl:template match="*[local-name()='feedback-statement']">
@@ -3606,20 +3322,16 @@
3606
3322
  </xsl:template> <!-- feedback-statement -->
3607
3323
 
3608
3324
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
3609
-
3610
- <!-- process in the template 'title' -->
3611
- <xsl:call-template name="title"/>
3612
-
3325
+ <!-- process in the template 'title' -->
3326
+ <xsl:call-template name="title"/>
3613
3327
  </xsl:template>
3614
3328
 
3615
3329
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
3616
3330
  <xsl:param name="margin"/>
3617
-
3618
- <!-- process in the template 'paragraph' -->
3619
- <xsl:call-template name="paragraph">
3620
- <xsl:with-param name="margin" select="$margin"/>
3621
- </xsl:call-template>
3622
-
3331
+ <!-- process in the template 'paragraph' -->
3332
+ <xsl:call-template name="paragraph">
3333
+ <xsl:with-param name="margin" select="$margin"/>
3334
+ </xsl:call-template>
3623
3335
  </xsl:template>
3624
3336
 
3625
3337
  <!-- ================================= -->
@@ -3672,7 +3384,6 @@
3672
3384
  <xsl:template match="*[local-name()='table']" name="table">
3673
3385
 
3674
3386
  <xsl:variable name="table-preamble">
3675
-
3676
3387
  </xsl:variable>
3677
3388
 
3678
3389
  <xsl:variable name="table">
@@ -3690,8 +3401,7 @@
3690
3401
 
3691
3402
  <!-- Display table's name before table as standalone block -->
3692
3403
  <!-- $namespace = 'iso' or -->
3693
-
3694
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
3404
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
3695
3405
 
3696
3406
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
3697
3407
 
@@ -3744,8 +3454,7 @@
3744
3454
 
3745
3455
  <xsl:variable name="table_width_default">100%</xsl:variable>
3746
3456
  <xsl:variable name="table_width">
3747
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
3748
- <xsl:value-of select="$table_width_default"/>
3457
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) --><xsl:value-of select="$table_width_default"/>
3749
3458
  </xsl:variable>
3750
3459
 
3751
3460
  <xsl:variable name="table_attributes">
@@ -3888,27 +3597,25 @@
3888
3597
  <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
3889
3598
 
3890
3599
  <!-- centered table when table name is centered (see table-name-style) -->
3891
-
3892
- <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
3893
-
3894
- <fo:table-column column-width="proportional-column-width(1)"/>
3895
- <fo:table-column column-width="{@width}"/>
3896
- <fo:table-column column-width="proportional-column-width(1)"/>
3897
- <fo:table-body role="SKIP">
3898
- <fo:table-row role="SKIP">
3899
- <fo:table-cell column-number="2" role="SKIP">
3900
- <xsl:copy-of select="$table-preamble"/>
3901
- <fo:block role="SKIP">
3902
- <xsl:call-template name="setTrackChangesStyles">
3903
- <xsl:with-param name="isAdded" select="$isAdded"/>
3904
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
3905
- </xsl:call-template>
3906
- <xsl:copy-of select="$table"/>
3907
- </fo:block>
3908
- </fo:table-cell>
3909
- </fo:table-row>
3910
- </fo:table-body>
3911
- </fo:table>
3600
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
3601
+ <fo:table-column column-width="proportional-column-width(1)"/>
3602
+ <fo:table-column column-width="{@width}"/>
3603
+ <fo:table-column column-width="proportional-column-width(1)"/>
3604
+ <fo:table-body role="SKIP">
3605
+ <fo:table-row role="SKIP">
3606
+ <fo:table-cell column-number="2" role="SKIP">
3607
+ <xsl:copy-of select="$table-preamble"/>
3608
+ <fo:block role="SKIP">
3609
+ <xsl:call-template name="setTrackChangesStyles">
3610
+ <xsl:with-param name="isAdded" select="$isAdded"/>
3611
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
3612
+ </xsl:call-template>
3613
+ <xsl:copy-of select="$table"/>
3614
+ </fo:block>
3615
+ </fo:table-cell>
3616
+ </fo:table-row>
3617
+ </fo:table-body>
3618
+ </fo:table>
3912
3619
 
3913
3620
  </xsl:when>
3914
3621
  <xsl:otherwise>
@@ -3934,7 +3641,6 @@
3934
3641
  </xsl:template>
3935
3642
 
3936
3643
  <xsl:template name="setBordersTableArray">
3937
-
3938
3644
  </xsl:template>
3939
3645
 
3940
3646
  <!-- table/name-->
@@ -3943,51 +3649,50 @@
3943
3649
  <xsl:param name="cols-count"/>
3944
3650
  <xsl:if test="normalize-space() != ''">
3945
3651
 
3946
- <fo:block xsl:use-attribute-sets="table-name-style">
3947
-
3948
- <xsl:call-template name="refine_table-name-style">
3949
- <xsl:with-param name="continued" select="$continued"/>
3950
- </xsl:call-template>
3652
+ <fo:block xsl:use-attribute-sets="table-name-style">
3951
3653
 
3952
- <xsl:choose>
3953
- <xsl:when test="$continued = 'true'">
3654
+ <xsl:call-template name="refine_table-name-style">
3655
+ <xsl:with-param name="continued" select="$continued"/>
3656
+ </xsl:call-template>
3954
3657
 
3955
- </xsl:when>
3956
- <xsl:otherwise>
3957
- <xsl:apply-templates/>
3958
- </xsl:otherwise>
3959
- </xsl:choose>
3658
+ <xsl:choose>
3659
+ <xsl:when test="$continued = 'true'">
3660
+ </xsl:when>
3661
+ <xsl:otherwise>
3662
+ <xsl:apply-templates/>
3663
+ </xsl:otherwise>
3664
+ </xsl:choose>
3960
3665
 
3961
- </fo:block>
3666
+ </fo:block>
3962
3667
 
3963
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3964
- <xsl:if test="$continued = 'true'">
3668
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3669
+ <xsl:if test="$continued = 'true'">
3965
3670
 
3966
- <!-- to prevent the error 'THead element may contain only TR elements' -->
3671
+ <!-- to prevent the error 'THead element may contain only TR elements' -->
3967
3672
 
3968
- <xsl:choose>
3969
- <xsl:when test="string(number($cols-count)) != 'NaN'">
3970
- <fo:table width="100%" table-layout="fixed" role="SKIP">
3971
- <fo:table-body role="SKIP">
3972
- <fo:table-row>
3973
- <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
3974
- <fo:block text-align="right" role="SKIP">
3975
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3976
- </fo:block>
3977
- </fo:table-cell>
3978
- </fo:table-row>
3979
- </fo:table-body>
3980
- </fo:table>
3981
- </xsl:when>
3982
- <xsl:otherwise>
3983
- <fo:block text-align="right">
3984
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3985
- </fo:block>
3986
- </xsl:otherwise>
3987
- </xsl:choose>
3673
+ <xsl:choose>
3674
+ <xsl:when test="string(number($cols-count)) != 'NaN'">
3675
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
3676
+ <fo:table-body role="SKIP">
3677
+ <fo:table-row>
3678
+ <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
3679
+ <fo:block text-align="right" role="SKIP">
3680
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3681
+ </fo:block>
3682
+ </fo:table-cell>
3683
+ </fo:table-row>
3684
+ </fo:table-body>
3685
+ </fo:table>
3686
+ </xsl:when>
3687
+ <xsl:otherwise>
3688
+ <fo:block text-align="right">
3689
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3690
+ </fo:block>
3691
+ </xsl:otherwise>
3692
+ </xsl:choose>
3988
3693
 
3989
- </xsl:if>
3990
- <!-- </xsl:if> -->
3694
+ </xsl:if>
3695
+ <!-- </xsl:if> -->
3991
3696
 
3992
3697
  </xsl:if>
3993
3698
  </xsl:template> <!-- table/name -->
@@ -4362,7 +4067,6 @@
4362
4067
  <xsl:template match="*[local-name()='thead']">
4363
4068
  <xsl:param name="cols-count"/>
4364
4069
  <fo:table-header>
4365
-
4366
4070
  <xsl:apply-templates/>
4367
4071
  </fo:table-header>
4368
4072
  </xsl:template> <!-- thead -->
@@ -4376,21 +4080,20 @@
4376
4080
 
4377
4081
  <xsl:call-template name="refine_table-header-title-style"/>
4378
4082
 
4379
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4380
- <xsl:with-param name="continued">true</xsl:with-param>
4381
- <xsl:with-param name="cols-count" select="$cols-count"/>
4382
- </xsl:apply-templates>
4083
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4084
+ <xsl:with-param name="continued">true</xsl:with-param>
4085
+ <xsl:with-param name="cols-count" select="$cols-count"/>
4086
+ </xsl:apply-templates>
4383
4087
 
4384
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4385
- <fo:block role="SKIP"/>
4386
- </xsl:if>
4088
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
4089
+ <fo:block role="SKIP"/>
4090
+ </xsl:if>
4387
4091
 
4388
4092
  </fo:table-cell>
4389
4093
  </fo:table-row>
4390
4094
  </xsl:template> <!-- table-header-title -->
4391
4095
 
4392
4096
  <xsl:template name="refine_table-header-title-style">
4393
-
4394
4097
  </xsl:template> <!-- refine_table-header-title-style -->
4395
4098
 
4396
4099
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -4420,7 +4123,6 @@
4420
4123
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
4421
4124
 
4422
4125
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
4423
-
4424
4126
  </xsl:variable>
4425
4127
 
4426
4128
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -4482,26 +4184,19 @@
4482
4184
  <xsl:call-template name="setBordersTableArray"/>
4483
4185
 
4484
4186
  <!-- fn will be processed inside 'note' processing -->
4485
-
4486
- <!-- for BSI (not PAS) display Notes before footnotes -->
4487
-
4488
- <!-- except gb and bsi -->
4489
-
4490
- <xsl:apply-templates select="../*[local-name()='p']"/>
4491
- <xsl:apply-templates select="../*[local-name()='dl']"/>
4492
- <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
4493
- <xsl:apply-templates select="../*[local-name()='example']"/>
4494
- <xsl:apply-templates select="../*[local-name()='source']"/>
4187
+ <xsl:apply-templates select="../*[local-name()='p']"/>
4188
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
4189
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
4190
+ <xsl:apply-templates select="../*[local-name()='example']"/>
4191
+ <xsl:apply-templates select="../*[local-name()='source']"/>
4495
4192
 
4496
4193
  <xsl:variable name="isDisplayRowSeparator">
4497
-
4498
4194
  </xsl:variable>
4499
4195
 
4500
4196
  <!-- horizontal row separator -->
4501
4197
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
4502
4198
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
4503
4199
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
4504
-
4505
4200
  <xsl:call-template name="setBordersTableArray"/>
4506
4201
  <fo:block font-size="1pt"> </fo:block>
4507
4202
  </fo:block-container>
@@ -4509,11 +4204,8 @@
4509
4204
  </xsl:if>
4510
4205
 
4511
4206
  <!-- fn processing -->
4512
-
4513
- <!-- <xsl:call-template name="table_fn_display" /> -->
4514
- <xsl:copy-of select="$table_fn_block"/>
4515
-
4516
- <!-- for PAS display Notes after footnotes -->
4207
+ <!-- <xsl:call-template name="table_fn_display" /> -->
4208
+ <xsl:copy-of select="$table_fn_block"/>
4517
4209
 
4518
4210
  </fo:table-cell>
4519
4211
  </fo:table-row>
@@ -4640,7 +4332,7 @@
4640
4332
  <xsl:with-param name="pText" select="$border_under_row_"/>
4641
4333
  </xsl:call-template>
4642
4334
  </xsl:variable>
4643
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
4335
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
4644
4336
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
4645
4337
  </xsl:if>
4646
4338
  </xsl:when>
@@ -4757,7 +4449,7 @@
4757
4449
  </xsl:variable>
4758
4450
  <xsl:variable name="quot">"</xsl:variable>
4759
4451
  <xsl:variable name="styles_">
4760
- <xsl:for-each select="xalan:nodeset($styles__)/item">
4452
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
4761
4453
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
4762
4454
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
4763
4455
  <xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
@@ -4807,9 +4499,7 @@
4807
4499
  <fo:block role="SKIP">
4808
4500
 
4809
4501
  <xsl:if test="$isGenerateTableIF = 'true'">
4810
-
4811
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4812
-
4502
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4813
4503
  </xsl:if>
4814
4504
 
4815
4505
  <xsl:apply-templates/>
@@ -4824,25 +4514,23 @@
4824
4514
 
4825
4515
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
4826
4516
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
4517
+ <xsl:call-template name="setNamedDestination"/>
4518
+ <fo:block xsl:use-attribute-sets="table-note-style">
4519
+ <xsl:copy-of select="@id"/>
4827
4520
 
4828
- <xsl:call-template name="setNamedDestination"/>
4829
- <fo:block xsl:use-attribute-sets="table-note-style">
4830
- <xsl:copy-of select="@id"/>
4831
-
4832
- <xsl:call-template name="refine_table-note-style"/>
4833
-
4834
- <!-- Table's note/example name (NOTE, for example) -->
4835
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
4521
+ <xsl:call-template name="refine_table-note-style"/>
4836
4522
 
4837
- <xsl:call-template name="refine_table-note-name-style"/>
4523
+ <!-- Table's note/example name (NOTE, for example) -->
4524
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
4838
4525
 
4839
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4526
+ <xsl:call-template name="refine_table-note-name-style"/>
4840
4527
 
4841
- </fo:inline>
4528
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4842
4529
 
4843
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4844
- </fo:block>
4530
+ </fo:inline>
4845
4531
 
4532
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4533
+ </fo:block>
4846
4534
  </xsl:template> <!-- table/note -->
4847
4535
 
4848
4536
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
@@ -4887,9 +4575,7 @@
4887
4575
  <xsl:variable name="current_fn_number" select="@reference"/>
4888
4576
 
4889
4577
  <xsl:variable name="current_fn_number_text">
4890
-
4891
- <xsl:value-of select="$current_fn_number"/>
4892
-
4578
+ <xsl:value-of select="$current_fn_number"/>
4893
4579
  </xsl:variable>
4894
4580
 
4895
4581
  <xsl:variable name="ref_id" select="@target"/>
@@ -4901,12 +4587,10 @@
4901
4587
  <xsl:choose>
4902
4588
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
4903
4589
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
4904
-
4905
4590
  </fn_styles>
4906
4591
  </xsl:when>
4907
4592
  <xsl:otherwise>
4908
4593
  <fn_styles xsl:use-attribute-sets="fn-num-style">
4909
-
4910
4594
  </fn_styles>
4911
4595
  </xsl:otherwise>
4912
4596
  </xsl:choose>
@@ -4924,7 +4608,6 @@
4924
4608
  <xsl:with-param name="element">
4925
4609
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
4926
4610
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
4927
-
4928
4611
  <xsl:copy-of select="$current_fn_number_text"/>
4929
4612
 
4930
4613
  </fo:inline>
@@ -4962,10 +4645,9 @@
4962
4645
  <here><xsl:copy-of select="$footnotes"/></here> -->
4963
4646
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
4964
4647
  </xsl:variable>
4965
-
4966
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
4967
- <xsl:copy-of select="$fn_block"/>
4968
- </fo:block>
4648
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
4649
+ <xsl:copy-of select="$fn_block"/>
4650
+ </fo:block>
4969
4651
 
4970
4652
  </fo:block-container>
4971
4653
  </fo:footnote-body>
@@ -5042,21 +4724,20 @@
5042
4724
  <xsl:variable name="reference" select="@reference"/>
5043
4725
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
5044
4726
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
4727
+ <fo:block xsl:use-attribute-sets="table-fn-style">
4728
+ <xsl:copy-of select="@id"/>
4729
+ <xsl:call-template name="refine_table-fn-style"/>
5045
4730
 
5046
- <fo:block xsl:use-attribute-sets="table-fn-style">
5047
- <xsl:copy-of select="@id"/>
5048
- <xsl:call-template name="refine_table-fn-style"/>
5049
-
5050
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
5051
- <xsl:with-param name="process">true</xsl:with-param>
5052
- </xsl:apply-templates>
4731
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
4732
+ <xsl:with-param name="process">true</xsl:with-param>
4733
+ </xsl:apply-templates>
5053
4734
 
5054
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
5055
- <!-- <xsl:copy-of select="./node()"/> -->
5056
- <xsl:apply-templates/>
5057
- </fo:inline>
4735
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
4736
+ <!-- <xsl:copy-of select="./node()"/> -->
4737
+ <xsl:apply-templates/>
4738
+ </fo:inline>
5058
4739
 
5059
- </fo:block>
4740
+ </fo:block>
5060
4741
 
5061
4742
  <!-- </xsl:if> -->
5062
4743
  </xsl:for-each>
@@ -5109,7 +4790,6 @@
5109
4790
  <xsl:param name="process">false</xsl:param>
5110
4791
  <xsl:if test="$process = 'true'">
5111
4792
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
5112
-
5113
4793
  </xsl:if>
5114
4794
  </xsl:template>
5115
4795
 
@@ -5193,7 +4873,6 @@
5193
4873
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
5194
4874
 
5195
4875
  <xsl:variable name="key_iso">
5196
-
5197
4876
  </xsl:variable>
5198
4877
 
5199
4878
  <fo:block>
@@ -5239,7 +4918,6 @@
5239
4918
  <fo:table width="95%" table-layout="fixed">
5240
4919
  <xsl:if test="normalize-space($key_iso) = 'true'">
5241
4920
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5242
-
5243
4921
  </xsl:if>
5244
4922
  <xsl:choose>
5245
4923
  <!-- if there 'dl', then set same columns width -->
@@ -5263,23 +4941,19 @@
5263
4941
  <fo:table-row>
5264
4942
  <fo:table-cell>
5265
4943
  <fo:block>
5266
-
5267
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
5268
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
5269
- <!-- <xsl:value-of select="@reference"/> -->
5270
- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
5271
- </fo:inline>
4944
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
4945
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
4946
+ <!-- <xsl:value-of select="@reference"/> -->
4947
+ <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
4948
+ </fo:inline>
5272
4949
 
5273
4950
  </fo:block>
5274
4951
  </fo:table-cell>
5275
4952
  <fo:table-cell>
5276
4953
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
5277
4954
  <xsl:if test="normalize-space($key_iso) = 'true'">
5278
-
5279
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
5280
-
4955
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
5281
4956
  </xsl:if>
5282
-
5283
4957
  <!-- <xsl:copy-of select="./node()"/> -->
5284
4958
  <xsl:apply-templates/>
5285
4959
  </fo:block>
@@ -5329,11 +5003,9 @@
5329
5003
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
5330
5004
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
5331
5005
  <xsl:variable name="key_iso">
5332
-
5333
5006
  </xsl:variable>
5334
5007
  <xsl:if test="normalize-space($key_iso) = 'true'">
5335
5008
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5336
-
5337
5009
  </xsl:if>
5338
5010
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
5339
5011
  <!-- <xsl:value-of select="@reference"/> -->
@@ -5379,8 +5051,7 @@
5379
5051
  <xsl:text>※</xsl:text>
5380
5052
  </xsl:if> -->
5381
5053
  <!-- <xsl:value-of select="@reference"/> -->
5382
-
5383
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
5054
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
5384
5055
 
5385
5056
  <!-- <xsl:if test="$namespace = 'bsi'">
5386
5057
  <xsl:text>)</xsl:text>
@@ -5452,10 +5123,9 @@
5452
5123
  </xsl:if>
5453
5124
 
5454
5125
  <xsl:call-template name="setBlockSpanAll"/>
5455
-
5456
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
5457
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
5458
- </xsl:if>
5126
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
5127
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5128
+ </xsl:if>
5459
5129
 
5460
5130
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
5461
5131
  <!-- set font-size as sourcecode font-size -->
@@ -5476,7 +5146,6 @@
5476
5146
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
5477
5147
  </xsl:choose>
5478
5148
  </xsl:attribute>
5479
-
5480
5149
  </xsl:if>
5481
5150
 
5482
5151
  <xsl:call-template name="setTrackChangesStyles">
@@ -5485,37 +5154,32 @@
5485
5154
  </xsl:call-template>
5486
5155
 
5487
5156
  <fo:block-container margin-left="0mm" role="SKIP">
5488
-
5489
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
5157
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5490
5158
 
5491
5159
  <xsl:variable name="parent" select="local-name(..)"/>
5492
5160
 
5493
- <xsl:variable name="key_iso">
5494
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
5161
+ <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
5495
5162
  </xsl:variable>
5496
5163
 
5497
5164
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
5498
5165
 
5499
5166
  <xsl:choose>
5500
5167
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
5501
-
5502
- <fo:block margin-bottom="12pt" text-align="left">
5503
-
5504
- <!-- <xsl:variable name="title-where">
5168
+ <fo:block margin-bottom="12pt" text-align="left">
5169
+ <!-- <xsl:variable name="title-where">
5505
5170
  <xsl:call-template name="getLocalizedString">
5506
5171
  <xsl:with-param name="key">where</xsl:with-param>
5507
5172
  </xsl:call-template>
5508
5173
  </xsl:variable>
5509
5174
  <xsl:value-of select="$title-where"/> -->
5510
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
5511
- <xsl:text> </xsl:text>
5512
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
5513
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
5514
- <xsl:text> </xsl:text>
5515
- </xsl:if>
5516
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
5517
- </fo:block>
5518
-
5175
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
5176
+ <xsl:text> </xsl:text>
5177
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
5178
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
5179
+ <xsl:text> </xsl:text>
5180
+ </xsl:if>
5181
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
5182
+ </fo:block>
5519
5183
  </xsl:when> <!-- END: only one component -->
5520
5184
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
5521
5185
  <fo:block margin-bottom="12pt" text-align="left">
@@ -5535,19 +5199,17 @@
5535
5199
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
5536
5200
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
5537
5201
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
5202
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
5538
5203
 
5539
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
5540
-
5541
- <xsl:call-template name="refine_figure_key_style"/>
5542
-
5543
- <xsl:variable name="title-key">
5544
- <xsl:call-template name="getLocalizedString">
5545
- <xsl:with-param name="key">key</xsl:with-param>
5546
- </xsl:call-template>
5547
- </xsl:variable>
5548
- <xsl:value-of select="$title-key"/>
5549
- </fo:block>
5204
+ <xsl:call-template name="refine_figure_key_style"/>
5550
5205
 
5206
+ <xsl:variable name="title-key">
5207
+ <xsl:call-template name="getLocalizedString">
5208
+ <xsl:with-param name="key">key</xsl:with-param>
5209
+ </xsl:call-template>
5210
+ </xsl:variable>
5211
+ <xsl:value-of select="$title-key"/>
5212
+ </fo:block>
5551
5213
  </xsl:if>
5552
5214
  </xsl:when> <!-- END: definition list in a figure -->
5553
5215
  </xsl:choose>
@@ -5580,12 +5242,10 @@
5580
5242
  <xsl:if test="$isGenerateTableIF = 'true'">
5581
5243
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
5582
5244
  </xsl:if>
5583
-
5584
5245
  <xsl:choose>
5585
5246
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
5586
5247
  <xsl:when test="normalize-space($key_iso) = 'true'">
5587
5248
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5588
-
5589
5249
  </xsl:when>
5590
5250
  </xsl:choose>
5591
5251
 
@@ -5690,17 +5350,15 @@
5690
5350
  <xsl:call-template name="getMaxLength_dt"/>
5691
5351
  </xsl:variable>
5692
5352
 
5693
- <xsl:variable name="isContainsKeepTogetherTag_">
5694
- false
5353
+ <xsl:variable name="isContainsKeepTogetherTag_">false
5695
5354
  </xsl:variable>
5696
5355
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
5697
5356
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
5698
-
5699
- <xsl:call-template name="setColumnWidth_dl">
5700
- <xsl:with-param name="colwidths" select="$colwidths"/>
5701
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
5702
- <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
5703
- </xsl:call-template>
5357
+ <xsl:call-template name="setColumnWidth_dl">
5358
+ <xsl:with-param name="colwidths" select="$colwidths"/>
5359
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
5360
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
5361
+ </xsl:call-template>
5704
5362
 
5705
5363
  <fo:table-body>
5706
5364
 
@@ -5751,24 +5409,19 @@
5751
5409
  </xsl:template>
5752
5410
 
5753
5411
  <xsl:template name="refine_dl_formula_where_style">
5754
-
5755
5412
  </xsl:template> <!-- refine_dl_formula_where_style -->
5756
5413
 
5757
5414
  <xsl:template name="refine_figure_key_style">
5758
-
5759
- <xsl:attribute name="font-weight">normal</xsl:attribute>
5760
- <xsl:attribute name="color">black</xsl:attribute>
5761
-
5415
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
5416
+ <xsl:attribute name="color">black</xsl:attribute>
5762
5417
  </xsl:template> <!-- refine_figure_key_style -->
5763
5418
 
5764
5419
  <xsl:template name="refine_multicomponent_style">
5765
5420
  <xsl:variable name="parent" select="local-name(..)"/>
5766
-
5767
5421
  </xsl:template> <!-- refine_multicomponent_style -->
5768
5422
 
5769
5423
  <xsl:template name="refine_multicomponent_block_style">
5770
5424
  <xsl:variable name="parent" select="local-name(..)"/>
5771
-
5772
5425
  </xsl:template> <!-- refine_multicomponent_block_style -->
5773
5426
 
5774
5427
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -5955,14 +5608,11 @@
5955
5608
  <xsl:attribute name="id">
5956
5609
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
5957
5610
  </xsl:attribute>
5958
-
5959
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
5960
- <xsl:with-param name="process">true</xsl:with-param>
5961
- </xsl:apply-templates>
5962
-
5611
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
5612
+ <xsl:with-param name="process">true</xsl:with-param>
5613
+ </xsl:apply-templates>
5963
5614
  </td>
5964
5615
  </tr>
5965
-
5966
5616
  </xsl:template>
5967
5617
 
5968
5618
  <!-- Definition's term -->
@@ -5971,7 +5621,6 @@
5971
5621
  <xsl:param name="split_keep-within-line"/>
5972
5622
 
5973
5623
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
5974
-
5975
5624
  <xsl:call-template name="insert_dt_cell">
5976
5625
  <xsl:with-param name="key_iso" select="$key_iso"/>
5977
5626
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -5993,7 +5642,6 @@
5993
5642
  <!-- border is mandatory, to calculate real width -->
5994
5643
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
5995
5644
  <xsl:attribute name="text-align">left</xsl:attribute>
5996
-
5997
5645
  </xsl:if>
5998
5646
 
5999
5647
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -6003,9 +5651,7 @@
6003
5651
 
6004
5652
  <xsl:choose>
6005
5653
  <xsl:when test="$isGenerateTableIF = 'true'">
6006
-
6007
- <xsl:copy-of select="@id"/>
6008
-
5654
+ <xsl:copy-of select="@id"/>
6009
5655
  </xsl:when>
6010
5656
  <xsl:otherwise>
6011
5657
  <xsl:copy-of select="@id"/>
@@ -6042,9 +5688,7 @@
6042
5688
  <fo:block role="SKIP">
6043
5689
 
6044
5690
  <xsl:if test="$isGenerateTableIF = 'true'">
6045
-
6046
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6047
-
5691
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6048
5692
  </xsl:if>
6049
5693
 
6050
5694
  <xsl:choose>
@@ -6192,7 +5836,6 @@
6192
5836
  </xsl:template>
6193
5837
 
6194
5838
  <xsl:template name="refine_italic_style">
6195
-
6196
5839
  </xsl:template>
6197
5840
 
6198
5841
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -6208,12 +5851,10 @@
6208
5851
  </xsl:template>
6209
5852
 
6210
5853
  <xsl:template name="refine_strong_style">
6211
-
6212
- <xsl:if test="not(parent::*[local-name() = 'termsource'])">
6213
- <xsl:attribute name="font-weight">normal</xsl:attribute>
6214
- <xsl:attribute name="color">black</xsl:attribute>
6215
- </xsl:if>
6216
-
5854
+ <xsl:if test="not(parent::*[local-name() = 'termsource'])">
5855
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
5856
+ <xsl:attribute name="color">black</xsl:attribute>
5857
+ </xsl:if>
6217
5858
  <xsl:if test="ancestor::*['preferred']">
6218
5859
  <xsl:attribute name="role">SKIP</xsl:attribute>
6219
5860
  </xsl:if>
@@ -6238,15 +5879,11 @@
6238
5879
  <xsl:template match="*[local-name()='tt']">
6239
5880
  <fo:inline xsl:use-attribute-sets="tt-style">
6240
5881
 
6241
- <xsl:variable name="_font-size">
6242
-
6243
- <!-- inherit -->
6244
-
6245
- <xsl:choose>
6246
- <xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
6247
- <xsl:otherwise>95%</xsl:otherwise> <!-- 110% -->
6248
- </xsl:choose>
6249
-
5882
+ <xsl:variable name="_font-size"> <!-- inherit -->
5883
+ <xsl:choose>
5884
+ <xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
5885
+ <xsl:otherwise>95%</xsl:otherwise> <!-- 110% -->
5886
+ </xsl:choose>
6250
5887
  </xsl:variable>
6251
5888
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6252
5889
  <xsl:if test="$font-size != ''">
@@ -6462,8 +6099,7 @@
6462
6099
  </xsl:otherwise>
6463
6100
  </xsl:choose>
6464
6101
  </xsl:variable>
6465
- <xsl:variable name="ratio_">
6466
- 0.75
6102
+ <xsl:variable name="ratio_">0.75
6467
6103
  </xsl:variable>
6468
6104
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
6469
6105
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -6553,7 +6189,7 @@
6553
6189
 
6554
6190
  <xsl:variable name="quot">"</xsl:variable>
6555
6191
  <xsl:variable name="styles_">
6556
- <xsl:for-each select="xalan:nodeset($styles__)/item">
6192
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
6557
6193
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
6558
6194
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
6559
6195
  <xsl:variable name="value">
@@ -6565,7 +6201,7 @@
6565
6201
  </xsl:otherwise>
6566
6202
  </xsl:choose>
6567
6203
  </xsl:variable>
6568
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
6204
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
6569
6205
  <style name="{$key}"><xsl:value-of select="$value"/></style>
6570
6206
  </xsl:if>
6571
6207
  <xsl:if test="$key = 'text-indent'">
@@ -6579,7 +6215,6 @@
6579
6215
  <fo:inline>
6580
6216
  <xsl:for-each select="$styles/style">
6581
6217
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
6582
-
6583
6218
  </xsl:for-each>
6584
6219
  <xsl:apply-templates/>
6585
6220
  </fo:inline>
@@ -7566,10 +7201,9 @@
7566
7201
  <xsl:variable name="mathml_content">
7567
7202
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
7568
7203
  </xsl:variable>
7569
-
7570
- <xsl:call-template name="mathml_instream_object">
7571
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
7572
- </xsl:call-template>
7204
+ <xsl:call-template name="mathml_instream_object">
7205
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
7206
+ </xsl:call-template>
7573
7207
 
7574
7208
  </fo:inline>
7575
7209
  </xsl:template>
@@ -7603,7 +7237,6 @@
7603
7237
  <xsl:template name="getMathml_asciimath_text">
7604
7238
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
7605
7239
  <xsl:variable name="latexmath">
7606
-
7607
7240
  </xsl:variable>
7608
7241
  <xsl:variable name="asciimath_text_following">
7609
7242
  <xsl:choose>
@@ -7676,7 +7309,6 @@
7676
7309
  </xsl:template>
7677
7310
 
7678
7311
  <xsl:template name="refine_mathml_insteam_object_style">
7679
-
7680
7312
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
7681
7313
 
7682
7314
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -8074,7 +7706,6 @@
8074
7706
  <xsl:variable name="annotation-id" select="@id"/>
8075
7707
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
8076
7708
  <fo:block id="{$annotation-id}" white-space="nowrap">
8077
-
8078
7709
  <fo:inline>
8079
7710
  <xsl:apply-templates>
8080
7711
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -8103,7 +7734,6 @@
8103
7734
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
8104
7735
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8105
7736
  </xsl:if>
8106
-
8107
7737
  <xsl:if test="parent::*[local-name() = 'add']">
8108
7738
  <xsl:call-template name="append_add-style"/>
8109
7739
  </xsl:if>
@@ -8114,8 +7744,7 @@
8114
7744
  </xsl:template>
8115
7745
 
8116
7746
  <!-- command between two xref points to non-standard bibitem -->
8117
- <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
8118
- <xsl:value-of select="."/>
7747
+ <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]"><xsl:value-of select="."/>
8119
7748
  </xsl:template>
8120
7749
 
8121
7750
  <!-- ====== -->
@@ -8130,7 +7759,6 @@
8130
7759
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
8131
7760
  </xsl:choose>
8132
7761
  </xsl:attribute>
8133
-
8134
7762
  </xsl:if>
8135
7763
  <fo:block-container margin-left="0mm" role="SKIP">
8136
7764
  <xsl:call-template name="setNamedDestination"/>
@@ -8220,53 +7848,49 @@
8220
7848
 
8221
7849
  <xsl:template match="*[local-name() = 'note']" name="note">
8222
7850
 
8223
- <xsl:call-template name="setNamedDestination"/>
8224
-
8225
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8226
-
8227
- <xsl:call-template name="setBlockSpanAll"/>
8228
-
8229
- <xsl:call-template name="refine_note-style"/>
7851
+ <xsl:call-template name="setNamedDestination"/>
8230
7852
 
8231
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7853
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
8232
7854
 
8233
- <fo:block>
7855
+ <xsl:call-template name="setBlockSpanAll"/>
8234
7856
 
8235
- <xsl:call-template name="refine_note_block_style"/>
7857
+ <xsl:call-template name="refine_note-style"/>
8236
7858
 
8237
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
7859
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7860
+ <fo:block>
8238
7861
 
8239
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
7862
+ <xsl:call-template name="refine_note_block_style"/>
8240
7863
 
8241
- <xsl:call-template name="refine_note-name-style"/>
7864
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
8242
7865
 
8243
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
8244
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
8245
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
8246
- <xsl:call-template name="append_add-style"/>
8247
- </xsl:if>
7866
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
8248
7867
 
8249
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
8250
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8251
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
8252
- <xsl:with-param name="skip">false</xsl:with-param>
8253
- </xsl:apply-templates>
8254
- </xsl:if>
7868
+ <xsl:call-template name="refine_note-name-style"/>
8255
7869
 
8256
- <xsl:apply-templates select="*[local-name() = 'name']"/>
7870
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7871
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7872
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7873
+ <xsl:call-template name="append_add-style"/>
7874
+ </xsl:if>
8257
7875
 
8258
- </fo:inline>
7876
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7877
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7878
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7879
+ <xsl:with-param name="skip">false</xsl:with-param>
7880
+ </xsl:apply-templates>
7881
+ </xsl:if>
8259
7882
 
8260
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8261
- </fo:block>
7883
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8262
7884
 
8263
- </fo:block-container>
8264
- </fo:block-container>
7885
+ </fo:inline>
8265
7886
 
7887
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7888
+ </fo:block>
7889
+ </fo:block-container>
7890
+ </fo:block-container>
8266
7891
  </xsl:template>
8267
7892
 
8268
7893
  <xsl:template name="refine_note_block_style">
8269
-
8270
7894
  </xsl:template> <!-- refine_note_block_style -->
8271
7895
 
8272
7896
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -8319,7 +7943,6 @@
8319
7943
  <xsl:value-of select="$sfx"/>
8320
7944
  </xsl:when>
8321
7945
  <xsl:otherwise>
8322
-
8323
7946
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
8324
7947
  <!-- <xsl:if test="$namespace = 'ieee'">
8325
7948
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -8327,7 +7950,6 @@
8327
7950
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
8328
7951
  <xsl:text>:</xsl:text>
8329
7952
  </xsl:if> -->
8330
-
8331
7953
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8332
7954
  <xsl:text> – </xsl:text> en dash &#x2013;
8333
7955
  </xsl:if> -->
@@ -8348,7 +7970,6 @@
8348
7970
  <xsl:value-of select="$sfx"/>
8349
7971
  </xsl:when>
8350
7972
  <xsl:otherwise>
8351
-
8352
7973
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
8353
7974
  <!-- <xsl:if test="$namespace = 'ieee'">
8354
7975
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -8404,7 +8025,6 @@
8404
8025
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
8405
8026
 
8406
8027
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
8407
-
8408
8028
  </xsl:if>
8409
8029
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8410
8030
  </fo:block>
@@ -8439,16 +8059,13 @@
8439
8059
  <xsl:call-template name="setTrackChangesStyles">
8440
8060
  <xsl:with-param name="isAdded" select="$isAdded"/>
8441
8061
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
8442
- </xsl:call-template>
8443
-
8444
- <!-- show figure's name BEFORE image -->
8445
- <xsl:apply-templates select="*[local-name() = 'name']"/>
8062
+ </xsl:call-template> <!-- show figure's name BEFORE image -->
8063
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8446
8064
 
8447
8065
  <!-- Example: Dimensions in millimeters -->
8448
8066
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
8449
8067
 
8450
- <xsl:variable name="show_figure_key_in_block_container">
8451
- true
8068
+ <xsl:variable name="show_figure_key_in_block_container">true
8452
8069
  </xsl:variable>
8453
8070
 
8454
8071
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
@@ -8465,7 +8082,6 @@
8465
8082
  </xsl:if>
8466
8083
 
8467
8084
  </fo:block-container>
8468
-
8469
8085
  </xsl:template>
8470
8086
 
8471
8087
  <xsl:template name="showFigureKey">
@@ -8503,13 +8119,12 @@
8503
8119
  <!-- SOURCE: ... -->
8504
8120
  <!-- figure/source -->
8505
8121
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
8506
-
8507
- <xsl:call-template name="termsource"/>
8508
-
8122
+ <xsl:call-template name="termsource"/>
8509
8123
  </xsl:template>
8510
8124
 
8511
8125
  <xsl:template match="*[local-name() = 'image']">
8512
8126
  <xsl:param name="indent">0</xsl:param>
8127
+ <xsl:param name="logo_width"/>
8513
8128
  <xsl:variable name="isAdded" select="../@added"/>
8514
8129
  <xsl:variable name="isDeleted" select="../@deleted"/>
8515
8130
  <xsl:choose>
@@ -8531,9 +8146,18 @@
8531
8146
 
8532
8147
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
8533
8148
 
8534
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
8535
8149
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
8536
8150
 
8151
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
8152
+ <xsl:attribute name="width">100%</xsl:attribute>
8153
+ <xsl:if test="normalize-space($logo_width) != ''">
8154
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
8155
+ </xsl:if>
8156
+ <xsl:attribute name="content-height">100%</xsl:attribute>
8157
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8158
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
8159
+ </xsl:if>
8160
+
8537
8161
  <xsl:variable name="width">
8538
8162
  <xsl:call-template name="setImageWidth"/>
8539
8163
  </xsl:variable>
@@ -8611,8 +8235,7 @@
8611
8235
  </xsl:call-template>
8612
8236
  </xsl:variable>
8613
8237
 
8614
- <xsl:variable name="scaleRatio">
8615
- 1
8238
+ <xsl:variable name="scaleRatio">1
8616
8239
  </xsl:variable>
8617
8240
 
8618
8241
  <xsl:if test="number($scale) &lt; 100">
@@ -8723,18 +8346,14 @@
8723
8346
  </xsl:variable>
8724
8347
 
8725
8348
  <xsl:variable name="image_width_effective">
8726
-
8727
- <xsl:value-of select="$width_effective - number($indent_left)"/>
8728
-
8349
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
8729
8350
  </xsl:variable>
8730
8351
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
8731
8352
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
8732
8353
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
8733
8354
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
8734
8355
  <xsl:variable name="scale">
8735
-
8736
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
8737
-
8356
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
8738
8357
  </xsl:variable>
8739
8358
  <xsl:value-of select="$scale"/>
8740
8359
  </xsl:template>
@@ -8755,7 +8374,8 @@
8755
8374
  </xsl:when>
8756
8375
  <xsl:when test="not(starts-with(@src, 'data:'))">
8757
8376
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
8758
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
8377
+ <xsl:variable name="file_protocol"><xsl:if test="not(starts-with($src_external, 'http:')) and not(starts-with($src_external, 'https:')) and not(starts-with($src_external, 'www.'))">file:///</xsl:if></xsl:variable>
8378
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
8759
8379
  </xsl:when>
8760
8380
  <xsl:otherwise>
8761
8381
  <xsl:value-of select="@src"/>
@@ -9051,8 +8671,8 @@
9051
8671
  </xsl:call-template>
9052
8672
  </xsl:variable>
9053
8673
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
9054
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
9055
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
8674
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
8675
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
9056
8676
 
9057
8677
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
9058
8678
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -9124,8 +8744,8 @@
9124
8744
  </xsl:variable>
9125
8745
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
9126
8746
  <xsl:variable name="att_name" select="local-name()"/>
9127
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
9128
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
8747
+ <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/mn:item[1], ',', $components/mn:item[2], ',', $components/mn:item[3], ')')"/></xsl:attribute>
8748
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
9129
8749
  </xsl:template>
9130
8750
 
9131
8751
  <!-- ============== -->
@@ -9198,13 +8818,13 @@
9198
8818
  </xsl:call-template>
9199
8819
  </xsl:variable>
9200
8820
  <xsl:variable name="x_coords">
9201
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
8821
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
9202
8822
  <xsl:sort select="." data-type="number"/>
9203
8823
  <x><xsl:value-of select="."/></x>
9204
8824
  </xsl:for-each>
9205
8825
  </xsl:variable>
9206
8826
  <xsl:variable name="y_coords">
9207
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
8827
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
9208
8828
  <xsl:sort select="." data-type="number"/>
9209
8829
  <y><xsl:value-of select="."/></y>
9210
8830
  </xsl:for-each>
@@ -9409,11 +9029,11 @@
9409
9029
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
9410
9030
  </xsl:variable>
9411
9031
 
9412
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
9413
- <title>
9032
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
9033
+ <mn:title>
9414
9034
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
9415
- </title>
9416
- </item>
9035
+ </mn:title>
9036
+ </mn:item>
9417
9037
  </xsl:if>
9418
9038
  </xsl:template>
9419
9039
 
@@ -9484,12 +9104,12 @@
9484
9104
  <xsl:param name="contents"/>
9485
9105
  <xsl:param name="contents_addon"/>
9486
9106
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
9487
- <xsl:if test="$contents_nodes//item">
9107
+ <xsl:if test="$contents_nodes//mn:item">
9488
9108
  <fo:bookmark-tree>
9489
9109
  <xsl:choose>
9490
- <xsl:when test="$contents_nodes/doc">
9110
+ <xsl:when test="$contents_nodes/mn:doc">
9491
9111
  <xsl:choose>
9492
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
9112
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
9493
9113
 
9494
9114
  <xsl:if test="$contents_nodes/collection">
9495
9115
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -9497,8 +9117,8 @@
9497
9117
  </fo:bookmark>
9498
9118
  </xsl:if>
9499
9119
 
9500
- <xsl:for-each select="$contents_nodes/doc">
9501
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
9120
+ <xsl:for-each select="$contents_nodes/mn:doc">
9121
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
9502
9122
  <xsl:if test="@bundle = 'true'">
9503
9123
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
9504
9124
  </xsl:if>
@@ -9532,14 +9152,14 @@
9532
9152
  </xsl:choose>
9533
9153
  </fo:bookmark-title>
9534
9154
 
9535
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
9155
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
9536
9156
 
9537
9157
  <xsl:call-template name="insertFigureBookmarks">
9538
- <xsl:with-param name="contents" select="contents"/>
9158
+ <xsl:with-param name="contents" select="mn:contents"/>
9539
9159
  </xsl:call-template>
9540
9160
 
9541
9161
  <xsl:call-template name="insertTableBookmarks">
9542
- <xsl:with-param name="contents" select="contents"/>
9162
+ <xsl:with-param name="contents" select="mn:contents"/>
9543
9163
  <xsl:with-param name="lang" select="@lang"/>
9544
9164
  </xsl:call-template>
9545
9165
 
@@ -9548,16 +9168,16 @@
9548
9168
  </xsl:for-each>
9549
9169
  </xsl:when>
9550
9170
  <xsl:otherwise>
9551
- <xsl:for-each select="$contents_nodes/doc">
9171
+ <xsl:for-each select="$contents_nodes/mn:doc">
9552
9172
 
9553
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
9173
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
9554
9174
 
9555
9175
  <xsl:call-template name="insertFigureBookmarks">
9556
- <xsl:with-param name="contents" select="contents"/>
9176
+ <xsl:with-param name="contents" select="mn:contents"/>
9557
9177
  </xsl:call-template>
9558
9178
 
9559
9179
  <xsl:call-template name="insertTableBookmarks">
9560
- <xsl:with-param name="contents" select="contents"/>
9180
+ <xsl:with-param name="contents" select="mn:contents"/>
9561
9181
  <xsl:with-param name="lang" select="@lang"/>
9562
9182
  </xsl:call-template>
9563
9183
 
@@ -9566,14 +9186,14 @@
9566
9186
  </xsl:choose>
9567
9187
  </xsl:when>
9568
9188
  <xsl:otherwise>
9569
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
9189
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
9570
9190
 
9571
9191
  <xsl:call-template name="insertFigureBookmarks">
9572
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
9192
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
9573
9193
  </xsl:call-template>
9574
9194
 
9575
9195
  <xsl:call-template name="insertTableBookmarks">
9576
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
9196
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
9577
9197
  <xsl:with-param name="lang" select="@lang"/>
9578
9198
  </xsl:call-template>
9579
9199
 
@@ -9590,80 +9210,72 @@
9590
9210
  <xsl:template name="insertFigureBookmarks">
9591
9211
  <xsl:param name="contents"/>
9592
9212
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
9593
- <xsl:if test="$contents_nodes/figure">
9594
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
9213
+ <xsl:if test="$contents_nodes/mn:figure">
9214
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
9595
9215
  <fo:bookmark-title>Figures</fo:bookmark-title>
9596
- <xsl:for-each select="$contents_nodes/figure">
9216
+ <xsl:for-each select="$contents_nodes/mn:figure">
9597
9217
  <fo:bookmark internal-destination="{@id}">
9598
9218
  <fo:bookmark-title>
9599
- <xsl:value-of select="normalize-space(title)"/>
9219
+ <xsl:value-of select="normalize-space(mn:title)"/>
9600
9220
  </fo:bookmark-title>
9601
9221
  </fo:bookmark>
9602
9222
  </xsl:for-each>
9603
9223
  </fo:bookmark>
9604
9224
  </xsl:if>
9225
+ <xsl:if test="$contents_nodes//mn:figures/mn:figure">
9226
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
9605
9227
 
9606
- <xsl:if test="$contents_nodes//figures/figure">
9607
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
9608
-
9609
- <xsl:variable name="bookmark-title">
9610
-
9611
- <xsl:value-of select="$title-list-figures"/>
9612
-
9613
- </xsl:variable>
9614
- <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
9615
- <xsl:for-each select="$contents_nodes//figures/figure">
9616
- <fo:bookmark internal-destination="{@id}">
9617
- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
9618
- </fo:bookmark>
9619
- </xsl:for-each>
9228
+ <xsl:variable name="bookmark-title">
9229
+ <xsl:value-of select="$title-list-figures"/>
9230
+ </xsl:variable>
9231
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
9232
+ <xsl:for-each select="$contents_nodes//mn:figures/mn:figure">
9233
+ <fo:bookmark internal-destination="{@id}">
9234
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
9620
9235
  </fo:bookmark>
9621
- </xsl:if>
9622
-
9236
+ </xsl:for-each>
9237
+ </fo:bookmark>
9238
+ </xsl:if>
9623
9239
  </xsl:template> <!-- insertFigureBookmarks -->
9624
9240
 
9625
9241
  <xsl:template name="insertTableBookmarks">
9626
9242
  <xsl:param name="contents"/>
9627
9243
  <xsl:param name="lang"/>
9628
9244
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
9629
- <xsl:if test="$contents_nodes/table">
9630
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
9245
+ <xsl:if test="$contents_nodes/mn:table">
9246
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
9631
9247
  <fo:bookmark-title>
9632
9248
  <xsl:choose>
9633
9249
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
9634
9250
  <xsl:otherwise>Tables</xsl:otherwise>
9635
9251
  </xsl:choose>
9636
9252
  </fo:bookmark-title>
9637
- <xsl:for-each select="$contents_nodes/table">
9253
+ <xsl:for-each select="$contents_nodes/mn:table">
9638
9254
  <fo:bookmark internal-destination="{@id}">
9639
9255
  <fo:bookmark-title>
9640
- <xsl:value-of select="normalize-space(title)"/>
9256
+ <xsl:value-of select="normalize-space(mn:title)"/>
9641
9257
  </fo:bookmark-title>
9642
9258
  </fo:bookmark>
9643
9259
  </xsl:for-each>
9644
9260
  </fo:bookmark>
9645
9261
  </xsl:if>
9262
+ <xsl:if test="$contents_nodes//mn:tables/mn:table">
9263
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
9646
9264
 
9647
- <xsl:if test="$contents_nodes//tables/table">
9648
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
9649
-
9650
- <xsl:variable name="bookmark-title">
9651
-
9652
- <xsl:value-of select="$title-list-tables"/>
9653
-
9654
- </xsl:variable>
9265
+ <xsl:variable name="bookmark-title">
9266
+ <xsl:value-of select="$title-list-tables"/>
9267
+ </xsl:variable>
9655
9268
 
9656
- <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
9269
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
9657
9270
 
9658
- <xsl:for-each select="$contents_nodes//tables/table">
9659
- <fo:bookmark internal-destination="{@id}">
9660
- <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
9661
- <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
9662
- </fo:bookmark>
9663
- </xsl:for-each>
9271
+ <xsl:for-each select="$contents_nodes//mn:tables/mn:table">
9272
+ <fo:bookmark internal-destination="{@id}">
9273
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
9274
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
9664
9275
  </fo:bookmark>
9665
- </xsl:if>
9666
-
9276
+ </xsl:for-each>
9277
+ </fo:bookmark>
9278
+ </xsl:if>
9667
9279
  </xsl:template> <!-- insertTableBookmarks -->
9668
9280
  <!-- End Bookmarks -->
9669
9281
 
@@ -9693,17 +9305,15 @@
9693
9305
  <xsl:param name="title" select="''"/>
9694
9306
  <xsl:choose>
9695
9307
  <xsl:when test="$lang = 'en'">
9696
-
9697
9308
  </xsl:when>
9698
9309
  <xsl:when test="$lang = 'fr'">
9699
-
9700
9310
  </xsl:when>
9701
9311
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
9702
9312
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
9703
9313
  </xsl:choose>
9704
9314
  </xsl:template>
9705
9315
 
9706
- <xsl:template match="item" mode="bookmark">
9316
+ <xsl:template match="mn:item" mode="bookmark">
9707
9317
  <xsl:choose>
9708
9318
  <xsl:when test="@id != ''">
9709
9319
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -9713,7 +9323,7 @@
9713
9323
  <xsl:text> </xsl:text>
9714
9324
  </xsl:if>
9715
9325
  <xsl:variable name="title">
9716
- <xsl:for-each select="title/node()">
9326
+ <xsl:for-each select="mn:title/node()">
9717
9327
  <xsl:choose>
9718
9328
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
9719
9329
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -9731,7 +9341,7 @@
9731
9341
  </xsl:choose>
9732
9342
  </xsl:template>
9733
9343
 
9734
- <xsl:template match="title" mode="bookmark"/>
9344
+ <xsl:template match="mn:title" mode="bookmark"/>
9735
9345
  <xsl:template match="text()" mode="bookmark"/>
9736
9346
 
9737
9347
  <!-- figure/name -->
@@ -9960,9 +9570,9 @@
9960
9570
  <xsl:template match="text()" mode="contents_item">
9961
9571
  <xsl:variable name="text">
9962
9572
  <!-- to split by '_' and other chars -->
9963
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
9573
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
9964
9574
  </xsl:variable>
9965
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
9575
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
9966
9576
  <xsl:call-template name="keep_together_standard_number"/>
9967
9577
  </xsl:for-each>
9968
9578
  </xsl:template>
@@ -9994,20 +9604,12 @@
9994
9604
  </xsl:template>
9995
9605
 
9996
9606
  <xsl:template name="get_sourcecode_attributes">
9997
- <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
9998
- <xsl:variable name="_font-size">
9999
-
10000
- <!-- inherit -->
10001
-
10002
- <!-- <xsl:if test="$namespace = 'ieee'">
10003
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
10004
- </xsl:if> -->
10005
-
10006
- <xsl:choose>
10007
- <xsl:when test="ancestor::*[local-name() = 'table'][not(parent::*[local-name() = 'sourcecode'][@linenums = 'true'])]">inherit</xsl:when>
10008
- <xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
10009
- </xsl:choose>
10010
-
9607
+ <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
9608
+ <xsl:variable name="_font-size"><!-- inherit -->
9609
+ <xsl:choose>
9610
+ <xsl:when test="ancestor::*[local-name() = 'table'][not(parent::*[local-name() = 'sourcecode'][@linenums = 'true'])]">inherit</xsl:when>
9611
+ <xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
9612
+ </xsl:choose>
10011
9613
  </xsl:variable>
10012
9614
 
10013
9615
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -10063,11 +9665,9 @@
10063
9665
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
10064
9666
  </xsl:choose>
10065
9667
  </xsl:attribute>
10066
-
10067
9668
  </xsl:if>
10068
9669
  <fo:block-container margin-left="0mm" role="SKIP">
10069
-
10070
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name BEFORE content -->
9670
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name BEFORE content -->
10071
9671
 
10072
9672
  <fo:block xsl:use-attribute-sets="sourcecode-style">
10073
9673
 
@@ -10265,25 +9865,6 @@
10265
9865
  </xsl:choose>
10266
9866
  </xsl:template>
10267
9867
 
10268
- <!-- insert 'char' between each character in the string -->
10269
- <xsl:template name="interspers">
10270
- <xsl:param name="str"/>
10271
- <xsl:param name="char" select="$zero_width_space"/>
10272
- <xsl:if test="$str != ''">
10273
- <xsl:value-of select="substring($str, 1, 1)"/>
10274
-
10275
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
10276
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
10277
- <xsl:value-of select="$char"/>
10278
- </xsl:if>
10279
-
10280
- <xsl:call-template name="interspers">
10281
- <xsl:with-param name="str" select="substring($str, 2)"/>
10282
- <xsl:with-param name="char" select="$char"/>
10283
- </xsl:call-template>
10284
- </xsl:if>
10285
- </xsl:template>
10286
-
10287
9868
  <xsl:template name="interspers-java">
10288
9869
  <xsl:param name="str"/>
10289
9870
  <xsl:param name="char" select="$zero_width_space"/>
@@ -10380,7 +9961,7 @@
10380
9961
  </xsl:variable>
10381
9962
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
10382
9963
 
10383
- <xsl:for-each select="$classes/item">
9964
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
10384
9965
  <xsl:variable name="class_name" select="."/>
10385
9966
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
10386
9967
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -10463,12 +10044,9 @@
10463
10044
 
10464
10045
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
10465
10046
  <xsl:if test="normalize-space() != ''">
10466
-
10467
- <fo:block xsl:use-attribute-sets="permission-name-style">
10468
- <xsl:apply-templates/>
10469
-
10470
- </fo:block>
10471
-
10047
+ <fo:block xsl:use-attribute-sets="permission-name-style">
10048
+ <xsl:apply-templates/>
10049
+ </fo:block>
10472
10050
  </xsl:if>
10473
10051
  </xsl:template>
10474
10052
 
@@ -10497,12 +10075,9 @@
10497
10075
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
10498
10076
  <xsl:if test="normalize-space() != ''">
10499
10077
 
10500
- <fo:block xsl:use-attribute-sets="requirement-name-style">
10501
-
10502
- <xsl:apply-templates/>
10503
-
10504
- </fo:block>
10505
-
10078
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
10079
+ <xsl:apply-templates/>
10080
+ </fo:block>
10506
10081
  </xsl:if>
10507
10082
  </xsl:template>
10508
10083
 
@@ -10541,11 +10116,9 @@
10541
10116
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
10542
10117
  <xsl:if test="normalize-space() != ''">
10543
10118
 
10544
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
10545
- <xsl:apply-templates/>
10546
-
10547
- </fo:block>
10548
-
10119
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
10120
+ <xsl:apply-templates/>
10121
+ </fo:block>
10549
10122
  </xsl:if>
10550
10123
  </xsl:template>
10551
10124
 
@@ -10671,7 +10244,6 @@
10671
10244
 
10672
10245
  <xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
10673
10246
  <xsl:attribute name="font-weight">bold</xsl:attribute>
10674
-
10675
10247
  </xsl:if>
10676
10248
 
10677
10249
  <xsl:apply-templates mode="requirement"/>
@@ -10716,7 +10288,6 @@
10716
10288
 
10717
10289
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
10718
10290
  <fo:block font-size="11pt">
10719
-
10720
10291
  <xsl:apply-templates/>
10721
10292
  </fo:block>
10722
10293
  </xsl:template>
@@ -10756,7 +10327,6 @@
10756
10327
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
10757
10328
  <xsl:variable name="element">inline
10758
10329
 
10759
-
10760
10330
  </xsl:variable>
10761
10331
  <xsl:choose>
10762
10332
  <xsl:when test="contains($element, 'block')">
@@ -10788,110 +10358,105 @@
10788
10358
  text line 2
10789
10359
  -->
10790
10360
  <xsl:template match="*[local-name() = 'example']" name="example">
10361
+ <xsl:call-template name="setNamedDestination"/>
10362
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
10791
10363
 
10792
- <xsl:call-template name="setNamedDestination"/>
10793
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
10364
+ <xsl:call-template name="setBlockSpanAll"/>
10794
10365
 
10795
- <xsl:call-template name="setBlockSpanAll"/>
10366
+ <xsl:call-template name="refine_example-style"/>
10796
10367
 
10797
- <xsl:call-template name="refine_example-style"/>
10368
+ <xsl:variable name="fo_element">
10369
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>inline
10370
+ </xsl:variable>
10798
10371
 
10799
- <xsl:variable name="fo_element">
10800
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
10801
- inline
10802
- </xsl:variable>
10372
+ <fo:block-container margin-left="0mm" role="SKIP">
10803
10373
 
10804
- <fo:block-container margin-left="0mm" role="SKIP">
10374
+ <xsl:choose>
10805
10375
 
10806
- <xsl:choose>
10376
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
10807
10377
 
10808
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
10378
+ <!-- display name 'EXAMPLE' in a separate block -->
10379
+ <fo:block>
10380
+ <xsl:apply-templates select="*[local-name()='name']">
10381
+ <xsl:with-param name="fo_element" select="$fo_element"/>
10382
+ </xsl:apply-templates>
10383
+ </fo:block>
10809
10384
 
10810
- <!-- display name 'EXAMPLE' in a separate block -->
10811
- <fo:block>
10812
- <xsl:apply-templates select="*[local-name()='name']">
10385
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10386
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10387
+ <xsl:variable name="example_body">
10388
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10813
10389
  <xsl:with-param name="fo_element" select="$fo_element"/>
10814
10390
  </xsl:apply-templates>
10815
- </fo:block>
10816
-
10817
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10818
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10819
- <xsl:variable name="example_body">
10820
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10821
- <xsl:with-param name="fo_element" select="$fo_element"/>
10822
- </xsl:apply-templates>
10823
- </xsl:variable>
10824
- <xsl:choose>
10825
- <xsl:when test="xalan:nodeset($example_body)/*">
10826
- <xsl:copy-of select="$example_body"/>
10827
- </xsl:when>
10828
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
10829
- </xsl:choose>
10830
- </fo:block-container>
10831
- </fo:block-container>
10832
- </xsl:when> <!-- end block -->
10833
-
10834
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
10835
-
10836
- <xsl:variable name="provisional_distance_between_starts_">
10837
- 7
10838
10391
  </xsl:variable>
10839
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
10840
- <xsl:variable name="indent_">
10841
- 0
10842
- </xsl:variable>
10843
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
10392
+ <xsl:choose>
10393
+ <xsl:when test="xalan:nodeset($example_body)/*">
10394
+ <xsl:copy-of select="$example_body"/>
10395
+ </xsl:when>
10396
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
10397
+ </xsl:choose>
10398
+ </fo:block-container>
10399
+ </fo:block-container>
10400
+ </xsl:when> <!-- end block -->
10844
10401
 
10845
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
10846
- <fo:list-item>
10847
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
10848
- <fo:block>
10849
- <xsl:apply-templates select="*[local-name()='name']">
10850
- <xsl:with-param name="fo_element">block</xsl:with-param>
10851
- </xsl:apply-templates>
10852
- </fo:block>
10853
- </fo:list-item-label>
10854
- <fo:list-item-body start-indent="body-start()">
10855
- <fo:block>
10856
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10857
- <xsl:with-param name="fo_element" select="$fo_element"/>
10858
- </xsl:apply-templates>
10859
- </fo:block>
10860
- </fo:list-item-body>
10861
- </fo:list-item>
10862
- </fo:list-block>
10863
- </xsl:when> <!-- end list -->
10402
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
10864
10403
 
10865
- <xsl:otherwise> <!-- inline -->
10404
+ <xsl:variable name="provisional_distance_between_starts_">7
10405
+ </xsl:variable>
10406
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
10407
+ <xsl:variable name="indent_">0
10408
+ </xsl:variable>
10409
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
10866
10410
 
10867
- <!-- display 'EXAMPLE' and first element in the same line -->
10868
- <fo:block>
10869
- <xsl:apply-templates select="*[local-name()='name']">
10870
- <xsl:with-param name="fo_element" select="$fo_element"/>
10871
- </xsl:apply-templates>
10872
- <fo:inline>
10873
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
10411
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
10412
+ <fo:list-item>
10413
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
10414
+ <fo:block>
10415
+ <xsl:apply-templates select="*[local-name()='name']">
10416
+ <xsl:with-param name="fo_element">block</xsl:with-param>
10417
+ </xsl:apply-templates>
10418
+ </fo:block>
10419
+ </fo:list-item-label>
10420
+ <fo:list-item-body start-indent="body-start()">
10421
+ <fo:block>
10422
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
10874
10423
  <xsl:with-param name="fo_element" select="$fo_element"/>
10875
10424
  </xsl:apply-templates>
10876
- </fo:inline>
10877
- </fo:block>
10425
+ </fo:block>
10426
+ </fo:list-item-body>
10427
+ </fo:list-item>
10428
+ </fo:list-block>
10429
+ </xsl:when> <!-- end list -->
10878
10430
 
10879
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
10880
- <!-- display further elements in blocks -->
10881
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10882
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10883
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
10884
- <xsl:with-param name="fo_element" select="'block'"/>
10885
- </xsl:apply-templates>
10886
- </fo:block-container>
10887
- </fo:block-container>
10888
- </xsl:if>
10889
- </xsl:otherwise> <!-- end inline -->
10431
+ <xsl:otherwise> <!-- inline -->
10890
10432
 
10891
- </xsl:choose>
10892
- </fo:block-container>
10893
- </fo:block-container>
10433
+ <!-- display 'EXAMPLE' and first element in the same line -->
10434
+ <fo:block>
10435
+ <xsl:apply-templates select="*[local-name()='name']">
10436
+ <xsl:with-param name="fo_element" select="$fo_element"/>
10437
+ </xsl:apply-templates>
10438
+ <fo:inline>
10439
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
10440
+ <xsl:with-param name="fo_element" select="$fo_element"/>
10441
+ </xsl:apply-templates>
10442
+ </fo:inline>
10443
+ </fo:block>
10894
10444
 
10445
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
10446
+ <!-- display further elements in blocks -->
10447
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
10448
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10449
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
10450
+ <xsl:with-param name="fo_element" select="'block'"/>
10451
+ </xsl:apply-templates>
10452
+ </fo:block-container>
10453
+ </fo:block-container>
10454
+ </xsl:if>
10455
+ </xsl:otherwise> <!-- end inline -->
10456
+
10457
+ </xsl:choose>
10458
+ </fo:block-container>
10459
+ </fo:block-container>
10895
10460
  </xsl:template>
10896
10461
 
10897
10462
  <!-- example/name -->
@@ -10906,7 +10471,6 @@
10906
10471
  </xsl:when>
10907
10472
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
10908
10473
  <fo:block xsl:use-attribute-sets="example-name-style">
10909
-
10910
10474
  <xsl:apply-templates/>
10911
10475
  </fo:block>
10912
10476
  </xsl:when>
@@ -10923,7 +10487,6 @@
10923
10487
  <!-- table/example/name, table/tfoot//example/name -->
10924
10488
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
10925
10489
  <fo:inline xsl:use-attribute-sets="example-name-style">
10926
-
10927
10490
  <xsl:apply-templates/>
10928
10491
  </fo:inline>
10929
10492
  </xsl:template>
@@ -10933,12 +10496,10 @@
10933
10496
 
10934
10497
  <xsl:variable name="num"><xsl:number/></xsl:variable>
10935
10498
  <xsl:variable name="element">
10936
-
10937
- <xsl:choose>
10938
- <xsl:when test="$num = 1 and not(contains($fo_element, 'block'))">inline</xsl:when>
10939
- <xsl:otherwise>block</xsl:otherwise>
10940
- </xsl:choose>
10941
-
10499
+ <xsl:choose>
10500
+ <xsl:when test="$num = 1 and not(contains($fo_element, 'block'))">inline</xsl:when>
10501
+ <xsl:otherwise>block</xsl:otherwise>
10502
+ </xsl:choose>
10942
10503
  <xsl:value-of select="$fo_element"/>
10943
10504
  </xsl:variable>
10944
10505
  <xsl:choose>
@@ -11056,7 +10617,7 @@
11056
10617
  </xsl:call-template>
11057
10618
  </xsl:variable>
11058
10619
 
11059
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
10620
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
11060
10621
  <xsl:choose>
11061
10622
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
11062
10623
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
@@ -11093,7 +10654,6 @@
11093
10654
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
11094
10655
  </xsl:if>
11095
10656
  </xsl:if>
11096
-
11097
10657
  <fo:block-container margin-left="0mm" role="SKIP">
11098
10658
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
11099
10659
 
@@ -11176,7 +10736,6 @@
11176
10736
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11177
10737
  <xsl:attribute name="vertical-align">super</xsl:attribute>
11178
10738
  <xsl:attribute name="font-size">80%</xsl:attribute>
11179
-
11180
10739
  </xsl:if>
11181
10740
 
11182
10741
  <xsl:call-template name="refine_eref-style"/>
@@ -11225,7 +10784,6 @@
11225
10784
  </xsl:template>
11226
10785
 
11227
10786
  <xsl:template name="refine_basic_link_style">
11228
-
11229
10787
  </xsl:template> <!-- refine_basic_link_style -->
11230
10788
 
11231
10789
  <!-- ====== -->
@@ -11241,11 +10799,7 @@
11241
10799
  </xsl:call-template>
11242
10800
  </xsl:variable>
11243
10801
 
11244
- <xsl:variable name="padding">
11245
-
11246
- 1.5
11247
-
11248
-
10802
+ <xsl:variable name="padding">1.5
11249
10803
  </xsl:variable>
11250
10804
 
11251
10805
  <xsl:variable name="padding-right">
@@ -11256,7 +10810,6 @@
11256
10810
  </xsl:otherwise>
11257
10811
  </xsl:choose>
11258
10812
  </xsl:variable>
11259
-
11260
10813
  <xsl:choose>
11261
10814
  <xsl:when test="$lang = 'zh'">
11262
10815
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -11280,9 +10833,7 @@
11280
10833
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
11281
10834
 
11282
10835
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
11283
-
11284
- <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
11285
-
10836
+ <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
11286
10837
  </xsl:template>
11287
10838
 
11288
10839
  <xsl:template name="insertNonBreakSpaces">
@@ -11300,8 +10851,7 @@
11300
10851
  <xsl:variable name="level">
11301
10852
  <xsl:call-template name="getLevel"/>
11302
10853
  </xsl:variable>
11303
- <xsl:variable name="font-size">
11304
- inherit
10854
+ <xsl:variable name="font-size">inherit
11305
10855
  </xsl:variable>
11306
10856
  <xsl:variable name="levelTerm">
11307
10857
  <xsl:call-template name="getLevelTermName"/>
@@ -11353,9 +10903,8 @@
11353
10903
  </xsl:template>
11354
10904
 
11355
10905
  <xsl:template name="setStyle_preferred">
11356
-
11357
- <xsl:attribute name="font-weight">normal</xsl:attribute>
11358
- <xsl:attribute name="color">black</xsl:attribute>
10906
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
10907
+ <xsl:attribute name="color">black</xsl:attribute>
11359
10908
 
11360
10909
  </xsl:template>
11361
10910
 
@@ -11433,7 +10982,6 @@
11433
10982
 
11434
10983
  <!-- main sections -->
11435
10984
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
11436
-
11437
10985
  <xsl:call-template name="setNamedDestination"/>
11438
10986
  <fo:block>
11439
10987
  <xsl:call-template name="setId"/>
@@ -11468,18 +11016,14 @@
11468
11016
  </xsl:template>
11469
11017
 
11470
11018
  <xsl:template name="sections_element_style">
11471
-
11472
- <xsl:variable name="pos"><xsl:number count="ribose:sections/ribose:clause[not(@type='scope') and not(@type='conformance')]"/></xsl:variable> <!-- | ribose:sections/ribose:terms -->
11473
- <xsl:if test="$pos &gt;= 2">
11474
- <xsl:attribute name="space-before">18pt</xsl:attribute>
11475
- </xsl:if>
11476
-
11019
+ <xsl:variable name="pos"><xsl:number count="ribose:sections/ribose:clause[not(@type='scope') and not(@type='conformance')]"/></xsl:variable> <!-- | ribose:sections/ribose:terms -->
11020
+ <xsl:if test="$pos &gt;= 2">
11021
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
11022
+ </xsl:if>
11477
11023
  </xsl:template> <!-- sections_element_style -->
11478
11024
 
11479
11025
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
11480
-
11481
- <fo:block break-after="page"/>
11482
-
11026
+ <fo:block break-after="page"/>
11483
11027
  <xsl:call-template name="setNamedDestination"/>
11484
11028
  <fo:block>
11485
11029
  <xsl:call-template name="setId"/>
@@ -11528,7 +11072,6 @@
11528
11072
  </xsl:template>
11529
11073
 
11530
11074
  <xsl:template name="refine_clause_style">
11531
-
11532
11075
  </xsl:template> <!-- refine_clause_style -->
11533
11076
 
11534
11077
  <xsl:template match="*[local-name() = 'definitions']">
@@ -11568,7 +11111,6 @@
11568
11111
  </xsl:template>
11569
11112
 
11570
11113
  <xsl:template name="refine_annex_style">
11571
-
11572
11114
  </xsl:template>
11573
11115
 
11574
11116
  <!-- document text (not figures, or tables) footnotes -->
@@ -11672,17 +11214,15 @@
11672
11214
  <!-- Lists processing -->
11673
11215
  <!-- ===================================== -->
11674
11216
  <xsl:variable name="ul_labels_">
11675
-
11676
- <label level="1" font-size="75%">o</label> <!-- white circle -->
11677
- <label level="2">—</label> <!-- em dash -->
11678
- <label level="3" font-size="140%">•</label> <!-- bullet -->
11217
+ <label level="1" font-size="75%">o</label> <!-- white circle -->
11218
+ <label level="2">—</label> <!-- em dash -->
11219
+ <label level="3" font-size="140%">•</label> <!-- bullet -->
11679
11220
 
11680
11221
  </xsl:variable>
11681
11222
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
11682
11223
 
11683
11224
  <xsl:template name="setULLabel">
11684
- <xsl:variable name="list_level__">
11685
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
11225
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
11686
11226
  </xsl:variable>
11687
11227
  <xsl:variable name="list_level_" select="number($list_level__)"/>
11688
11228
  <xsl:variable name="list_level">
@@ -11739,28 +11279,22 @@
11739
11279
  <xsl:variable name="label">
11740
11280
 
11741
11281
  <xsl:variable name="style_prefix_">
11742
- <xsl:if test="$type = 'roman'">
11743
- <!-- Example: (i) -->
11282
+ <xsl:if test="$type = 'roman'"> <!-- Example: (i) -->
11744
11283
  </xsl:if>
11745
11284
  <xsl:if test="$type = 'alphabet'">
11746
-
11747
11285
  </xsl:if>
11748
11286
  </xsl:variable>
11749
11287
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
11750
11288
 
11751
11289
  <xsl:variable name="style_suffix_">
11752
11290
  <xsl:choose>
11753
- <xsl:when test="$type = 'arabic'">
11754
- .
11291
+ <xsl:when test="$type = 'arabic'">.
11755
11292
  </xsl:when>
11756
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
11757
- .
11293
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">.
11758
11294
  </xsl:when>
11759
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
11760
- .
11295
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">.
11761
11296
  </xsl:when>
11762
- <xsl:when test="$type = 'roman'">
11763
- .
11297
+ <xsl:when test="$type = 'roman'">.
11764
11298
  </xsl:when>
11765
11299
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
11766
11300
  </xsl:choose>
@@ -11777,8 +11311,7 @@
11777
11311
  <xsl:value-of select="$style_suffix"/>
11778
11312
  </xsl:if>
11779
11313
  </xsl:variable>
11780
-
11781
- <xsl:value-of select="normalize-space($label)"/>
11314
+ <xsl:value-of select="normalize-space($label)"/>
11782
11315
 
11783
11316
  </xsl:when>
11784
11317
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -11835,17 +11368,13 @@
11835
11368
 
11836
11369
  <xsl:variable name="format">
11837
11370
  <xsl:choose>
11838
- <xsl:when test="$type = 'arabic'">
11839
- 1.
11371
+ <xsl:when test="$type = 'arabic'">1.
11840
11372
  </xsl:when>
11841
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
11842
- a.
11373
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a.
11843
11374
  </xsl:when>
11844
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
11845
- A.
11375
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A.
11846
11376
  </xsl:when>
11847
- <xsl:when test="$type = 'roman'">
11848
- i.
11377
+ <xsl:when test="$type = 'roman'">i.
11849
11378
  </xsl:when>
11850
11379
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
11851
11380
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -11882,19 +11411,16 @@
11882
11411
  </fo:block-container>
11883
11412
  </xsl:when>
11884
11413
  <xsl:otherwise>
11885
-
11886
- <fo:block role="SKIP">
11887
- <xsl:apply-templates select="." mode="list">
11888
- <xsl:with-param name="indent" select="$indent"/>
11889
- </xsl:apply-templates>
11890
- </fo:block>
11891
-
11414
+ <fo:block role="SKIP">
11415
+ <xsl:apply-templates select="." mode="list">
11416
+ <xsl:with-param name="indent" select="$indent"/>
11417
+ </xsl:apply-templates>
11418
+ </fo:block>
11892
11419
  </xsl:otherwise>
11893
11420
  </xsl:choose>
11894
11421
  </xsl:template>
11895
11422
 
11896
11423
  <xsl:template name="refine_list_container_style">
11897
-
11898
11424
  </xsl:template> <!-- refine_list_container_style -->
11899
11425
 
11900
11426
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -11958,7 +11484,6 @@
11958
11484
  </xsl:template>
11959
11485
 
11960
11486
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
11961
-
11962
11487
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
11963
11488
 
11964
11489
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -12243,7 +11768,6 @@
12243
11768
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
12244
11769
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
12245
11770
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
12246
-
12247
11771
  <xsl:apply-templates/>
12248
11772
  </fo:block>
12249
11773
  </xsl:template>
@@ -12295,7 +11819,6 @@
12295
11819
  <fo:table-column column-width="15mm"/>
12296
11820
  <fo:table-body>
12297
11821
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
12298
-
12299
11822
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
12300
11823
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
12301
11824
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -12331,7 +11854,6 @@
12331
11854
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
12332
11855
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
12333
11856
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
12334
-
12335
11857
  </xsl:template>
12336
11858
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
12337
11859
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -12342,16 +11864,13 @@
12342
11864
  <xsl:call-template name="setNamedDestination"/>
12343
11865
  <fo:block id="{@id}">
12344
11866
  <xsl:apply-templates/>
12345
-
12346
11867
  </fo:block>
12347
11868
  </xsl:template>
12348
11869
 
12349
11870
  <!-- Bibliography (non-normative references) -->
12350
11871
  <xsl:template match="*[local-name() = 'references']">
12351
11872
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
12352
-
12353
- <fo:block break-after="page"/>
12354
-
11873
+ <fo:block break-after="page"/>
12355
11874
  </xsl:if>
12356
11875
 
12357
11876
  <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
@@ -12367,9 +11886,7 @@
12367
11886
 
12368
11887
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
12369
11888
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
12370
-
12371
11889
  </fo:block>
12372
-
12373
11890
  </xsl:template> <!-- references -->
12374
11891
 
12375
11892
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -12379,40 +11896,37 @@
12379
11896
  <!-- Normative references -->
12380
11897
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
12381
11898
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
12382
-
12383
- <xsl:call-template name="setNamedDestination"/>
12384
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
12385
-
12386
- <xsl:call-template name="processBibitem"/>
12387
- </fo:block>
11899
+ <xsl:call-template name="setNamedDestination"/>
11900
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
11901
+ <xsl:call-template name="processBibitem"/>
11902
+ </fo:block>
12388
11903
 
12389
11904
  </xsl:template> <!-- bibitem -->
12390
11905
 
12391
11906
  <!-- Bibliography (non-normative references) -->
12392
11907
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
12393
11908
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
12394
-
12395
- <xsl:call-template name="setNamedDestination"/>
12396
- <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
12397
- <fo:list-item>
12398
- <fo:list-item-label end-indent="label-end()">
12399
- <fo:block>
12400
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
12401
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
12402
- </xsl:apply-templates>
12403
- </fo:block>
12404
- </fo:list-item-label>
12405
- <fo:list-item-body start-indent="body-start()">
12406
- <fo:block>
12407
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
12408
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
12409
- </xsl:apply-templates>
12410
- <xsl:apply-templates select="ribose:formattedref"/>
12411
- </fo:block>
12412
- </fo:list-item-body>
12413
- </fo:list-item>
12414
- </fo:list-block>
12415
- <!-- rsd -->
11909
+ <xsl:call-template name="setNamedDestination"/>
11910
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
11911
+ <fo:list-item>
11912
+ <fo:list-item-label end-indent="label-end()">
11913
+ <fo:block>
11914
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11915
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
11916
+ </xsl:apply-templates>
11917
+ </fo:block>
11918
+ </fo:list-item-label>
11919
+ <fo:list-item-body start-indent="body-start()">
11920
+ <fo:block>
11921
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11922
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
11923
+ </xsl:apply-templates>
11924
+ <xsl:apply-templates select="ribose:formattedref"/>
11925
+ </fo:block>
11926
+ </fo:list-item-body>
11927
+ </fo:list-item>
11928
+ </fo:list-block>
11929
+ <!-- rsd -->
12416
11930
 
12417
11931
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
12418
11932
 
@@ -12422,7 +11936,6 @@
12422
11936
  <xsl:otherwise>
12423
11937
  <xsl:call-template name="setNamedDestination"/>
12424
11938
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
12425
-
12426
11939
  <fo:list-item-label end-indent="label-end()">
12427
11940
  <fo:block role="SKIP">
12428
11941
  <fo:inline role="SKIP">
@@ -12449,18 +11962,16 @@
12449
11962
 
12450
11963
  <xsl:template name="processBibitem">
12451
11964
  <xsl:param name="biblio_tag_part">both</xsl:param>
11965
+ <!-- start bibitem processing -->
11966
+ <xsl:if test=".//*[local-name() = 'fn']">
11967
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
11968
+ </xsl:if>
12452
11969
 
12453
- <!-- start bibitem processing -->
12454
- <xsl:if test=".//*[local-name() = 'fn']">
12455
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
12456
- </xsl:if>
12457
-
12458
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
12459
- <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
12460
- </xsl:apply-templates>
12461
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
12462
- <!-- end bibitem processing -->
12463
-
11970
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
11971
+ <xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
11972
+ </xsl:apply-templates>
11973
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
11974
+ <!-- end bibitem processing -->
12464
11975
  </xsl:template> <!-- processBibitem (bibitem) -->
12465
11976
 
12466
11977
  <xsl:template match="*[local-name() = 'title']" mode="title">
@@ -12603,8 +12114,7 @@
12603
12114
  <xsl:choose>
12604
12115
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
12605
12116
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
12606
- <xsl:otherwise><!-- default value -->
12607
- 2
12117
+ <xsl:otherwise><!-- default value -->2
12608
12118
  </xsl:otherwise>
12609
12119
  </xsl:choose>
12610
12120
  </xsl:variable>
@@ -12812,27 +12322,21 @@
12812
12322
  <!-- ================ -->
12813
12323
  <!-- Admonition -->
12814
12324
  <!-- ================ -->
12815
- <xsl:template match="*[local-name() = 'admonition']">
12816
-
12817
- <!-- text in the box -->
12818
- <xsl:call-template name="setNamedDestination"/>
12819
- <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
12820
-
12821
- <xsl:call-template name="setBlockSpanAll"/>
12822
-
12823
- <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
12824
-
12825
- <fo:block xsl:use-attribute-sets="admonition-name-style">
12826
- <xsl:call-template name="displayAdmonitionName"/>
12827
- </fo:block>
12828
- <fo:block xsl:use-attribute-sets="admonition-p-style">
12829
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12830
- </fo:block>
12831
-
12832
- </fo:block-container>
12325
+ <xsl:template match="*[local-name() = 'admonition']"> <!-- text in the box -->
12326
+ <xsl:call-template name="setNamedDestination"/>
12327
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
12833
12328
 
12834
- </fo:block-container>
12329
+ <xsl:call-template name="setBlockSpanAll"/>
12330
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
12331
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
12332
+ <xsl:call-template name="displayAdmonitionName"/>
12333
+ </fo:block>
12334
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
12335
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
12336
+ </fo:block>
12835
12337
 
12338
+ </fo:block-container>
12339
+ </fo:block-container>
12836
12340
  </xsl:template>
12837
12341
 
12838
12342
  <xsl:template name="displayAdmonitionName">
@@ -12880,12 +12384,10 @@
12880
12384
  </xsl:template> -->
12881
12385
 
12882
12386
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
12387
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
12883
12388
 
12884
- <fo:block xsl:use-attribute-sets="admonition-p-style">
12885
-
12886
- <xsl:apply-templates/>
12887
- </fo:block>
12888
-
12389
+ <xsl:apply-templates/>
12390
+ </fo:block>
12889
12391
  </xsl:template>
12890
12392
 
12891
12393
  <!-- ================ -->
@@ -12921,11 +12423,9 @@
12921
12423
 
12922
12424
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
12923
12425
  <xsl:variable name="updated_xml_step2">
12924
-
12925
- <xsl:if test="$table_if = 'false'">
12926
- <xsl:copy-of select="$updated_xml_step1"/>
12927
- </xsl:if>
12928
-
12426
+ <xsl:if test="$table_if = 'false'">
12427
+ <xsl:copy-of select="$updated_xml_step1"/>
12428
+ </xsl:if>
12929
12429
  </xsl:variable>
12930
12430
 
12931
12431
  <xsl:variable name="endTime2" select="java:getTime(java:java.util.Date.new())"/>
@@ -13400,7 +12900,6 @@
13400
12900
  </xsl:template>
13401
12901
 
13402
12902
  <xsl:template name="addNamedDestinationAttribute">
13403
-
13404
12903
  </xsl:template>
13405
12904
 
13406
12905
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -13895,7 +13394,6 @@
13895
13394
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
13896
13395
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
13897
13396
  <!-- if EXPRESS reference -->
13898
-
13899
13397
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
13900
13398
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
13901
13399
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -13949,8 +13447,7 @@
13949
13447
 
13950
13448
  <xsl:variable name="text2">
13951
13449
  <xsl:element name="text" namespace="{$namespace_full}">
13952
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
13953
- <xsl:copy-of select="."/>
13450
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
13954
13451
  </xsl:for-each>
13955
13452
  </xsl:element>
13956
13453
  </xsl:variable>
@@ -14242,9 +13739,7 @@
14242
13739
  </xsl:attribute>
14243
13740
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
14244
13741
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
14245
-
14246
- <xsl:value-of select="$skip_footnote_body_"/>
14247
-
13742
+ <xsl:value-of select="$skip_footnote_body_"/>
14248
13743
  </xsl:attribute>
14249
13744
  <xsl:attribute name="ref_id">
14250
13745
  <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
@@ -14333,7 +13828,6 @@
14333
13828
 
14334
13829
  <xsl:template name="printEdition">
14335
13830
  <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
14336
-
14337
13831
  <xsl:choose>
14338
13832
  <xsl:when test="$edition_i18n != ''">
14339
13833
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -14562,8 +14056,7 @@
14562
14056
  <dc:title>
14563
14057
  <xsl:variable name="title">
14564
14058
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
14565
-
14566
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
14059
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
14567
14060
 
14568
14061
  </xsl:for-each>
14569
14062
  </xsl:variable>
@@ -14582,16 +14075,14 @@
14582
14075
  </dc:title>
14583
14076
  <xsl:variable name="dc_creator">
14584
14077
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
14585
-
14586
- <rdf:Seq>
14587
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
14588
- <rdf:li>
14589
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
14590
- </rdf:li>
14591
- <!-- <xsl:if test="position() != last()">; </xsl:if> -->
14592
- </xsl:for-each>
14593
- </rdf:Seq>
14594
-
14078
+ <rdf:Seq>
14079
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role'][not(*[local-name() = 'description'])]/@type='author']">
14080
+ <rdf:li>
14081
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
14082
+ </rdf:li>
14083
+ <!-- <xsl:if test="position() != last()">; </xsl:if> -->
14084
+ </xsl:for-each>
14085
+ </rdf:Seq>
14595
14086
  </xsl:for-each>
14596
14087
  </xsl:variable>
14597
14088
  <xsl:if test="normalize-space($dc_creator) != ''">
@@ -14602,9 +14093,7 @@
14602
14093
 
14603
14094
  <xsl:variable name="dc_description">
14604
14095
  <xsl:variable name="abstract">
14605
-
14606
- <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
14607
-
14096
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
14608
14097
  </xsl:variable>
14609
14098
  <rdf:Alt>
14610
14099
  <rdf:li xml:lang="x-default">
@@ -14669,7 +14158,9 @@
14669
14158
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
14670
14159
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
14671
14160
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
14672
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
14161
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
14162
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
14163
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
14673
14164
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
14674
14165
  <!-- Todo: need update -->
14675
14166
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -14834,7 +14325,7 @@
14834
14325
  <xsl:param name="normalize-space" select="'true'"/>
14835
14326
  <xsl:param name="keep_sep" select="'false'"/>
14836
14327
  <xsl:if test="string-length($pText) &gt;0">
14837
- <item>
14328
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
14838
14329
  <xsl:choose>
14839
14330
  <xsl:when test="$normalize-space = 'true'">
14840
14331
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -14843,8 +14334,8 @@
14843
14334
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
14844
14335
  </xsl:otherwise>
14845
14336
  </xsl:choose>
14846
- </item>
14847
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
14337
+ </xsl:element>
14338
+ <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><xsl:element name="item" namespace="{$namespace_mn_xsl}"><xsl:value-of select="$sep"/></xsl:element></xsl:if>
14848
14339
  <xsl:call-template name="split">
14849
14340
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
14850
14341
  <xsl:with-param name="sep" select="$sep"/>
@@ -14862,30 +14353,6 @@
14862
14353
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
14863
14354
  </xsl:template>
14864
14355
 
14865
- <xsl:template name="namespaceCheck">
14866
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
14867
- <xsl:variable name="XSLNS">
14868
-
14869
- <xsl:value-of select="document('')//*/namespace::ribose"/>
14870
-
14871
- </xsl:variable>
14872
- <!-- <xsl:if test="$documentNS != $XSLNS">
14873
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
14874
- </xsl:if> -->
14875
- </xsl:template> <!-- namespaceCheck -->
14876
-
14877
- <xsl:template name="getLanguage">
14878
- <xsl:param name="lang"/>
14879
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
14880
- <xsl:choose>
14881
- <xsl:when test="$language = 'en'">English</xsl:when>
14882
- <xsl:when test="$language = 'fr'">French</xsl:when>
14883
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
14884
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
14885
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
14886
- </xsl:choose>
14887
- </xsl:template>
14888
-
14889
14356
  <xsl:template name="setId">
14890
14357
  <xsl:param name="prefix"/>
14891
14358
  <xsl:attribute name="id">