metanorma-iho 0.2.12 → 0.2.13

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.
@@ -1490,200 +1490,234 @@
1490
1490
  <xsl:call-template name="add-zero-spaces-java"/>
1491
1491
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1492
1492
 
1493
- <xsl:variable name="simple-table">
1494
- <xsl:call-template name="getSimpleTable"/>
1495
- </xsl:variable>
1493
+ <xsl:variable name="table">
1496
1494
 
1497
-
1498
-
1499
-
1500
-
1501
- <!-- <xsl:if test="$namespace = 'bipm'">
1502
- <fo:block>&#xA0;</fo:block>
1503
- </xsl:if> -->
1504
-
1505
- <!-- $namespace = 'iso' or -->
1506
-
1507
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1508
-
1509
-
1510
-
1511
- <xsl:call-template name="fn_name_display"/>
1495
+ <xsl:variable name="simple-table">
1496
+ <xsl:call-template name="getSimpleTable"/>
1497
+ </xsl:variable>
1512
1498
 
1513
1499
 
1514
-
1515
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1516
-
1517
- <!-- <xsl:variable name="cols-count">
1518
- <xsl:choose>
1519
- <xsl:when test="*[local-name()='thead']">
1520
- <xsl:call-template name="calculate-columns-numbers">
1521
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1522
- </xsl:call-template>
1523
- </xsl:when>
1524
- <xsl:otherwise>
1525
- <xsl:call-template name="calculate-columns-numbers">
1526
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1527
- </xsl:call-template>
1528
- </xsl:otherwise>
1529
- </xsl:choose>
1530
- </xsl:variable> -->
1531
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1532
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1533
-
1534
-
1535
-
1536
- <xsl:variable name="colwidths">
1537
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1538
- <xsl:call-template name="calculate-column-widths">
1539
- <xsl:with-param name="cols-count" select="$cols-count"/>
1540
- <xsl:with-param name="table" select="$simple-table"/>
1541
- </xsl:call-template>
1542
- </xsl:if>
1543
- </xsl:variable>
1544
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1545
-
1546
- <!-- <xsl:variable name="colwidths2">
1547
- <xsl:call-template name="calculate-column-widths">
1548
- <xsl:with-param name="cols-count" select="$cols-count"/>
1549
- </xsl:call-template>
1550
- </xsl:variable> -->
1551
-
1552
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1553
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1554
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1555
-
1556
- <xsl:variable name="margin-left">
1557
- <xsl:choose>
1558
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1559
- <xsl:otherwise>0</xsl:otherwise>
1560
- </xsl:choose>
1561
- </xsl:variable>
1562
-
1563
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1564
1500
 
1565
1501
 
1566
-
1567
-
1568
-
1569
1502
 
1503
+ <!-- <xsl:if test="$namespace = 'bipm'">
1504
+ <fo:block>&#xA0;</fo:block>
1505
+ </xsl:if> -->
1570
1506
 
1571
-
1507
+ <!-- $namespace = 'iso' or -->
1572
1508
 
1509
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1573
1510
 
1511
+
1574
1512
 
1575
- <xsl:attribute name="space-after">18pt</xsl:attribute>
1576
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1577
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1513
+ <xsl:call-template name="fn_name_display"/>
1578
1514
 
1515
+
1579
1516
 
1517
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1580
1518
 
1519
+ <!-- <xsl:variable name="cols-count">
1520
+ <xsl:choose>
1521
+ <xsl:when test="*[local-name()='thead']">
1522
+ <xsl:call-template name="calculate-columns-numbers">
1523
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1524
+ </xsl:call-template>
1525
+ </xsl:when>
1526
+ <xsl:otherwise>
1527
+ <xsl:call-template name="calculate-columns-numbers">
1528
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1529
+ </xsl:call-template>
1530
+ </xsl:otherwise>
1531
+ </xsl:choose>
1532
+ </xsl:variable> -->
1533
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1534
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1581
1535
 
1582
1536
 
1583
- <xsl:variable name="table_attributes">
1584
- <attribute name="table-layout">fixed</attribute>
1585
- <attribute name="width">
1586
- <xsl:choose>
1587
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1588
- <xsl:otherwise>100%</xsl:otherwise>
1589
- </xsl:choose>
1590
- </attribute>
1591
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1592
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1537
+
1538
+ <xsl:variable name="colwidths">
1539
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1540
+ <xsl:call-template name="calculate-column-widths">
1541
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1542
+ <xsl:with-param name="table" select="$simple-table"/>
1543
+ </xsl:call-template>
1544
+ </xsl:if>
1545
+ </xsl:variable>
1546
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1547
+
1548
+ <!-- <xsl:variable name="colwidths2">
1549
+ <xsl:call-template name="calculate-column-widths">
1550
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1551
+ </xsl:call-template>
1552
+ </xsl:variable> -->
1553
+
1554
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1555
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
1556
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1557
+
1558
+ <xsl:variable name="margin-left">
1559
+ <xsl:choose>
1560
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1561
+ <xsl:otherwise>0</xsl:otherwise>
1562
+ </xsl:choose>
1563
+ </xsl:variable>
1564
+
1565
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1593
1566
 
1594
1567
 
1568
+
1569
+
1570
+
1595
1571
 
1596
1572
 
1597
-
1598
-
1599
-
1600
-
1601
- <attribute name="margin-left">0mm</attribute>
1602
- <attribute name="margin-right">0mm</attribute>
1573
+
1603
1574
 
1604
-
1605
1575
 
1606
- </xsl:variable>
1607
-
1608
-
1609
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1610
1576
 
1611
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1612
- <xsl:attribute name="{@name}">
1613
- <xsl:value-of select="."/>
1614
- </xsl:attribute>
1615
- </xsl:for-each>
1577
+ <xsl:attribute name="space-after">18pt</xsl:attribute>
1578
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1579
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1616
1580
 
1617
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1618
- <xsl:if test="$isNoteOrFnExist = 'true'">
1619
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1620
- </xsl:if>
1621
1581
 
1622
- <xsl:choose>
1623
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1624
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1625
- <fo:table-column column-width="{@width}"/>
1626
- </xsl:for-each>
1627
- </xsl:when>
1628
- <xsl:otherwise>
1629
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1630
- <xsl:choose>
1631
- <xsl:when test=". = 1 or . = 0">
1632
- <fo:table-column column-width="proportional-column-width(2)"/>
1633
- </xsl:when>
1634
- <xsl:otherwise>
1635
- <fo:table-column column-width="proportional-column-width({.})"/>
1636
- </xsl:otherwise>
1637
- </xsl:choose>
1638
- </xsl:for-each>
1639
- </xsl:otherwise>
1640
- </xsl:choose>
1641
1582
 
1642
- <xsl:choose>
1643
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1644
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1645
- </xsl:when>
1646
- <xsl:otherwise>
1647
- <xsl:apply-templates/>
1648
- </xsl:otherwise>
1649
- </xsl:choose>
1650
1583
 
1651
- </fo:table>
1652
-
1653
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1654
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1655
- <xsl:call-template name="insertTableFooterInSeparateTable">
1656
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
1657
- <xsl:with-param name="colwidths" select="$colwidths"/>
1658
- <xsl:with-param name="colgroup" select="$colgroup"/>
1659
- </xsl:call-template>
1660
- </xsl:for-each>
1661
-
1662
- <!-- insert footer as table -->
1663
- <!-- <fo:table>
1664
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1665
- <xsl:attribute name="{@name}">
1666
- <xsl:value-of select="."/>
1667
- </xsl:attribute>
1668
- </xsl:for-each>
1584
+ <xsl:variable name="table_width">
1585
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1586
+ 100%
1587
+
1588
+
1589
+ </xsl:variable>
1590
+
1591
+ <xsl:variable name="table_attributes">
1592
+ <attribute name="table-layout">fixed</attribute>
1593
+ <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1594
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1595
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1596
+
1597
+
1598
+
1599
+
1600
+
1601
+
1602
+
1603
+
1604
+ <attribute name="margin-left">0mm</attribute>
1605
+ <attribute name="margin-right">0mm</attribute>
1606
+
1607
+
1608
+
1609
+ </xsl:variable>
1669
1610
 
1670
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1611
+
1612
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1613
+
1614
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1615
+ <xsl:attribute name="{@name}">
1616
+ <xsl:value-of select="."/>
1617
+ </xsl:attribute>
1618
+ </xsl:for-each>
1619
+
1620
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1621
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1622
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1623
+ </xsl:if>
1624
+
1625
+ <xsl:choose>
1626
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1627
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1628
+ <fo:table-column column-width="{@width}"/>
1629
+ </xsl:for-each>
1630
+ </xsl:when>
1631
+ <xsl:otherwise>
1632
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1633
+ <xsl:choose>
1634
+ <xsl:when test=". = 1 or . = 0">
1635
+ <fo:table-column column-width="proportional-column-width(2)"/>
1636
+ </xsl:when>
1637
+ <xsl:otherwise>
1638
+ <fo:table-column column-width="proportional-column-width({.})"/>
1639
+ </xsl:otherwise>
1640
+ </xsl:choose>
1641
+ </xsl:for-each>
1642
+ </xsl:otherwise>
1643
+ </xsl:choose>
1644
+
1671
1645
  <xsl:choose>
1672
- <xsl:when test=". = 1 or . = 0">
1673
- <fo:table-column column-width="proportional-column-width(2)"/>
1646
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1647
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1674
1648
  </xsl:when>
1675
1649
  <xsl:otherwise>
1676
- <fo:table-column column-width="proportional-column-width({.})"/>
1650
+ <xsl:apply-templates/>
1677
1651
  </xsl:otherwise>
1678
1652
  </xsl:choose>
1653
+
1654
+ </fo:table>
1655
+
1656
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1657
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1658
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1659
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1660
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1661
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1662
+ </xsl:call-template>
1679
1663
  </xsl:for-each>
1680
- </fo:table>-->
1681
-
1682
-
1683
-
1684
-
1685
-
1686
- </fo:block-container>
1664
+
1665
+ <!-- insert footer as table -->
1666
+ <!-- <fo:table>
1667
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1668
+ <xsl:attribute name="{@name}">
1669
+ <xsl:value-of select="."/>
1670
+ </xsl:attribute>
1671
+ </xsl:for-each>
1672
+
1673
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1674
+ <xsl:choose>
1675
+ <xsl:when test=". = 1 or . = 0">
1676
+ <fo:table-column column-width="proportional-column-width(2)"/>
1677
+ </xsl:when>
1678
+ <xsl:otherwise>
1679
+ <fo:table-column column-width="proportional-column-width({.})"/>
1680
+ </xsl:otherwise>
1681
+ </xsl:choose>
1682
+ </xsl:for-each>
1683
+ </fo:table>-->
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+ </fo:block-container>
1690
+ </xsl:variable>
1691
+
1692
+
1693
+
1694
+ <xsl:choose>
1695
+ <xsl:when test="@width">
1696
+
1697
+ <!-- centered table when table name is centered (see table-name-style) -->
1698
+
1699
+ <fo:table table-layout="fixed" width="100%">
1700
+ <fo:table-column column-width="proportional-column-width(1)"/>
1701
+ <fo:table-column column-width="{@width}"/>
1702
+ <fo:table-column column-width="proportional-column-width(1)"/>
1703
+ <fo:table-body>
1704
+ <fo:table-row>
1705
+ <fo:table-cell column-number="2">
1706
+ <fo:block><xsl:copy-of select="$table"/></fo:block>
1707
+ </fo:table-cell>
1708
+ </fo:table-row>
1709
+ </fo:table-body>
1710
+ </fo:table>
1711
+
1712
+
1713
+
1714
+
1715
+ </xsl:when>
1716
+ <xsl:otherwise>
1717
+ <xsl:copy-of select="$table"/>
1718
+ </xsl:otherwise>
1719
+ </xsl:choose>
1720
+
1687
1721
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1688
1722
  <xsl:if test="normalize-space() != ''">
1689
1723
  <fo:block xsl:use-attribute-sets="table-name-style">
@@ -2507,7 +2541,7 @@
2507
2541
  <xsl:with-param name="table" select="$html-table"/>
2508
2542
  </xsl:call-template>
2509
2543
  </xsl:variable>
2510
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2544
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2511
2545
  <xsl:variable name="maxlength_dt">
2512
2546
  <xsl:call-template name="getMaxLength_dt"/>
2513
2547
  </xsl:variable>
@@ -2536,13 +2570,22 @@
2536
2570
  </xsl:when>
2537
2571
  <xsl:otherwise>
2538
2572
  <xsl:choose>
2573
+ <!-- to set width check most wide chars like `W` -->
2539
2574
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
2540
- <fo:table-column column-width="5%"/>
2541
- <fo:table-column column-width="95%"/>
2575
+ <fo:table-column column-width="7%"/>
2576
+ <fo:table-column column-width="93%"/>
2577
+ </xsl:when>
2578
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like ABC, etc -->
2579
+ <fo:table-column column-width="15%"/>
2580
+ <fo:table-column column-width="85%"/>
2581
+ </xsl:when>
2582
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 7"> <!-- if dt contains short text like ABCDEF, etc -->
2583
+ <fo:table-column column-width="20%"/>
2584
+ <fo:table-column column-width="80%"/>
2542
2585
  </xsl:when>
2543
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
2544
- <fo:table-column column-width="10%"/>
2545
- <fo:table-column column-width="90%"/>
2586
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
2587
+ <fo:table-column column-width="25%"/>
2588
+ <fo:table-column column-width="75%"/>
2546
2589
  </xsl:when>
2547
2590
  <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
2548
2591
  <fo:table-column column-width="60%"/>
@@ -2852,6 +2895,10 @@
2852
2895
  <xsl:param name="text" select="."/>
2853
2896
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2854
2897
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
2898
+ </xsl:template><xsl:template name="add-zero-spaces-link-java">
2899
+ <xsl:param name="text" select="."/>
2900
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2901
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
2855
2902
  </xsl:template><xsl:template name="add-zero-spaces">
2856
2903
  <xsl:param name="text" select="."/>
2857
2904
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
@@ -3112,6 +3159,11 @@
3112
3159
  <!-- replace start and end spaces to non-break space -->
3113
3160
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3114
3161
  </xsl:copy>
3162
+ </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3163
+ <xsl:copy>
3164
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
3165
+ </xsl:copy>
3166
+ <mathml:mspace width="0.5ex"/>
3115
3167
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3116
3168
  <xsl:variable name="target">
3117
3169
  <xsl:choose>
@@ -3133,7 +3185,10 @@
3133
3185
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3134
3186
  <xsl:choose>
3135
3187
  <xsl:when test="normalize-space(.) = ''">
3136
- <xsl:value-of select="$target"/>
3188
+ <!-- <xsl:value-of select="$target"/> -->
3189
+ <xsl:call-template name="add-zero-spaces-link-java">
3190
+ <xsl:with-param name="text" select="$target"/>
3191
+ </xsl:call-template>
3137
3192
  </xsl:when>
3138
3193
  <xsl:otherwise>
3139
3194
  <xsl:apply-templates/>
@@ -3608,6 +3663,8 @@
3608
3663
  <xsl:copy>
3609
3664
  <xsl:apply-templates mode="contents_item"/>
3610
3665
  </xsl:copy>
3666
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
3667
+ <xsl:copy-of select="."/>
3611
3668
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3612
3669
  <xsl:text> </xsl:text>
3613
3670
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -4014,11 +4071,13 @@
4014
4071
  </xsl:if>
4015
4072
  </xsl:if>
4016
4073
 
4074
+
4017
4075
  <fo:block-container margin-left="0mm">
4018
4076
 
4019
4077
  <fo:block xsl:use-attribute-sets="quote-style">
4020
4078
  <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
4021
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4079
+
4080
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
4022
4081
  </fo:block>
4023
4082
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
4024
4083
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -4531,7 +4590,7 @@
4531
4590
  <xsl:param name="charDelim" select="', '"/>
4532
4591
  <xsl:choose>
4533
4592
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
4534
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4593
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4535
4594
  <xsl:sort data-type="text" order="ascending"/>
4536
4595
  <xsl:call-template name="insertKeyword">
4537
4596
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -4540,7 +4599,7 @@
4540
4599
  </xsl:for-each>
4541
4600
  </xsl:when>
4542
4601
  <xsl:otherwise>
4543
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4602
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4544
4603
  <xsl:call-template name="insertKeyword">
4545
4604
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
4546
4605
  <xsl:with-param name="charDelim" select="$charDelim"/>
@@ -4557,6 +4616,9 @@
4557
4616
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
4558
4617
  </xsl:choose>
4559
4618
  </xsl:template><xsl:template name="addPDFUAmeta">
4619
+ <xsl:variable name="lang">
4620
+ <xsl:call-template name="getLang"/>
4621
+ </xsl:variable>
4560
4622
  <fo:declarations>
4561
4623
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4562
4624
  <pdf:dictionary type="normal" key="ViewerPreferences">
@@ -4569,13 +4631,16 @@
4569
4631
  <!-- Dublin Core properties go here -->
4570
4632
  <dc:title>
4571
4633
  <xsl:variable name="title">
4572
-
4573
-
4574
-
4575
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
4576
-
4577
-
4578
-
4634
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4635
+
4636
+
4637
+
4638
+
4639
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
4640
+
4641
+
4642
+
4643
+ </xsl:for-each>
4579
4644
  </xsl:variable>
4580
4645
  <xsl:choose>
4581
4646
  <xsl:when test="normalize-space($title) != ''">
@@ -4587,19 +4652,21 @@
4587
4652
  </xsl:choose>
4588
4653
  </dc:title>
4589
4654
  <dc:creator>
4590
-
4591
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
4592
-
4593
-
4594
-
4595
- </dc:creator>
4596
- <dc:description>
4597
- <xsl:variable name="abstract">
4655
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4598
4656
 
4599
- <xsl:copy-of select="/*/*[local-name() = 'bibliography']/*[local-name() = 'references']/*[local-name() = 'bibitem']/*[local-name() = 'abstract']//text()"/>
4657
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
4658
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
4659
+ <xsl:if test="position() != last()">; </xsl:if>
4660
+ </xsl:for-each>
4600
4661
 
4601
4662
 
4602
4663
 
4664
+ </xsl:for-each>
4665
+ </dc:creator>
4666
+ <dc:description>
4667
+ <xsl:variable name="abstract">
4668
+
4669
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4603
4670
 
4604
4671
 
4605
4672
  </xsl:variable>