metanorma-iho 0.2.12 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +11 -44
- data/.gitignore +1 -0
- data/.rubocop.yml +14 -0
- data/lib/asciidoctor/iho/biblio.rng +4 -6
- data/lib/asciidoctor/iho/iho.rng +6 -0
- data/lib/asciidoctor/iho/isodoc.rng +235 -3
- data/lib/isodoc/iho/html/htmlstyle.css +7 -0
- data/lib/isodoc/iho/iho.specification.xsl +543 -270
- data/lib/isodoc/iho/iho.standard.xsl +543 -270
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +5 -5
- metadata +25 -23
@@ -115,6 +115,13 @@ a.FootnoteRef + a.FootnoteRef:before {
|
|
115
115
|
content: ", ";
|
116
116
|
vertical-align: super; }
|
117
117
|
|
118
|
+
.addition {
|
119
|
+
color: blue; }
|
120
|
+
|
121
|
+
.deletion {
|
122
|
+
color: red;
|
123
|
+
text-decoration: line-through; }
|
124
|
+
|
118
125
|
#standard-band {
|
119
126
|
background-color: #0AC442; }
|
120
127
|
|
@@ -3,7 +3,9 @@
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
|
+
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
6
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
|
+
<xsl:param name="basepath"/>
|
7
9
|
|
8
10
|
|
9
11
|
|
@@ -109,7 +111,9 @@
|
|
109
111
|
</fo:page-sequence-master>
|
110
112
|
</fo:layout-master-set>
|
111
113
|
|
112
|
-
<
|
114
|
+
<fo:declarations>
|
115
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
116
|
+
</fo:declarations>
|
113
117
|
|
114
118
|
<xsl:call-template name="addBookmarks">
|
115
119
|
<xsl:with-param name="contents" select="$contents"/>
|
@@ -1224,6 +1228,7 @@
|
|
1224
1228
|
|
1225
1229
|
|
1226
1230
|
|
1231
|
+
|
1227
1232
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1228
1233
|
|
1229
1234
|
|
@@ -1437,7 +1442,7 @@
|
|
1437
1442
|
|
1438
1443
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1439
1444
|
|
1440
|
-
|
1445
|
+
|
1441
1446
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1442
1447
|
|
1443
1448
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
@@ -1445,6 +1450,12 @@
|
|
1445
1450
|
|
1446
1451
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1447
1452
|
|
1453
|
+
</xsl:attribute-set><xsl:attribute-set name="add-style">
|
1454
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1455
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1456
|
+
</xsl:attribute-set><xsl:attribute-set name="del-style">
|
1457
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1458
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1448
1459
|
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1449
1460
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1450
1461
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -1490,200 +1501,234 @@
|
|
1490
1501
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1491
1502
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1492
1503
|
|
1493
|
-
<xsl:variable name="
|
1494
|
-
<xsl:call-template name="getSimpleTable"/>
|
1495
|
-
</xsl:variable>
|
1504
|
+
<xsl:variable name="table">
|
1496
1505
|
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1502
|
-
<fo:block> </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"/>
|
1506
|
+
<xsl:variable name="simple-table">
|
1507
|
+
<xsl:call-template name="getSimpleTable"/>
|
1508
|
+
</xsl:variable>
|
1512
1509
|
|
1513
1510
|
|
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) > 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
1511
|
|
1565
1512
|
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
1513
|
|
1514
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1515
|
+
<fo:block> </fo:block>
|
1516
|
+
</xsl:if> -->
|
1570
1517
|
|
1571
|
-
|
1518
|
+
<!-- $namespace = 'iso' or -->
|
1572
1519
|
|
1520
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1573
1521
|
|
1522
|
+
|
1574
1523
|
|
1575
|
-
<xsl:
|
1576
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1577
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1524
|
+
<xsl:call-template name="fn_name_display"/>
|
1578
1525
|
|
1526
|
+
|
1579
1527
|
|
1528
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1580
1529
|
|
1530
|
+
<!-- <xsl:variable name="cols-count">
|
1531
|
+
<xsl:choose>
|
1532
|
+
<xsl:when test="*[local-name()='thead']">
|
1533
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1534
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1535
|
+
</xsl:call-template>
|
1536
|
+
</xsl:when>
|
1537
|
+
<xsl:otherwise>
|
1538
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1539
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1540
|
+
</xsl:call-template>
|
1541
|
+
</xsl:otherwise>
|
1542
|
+
</xsl:choose>
|
1543
|
+
</xsl:variable> -->
|
1544
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1545
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1581
1546
|
|
1582
1547
|
|
1583
|
-
|
1584
|
-
|
1585
|
-
<
|
1586
|
-
<xsl:
|
1587
|
-
<xsl:
|
1588
|
-
<xsl:
|
1589
|
-
</xsl:
|
1590
|
-
</
|
1591
|
-
|
1592
|
-
|
1548
|
+
|
1549
|
+
<xsl:variable name="colwidths">
|
1550
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1551
|
+
<xsl:call-template name="calculate-column-widths">
|
1552
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1553
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1554
|
+
</xsl:call-template>
|
1555
|
+
</xsl:if>
|
1556
|
+
</xsl:variable>
|
1557
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1558
|
+
|
1559
|
+
<!-- <xsl:variable name="colwidths2">
|
1560
|
+
<xsl:call-template name="calculate-column-widths">
|
1561
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1562
|
+
</xsl:call-template>
|
1563
|
+
</xsl:variable> -->
|
1564
|
+
|
1565
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1566
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1567
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1568
|
+
|
1569
|
+
<xsl:variable name="margin-left">
|
1570
|
+
<xsl:choose>
|
1571
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1572
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1573
|
+
</xsl:choose>
|
1574
|
+
</xsl:variable>
|
1575
|
+
|
1576
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1593
1577
|
|
1594
1578
|
|
1579
|
+
|
1580
|
+
|
1581
|
+
|
1595
1582
|
|
1596
1583
|
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
<attribute name="margin-left">0mm</attribute>
|
1602
|
-
<attribute name="margin-right">0mm</attribute>
|
1584
|
+
|
1603
1585
|
|
1604
|
-
|
1605
1586
|
|
1606
|
-
</xsl:variable>
|
1607
|
-
|
1608
|
-
|
1609
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1610
1587
|
|
1611
|
-
|
1612
|
-
<xsl:attribute name="
|
1613
|
-
|
1614
|
-
</xsl:attribute>
|
1615
|
-
</xsl:for-each>
|
1588
|
+
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
1589
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1590
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1616
1591
|
|
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
1592
|
|
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
1593
|
|
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
1594
|
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1595
|
+
<xsl:variable name="table_width">
|
1596
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1597
|
+
100%
|
1598
|
+
|
1599
|
+
|
1600
|
+
</xsl:variable>
|
1601
|
+
|
1602
|
+
<xsl:variable name="table_attributes">
|
1603
|
+
<attribute name="table-layout">fixed</attribute>
|
1604
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
1605
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1606
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1607
|
+
|
1608
|
+
|
1609
|
+
|
1610
|
+
|
1611
|
+
|
1612
|
+
|
1613
|
+
|
1614
|
+
|
1615
|
+
<attribute name="margin-left">0mm</attribute>
|
1616
|
+
<attribute name="margin-right">0mm</attribute>
|
1617
|
+
|
1618
|
+
|
1619
|
+
|
1620
|
+
</xsl:variable>
|
1669
1621
|
|
1670
|
-
|
1622
|
+
|
1623
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1624
|
+
|
1625
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1626
|
+
<xsl:attribute name="{@name}">
|
1627
|
+
<xsl:value-of select="."/>
|
1628
|
+
</xsl:attribute>
|
1629
|
+
</xsl:for-each>
|
1630
|
+
|
1631
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1632
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1633
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1634
|
+
</xsl:if>
|
1635
|
+
|
1636
|
+
<xsl:choose>
|
1637
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1638
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1639
|
+
<fo:table-column column-width="{@width}"/>
|
1640
|
+
</xsl:for-each>
|
1641
|
+
</xsl:when>
|
1642
|
+
<xsl:otherwise>
|
1643
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1644
|
+
<xsl:choose>
|
1645
|
+
<xsl:when test=". = 1 or . = 0">
|
1646
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1647
|
+
</xsl:when>
|
1648
|
+
<xsl:otherwise>
|
1649
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1650
|
+
</xsl:otherwise>
|
1651
|
+
</xsl:choose>
|
1652
|
+
</xsl:for-each>
|
1653
|
+
</xsl:otherwise>
|
1654
|
+
</xsl:choose>
|
1655
|
+
|
1671
1656
|
<xsl:choose>
|
1672
|
-
<xsl:when test="
|
1673
|
-
<
|
1657
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1658
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1674
1659
|
</xsl:when>
|
1675
1660
|
<xsl:otherwise>
|
1676
|
-
<
|
1661
|
+
<xsl:apply-templates/>
|
1677
1662
|
</xsl:otherwise>
|
1678
1663
|
</xsl:choose>
|
1664
|
+
|
1665
|
+
</fo:table>
|
1666
|
+
|
1667
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1668
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1669
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1670
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1671
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1672
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1673
|
+
</xsl:call-template>
|
1679
1674
|
</xsl:for-each>
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1675
|
+
|
1676
|
+
<!-- insert footer as table -->
|
1677
|
+
<!-- <fo:table>
|
1678
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1679
|
+
<xsl:attribute name="{@name}">
|
1680
|
+
<xsl:value-of select="."/>
|
1681
|
+
</xsl:attribute>
|
1682
|
+
</xsl:for-each>
|
1683
|
+
|
1684
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1685
|
+
<xsl:choose>
|
1686
|
+
<xsl:when test=". = 1 or . = 0">
|
1687
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1688
|
+
</xsl:when>
|
1689
|
+
<xsl:otherwise>
|
1690
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1691
|
+
</xsl:otherwise>
|
1692
|
+
</xsl:choose>
|
1693
|
+
</xsl:for-each>
|
1694
|
+
</fo:table>-->
|
1695
|
+
|
1696
|
+
|
1697
|
+
|
1698
|
+
|
1699
|
+
|
1700
|
+
</fo:block-container>
|
1701
|
+
</xsl:variable>
|
1702
|
+
|
1703
|
+
|
1704
|
+
|
1705
|
+
<xsl:choose>
|
1706
|
+
<xsl:when test="@width">
|
1707
|
+
|
1708
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
1709
|
+
|
1710
|
+
<fo:table table-layout="fixed" width="100%">
|
1711
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1712
|
+
<fo:table-column column-width="{@width}"/>
|
1713
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1714
|
+
<fo:table-body>
|
1715
|
+
<fo:table-row>
|
1716
|
+
<fo:table-cell column-number="2">
|
1717
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
1718
|
+
</fo:table-cell>
|
1719
|
+
</fo:table-row>
|
1720
|
+
</fo:table-body>
|
1721
|
+
</fo:table>
|
1722
|
+
|
1723
|
+
|
1724
|
+
|
1725
|
+
|
1726
|
+
</xsl:when>
|
1727
|
+
<xsl:otherwise>
|
1728
|
+
<xsl:copy-of select="$table"/>
|
1729
|
+
</xsl:otherwise>
|
1730
|
+
</xsl:choose>
|
1731
|
+
|
1687
1732
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1688
1733
|
<xsl:if test="normalize-space() != ''">
|
1689
1734
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -1811,7 +1856,15 @@
|
|
1811
1856
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1812
1857
|
<xsl:value-of select="@target"/>
|
1813
1858
|
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1814
|
-
<xsl:variable name="
|
1859
|
+
<xsl:variable name="mathml">
|
1860
|
+
<xsl:for-each select="*">
|
1861
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
1862
|
+
<xsl:copy-of select="."/>
|
1863
|
+
</xsl:if>
|
1864
|
+
</xsl:for-each>
|
1865
|
+
</xsl:variable>
|
1866
|
+
|
1867
|
+
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
1815
1868
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1816
1869
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1817
1870
|
<xsl:param name="cols-count"/>
|
@@ -2507,7 +2560,7 @@
|
|
2507
2560
|
<xsl:with-param name="table" select="$html-table"/>
|
2508
2561
|
</xsl:call-template>
|
2509
2562
|
</xsl:variable>
|
2510
|
-
<!-- colwidths=<xsl:
|
2563
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2511
2564
|
<xsl:variable name="maxlength_dt">
|
2512
2565
|
<xsl:call-template name="getMaxLength_dt"/>
|
2513
2566
|
</xsl:variable>
|
@@ -2536,13 +2589,22 @@
|
|
2536
2589
|
</xsl:when>
|
2537
2590
|
<xsl:otherwise>
|
2538
2591
|
<xsl:choose>
|
2592
|
+
<!-- to set width check most wide chars like `W` -->
|
2539
2593
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2540
|
-
<fo:table-column column-width="
|
2541
|
-
<fo:table-column column-width="
|
2594
|
+
<fo:table-column column-width="7%"/>
|
2595
|
+
<fo:table-column column-width="93%"/>
|
2596
|
+
</xsl:when>
|
2597
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
2598
|
+
<fo:table-column column-width="15%"/>
|
2599
|
+
<fo:table-column column-width="85%"/>
|
2542
2600
|
</xsl:when>
|
2543
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
2544
|
-
<fo:table-column column-width="
|
2545
|
-
<fo:table-column column-width="
|
2601
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2602
|
+
<fo:table-column column-width="20%"/>
|
2603
|
+
<fo:table-column column-width="80%"/>
|
2604
|
+
</xsl:when>
|
2605
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2606
|
+
<fo:table-column column-width="25%"/>
|
2607
|
+
<fo:table-column column-width="75%"/>
|
2546
2608
|
</xsl:when>
|
2547
2609
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2548
2610
|
<fo:table-column column-width="60%"/>
|
@@ -2759,8 +2821,16 @@
|
|
2759
2821
|
<fo:inline text-decoration="underline">
|
2760
2822
|
<xsl:apply-templates/>
|
2761
2823
|
</fo:inline>
|
2824
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
2825
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2826
|
+
<xsl:apply-templates/>
|
2827
|
+
</fo:inline>
|
2762
2828
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2763
|
-
<fo:inline
|
2829
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
2830
|
+
<xsl:apply-templates/>
|
2831
|
+
</fo:inline>
|
2832
|
+
</xsl:template><xsl:template match="*[local-name()='hi']">
|
2833
|
+
<fo:inline background-color="yellow">
|
2764
2834
|
<xsl:apply-templates/>
|
2765
2835
|
</fo:inline>
|
2766
2836
|
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
@@ -2852,6 +2922,10 @@
|
|
2852
2922
|
<xsl:param name="text" select="."/>
|
2853
2923
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2854
2924
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2925
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
2926
|
+
<xsl:param name="text" select="."/>
|
2927
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2928
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
2855
2929
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2856
2930
|
<xsl:param name="text" select="."/>
|
2857
2931
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -3099,6 +3173,7 @@
|
|
3099
3173
|
<xsl:apply-templates select="." mode="mathml"/>
|
3100
3174
|
</xsl:variable>
|
3101
3175
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3176
|
+
|
3102
3177
|
<!-- <xsl:copy-of select="."/> -->
|
3103
3178
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3104
3179
|
</fo:instream-foreign-object>
|
@@ -3112,7 +3187,12 @@
|
|
3112
3187
|
<!-- replace start and end spaces to non-break space -->
|
3113
3188
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3114
3189
|
</xsl:copy>
|
3115
|
-
</xsl:template><xsl:template match="
|
3190
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3191
|
+
<xsl:copy>
|
3192
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3193
|
+
</xsl:copy>
|
3194
|
+
<mathml:mspace width="0.5ex"/>
|
3195
|
+
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3116
3196
|
<xsl:variable name="target">
|
3117
3197
|
<xsl:choose>
|
3118
3198
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -3133,7 +3213,10 @@
|
|
3133
3213
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3134
3214
|
<xsl:choose>
|
3135
3215
|
<xsl:when test="normalize-space(.) = ''">
|
3136
|
-
<xsl:value-of select="$target"/>
|
3216
|
+
<!-- <xsl:value-of select="$target"/> -->
|
3217
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
3218
|
+
<xsl:with-param name="text" select="$target"/>
|
3219
|
+
</xsl:call-template>
|
3137
3220
|
</xsl:when>
|
3138
3221
|
<xsl:otherwise>
|
3139
3222
|
<xsl:apply-templates/>
|
@@ -3143,8 +3226,6 @@
|
|
3143
3226
|
</xsl:otherwise>
|
3144
3227
|
</xsl:choose>
|
3145
3228
|
</fo:inline>
|
3146
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
3147
|
-
<fo:inline id="{@id}"/>
|
3148
3229
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
3149
3230
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
3150
3231
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
@@ -3355,27 +3436,43 @@
|
|
3355
3436
|
<fo:block id="{@id}">
|
3356
3437
|
<xsl:apply-templates/>
|
3357
3438
|
</fo:block>
|
3439
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3358
3440
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
3359
3441
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
3360
3442
|
<xsl:apply-templates/>
|
3361
3443
|
</fo:block>
|
3362
3444
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3363
|
-
<
|
3364
|
-
|
3365
|
-
|
3366
|
-
|
3367
|
-
|
3368
|
-
|
3369
|
-
|
3370
|
-
|
3371
|
-
|
3372
|
-
|
3373
|
-
|
3374
|
-
|
3375
|
-
|
3376
|
-
|
3377
|
-
|
3378
|
-
|
3445
|
+
<xsl:choose>
|
3446
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3447
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
3448
|
+
<xsl:variable name="src">
|
3449
|
+
<xsl:call-template name="image_src"/>
|
3450
|
+
</xsl:variable>
|
3451
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
3452
|
+
</fo:inline>
|
3453
|
+
</xsl:when>
|
3454
|
+
<xsl:otherwise>
|
3455
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
3456
|
+
|
3457
|
+
<xsl:variable name="src">
|
3458
|
+
<xsl:call-template name="image_src"/>
|
3459
|
+
</xsl:variable>
|
3460
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3461
|
+
</fo:block>
|
3462
|
+
</xsl:otherwise>
|
3463
|
+
</xsl:choose>
|
3464
|
+
</xsl:template><xsl:template name="image_src">
|
3465
|
+
<xsl:choose>
|
3466
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3467
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3468
|
+
</xsl:when>
|
3469
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3470
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3471
|
+
</xsl:when>
|
3472
|
+
<xsl:otherwise>
|
3473
|
+
<xsl:value-of select="@src"/>
|
3474
|
+
</xsl:otherwise>
|
3475
|
+
</xsl:choose>
|
3379
3476
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3380
3477
|
<xsl:apply-templates mode="contents"/>
|
3381
3478
|
<xsl:text> </xsl:text>
|
@@ -3608,6 +3705,8 @@
|
|
3608
3705
|
<xsl:copy>
|
3609
3706
|
<xsl:apply-templates mode="contents_item"/>
|
3610
3707
|
</xsl:copy>
|
3708
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3709
|
+
<xsl:copy-of select="."/>
|
3611
3710
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3612
3711
|
<xsl:text> </xsl:text>
|
3613
3712
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3936,10 +4035,11 @@
|
|
3936
4035
|
</xsl:choose>
|
3937
4036
|
|
3938
4037
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3939
|
-
|
4038
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3940
4039
|
<xsl:variable name="element">
|
3941
4040
|
block
|
3942
4041
|
|
4042
|
+
|
3943
4043
|
</xsl:variable>
|
3944
4044
|
<xsl:choose>
|
3945
4045
|
<xsl:when test="normalize-space($element) = 'block'">
|
@@ -4014,11 +4114,13 @@
|
|
4014
4114
|
</xsl:if>
|
4015
4115
|
</xsl:if>
|
4016
4116
|
|
4117
|
+
|
4017
4118
|
<fo:block-container margin-left="0mm">
|
4018
4119
|
|
4019
4120
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4020
4121
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4021
|
-
|
4122
|
+
|
4123
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4022
4124
|
</fo:block>
|
4023
4125
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4024
4126
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4041,32 +4143,50 @@
|
|
4041
4143
|
<xsl:text>— </xsl:text>
|
4042
4144
|
<xsl:apply-templates/>
|
4043
4145
|
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
4044
|
-
|
4045
|
-
|
4046
|
-
|
4047
|
-
|
4048
|
-
|
4049
|
-
|
4050
|
-
|
4051
|
-
|
4052
|
-
|
4053
|
-
|
4054
|
-
|
4055
|
-
|
4056
|
-
|
4057
|
-
|
4058
|
-
|
4059
|
-
|
4060
|
-
|
4061
|
-
|
4062
|
-
|
4063
|
-
|
4064
|
-
|
4065
|
-
|
4066
|
-
|
4067
|
-
|
4068
|
-
|
4069
|
-
|
4146
|
+
|
4147
|
+
<xsl:variable name="bibitemid">
|
4148
|
+
<xsl:choose>
|
4149
|
+
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
|
4150
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
4151
|
+
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
4152
|
+
</xsl:choose>
|
4153
|
+
</xsl:variable>
|
4154
|
+
|
4155
|
+
<xsl:choose>
|
4156
|
+
<xsl:when test="normalize-space($bibitemid) != ''">
|
4157
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
4158
|
+
<xsl:if test="@type = 'footnote'">
|
4159
|
+
|
4160
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
4161
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4162
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
4163
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4164
|
+
|
4165
|
+
|
4166
|
+
</xsl:if>
|
4167
|
+
|
4168
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4169
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4170
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
4171
|
+
</xsl:if>
|
4172
|
+
<xsl:if test="@type = 'inline'">
|
4173
|
+
|
4174
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
4175
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4176
|
+
|
4177
|
+
|
4178
|
+
|
4179
|
+
</xsl:if>
|
4180
|
+
|
4181
|
+
<xsl:apply-templates/>
|
4182
|
+
</fo:basic-link>
|
4183
|
+
|
4184
|
+
</fo:inline>
|
4185
|
+
</xsl:when>
|
4186
|
+
<xsl:otherwise>
|
4187
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4188
|
+
</xsl:otherwise>
|
4189
|
+
</xsl:choose>
|
4070
4190
|
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
4071
4191
|
<!-- zero-space char -->
|
4072
4192
|
<xsl:variable name="depth">
|
@@ -4245,6 +4365,153 @@
|
|
4245
4365
|
</fo:block>
|
4246
4366
|
</xsl:otherwise>
|
4247
4367
|
</xsl:choose>
|
4368
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
|
4369
|
+
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
4370
|
+
<bookmark><xsl:value-of select="@id"/></bookmark>
|
4371
|
+
</xsl:for-each>
|
4372
|
+
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
|
4373
|
+
<xsl:copy>
|
4374
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id"/>
|
4375
|
+
</xsl:copy>
|
4376
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
4377
|
+
<xsl:variable name="id">
|
4378
|
+
<xsl:call-template name="generateIndexXrefId"/>
|
4379
|
+
</xsl:variable>
|
4380
|
+
<xsl:copy> <!-- add id to xref -->
|
4381
|
+
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
4382
|
+
<xsl:attribute name="id">
|
4383
|
+
<xsl:value-of select="$id"/>
|
4384
|
+
</xsl:attribute>
|
4385
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4386
|
+
</xsl:copy>
|
4387
|
+
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
4388
|
+
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
4389
|
+
<xsl:if test="@to">
|
4390
|
+
<xsl:value-of select="$dash"/>
|
4391
|
+
<xsl:copy>
|
4392
|
+
<xsl:copy-of select="@*"/>
|
4393
|
+
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
4394
|
+
<xsl:attribute name="id">
|
4395
|
+
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
4396
|
+
</xsl:attribute>
|
4397
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4398
|
+
</xsl:copy>
|
4399
|
+
</xsl:if>
|
4400
|
+
</xsl:template><xsl:template match="@*|node()" mode="index_update">
|
4401
|
+
<xsl:copy>
|
4402
|
+
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
4403
|
+
</xsl:copy>
|
4404
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
|
4405
|
+
<xsl:copy>
|
4406
|
+
<xsl:apply-templates select="@*" mode="index_update"/>
|
4407
|
+
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
4408
|
+
</xsl:copy>
|
4409
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
|
4410
|
+
<xsl:param name="element"/>
|
4411
|
+
<xsl:param name="remove" select="'false'"/>
|
4412
|
+
<xsl:param name="target"/>
|
4413
|
+
<!-- <node></node> -->
|
4414
|
+
<xsl:choose>
|
4415
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
4416
|
+
<!-- skip text (i.e. remove it) and process next element -->
|
4417
|
+
<!-- [removed_<xsl:value-of select="."/>] -->
|
4418
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4419
|
+
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
|
4420
|
+
</xsl:apply-templates>
|
4421
|
+
</xsl:when>
|
4422
|
+
<xsl:when test="self::text()">
|
4423
|
+
<xsl:value-of select="."/>
|
4424
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4425
|
+
</xsl:when>
|
4426
|
+
<xsl:when test="self::* and local-name(.) = 'xref'">
|
4427
|
+
<xsl:variable name="id" select="@id"/>
|
4428
|
+
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
4429
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4430
|
+
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
4431
|
+
|
4432
|
+
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4433
|
+
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
4434
|
+
|
4435
|
+
<xsl:choose>
|
4436
|
+
<!-- 2nd pass -->
|
4437
|
+
<!-- if page is equal to page for next and page is not the end of range -->
|
4438
|
+
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
4439
|
+
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
4440
|
+
<!-- [removed_xref] -->
|
4441
|
+
|
4442
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4443
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4444
|
+
<xsl:with-param name="target">
|
4445
|
+
<xsl:choose>
|
4446
|
+
<xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
|
4447
|
+
<xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
|
4448
|
+
</xsl:choose>
|
4449
|
+
</xsl:with-param>
|
4450
|
+
</xsl:apply-templates>
|
4451
|
+
</xsl:when>
|
4452
|
+
|
4453
|
+
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
4454
|
+
<!-- remove xref -->
|
4455
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4456
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4457
|
+
</xsl:apply-templates>
|
4458
|
+
</xsl:when>
|
4459
|
+
|
4460
|
+
<xsl:otherwise>
|
4461
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4462
|
+
<xsl:with-param name="target" select="$target"/>
|
4463
|
+
</xsl:apply-templates>
|
4464
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4465
|
+
</xsl:otherwise>
|
4466
|
+
</xsl:choose>
|
4467
|
+
</xsl:when>
|
4468
|
+
<xsl:when test="self::* and local-name(.) = 'ul'">
|
4469
|
+
<!-- ul -->
|
4470
|
+
<xsl:apply-templates select="." mode="index_update"/>
|
4471
|
+
</xsl:when>
|
4472
|
+
<xsl:otherwise>
|
4473
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4474
|
+
<xsl:with-param name="target" select="$target"/>
|
4475
|
+
</xsl:apply-templates>
|
4476
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4477
|
+
</xsl:otherwise>
|
4478
|
+
</xsl:choose>
|
4479
|
+
</xsl:template><xsl:template match="@*|node()" mode="xref_copy">
|
4480
|
+
<xsl:param name="target"/>
|
4481
|
+
<xsl:copy>
|
4482
|
+
<xsl:apply-templates select="@*" mode="xref_copy"/>
|
4483
|
+
<xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
|
4484
|
+
<xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
|
4485
|
+
</xsl:if>
|
4486
|
+
<xsl:apply-templates select="node()" mode="xref_copy"/>
|
4487
|
+
</xsl:copy>
|
4488
|
+
</xsl:template><xsl:template name="generateIndexXrefId">
|
4489
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4490
|
+
|
4491
|
+
<xsl:variable name="docid">
|
4492
|
+
<xsl:call-template name="getDocumentId"/>
|
4493
|
+
</xsl:variable>
|
4494
|
+
<xsl:variable name="item_number">
|
4495
|
+
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
4496
|
+
</xsl:variable>
|
4497
|
+
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
4498
|
+
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
4499
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
4500
|
+
<xsl:apply-templates/>
|
4501
|
+
<fo:block>
|
4502
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
4503
|
+
<fo:block> </fo:block>
|
4504
|
+
</xsl:if>
|
4505
|
+
</fo:block>
|
4506
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
4507
|
+
<xsl:apply-templates/>
|
4508
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
4509
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4510
|
+
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4511
|
+
<xsl:apply-templates/>
|
4512
|
+
</fo:block>
|
4513
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
4514
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
4248
4515
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4249
4516
|
<!-- <row>
|
4250
4517
|
<date>05-07-2013</date>
|
@@ -4531,7 +4798,7 @@
|
|
4531
4798
|
<xsl:param name="charDelim" select="', '"/>
|
4532
4799
|
<xsl:choose>
|
4533
4800
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4534
|
-
<xsl:for-each select="
|
4801
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4535
4802
|
<xsl:sort data-type="text" order="ascending"/>
|
4536
4803
|
<xsl:call-template name="insertKeyword">
|
4537
4804
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4540,7 +4807,7 @@
|
|
4540
4807
|
</xsl:for-each>
|
4541
4808
|
</xsl:when>
|
4542
4809
|
<xsl:otherwise>
|
4543
|
-
<xsl:for-each select="
|
4810
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4544
4811
|
<xsl:call-template name="insertKeyword">
|
4545
4812
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4546
4813
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4557,65 +4824,71 @@
|
|
4557
4824
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4558
4825
|
</xsl:choose>
|
4559
4826
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4560
|
-
<
|
4561
|
-
<
|
4562
|
-
|
4563
|
-
|
4564
|
-
|
4565
|
-
|
4566
|
-
|
4567
|
-
|
4568
|
-
|
4569
|
-
|
4570
|
-
|
4571
|
-
|
4827
|
+
<xsl:variable name="lang">
|
4828
|
+
<xsl:call-template name="getLang"/>
|
4829
|
+
</xsl:variable>
|
4830
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4831
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
4832
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
4833
|
+
</pdf:dictionary>
|
4834
|
+
</pdf:catalog>
|
4835
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
4836
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
4837
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
4838
|
+
<!-- Dublin Core properties go here -->
|
4839
|
+
<dc:title>
|
4840
|
+
<xsl:variable name="title">
|
4841
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4842
|
+
|
4572
4843
|
|
4573
4844
|
|
4574
4845
|
|
4575
|
-
<xsl:value-of select="
|
4846
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
4576
4847
|
|
4577
4848
|
|
4578
4849
|
|
4579
|
-
</xsl:
|
4580
|
-
|
4581
|
-
|
4582
|
-
|
4583
|
-
|
4584
|
-
|
4585
|
-
|
4586
|
-
</xsl:
|
4587
|
-
</xsl:
|
4588
|
-
</
|
4589
|
-
|
4850
|
+
</xsl:for-each>
|
4851
|
+
</xsl:variable>
|
4852
|
+
<xsl:choose>
|
4853
|
+
<xsl:when test="normalize-space($title) != ''">
|
4854
|
+
<xsl:value-of select="$title"/>
|
4855
|
+
</xsl:when>
|
4856
|
+
<xsl:otherwise>
|
4857
|
+
<xsl:text> </xsl:text>
|
4858
|
+
</xsl:otherwise>
|
4859
|
+
</xsl:choose>
|
4860
|
+
</dc:title>
|
4861
|
+
<dc:creator>
|
4862
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4590
4863
|
|
4591
|
-
<xsl:
|
4864
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
4865
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
4866
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
4867
|
+
</xsl:for-each>
|
4592
4868
|
|
4593
4869
|
|
4594
4870
|
|
4595
|
-
</
|
4596
|
-
|
4597
|
-
|
4598
|
-
|
4599
|
-
|
4600
|
-
|
4601
|
-
|
4602
|
-
|
4603
|
-
|
4604
|
-
|
4605
|
-
|
4606
|
-
|
4607
|
-
|
4608
|
-
|
4609
|
-
|
4610
|
-
|
4611
|
-
|
4612
|
-
<
|
4613
|
-
|
4614
|
-
|
4615
|
-
|
4616
|
-
</rdf:RDF>
|
4617
|
-
</x:xmpmeta>
|
4618
|
-
</fo:declarations>
|
4871
|
+
</xsl:for-each>
|
4872
|
+
</dc:creator>
|
4873
|
+
<dc:description>
|
4874
|
+
<xsl:variable name="abstract">
|
4875
|
+
|
4876
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
4877
|
+
|
4878
|
+
|
4879
|
+
</xsl:variable>
|
4880
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
4881
|
+
</dc:description>
|
4882
|
+
<pdf:Keywords>
|
4883
|
+
<xsl:call-template name="insertKeywords"/>
|
4884
|
+
</pdf:Keywords>
|
4885
|
+
</rdf:Description>
|
4886
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
4887
|
+
<!-- XMP properties go here -->
|
4888
|
+
<xmp:CreatorTool/>
|
4889
|
+
</rdf:Description>
|
4890
|
+
</rdf:RDF>
|
4891
|
+
</x:xmpmeta>
|
4619
4892
|
</xsl:template><xsl:template name="getId">
|
4620
4893
|
<xsl:choose>
|
4621
4894
|
<xsl:when test="../@id">
|