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.
@@ -1560,203 +1560,231 @@
1560
1560
  <xsl:call-template name="add-zero-spaces-java"/>
1561
1561
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1562
1562
 
1563
- <xsl:variable name="simple-table">
1564
- <xsl:call-template name="getSimpleTable"/>
1565
- </xsl:variable>
1563
+ <xsl:variable name="table">
1566
1564
 
1567
-
1568
-
1569
-
1570
-
1571
- <!-- <xsl:if test="$namespace = 'bipm'">
1572
- <fo:block>&#xA0;</fo:block>
1573
- </xsl:if> -->
1574
-
1575
- <!-- $namespace = 'iso' or -->
1576
-
1577
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1578
-
1579
-
1580
-
1581
- <xsl:call-template name="fn_name_display"/>
1565
+ <xsl:variable name="simple-table">
1566
+ <xsl:call-template name="getSimpleTable"/>
1567
+ </xsl:variable>
1582
1568
 
1583
1569
 
1584
-
1585
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1586
-
1587
- <!-- <xsl:variable name="cols-count">
1588
- <xsl:choose>
1589
- <xsl:when test="*[local-name()='thead']">
1590
- <xsl:call-template name="calculate-columns-numbers">
1591
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1592
- </xsl:call-template>
1593
- </xsl:when>
1594
- <xsl:otherwise>
1595
- <xsl:call-template name="calculate-columns-numbers">
1596
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1597
- </xsl:call-template>
1598
- </xsl:otherwise>
1599
- </xsl:choose>
1600
- </xsl:variable> -->
1601
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1602
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1603
-
1604
-
1605
-
1606
- <xsl:variable name="colwidths">
1607
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1608
- <xsl:call-template name="calculate-column-widths">
1609
- <xsl:with-param name="cols-count" select="$cols-count"/>
1610
- <xsl:with-param name="table" select="$simple-table"/>
1611
- </xsl:call-template>
1612
- </xsl:if>
1613
- </xsl:variable>
1614
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1615
-
1616
- <!-- <xsl:variable name="colwidths2">
1617
- <xsl:call-template name="calculate-column-widths">
1618
- <xsl:with-param name="cols-count" select="$cols-count"/>
1619
- </xsl:call-template>
1620
- </xsl:variable> -->
1621
-
1622
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1623
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1624
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1625
-
1626
- <xsl:variable name="margin-left">
1627
- <xsl:choose>
1628
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1629
- <xsl:otherwise>0</xsl:otherwise>
1630
- </xsl:choose>
1631
- </xsl:variable>
1632
-
1633
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1634
1570
 
1635
1571
 
1636
-
1637
1572
 
1638
- <xsl:attribute name="space-after">12pt</xsl:attribute>
1639
- <xsl:if test="not(ancestor::*[local-name()='sections'])">
1640
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1641
- </xsl:if>
1642
-
1643
-
1573
+ <!-- <xsl:if test="$namespace = 'bipm'">
1574
+ <fo:block>&#xA0;</fo:block>
1575
+ </xsl:if> -->
1644
1576
 
1577
+ <!-- $namespace = 'iso' or -->
1645
1578
 
1646
-
1579
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1647
1580
 
1581
+
1648
1582
 
1583
+ <xsl:call-template name="fn_name_display"/>
1649
1584
 
1585
+
1650
1586
 
1587
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1651
1588
 
1589
+ <!-- <xsl:variable name="cols-count">
1590
+ <xsl:choose>
1591
+ <xsl:when test="*[local-name()='thead']">
1592
+ <xsl:call-template name="calculate-columns-numbers">
1593
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1594
+ </xsl:call-template>
1595
+ </xsl:when>
1596
+ <xsl:otherwise>
1597
+ <xsl:call-template name="calculate-columns-numbers">
1598
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1599
+ </xsl:call-template>
1600
+ </xsl:otherwise>
1601
+ </xsl:choose>
1602
+ </xsl:variable> -->
1603
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1604
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1652
1605
 
1653
1606
 
1654
- <xsl:variable name="table_attributes">
1655
- <attribute name="table-layout">fixed</attribute>
1656
- <attribute name="width">
1657
- <xsl:choose>
1658
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1659
- <xsl:otherwise>100%</xsl:otherwise>
1660
- </xsl:choose>
1661
- </attribute>
1662
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1663
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1607
+
1608
+ <xsl:variable name="colwidths">
1609
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1610
+ <xsl:call-template name="calculate-column-widths">
1611
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1612
+ <xsl:with-param name="table" select="$simple-table"/>
1613
+ </xsl:call-template>
1614
+ </xsl:if>
1615
+ </xsl:variable>
1616
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1617
+
1618
+ <!-- <xsl:variable name="colwidths2">
1619
+ <xsl:call-template name="calculate-column-widths">
1620
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1621
+ </xsl:call-template>
1622
+ </xsl:variable> -->
1623
+
1624
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1625
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
1626
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1627
+
1628
+ <xsl:variable name="margin-left">
1629
+ <xsl:choose>
1630
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1631
+ <xsl:otherwise>0</xsl:otherwise>
1632
+ </xsl:choose>
1633
+ </xsl:variable>
1634
+
1635
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1664
1636
 
1665
1637
 
1638
+
1666
1639
 
1640
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1641
+ <xsl:if test="not(ancestor::*[local-name()='sections'])">
1642
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1643
+ </xsl:if>
1644
+
1645
+
1667
1646
 
1668
-
1669
1647
 
1670
- <xsl:if test="ancestor::*[local-name()='sections']">
1671
- <attribute name="border-top">1.5pt solid black</attribute>
1672
- <attribute name="border-bottom">1.5pt solid black</attribute>
1673
- </xsl:if>
1674
-
1675
-
1648
+
1676
1649
 
1677
-
1678
1650
 
1679
- </xsl:variable>
1680
-
1681
-
1682
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1683
1651
 
1684
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1685
- <xsl:attribute name="{@name}">
1686
- <xsl:value-of select="."/>
1687
- </xsl:attribute>
1688
- </xsl:for-each>
1689
1652
 
1690
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1691
- <xsl:if test="$isNoteOrFnExist = 'true'">
1692
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1693
- </xsl:if>
1694
1653
 
1695
- <xsl:choose>
1696
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1697
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1698
- <fo:table-column column-width="{@width}"/>
1699
- </xsl:for-each>
1700
- </xsl:when>
1701
- <xsl:otherwise>
1702
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1703
- <xsl:choose>
1704
- <xsl:when test=". = 1 or . = 0">
1705
- <fo:table-column column-width="proportional-column-width(2)"/>
1706
- </xsl:when>
1707
- <xsl:otherwise>
1708
- <fo:table-column column-width="proportional-column-width({.})"/>
1709
- </xsl:otherwise>
1710
- </xsl:choose>
1711
- </xsl:for-each>
1712
- </xsl:otherwise>
1713
- </xsl:choose>
1714
1654
 
1715
- <xsl:choose>
1716
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1717
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1718
- </xsl:when>
1719
- <xsl:otherwise>
1720
- <xsl:apply-templates/>
1721
- </xsl:otherwise>
1722
- </xsl:choose>
1655
+ <xsl:variable name="table_width">
1656
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1657
+
1658
+
1659
+
1660
+ <xsl:choose>
1661
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1662
+ <xsl:otherwise>100%</xsl:otherwise>
1663
+ </xsl:choose>
1664
+
1665
+ </xsl:variable>
1723
1666
 
1724
- </fo:table>
1725
-
1726
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1727
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1728
- <xsl:call-template name="insertTableFooterInSeparateTable">
1729
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
1730
- <xsl:with-param name="colwidths" select="$colwidths"/>
1731
- <xsl:with-param name="colgroup" select="$colgroup"/>
1732
- </xsl:call-template>
1733
- </xsl:for-each>
1734
-
1735
- <!-- insert footer as table -->
1736
- <!-- <fo:table>
1737
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1738
- <xsl:attribute name="{@name}">
1739
- <xsl:value-of select="."/>
1740
- </xsl:attribute>
1741
- </xsl:for-each>
1667
+ <xsl:variable name="table_attributes">
1668
+ <attribute name="table-layout">fixed</attribute>
1669
+ <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1670
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1671
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+ <xsl:if test="ancestor::*[local-name()='sections']">
1679
+ <attribute name="border-top">1.5pt solid black</attribute>
1680
+ <attribute name="border-bottom">1.5pt solid black</attribute>
1681
+ </xsl:if>
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+ </xsl:variable>
1742
1688
 
1743
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1689
+
1690
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1691
+
1692
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1693
+ <xsl:attribute name="{@name}">
1694
+ <xsl:value-of select="."/>
1695
+ </xsl:attribute>
1696
+ </xsl:for-each>
1697
+
1698
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1699
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1700
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1701
+ </xsl:if>
1702
+
1703
+ <xsl:choose>
1704
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1705
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1706
+ <fo:table-column column-width="{@width}"/>
1707
+ </xsl:for-each>
1708
+ </xsl:when>
1709
+ <xsl:otherwise>
1710
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1711
+ <xsl:choose>
1712
+ <xsl:when test=". = 1 or . = 0">
1713
+ <fo:table-column column-width="proportional-column-width(2)"/>
1714
+ </xsl:when>
1715
+ <xsl:otherwise>
1716
+ <fo:table-column column-width="proportional-column-width({.})"/>
1717
+ </xsl:otherwise>
1718
+ </xsl:choose>
1719
+ </xsl:for-each>
1720
+ </xsl:otherwise>
1721
+ </xsl:choose>
1722
+
1744
1723
  <xsl:choose>
1745
- <xsl:when test=". = 1 or . = 0">
1746
- <fo:table-column column-width="proportional-column-width(2)"/>
1724
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1725
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1747
1726
  </xsl:when>
1748
1727
  <xsl:otherwise>
1749
- <fo:table-column column-width="proportional-column-width({.})"/>
1728
+ <xsl:apply-templates/>
1750
1729
  </xsl:otherwise>
1751
1730
  </xsl:choose>
1731
+
1732
+ </fo:table>
1733
+
1734
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1735
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1736
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1737
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1738
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1739
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1740
+ </xsl:call-template>
1752
1741
  </xsl:for-each>
1753
- </fo:table>-->
1754
-
1755
-
1756
-
1757
-
1758
-
1759
- </fo:block-container>
1742
+
1743
+ <!-- insert footer as table -->
1744
+ <!-- <fo:table>
1745
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1746
+ <xsl:attribute name="{@name}">
1747
+ <xsl:value-of select="."/>
1748
+ </xsl:attribute>
1749
+ </xsl:for-each>
1750
+
1751
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1752
+ <xsl:choose>
1753
+ <xsl:when test=". = 1 or . = 0">
1754
+ <fo:table-column column-width="proportional-column-width(2)"/>
1755
+ </xsl:when>
1756
+ <xsl:otherwise>
1757
+ <fo:table-column column-width="proportional-column-width({.})"/>
1758
+ </xsl:otherwise>
1759
+ </xsl:choose>
1760
+ </xsl:for-each>
1761
+ </fo:table>-->
1762
+
1763
+
1764
+
1765
+
1766
+
1767
+ </fo:block-container>
1768
+ </xsl:variable>
1769
+
1770
+
1771
+
1772
+ <xsl:choose>
1773
+ <xsl:when test="@width">
1774
+
1775
+ <!-- centered table when table name is centered (see table-name-style) -->
1776
+
1777
+
1778
+
1779
+ <xsl:copy-of select="$table"/>
1780
+
1781
+
1782
+ </xsl:when>
1783
+ <xsl:otherwise>
1784
+ <xsl:copy-of select="$table"/>
1785
+ </xsl:otherwise>
1786
+ </xsl:choose>
1787
+
1760
1788
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1761
1789
  <xsl:if test="normalize-space() != ''">
1762
1790
  <fo:block xsl:use-attribute-sets="table-name-style">
@@ -2601,7 +2629,7 @@
2601
2629
  <xsl:with-param name="table" select="$html-table"/>
2602
2630
  </xsl:call-template>
2603
2631
  </xsl:variable>
2604
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2632
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2605
2633
  <xsl:variable name="maxlength_dt">
2606
2634
  <xsl:call-template name="getMaxLength_dt"/>
2607
2635
  </xsl:variable>
@@ -2630,13 +2658,22 @@
2630
2658
  </xsl:when>
2631
2659
  <xsl:otherwise>
2632
2660
  <xsl:choose>
2661
+ <!-- to set width check most wide chars like `W` -->
2633
2662
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
2634
- <fo:table-column column-width="5%"/>
2635
- <fo:table-column column-width="95%"/>
2663
+ <fo:table-column column-width="7%"/>
2664
+ <fo:table-column column-width="93%"/>
2665
+ </xsl:when>
2666
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like ABC, etc -->
2667
+ <fo:table-column column-width="15%"/>
2668
+ <fo:table-column column-width="85%"/>
2636
2669
  </xsl:when>
2637
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
2638
- <fo:table-column column-width="10%"/>
2639
- <fo:table-column column-width="90%"/>
2670
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 7"> <!-- if dt contains short text like ABCDEF, etc -->
2671
+ <fo:table-column column-width="20%"/>
2672
+ <fo:table-column column-width="80%"/>
2673
+ </xsl:when>
2674
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
2675
+ <fo:table-column column-width="25%"/>
2676
+ <fo:table-column column-width="75%"/>
2640
2677
  </xsl:when>
2641
2678
  <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
2642
2679
  <fo:table-column column-width="60%"/>
@@ -2943,6 +2980,10 @@
2943
2980
  <xsl:param name="text" select="."/>
2944
2981
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2945
2982
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
2983
+ </xsl:template><xsl:template name="add-zero-spaces-link-java">
2984
+ <xsl:param name="text" select="."/>
2985
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2986
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
2946
2987
  </xsl:template><xsl:template name="add-zero-spaces">
2947
2988
  <xsl:param name="text" select="."/>
2948
2989
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
@@ -3203,6 +3244,11 @@
3203
3244
  <!-- replace start and end spaces to non-break space -->
3204
3245
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3205
3246
  </xsl:copy>
3247
+ </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3248
+ <xsl:copy>
3249
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
3250
+ </xsl:copy>
3251
+ <mathml:mspace width="0.5ex"/>
3206
3252
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3207
3253
  <xsl:variable name="target">
3208
3254
  <xsl:choose>
@@ -3224,7 +3270,10 @@
3224
3270
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3225
3271
  <xsl:choose>
3226
3272
  <xsl:when test="normalize-space(.) = ''">
3227
- <xsl:value-of select="$target"/>
3273
+ <!-- <xsl:value-of select="$target"/> -->
3274
+ <xsl:call-template name="add-zero-spaces-link-java">
3275
+ <xsl:with-param name="text" select="$target"/>
3276
+ </xsl:call-template>
3228
3277
  </xsl:when>
3229
3278
  <xsl:otherwise>
3230
3279
  <xsl:apply-templates/>
@@ -3717,6 +3766,8 @@
3717
3766
  <xsl:copy>
3718
3767
  <xsl:apply-templates mode="contents_item"/>
3719
3768
  </xsl:copy>
3769
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
3770
+ <xsl:copy-of select="."/>
3720
3771
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3721
3772
  <xsl:text> </xsl:text>
3722
3773
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -4115,11 +4166,13 @@
4115
4166
  </xsl:if>
4116
4167
  </xsl:if>
4117
4168
 
4169
+
4118
4170
  <fo:block-container margin-left="0mm">
4119
4171
 
4120
4172
  <fo:block xsl:use-attribute-sets="quote-style">
4121
4173
  <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4122
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4174
+
4175
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4123
4176
  </fo:block>
4124
4177
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4125
4178
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -4541,7 +4594,7 @@
4541
4594
  <xsl:param name="charDelim" select="', '"/>
4542
4595
  <xsl:choose>
4543
4596
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
4544
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4597
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4545
4598
  <xsl:sort data-type="text" order="ascending"/>
4546
4599
  <xsl:call-template name="insertKeyword">
4547
4600
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -4550,7 +4603,7 @@
4550
4603
  </xsl:for-each>
4551
4604
  </xsl:when>
4552
4605
  <xsl:otherwise>
4553
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4606
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4554
4607
  <xsl:call-template name="insertKeyword">
4555
4608
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
4556
4609
  <xsl:with-param name="charDelim" select="$charDelim"/>
@@ -4567,6 +4620,9 @@
4567
4620
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
4568
4621
  </xsl:choose>
4569
4622
  </xsl:template><xsl:template name="addPDFUAmeta">
4623
+ <xsl:variable name="lang">
4624
+ <xsl:call-template name="getLang"/>
4625
+ </xsl:variable>
4570
4626
  <fo:declarations>
4571
4627
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4572
4628
  <pdf:dictionary type="normal" key="ViewerPreferences">
@@ -4579,13 +4635,16 @@
4579
4635
  <!-- Dublin Core properties go here -->
4580
4636
  <dc:title>
4581
4637
  <xsl:variable name="title">
4582
-
4583
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en' and @type = 'main']"/>
4584
-
4585
-
4586
-
4587
-
4588
-
4638
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4639
+
4640
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
4641
+
4642
+
4643
+
4644
+
4645
+
4646
+
4647
+ </xsl:for-each>
4589
4648
  </xsl:variable>
4590
4649
  <xsl:choose>
4591
4650
  <xsl:when test="normalize-space($title) != ''">
@@ -4597,17 +4656,21 @@
4597
4656
  </xsl:choose>
4598
4657
  </dc:title>
4599
4658
  <dc:creator>
4600
-
4601
-
4602
-
4603
- </dc:creator>
4604
- <dc:description>
4605
- <xsl:variable name="abstract">
4659
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4660
+
4661
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
4662
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
4663
+ <xsl:if test="position() != last()">; </xsl:if>
4664
+ </xsl:for-each>
4606
4665
 
4607
4666
 
4608
4667
 
4609
- <xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4668
+ </xsl:for-each>
4669
+ </dc:creator>
4670
+ <dc:description>
4671
+ <xsl:variable name="abstract">
4610
4672
 
4673
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4611
4674
 
4612
4675
 
4613
4676
  </xsl:variable>