metanorma-iho 0.2.9 → 0.2.14
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.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +20 -15
- data/.rubocop.yml +6 -0
- data/lib/asciidoctor/iho/basicdoc.rng +20 -3
- data/lib/asciidoctor/iho/iho.rng +6 -0
- data/lib/asciidoctor/iho/isodoc.rng +118 -4
- data/lib/isodoc/iho/iho.specification.xsl +428 -194
- data/lib/isodoc/iho/iho.standard.xsl +428 -194
- data/lib/isodoc/iho/xref.rb +28 -13
- data/lib/metanorma/iho/processor.rb +14 -0
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- metadata +6 -6
- data/lib/metanorma/iho/fonts_manifest.yaml +0 -8
@@ -1336,10 +1336,12 @@
|
|
1336
1336
|
|
1337
1337
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1338
1338
|
|
1339
|
+
|
1339
1340
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1340
1341
|
|
1341
1342
|
|
1342
1343
|
|
1344
|
+
|
1343
1345
|
|
1344
1346
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
1345
1347
|
<xsl:attribute name="margin-right">14mm</xsl:attribute>
|
@@ -1486,197 +1488,236 @@
|
|
1486
1488
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1487
1489
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1488
1490
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1489
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
1491
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1490
1492
|
|
1491
|
-
<xsl:variable name="
|
1492
|
-
<xsl:call-template name="getSimpleTable"/>
|
1493
|
-
</xsl:variable>
|
1493
|
+
<xsl:variable name="table">
|
1494
1494
|
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1500
|
-
<fo:block> </fo:block>
|
1501
|
-
</xsl:if> -->
|
1502
|
-
|
1503
|
-
<!-- $namespace = 'iso' or -->
|
1504
|
-
|
1505
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
<xsl:call-template name="fn_name_display"/>
|
1495
|
+
<xsl:variable name="simple-table">
|
1496
|
+
<xsl:call-template name="getSimpleTable"/>
|
1497
|
+
</xsl:variable>
|
1510
1498
|
|
1511
1499
|
|
1512
|
-
|
1513
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1514
|
-
|
1515
|
-
<!-- <xsl:variable name="cols-count">
|
1516
|
-
<xsl:choose>
|
1517
|
-
<xsl:when test="*[local-name()='thead']">
|
1518
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1519
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1520
|
-
</xsl:call-template>
|
1521
|
-
</xsl:when>
|
1522
|
-
<xsl:otherwise>
|
1523
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1524
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1525
|
-
</xsl:call-template>
|
1526
|
-
</xsl:otherwise>
|
1527
|
-
</xsl:choose>
|
1528
|
-
</xsl:variable> -->
|
1529
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1530
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
<xsl:variable name="colwidths">
|
1535
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1536
|
-
<xsl:call-template name="calculate-column-widths">
|
1537
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1538
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
1539
|
-
</xsl:call-template>
|
1540
|
-
</xsl:if>
|
1541
|
-
</xsl:variable>
|
1542
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1543
|
-
|
1544
|
-
<!-- <xsl:variable name="colwidths2">
|
1545
|
-
<xsl:call-template name="calculate-column-widths">
|
1546
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1547
|
-
</xsl:call-template>
|
1548
|
-
</xsl:variable> -->
|
1549
|
-
|
1550
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1551
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1552
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1553
|
-
|
1554
|
-
<xsl:variable name="margin-left">
|
1555
|
-
<xsl:choose>
|
1556
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1557
|
-
<xsl:otherwise>0</xsl:otherwise>
|
1558
|
-
</xsl:choose>
|
1559
|
-
</xsl:variable>
|
1560
|
-
|
1561
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1562
1500
|
|
1563
1501
|
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
1502
|
|
1503
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1504
|
+
<fo:block> </fo:block>
|
1505
|
+
</xsl:if> -->
|
1568
1506
|
|
1569
|
-
|
1507
|
+
<!-- $namespace = 'iso' or -->
|
1508
|
+
|
1509
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1510
|
+
|
1511
|
+
|
1512
|
+
|
1513
|
+
<xsl:call-template name="fn_name_display"/>
|
1514
|
+
|
1515
|
+
|
1516
|
+
|
1517
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1570
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"/> -->
|
1571
1535
|
|
1572
1536
|
|
1573
|
-
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
1574
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1575
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1576
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"/> -->
|
1577
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> -->
|
1578
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 -->
|
1579
1557
|
|
1558
|
+
<xsl:variable name="margin-left">
|
1559
|
+
<xsl:choose>
|
1560
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1561
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1562
|
+
</xsl:choose>
|
1563
|
+
</xsl:variable>
|
1580
1564
|
|
1581
|
-
<
|
1582
|
-
<attribute name="table-layout">fixed</attribute>
|
1583
|
-
<attribute name="width">100%</attribute>
|
1584
|
-
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1585
|
-
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1565
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1586
1566
|
|
1587
1567
|
|
1568
|
+
|
1569
|
+
|
1570
|
+
|
1588
1571
|
|
1589
1572
|
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
<attribute name="margin-left">0mm</attribute>
|
1595
|
-
<attribute name="margin-right">0mm</attribute>
|
1573
|
+
|
1596
1574
|
|
1597
|
-
|
1598
1575
|
|
1599
|
-
</xsl:variable>
|
1600
|
-
|
1601
|
-
|
1602
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1603
1576
|
|
1604
|
-
|
1605
|
-
<xsl:attribute name="
|
1606
|
-
|
1607
|
-
</xsl:attribute>
|
1608
|
-
</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>
|
1609
1580
|
|
1610
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1611
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1612
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1613
|
-
</xsl:if>
|
1614
1581
|
|
1615
|
-
<xsl:choose>
|
1616
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1617
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1618
|
-
<fo:table-column column-width="{@width}"/>
|
1619
|
-
</xsl:for-each>
|
1620
|
-
</xsl:when>
|
1621
|
-
<xsl:otherwise>
|
1622
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1623
|
-
<xsl:choose>
|
1624
|
-
<xsl:when test=". = 1 or . = 0">
|
1625
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1626
|
-
</xsl:when>
|
1627
|
-
<xsl:otherwise>
|
1628
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1629
|
-
</xsl:otherwise>
|
1630
|
-
</xsl:choose>
|
1631
|
-
</xsl:for-each>
|
1632
|
-
</xsl:otherwise>
|
1633
|
-
</xsl:choose>
|
1634
1582
|
|
1635
|
-
<xsl:choose>
|
1636
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1637
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1638
|
-
</xsl:when>
|
1639
|
-
<xsl:otherwise>
|
1640
|
-
<xsl:apply-templates/>
|
1641
|
-
</xsl:otherwise>
|
1642
|
-
</xsl:choose>
|
1643
1583
|
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
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>
|
1662
1610
|
|
1663
|
-
|
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
|
+
|
1664
1625
|
<xsl:choose>
|
1665
|
-
<xsl:when test="
|
1666
|
-
<
|
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>
|
1667
1630
|
</xsl:when>
|
1668
1631
|
<xsl:otherwise>
|
1669
|
-
<
|
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>
|
1670
1642
|
</xsl:otherwise>
|
1671
1643
|
</xsl:choose>
|
1644
|
+
|
1645
|
+
<xsl:choose>
|
1646
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1647
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1648
|
+
</xsl:when>
|
1649
|
+
<xsl:otherwise>
|
1650
|
+
<xsl:apply-templates/>
|
1651
|
+
</xsl:otherwise>
|
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>
|
1672
1663
|
</xsl:for-each>
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
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
|
+
|
1680
1721
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1681
1722
|
<xsl:if test="normalize-space() != ''">
|
1682
1723
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -2362,7 +2403,9 @@
|
|
2362
2403
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2363
2404
|
<fo:block-container>
|
2364
2405
|
|
2365
|
-
<xsl:
|
2406
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2407
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2408
|
+
</xsl:if>
|
2366
2409
|
|
2367
2410
|
|
2368
2411
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -2377,6 +2420,7 @@
|
|
2377
2420
|
<fo:block-container>
|
2378
2421
|
|
2379
2422
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2423
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2380
2424
|
|
2381
2425
|
|
2382
2426
|
<xsl:variable name="parent" select="local-name(..)"/>
|
@@ -2497,7 +2541,7 @@
|
|
2497
2541
|
<xsl:with-param name="table" select="$html-table"/>
|
2498
2542
|
</xsl:call-template>
|
2499
2543
|
</xsl:variable>
|
2500
|
-
<!-- colwidths=<xsl:
|
2544
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2501
2545
|
<xsl:variable name="maxlength_dt">
|
2502
2546
|
<xsl:call-template name="getMaxLength_dt"/>
|
2503
2547
|
</xsl:variable>
|
@@ -2526,13 +2570,22 @@
|
|
2526
2570
|
</xsl:when>
|
2527
2571
|
<xsl:otherwise>
|
2528
2572
|
<xsl:choose>
|
2573
|
+
<!-- to set width check most wide chars like `W` -->
|
2529
2574
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2530
|
-
<fo:table-column column-width="
|
2531
|
-
<fo:table-column column-width="
|
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) <= 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) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2583
|
+
<fo:table-column column-width="20%"/>
|
2584
|
+
<fo:table-column column-width="80%"/>
|
2532
2585
|
</xsl:when>
|
2533
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
2534
|
-
<fo:table-column column-width="
|
2535
|
-
<fo:table-column column-width="
|
2586
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2587
|
+
<fo:table-column column-width="25%"/>
|
2588
|
+
<fo:table-column column-width="75%"/>
|
2536
2589
|
</xsl:when>
|
2537
2590
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2538
2591
|
<fo:table-column column-width="60%"/>
|
@@ -2564,12 +2617,32 @@
|
|
2564
2617
|
</xsl:otherwise>
|
2565
2618
|
</xsl:choose>
|
2566
2619
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
2567
|
-
<xsl:
|
2568
|
-
<xsl:
|
2569
|
-
|
2570
|
-
<xsl:
|
2571
|
-
|
2572
|
-
|
2620
|
+
<xsl:variable name="lengths">
|
2621
|
+
<xsl:for-each select="*[local-name()='dt']">
|
2622
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
2623
|
+
<xsl:variable name="attributes">
|
2624
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
2625
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
2626
|
+
</xsl:variable>
|
2627
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
2628
|
+
</xsl:for-each>
|
2629
|
+
</xsl:variable>
|
2630
|
+
<xsl:variable name="maxLength">
|
2631
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
2632
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
2633
|
+
<xsl:if test="position() = 1">
|
2634
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2635
|
+
</xsl:if>
|
2636
|
+
</xsl:for-each> -->
|
2637
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
2638
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2639
|
+
<xsl:if test="position() = 1">
|
2640
|
+
<xsl:value-of select="."/>
|
2641
|
+
</xsl:if>
|
2642
|
+
</xsl:for-each>
|
2643
|
+
</xsl:variable>
|
2644
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
2645
|
+
<xsl:value-of select="$maxLength"/>
|
2573
2646
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
2574
2647
|
<xsl:param name="key_iso"/>
|
2575
2648
|
|
@@ -2711,6 +2784,7 @@
|
|
2711
2784
|
|
2712
2785
|
|
2713
2786
|
|
2787
|
+
|
2714
2788
|
|
2715
2789
|
</xsl:variable>
|
2716
2790
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2724,6 +2798,10 @@
|
|
2724
2798
|
</xsl:if>
|
2725
2799
|
<xsl:apply-templates/>
|
2726
2800
|
</fo:inline>
|
2801
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
2802
|
+
<fo:inline text-decoration="underline">
|
2803
|
+
<xsl:apply-templates/>
|
2804
|
+
</fo:inline>
|
2727
2805
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2728
2806
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2729
2807
|
<xsl:apply-templates/>
|
@@ -2817,6 +2895,10 @@
|
|
2817
2895
|
<xsl:param name="text" select="."/>
|
2818
2896
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2819
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')"/>
|
2820
2902
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2821
2903
|
<xsl:param name="text" select="."/>
|
2822
2904
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -3077,6 +3159,11 @@
|
|
3077
3159
|
<!-- replace start and end spaces to non-break space -->
|
3078
3160
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3079
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"/>
|
3080
3167
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3081
3168
|
<xsl:variable name="target">
|
3082
3169
|
<xsl:choose>
|
@@ -3098,7 +3185,10 @@
|
|
3098
3185
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3099
3186
|
<xsl:choose>
|
3100
3187
|
<xsl:when test="normalize-space(.) = ''">
|
3101
|
-
<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>
|
3102
3192
|
</xsl:when>
|
3103
3193
|
<xsl:otherwise>
|
3104
3194
|
<xsl:apply-templates/>
|
@@ -3304,7 +3394,7 @@
|
|
3304
3394
|
</xsl:if> -->
|
3305
3395
|
</fo:inline>
|
3306
3396
|
</xsl:if>
|
3307
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3397
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3308
3398
|
<fo:block-container id="{@id}">
|
3309
3399
|
|
3310
3400
|
<fo:block>
|
@@ -3373,6 +3463,8 @@
|
|
3373
3463
|
<xsl:variable name="bookmark-title_">
|
3374
3464
|
<xsl:call-template name="getLangVersion">
|
3375
3465
|
<xsl:with-param name="lang" select="@lang"/>
|
3466
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
3467
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3376
3468
|
</xsl:call-template>
|
3377
3469
|
</xsl:variable>
|
3378
3470
|
<xsl:choose>
|
@@ -3390,13 +3482,34 @@
|
|
3390
3482
|
</xsl:choose>
|
3391
3483
|
</fo:bookmark-title>
|
3392
3484
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3485
|
+
|
3486
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3487
|
+
<xsl:with-param name="contents" select="contents"/>
|
3488
|
+
</xsl:call-template>
|
3489
|
+
|
3490
|
+
<xsl:call-template name="insertTableBookmarks">
|
3491
|
+
<xsl:with-param name="contents" select="contents"/>
|
3492
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3493
|
+
</xsl:call-template>
|
3494
|
+
|
3393
3495
|
</fo:bookmark>
|
3394
3496
|
|
3395
3497
|
</xsl:for-each>
|
3396
3498
|
</xsl:when>
|
3397
3499
|
<xsl:otherwise>
|
3398
3500
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3501
|
+
|
3399
3502
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3503
|
+
|
3504
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3505
|
+
<xsl:with-param name="contents" select="contents"/>
|
3506
|
+
</xsl:call-template>
|
3507
|
+
|
3508
|
+
<xsl:call-template name="insertTableBookmarks">
|
3509
|
+
<xsl:with-param name="contents" select="contents"/>
|
3510
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3511
|
+
</xsl:call-template>
|
3512
|
+
|
3400
3513
|
</xsl:for-each>
|
3401
3514
|
</xsl:otherwise>
|
3402
3515
|
</xsl:choose>
|
@@ -3415,8 +3528,44 @@
|
|
3415
3528
|
|
3416
3529
|
</fo:bookmark-tree>
|
3417
3530
|
</xsl:if>
|
3531
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
3532
|
+
<xsl:param name="contents"/>
|
3533
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
3534
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
3535
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
3536
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
3537
|
+
<fo:bookmark internal-destination="{@id}">
|
3538
|
+
<fo:bookmark-title>
|
3539
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3540
|
+
</fo:bookmark-title>
|
3541
|
+
</fo:bookmark>
|
3542
|
+
</xsl:for-each>
|
3543
|
+
</fo:bookmark>
|
3544
|
+
</xsl:if>
|
3545
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
3546
|
+
<xsl:param name="contents"/>
|
3547
|
+
<xsl:param name="lang"/>
|
3548
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
3549
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
3550
|
+
<fo:bookmark-title>
|
3551
|
+
<xsl:choose>
|
3552
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
3553
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
3554
|
+
</xsl:choose>
|
3555
|
+
</fo:bookmark-title>
|
3556
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
3557
|
+
<fo:bookmark internal-destination="{@id}">
|
3558
|
+
<fo:bookmark-title>
|
3559
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3560
|
+
</fo:bookmark-title>
|
3561
|
+
</fo:bookmark>
|
3562
|
+
</xsl:for-each>
|
3563
|
+
</fo:bookmark>
|
3564
|
+
</xsl:if>
|
3418
3565
|
</xsl:template><xsl:template name="getLangVersion">
|
3419
3566
|
<xsl:param name="lang"/>
|
3567
|
+
<xsl:param name="doctype" select="''"/>
|
3568
|
+
<xsl:param name="title" select="''"/>
|
3420
3569
|
<xsl:choose>
|
3421
3570
|
<xsl:when test="$lang = 'en'">
|
3422
3571
|
|
@@ -3452,6 +3601,12 @@
|
|
3452
3601
|
<!-- <xsl:text> </xsl:text> -->
|
3453
3602
|
</xsl:template><xsl:template name="getSection">
|
3454
3603
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3604
|
+
<!--
|
3605
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
3606
|
+
<xsl:value-of select="."/>
|
3607
|
+
</xsl:for-each>
|
3608
|
+
-->
|
3609
|
+
|
3455
3610
|
</xsl:template><xsl:template name="getName">
|
3456
3611
|
<xsl:choose>
|
3457
3612
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -3504,6 +3659,12 @@
|
|
3504
3659
|
<xsl:copy>
|
3505
3660
|
<xsl:apply-templates mode="contents_item"/>
|
3506
3661
|
</xsl:copy>
|
3662
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
3663
|
+
<xsl:copy>
|
3664
|
+
<xsl:apply-templates mode="contents_item"/>
|
3665
|
+
</xsl:copy>
|
3666
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3667
|
+
<xsl:copy-of select="."/>
|
3507
3668
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3508
3669
|
<xsl:text> </xsl:text>
|
3509
3670
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3529,6 +3690,7 @@
|
|
3529
3690
|
10
|
3530
3691
|
|
3531
3692
|
|
3693
|
+
|
3532
3694
|
|
3533
3695
|
|
3534
3696
|
|
@@ -3909,10 +4071,13 @@
|
|
3909
4071
|
</xsl:if>
|
3910
4072
|
</xsl:if>
|
3911
4073
|
|
4074
|
+
|
3912
4075
|
<fo:block-container margin-left="0mm">
|
3913
4076
|
|
3914
4077
|
<fo:block xsl:use-attribute-sets="quote-style">
|
3915
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4078
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4079
|
+
|
4080
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
3916
4081
|
</fo:block>
|
3917
4082
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3918
4083
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4067,6 +4232,7 @@
|
|
4067
4232
|
|
4068
4233
|
|
4069
4234
|
|
4235
|
+
|
4070
4236
|
|
4071
4237
|
|
4072
4238
|
|
@@ -4078,7 +4244,7 @@
|
|
4078
4244
|
|
4079
4245
|
|
4080
4246
|
|
4081
|
-
</xsl:template><xsl:template match="
|
4247
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
4082
4248
|
<fo:block break-after="page"/>
|
4083
4249
|
<fo:block>
|
4084
4250
|
<xsl:call-template name="setId"/>
|
@@ -4086,7 +4252,8 @@
|
|
4086
4252
|
</fo:block>
|
4087
4253
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4088
4254
|
<fo:block>
|
4089
|
-
<xsl:call-template name="setId"/>
|
4255
|
+
<xsl:call-template name="setId"/>
|
4256
|
+
|
4090
4257
|
|
4091
4258
|
<xsl:apply-templates/>
|
4092
4259
|
</fo:block>
|
@@ -4331,6 +4498,8 @@
|
|
4331
4498
|
<xsl:value-of select="translate(.,'. ','')"/>
|
4332
4499
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4333
4500
|
<xsl:value-of select="substring(.,1,1)"/>
|
4501
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4502
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4334
4503
|
</xsl:template><xsl:template name="convertDate">
|
4335
4504
|
<xsl:param name="date"/>
|
4336
4505
|
<xsl:param name="format" select="'short'"/>
|
@@ -4355,6 +4524,57 @@
|
|
4355
4524
|
</xsl:variable>
|
4356
4525
|
<xsl:variable name="result">
|
4357
4526
|
<xsl:choose>
|
4527
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4528
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4529
|
+
<xsl:text> </xsl:text>
|
4530
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4531
|
+
</xsl:when>
|
4532
|
+
<xsl:when test="$format = 'ddMM'">
|
4533
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4534
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4535
|
+
</xsl:when>
|
4536
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
4537
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4538
|
+
</xsl:when>
|
4539
|
+
<xsl:otherwise>
|
4540
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
4541
|
+
</xsl:otherwise>
|
4542
|
+
</xsl:choose>
|
4543
|
+
</xsl:variable>
|
4544
|
+
<xsl:value-of select="$result"/>
|
4545
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
4546
|
+
<xsl:param name="date"/>
|
4547
|
+
<xsl:param name="format" select="'short'"/>
|
4548
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
4549
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
4550
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
4551
|
+
<xsl:variable name="monthStr">
|
4552
|
+
<xsl:choose>
|
4553
|
+
<xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
|
4554
|
+
<xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
|
4555
|
+
<xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
|
4556
|
+
<xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
|
4557
|
+
<xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
|
4558
|
+
<xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
|
4559
|
+
<xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
|
4560
|
+
<xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
|
4561
|
+
<xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
|
4562
|
+
<xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
|
4563
|
+
<xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
|
4564
|
+
<xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
|
4565
|
+
</xsl:choose>
|
4566
|
+
</xsl:variable>
|
4567
|
+
<xsl:variable name="result">
|
4568
|
+
<xsl:choose>
|
4569
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4570
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4571
|
+
<xsl:text> </xsl:text>
|
4572
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4573
|
+
</xsl:when>
|
4574
|
+
<xsl:when test="$format = 'ddMM'">
|
4575
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4576
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4577
|
+
</xsl:when>
|
4358
4578
|
<xsl:when test="$format = 'short' or $day = ''">
|
4359
4579
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4360
4580
|
</xsl:when>
|
@@ -4370,7 +4590,7 @@
|
|
4370
4590
|
<xsl:param name="charDelim" select="', '"/>
|
4371
4591
|
<xsl:choose>
|
4372
4592
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4373
|
-
<xsl:for-each select="
|
4593
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4374
4594
|
<xsl:sort data-type="text" order="ascending"/>
|
4375
4595
|
<xsl:call-template name="insertKeyword">
|
4376
4596
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4379,7 +4599,7 @@
|
|
4379
4599
|
</xsl:for-each>
|
4380
4600
|
</xsl:when>
|
4381
4601
|
<xsl:otherwise>
|
4382
|
-
<xsl:for-each select="
|
4602
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4383
4603
|
<xsl:call-template name="insertKeyword">
|
4384
4604
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4385
4605
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4396,6 +4616,9 @@
|
|
4396
4616
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4397
4617
|
</xsl:choose>
|
4398
4618
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4619
|
+
<xsl:variable name="lang">
|
4620
|
+
<xsl:call-template name="getLang"/>
|
4621
|
+
</xsl:variable>
|
4399
4622
|
<fo:declarations>
|
4400
4623
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4401
4624
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -4408,13 +4631,16 @@
|
|
4408
4631
|
<!-- Dublin Core properties go here -->
|
4409
4632
|
<dc:title>
|
4410
4633
|
<xsl:variable name="title">
|
4411
|
-
|
4412
|
-
|
4413
|
-
|
4414
|
-
|
4415
|
-
|
4416
|
-
|
4417
|
-
|
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>
|
4418
4644
|
</xsl:variable>
|
4419
4645
|
<xsl:choose>
|
4420
4646
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -4426,19 +4652,21 @@
|
|
4426
4652
|
</xsl:choose>
|
4427
4653
|
</dc:title>
|
4428
4654
|
<dc:creator>
|
4429
|
-
|
4430
|
-
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
4431
|
-
|
4432
|
-
|
4433
|
-
|
4434
|
-
</dc:creator>
|
4435
|
-
<dc:description>
|
4436
|
-
<xsl:variable name="abstract">
|
4655
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4437
4656
|
|
4438
|
-
<xsl:
|
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>
|
4439
4661
|
|
4440
4662
|
|
4441
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()"/>
|
4442
4670
|
|
4443
4671
|
|
4444
4672
|
</xsl:variable>
|
@@ -4551,6 +4779,7 @@
|
|
4551
4779
|
|
4552
4780
|
|
4553
4781
|
|
4782
|
+
|
4554
4783
|
</xsl:variable>
|
4555
4784
|
<xsl:if test="$documentNS != $XSLNS">
|
4556
4785
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4610,6 +4839,11 @@
|
|
4610
4839
|
<xsl:call-template name="getLang"/>
|
4611
4840
|
</xsl:variable>
|
4612
4841
|
|
4613
|
-
<xsl:
|
4842
|
+
<xsl:choose>
|
4843
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4844
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4845
|
+
</xsl:when>
|
4846
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4847
|
+
</xsl:choose>
|
4614
4848
|
|
4615
4849
|
</xsl:template></xsl:stylesheet>
|