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