metanorma-un 0.5.12 → 0.5.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6f40fd8baff69f7e6106f1c7a19bcc6c3a2e090d125de96ae9c9b486a8e684a
4
- data.tar.gz: cb96a99a8726aa83764355fb67c58aac06860666f17c728286adc54d4f3ae30a
3
+ metadata.gz: 4ac4dfb800b093d690e6794598aa8156d689d00ee3d60056c2a8f75de4c603e2
4
+ data.tar.gz: 4005cbaf627818c531ec208e0d2f53f90067f0d2e812582973264fa680639a1c
5
5
  SHA512:
6
- metadata.gz: e3c8a21a6575b9e8a9f556fdae8a7c97f155a466b509f8793fc589268501edaf1fff97522297855e76461019472c60ff36196b753caee6bb182dddde9e82b6ce
7
- data.tar.gz: 3edf55c3391e3e126307fd2b911b754148d2dcced675e11540358a3c412bb09a130b69719e5fd2677d2b7b605136e2eaaf188171138b514ad1f88d053d917103
6
+ metadata.gz: 7fbc779c9ab63e8689a1224fcc4b725faf59fd6b6f40e1e71a81ff5227a286590ca02e23a92cf69593d29fb98f95526af24fa156d639f0dc4b52fb693bfc046a
7
+ data.tar.gz: 996c353ed8ee929fd8d3d95df7d6b59049cb38f054b14e993abea7d820110f7a32dfbd129f067e9961ffe26e06392588391cdf56be1ccef3e010377e8cfead00
@@ -812,6 +812,8 @@
812
812
  <ref name="requirement"/>
813
813
  <ref name="recommendation"/>
814
814
  <ref name="permission"/>
815
+ <ref name="imagemap"/>
816
+ <ref name="svgmap"/>
815
817
  </choice>
816
818
  </define>
817
819
  <define name="bibliography">
@@ -1635,4 +1637,65 @@
1635
1637
  <text/>
1636
1638
  </element>
1637
1639
  </define>
1640
+ <define name="imagemap">
1641
+ <element name="imagemap">
1642
+ <ref name="figure"/>
1643
+ <zeroOrMore>
1644
+ <element name="area">
1645
+ <attribute name="type">
1646
+ <choice>
1647
+ <value>rect</value>
1648
+ <value>circle</value>
1649
+ <value>ellipse</value>
1650
+ <value>poly</value>
1651
+ </choice>
1652
+ </attribute>
1653
+ <choice>
1654
+ <ref name="xref"/>
1655
+ <ref name="hyperlink"/>
1656
+ <ref name="eref"/>
1657
+ </choice>
1658
+ <oneOrMore>
1659
+ <element name="coords">
1660
+ <attribute name="x">
1661
+ <data type="float"/>
1662
+ </attribute>
1663
+ <attribute name="y">
1664
+ <data type="float"/>
1665
+ </attribute>
1666
+ </element>
1667
+ </oneOrMore>
1668
+ <optional>
1669
+ <element name="radius">
1670
+ <attribute name="x">
1671
+ <data type="float"/>
1672
+ </attribute>
1673
+ <optional>
1674
+ <attribute name="y">
1675
+ <data type="float"/>
1676
+ </attribute>
1677
+ </optional>
1678
+ </element>
1679
+ </optional>
1680
+ </element>
1681
+ </zeroOrMore>
1682
+ </element>
1683
+ </define>
1684
+ <define name="svgmap">
1685
+ <element name="svgmap">
1686
+ <ref name="figure"/>
1687
+ <zeroOrMore>
1688
+ <element name="target">
1689
+ <attribute name="href">
1690
+ <data type="anyURI"/>
1691
+ </attribute>
1692
+ <choice>
1693
+ <ref name="xref"/>
1694
+ <ref name="hyperlink"/>
1695
+ <ref name="eref"/>
1696
+ </choice>
1697
+ </element>
1698
+ </zeroOrMore>
1699
+ </element>
1700
+ </define>
1638
1701
  </grammar>
@@ -1700,198 +1700,226 @@
1700
1700
  <xsl:call-template name="add-zero-spaces-java"/>
1701
1701
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1702
1702
 
1703
- <xsl:variable name="simple-table">
1704
- <xsl:call-template name="getSimpleTable"/>
1705
- </xsl:variable>
1703
+ <xsl:variable name="table">
1706
1704
 
1707
-
1708
-
1709
-
1710
-
1711
- <!-- <xsl:if test="$namespace = 'bipm'">
1712
- <fo:block>&#xA0;</fo:block>
1713
- </xsl:if> -->
1714
-
1715
- <!-- $namespace = 'iso' or -->
1716
-
1717
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1718
-
1719
-
1720
-
1721
- <xsl:call-template name="fn_name_display"/>
1705
+ <xsl:variable name="simple-table">
1706
+ <xsl:call-template name="getSimpleTable"/>
1707
+ </xsl:variable>
1722
1708
 
1723
1709
 
1724
-
1725
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1726
-
1727
- <!-- <xsl:variable name="cols-count">
1728
- <xsl:choose>
1729
- <xsl:when test="*[local-name()='thead']">
1730
- <xsl:call-template name="calculate-columns-numbers">
1731
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1732
- </xsl:call-template>
1733
- </xsl:when>
1734
- <xsl:otherwise>
1735
- <xsl:call-template name="calculate-columns-numbers">
1736
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1737
- </xsl:call-template>
1738
- </xsl:otherwise>
1739
- </xsl:choose>
1740
- </xsl:variable> -->
1741
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1742
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1743
-
1744
-
1745
-
1746
- <xsl:variable name="colwidths">
1747
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1748
- <xsl:call-template name="calculate-column-widths">
1749
- <xsl:with-param name="cols-count" select="$cols-count"/>
1750
- <xsl:with-param name="table" select="$simple-table"/>
1751
- </xsl:call-template>
1752
- </xsl:if>
1753
- </xsl:variable>
1754
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1755
-
1756
- <!-- <xsl:variable name="colwidths2">
1757
- <xsl:call-template name="calculate-column-widths">
1758
- <xsl:with-param name="cols-count" select="$cols-count"/>
1759
- </xsl:call-template>
1760
- </xsl:variable> -->
1761
-
1762
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1763
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1764
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1765
-
1766
- <xsl:variable name="margin-left">
1767
- <xsl:choose>
1768
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1769
- <xsl:otherwise>0</xsl:otherwise>
1770
- </xsl:choose>
1771
- </xsl:variable>
1772
-
1773
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1774
1710
 
1775
1711
 
1776
-
1777
-
1778
1712
 
1779
- <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1780
- <xsl:attribute name="font-size">8pt</xsl:attribute>
1781
-
1713
+ <!-- <xsl:if test="$namespace = 'bipm'">
1714
+ <fo:block>&#xA0;</fo:block>
1715
+ </xsl:if> -->
1782
1716
 
1717
+ <!-- $namespace = 'iso' or -->
1783
1718
 
1784
-
1719
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1785
1720
 
1721
+
1786
1722
 
1723
+ <xsl:call-template name="fn_name_display"/>
1787
1724
 
1725
+
1788
1726
 
1727
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1789
1728
 
1729
+ <!-- <xsl:variable name="cols-count">
1730
+ <xsl:choose>
1731
+ <xsl:when test="*[local-name()='thead']">
1732
+ <xsl:call-template name="calculate-columns-numbers">
1733
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1734
+ </xsl:call-template>
1735
+ </xsl:when>
1736
+ <xsl:otherwise>
1737
+ <xsl:call-template name="calculate-columns-numbers">
1738
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1739
+ </xsl:call-template>
1740
+ </xsl:otherwise>
1741
+ </xsl:choose>
1742
+ </xsl:variable> -->
1743
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1744
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1790
1745
 
1791
1746
 
1792
- <xsl:variable name="table_attributes">
1793
- <attribute name="table-layout">fixed</attribute>
1794
- <attribute name="width">
1795
- <xsl:choose>
1796
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1797
- <xsl:otherwise>100%</xsl:otherwise>
1798
- </xsl:choose>
1799
- </attribute>
1800
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1801
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1747
+
1748
+ <xsl:variable name="colwidths">
1749
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1750
+ <xsl:call-template name="calculate-column-widths">
1751
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1752
+ <xsl:with-param name="table" select="$simple-table"/>
1753
+ </xsl:call-template>
1754
+ </xsl:if>
1755
+ </xsl:variable>
1756
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1757
+
1758
+ <!-- <xsl:variable name="colwidths2">
1759
+ <xsl:call-template name="calculate-column-widths">
1760
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1761
+ </xsl:call-template>
1762
+ </xsl:variable> -->
1763
+
1764
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1765
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
1766
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1767
+
1768
+ <xsl:variable name="margin-left">
1769
+ <xsl:choose>
1770
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1771
+ <xsl:otherwise>0</xsl:otherwise>
1772
+ </xsl:choose>
1773
+ </xsl:variable>
1774
+
1775
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1802
1776
 
1803
1777
 
1778
+
1779
+
1804
1780
 
1781
+ <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1782
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
1783
+
1805
1784
 
1806
-
1807
-
1808
1785
 
1809
- <attribute name="border-top">0.5pt solid black</attribute>
1810
-
1786
+
1811
1787
 
1812
-
1813
1788
 
1814
- </xsl:variable>
1815
-
1816
-
1817
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1818
1789
 
1819
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1820
- <xsl:attribute name="{@name}">
1821
- <xsl:value-of select="."/>
1822
- </xsl:attribute>
1823
- </xsl:for-each>
1824
1790
 
1825
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1826
- <xsl:if test="$isNoteOrFnExist = 'true'">
1827
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1828
- </xsl:if>
1829
1791
 
1830
- <xsl:choose>
1831
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1832
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1833
- <fo:table-column column-width="{@width}"/>
1834
- </xsl:for-each>
1835
- </xsl:when>
1836
- <xsl:otherwise>
1837
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1838
- <xsl:choose>
1839
- <xsl:when test=". = 1 or . = 0">
1840
- <fo:table-column column-width="proportional-column-width(2)"/>
1841
- </xsl:when>
1842
- <xsl:otherwise>
1843
- <fo:table-column column-width="proportional-column-width({.})"/>
1844
- </xsl:otherwise>
1845
- </xsl:choose>
1846
- </xsl:for-each>
1847
- </xsl:otherwise>
1848
- </xsl:choose>
1849
1792
 
1850
- <xsl:choose>
1851
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1852
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1853
- </xsl:when>
1854
- <xsl:otherwise>
1855
- <xsl:apply-templates/>
1856
- </xsl:otherwise>
1857
- </xsl:choose>
1793
+ <xsl:variable name="table_width">
1794
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1795
+
1796
+
1797
+
1798
+ <xsl:choose>
1799
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1800
+ <xsl:otherwise>100%</xsl:otherwise>
1801
+ </xsl:choose>
1802
+
1803
+ </xsl:variable>
1804
+
1805
+ <xsl:variable name="table_attributes">
1806
+ <attribute name="table-layout">fixed</attribute>
1807
+ <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1808
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1809
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1810
+
1811
+
1812
+
1813
+
1814
+
1815
+
1816
+
1817
+ <attribute name="border-top">0.5pt solid black</attribute>
1818
+
1819
+
1820
+
1821
+
1822
+ </xsl:variable>
1858
1823
 
1859
- </fo:table>
1860
-
1861
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1862
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1863
- <xsl:call-template name="insertTableFooterInSeparateTable">
1864
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
1865
- <xsl:with-param name="colwidths" select="$colwidths"/>
1866
- <xsl:with-param name="colgroup" select="$colgroup"/>
1867
- </xsl:call-template>
1868
- </xsl:for-each>
1869
-
1870
- <!-- insert footer as table -->
1871
- <!-- <fo:table>
1872
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1873
- <xsl:attribute name="{@name}">
1874
- <xsl:value-of select="."/>
1875
- </xsl:attribute>
1876
- </xsl:for-each>
1877
1824
 
1878
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1825
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1826
+
1827
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1828
+ <xsl:attribute name="{@name}">
1829
+ <xsl:value-of select="."/>
1830
+ </xsl:attribute>
1831
+ </xsl:for-each>
1832
+
1833
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1834
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1835
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1836
+ </xsl:if>
1837
+
1838
+ <xsl:choose>
1839
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1840
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1841
+ <fo:table-column column-width="{@width}"/>
1842
+ </xsl:for-each>
1843
+ </xsl:when>
1844
+ <xsl:otherwise>
1845
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1846
+ <xsl:choose>
1847
+ <xsl:when test=". = 1 or . = 0">
1848
+ <fo:table-column column-width="proportional-column-width(2)"/>
1849
+ </xsl:when>
1850
+ <xsl:otherwise>
1851
+ <fo:table-column column-width="proportional-column-width({.})"/>
1852
+ </xsl:otherwise>
1853
+ </xsl:choose>
1854
+ </xsl:for-each>
1855
+ </xsl:otherwise>
1856
+ </xsl:choose>
1857
+
1879
1858
  <xsl:choose>
1880
- <xsl:when test=". = 1 or . = 0">
1881
- <fo:table-column column-width="proportional-column-width(2)"/>
1859
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1860
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1882
1861
  </xsl:when>
1883
1862
  <xsl:otherwise>
1884
- <fo:table-column column-width="proportional-column-width({.})"/>
1863
+ <xsl:apply-templates/>
1885
1864
  </xsl:otherwise>
1886
1865
  </xsl:choose>
1866
+
1867
+ </fo:table>
1868
+
1869
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1870
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1871
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1872
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1873
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1874
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1875
+ </xsl:call-template>
1887
1876
  </xsl:for-each>
1888
- </fo:table>-->
1889
-
1890
-
1891
-
1892
-
1893
-
1894
- </fo:block-container>
1877
+
1878
+ <!-- insert footer as table -->
1879
+ <!-- <fo:table>
1880
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1881
+ <xsl:attribute name="{@name}">
1882
+ <xsl:value-of select="."/>
1883
+ </xsl:attribute>
1884
+ </xsl:for-each>
1885
+
1886
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1887
+ <xsl:choose>
1888
+ <xsl:when test=". = 1 or . = 0">
1889
+ <fo:table-column column-width="proportional-column-width(2)"/>
1890
+ </xsl:when>
1891
+ <xsl:otherwise>
1892
+ <fo:table-column column-width="proportional-column-width({.})"/>
1893
+ </xsl:otherwise>
1894
+ </xsl:choose>
1895
+ </xsl:for-each>
1896
+ </fo:table>-->
1897
+
1898
+
1899
+
1900
+
1901
+
1902
+ </fo:block-container>
1903
+ </xsl:variable>
1904
+
1905
+
1906
+
1907
+ <xsl:choose>
1908
+ <xsl:when test="@width">
1909
+
1910
+ <!-- centered table when table name is centered (see table-name-style) -->
1911
+
1912
+
1913
+
1914
+ <xsl:copy-of select="$table"/>
1915
+
1916
+
1917
+ </xsl:when>
1918
+ <xsl:otherwise>
1919
+ <xsl:copy-of select="$table"/>
1920
+ </xsl:otherwise>
1921
+ </xsl:choose>
1922
+
1895
1923
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1896
1924
  <xsl:if test="normalize-space() != ''">
1897
1925
  <fo:block xsl:use-attribute-sets="table-name-style">
@@ -2736,7 +2764,7 @@
2736
2764
  <xsl:with-param name="table" select="$html-table"/>
2737
2765
  </xsl:call-template>
2738
2766
  </xsl:variable>
2739
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2767
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2740
2768
  <xsl:variable name="maxlength_dt">
2741
2769
  <xsl:call-template name="getMaxLength_dt"/>
2742
2770
  </xsl:variable>
@@ -2765,13 +2793,22 @@
2765
2793
  </xsl:when>
2766
2794
  <xsl:otherwise>
2767
2795
  <xsl:choose>
2796
+ <!-- to set width check most wide chars like `W` -->
2768
2797
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
2769
- <fo:table-column column-width="5%"/>
2770
- <fo:table-column column-width="95%"/>
2798
+ <fo:table-column column-width="7%"/>
2799
+ <fo:table-column column-width="93%"/>
2800
+ </xsl:when>
2801
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like ABC, etc -->
2802
+ <fo:table-column column-width="15%"/>
2803
+ <fo:table-column column-width="85%"/>
2804
+ </xsl:when>
2805
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 7"> <!-- if dt contains short text like ABCDEF, etc -->
2806
+ <fo:table-column column-width="20%"/>
2807
+ <fo:table-column column-width="80%"/>
2771
2808
  </xsl:when>
2772
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
2773
- <fo:table-column column-width="10%"/>
2774
- <fo:table-column column-width="90%"/>
2809
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
2810
+ <fo:table-column column-width="25%"/>
2811
+ <fo:table-column column-width="75%"/>
2775
2812
  </xsl:when>
2776
2813
  <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
2777
2814
  <fo:table-column column-width="60%"/>
@@ -3078,6 +3115,10 @@
3078
3115
  <xsl:param name="text" select="."/>
3079
3116
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
3080
3117
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
3118
+ </xsl:template><xsl:template name="add-zero-spaces-link-java">
3119
+ <xsl:param name="text" select="."/>
3120
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
3121
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
3081
3122
  </xsl:template><xsl:template name="add-zero-spaces">
3082
3123
  <xsl:param name="text" select="."/>
3083
3124
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
@@ -3338,6 +3379,11 @@
3338
3379
  <!-- replace start and end spaces to non-break space -->
3339
3380
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3340
3381
  </xsl:copy>
3382
+ </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3383
+ <xsl:copy>
3384
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
3385
+ </xsl:copy>
3386
+ <mathml:mspace width="0.5ex"/>
3341
3387
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3342
3388
  <xsl:variable name="target">
3343
3389
  <xsl:choose>
@@ -3359,7 +3405,10 @@
3359
3405
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3360
3406
  <xsl:choose>
3361
3407
  <xsl:when test="normalize-space(.) = ''">
3362
- <xsl:value-of select="$target"/>
3408
+ <!-- <xsl:value-of select="$target"/> -->
3409
+ <xsl:call-template name="add-zero-spaces-link-java">
3410
+ <xsl:with-param name="text" select="$target"/>
3411
+ </xsl:call-template>
3363
3412
  </xsl:when>
3364
3413
  <xsl:otherwise>
3365
3414
  <xsl:apply-templates/>
@@ -3843,6 +3892,8 @@
3843
3892
  <xsl:copy>
3844
3893
  <xsl:apply-templates mode="contents_item"/>
3845
3894
  </xsl:copy>
3895
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
3896
+ <xsl:copy-of select="."/>
3846
3897
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3847
3898
  <xsl:text> </xsl:text>
3848
3899
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -4241,11 +4292,13 @@
4241
4292
  </xsl:if>
4242
4293
  </xsl:if>
4243
4294
 
4295
+
4244
4296
  <fo:block-container margin-left="0mm">
4245
4297
 
4246
4298
  <fo:block xsl:use-attribute-sets="quote-style">
4247
4299
  <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4248
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4300
+
4301
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4249
4302
  </fo:block>
4250
4303
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4251
4304
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -4667,7 +4720,7 @@
4667
4720
  <xsl:param name="charDelim" select="', '"/>
4668
4721
  <xsl:choose>
4669
4722
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
4670
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4723
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4671
4724
  <xsl:sort data-type="text" order="ascending"/>
4672
4725
  <xsl:call-template name="insertKeyword">
4673
4726
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -4676,7 +4729,7 @@
4676
4729
  </xsl:for-each>
4677
4730
  </xsl:when>
4678
4731
  <xsl:otherwise>
4679
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4732
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4680
4733
  <xsl:call-template name="insertKeyword">
4681
4734
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
4682
4735
  <xsl:with-param name="charDelim" select="$charDelim"/>
@@ -4693,6 +4746,9 @@
4693
4746
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
4694
4747
  </xsl:choose>
4695
4748
  </xsl:template><xsl:template name="addPDFUAmeta">
4749
+ <xsl:variable name="lang">
4750
+ <xsl:call-template name="getLang"/>
4751
+ </xsl:variable>
4696
4752
  <fo:declarations>
4697
4753
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4698
4754
  <pdf:dictionary type="normal" key="ViewerPreferences">
@@ -4705,13 +4761,16 @@
4705
4761
  <!-- Dublin Core properties go here -->
4706
4762
  <dc:title>
4707
4763
  <xsl:variable name="title">
4708
-
4709
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en' and @type = 'main']"/>
4710
-
4711
-
4712
-
4713
-
4714
-
4764
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4765
+
4766
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
4767
+
4768
+
4769
+
4770
+
4771
+
4772
+
4773
+ </xsl:for-each>
4715
4774
  </xsl:variable>
4716
4775
  <xsl:choose>
4717
4776
  <xsl:when test="normalize-space($title) != ''">
@@ -4723,17 +4782,21 @@
4723
4782
  </xsl:choose>
4724
4783
  </dc:title>
4725
4784
  <dc:creator>
4726
-
4727
-
4728
-
4729
- </dc:creator>
4730
- <dc:description>
4731
- <xsl:variable name="abstract">
4785
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4786
+
4787
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
4788
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
4789
+ <xsl:if test="position() != last()">; </xsl:if>
4790
+ </xsl:for-each>
4732
4791
 
4733
4792
 
4734
4793
 
4735
- <xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4794
+ </xsl:for-each>
4795
+ </dc:creator>
4796
+ <dc:description>
4797
+ <xsl:variable name="abstract">
4736
4798
 
4799
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4737
4800
 
4738
4801
 
4739
4802
  </xsl:variable>