metanorma-csa 1.7.3 → 1.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/csa/isodoc.rng +63 -0
- data/lib/isodoc/csa/csa.standard.xsl +246 -177
- data/lib/metanorma/csa/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daf0ed999ef5457bed8a02eda5b125fbcb10ef32540f7cc09dc67154a264a0da
|
4
|
+
data.tar.gz: a8e14de5abd1903bf8c8ad4bce7295e04fb0a1b494f37a4222284d209a0a11b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 442e12b1bfb2219134beb451b62210ea373f12685cc9050c2a52544ccd1e705205baed5cecb5b61fb202c846b758feba7f79c6124cda454defcb5982a6f616d6
|
7
|
+
data.tar.gz: d1aef30954ef55f4515b461025d4edd030d5814deda495bd0f0656e552e53f5f317abdcfdd1ce13cf66bdbfd9099de3187020c1e9ad7b4e43fa51a34874aba61
|
@@ -812,6 +812,8 @@
|
|
812
812
|
<ref name="requirement"/>
|
813
813
|
<ref name="recommendation"/>
|
814
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
815
817
|
</choice>
|
816
818
|
</define>
|
817
819
|
<define name="bibliography">
|
@@ -1635,4 +1637,65 @@
|
|
1635
1637
|
<text/>
|
1636
1638
|
</element>
|
1637
1639
|
</define>
|
1640
|
+
<define name="imagemap">
|
1641
|
+
<element name="imagemap">
|
1642
|
+
<ref name="figure"/>
|
1643
|
+
<zeroOrMore>
|
1644
|
+
<element name="area">
|
1645
|
+
<attribute name="type">
|
1646
|
+
<choice>
|
1647
|
+
<value>rect</value>
|
1648
|
+
<value>circle</value>
|
1649
|
+
<value>ellipse</value>
|
1650
|
+
<value>poly</value>
|
1651
|
+
</choice>
|
1652
|
+
</attribute>
|
1653
|
+
<choice>
|
1654
|
+
<ref name="xref"/>
|
1655
|
+
<ref name="hyperlink"/>
|
1656
|
+
<ref name="eref"/>
|
1657
|
+
</choice>
|
1658
|
+
<oneOrMore>
|
1659
|
+
<element name="coords">
|
1660
|
+
<attribute name="x">
|
1661
|
+
<data type="float"/>
|
1662
|
+
</attribute>
|
1663
|
+
<attribute name="y">
|
1664
|
+
<data type="float"/>
|
1665
|
+
</attribute>
|
1666
|
+
</element>
|
1667
|
+
</oneOrMore>
|
1668
|
+
<optional>
|
1669
|
+
<element name="radius">
|
1670
|
+
<attribute name="x">
|
1671
|
+
<data type="float"/>
|
1672
|
+
</attribute>
|
1673
|
+
<optional>
|
1674
|
+
<attribute name="y">
|
1675
|
+
<data type="float"/>
|
1676
|
+
</attribute>
|
1677
|
+
</optional>
|
1678
|
+
</element>
|
1679
|
+
</optional>
|
1680
|
+
</element>
|
1681
|
+
</zeroOrMore>
|
1682
|
+
</element>
|
1683
|
+
</define>
|
1684
|
+
<define name="svgmap">
|
1685
|
+
<element name="svgmap">
|
1686
|
+
<ref name="figure"/>
|
1687
|
+
<zeroOrMore>
|
1688
|
+
<element name="target">
|
1689
|
+
<attribute name="href">
|
1690
|
+
<data type="anyURI"/>
|
1691
|
+
</attribute>
|
1692
|
+
<choice>
|
1693
|
+
<ref name="xref"/>
|
1694
|
+
<ref name="hyperlink"/>
|
1695
|
+
<ref name="eref"/>
|
1696
|
+
</choice>
|
1697
|
+
</element>
|
1698
|
+
</zeroOrMore>
|
1699
|
+
</element>
|
1700
|
+
</define>
|
1638
1701
|
</grammar>
|
@@ -1407,191 +1407,225 @@
|
|
1407
1407
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1408
1408
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1409
1409
|
|
1410
|
-
<xsl:variable name="
|
1411
|
-
<xsl:call-template name="getSimpleTable"/>
|
1412
|
-
</xsl:variable>
|
1410
|
+
<xsl:variable name="table">
|
1413
1411
|
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1419
|
-
<fo:block> </fo:block>
|
1420
|
-
</xsl:if> -->
|
1421
|
-
|
1422
|
-
<!-- $namespace = 'iso' or -->
|
1423
|
-
|
1424
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1425
|
-
|
1426
|
-
|
1412
|
+
<xsl:variable name="simple-table">
|
1413
|
+
<xsl:call-template name="getSimpleTable"/>
|
1414
|
+
</xsl:variable>
|
1427
1415
|
|
1428
1416
|
|
1429
|
-
|
1430
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1431
|
-
|
1432
|
-
<!-- <xsl:variable name="cols-count">
|
1433
|
-
<xsl:choose>
|
1434
|
-
<xsl:when test="*[local-name()='thead']">
|
1435
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1436
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1437
|
-
</xsl:call-template>
|
1438
|
-
</xsl:when>
|
1439
|
-
<xsl:otherwise>
|
1440
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1441
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1442
|
-
</xsl:call-template>
|
1443
|
-
</xsl:otherwise>
|
1444
|
-
</xsl:choose>
|
1445
|
-
</xsl:variable> -->
|
1446
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1447
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
<xsl:variable name="colwidths">
|
1452
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1453
|
-
<xsl:call-template name="calculate-column-widths">
|
1454
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1455
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
1456
|
-
</xsl:call-template>
|
1457
|
-
</xsl:if>
|
1458
|
-
</xsl:variable>
|
1459
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1460
|
-
|
1461
|
-
<!-- <xsl:variable name="colwidths2">
|
1462
|
-
<xsl:call-template name="calculate-column-widths">
|
1463
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1464
|
-
</xsl:call-template>
|
1465
|
-
</xsl:variable> -->
|
1466
|
-
|
1467
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1468
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1469
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1470
|
-
|
1471
|
-
<xsl:variable name="margin-left">
|
1472
|
-
<xsl:choose>
|
1473
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1474
|
-
<xsl:otherwise>0</xsl:otherwise>
|
1475
|
-
</xsl:choose>
|
1476
|
-
</xsl:variable>
|
1477
|
-
|
1478
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1479
1417
|
|
1480
1418
|
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
1419
|
|
1420
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1421
|
+
<fo:block> </fo:block>
|
1422
|
+
</xsl:if> -->
|
1485
1423
|
|
1486
|
-
|
1424
|
+
<!-- $namespace = 'iso' or -->
|
1487
1425
|
|
1426
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1488
1427
|
|
1428
|
+
|
1489
1429
|
|
1430
|
+
|
1490
1431
|
|
1432
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1491
1433
|
|
1434
|
+
<!-- <xsl:variable name="cols-count">
|
1435
|
+
<xsl:choose>
|
1436
|
+
<xsl:when test="*[local-name()='thead']">
|
1437
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1438
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1439
|
+
</xsl:call-template>
|
1440
|
+
</xsl:when>
|
1441
|
+
<xsl:otherwise>
|
1442
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1443
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1444
|
+
</xsl:call-template>
|
1445
|
+
</xsl:otherwise>
|
1446
|
+
</xsl:choose>
|
1447
|
+
</xsl:variable> -->
|
1448
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1449
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1492
1450
|
|
1493
1451
|
|
1494
|
-
|
1495
|
-
|
1496
|
-
<
|
1497
|
-
<xsl:
|
1498
|
-
<xsl:
|
1499
|
-
<xsl:
|
1500
|
-
</xsl:
|
1501
|
-
</
|
1502
|
-
|
1503
|
-
|
1452
|
+
|
1453
|
+
<xsl:variable name="colwidths">
|
1454
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1455
|
+
<xsl:call-template name="calculate-column-widths">
|
1456
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1457
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1458
|
+
</xsl:call-template>
|
1459
|
+
</xsl:if>
|
1460
|
+
</xsl:variable>
|
1461
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1462
|
+
|
1463
|
+
<!-- <xsl:variable name="colwidths2">
|
1464
|
+
<xsl:call-template name="calculate-column-widths">
|
1465
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1466
|
+
</xsl:call-template>
|
1467
|
+
</xsl:variable> -->
|
1468
|
+
|
1469
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1470
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1471
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1472
|
+
|
1473
|
+
<xsl:variable name="margin-left">
|
1474
|
+
<xsl:choose>
|
1475
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1476
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1477
|
+
</xsl:choose>
|
1478
|
+
</xsl:variable>
|
1479
|
+
|
1480
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1504
1481
|
|
1505
1482
|
|
1483
|
+
|
1484
|
+
|
1485
|
+
|
1506
1486
|
|
1507
1487
|
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1488
|
+
|
1511
1489
|
|
1512
|
-
|
1513
1490
|
|
1514
|
-
</xsl:variable>
|
1515
|
-
|
1516
|
-
|
1517
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1518
1491
|
|
1519
|
-
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1520
|
-
<xsl:attribute name="{@name}">
|
1521
|
-
<xsl:value-of select="."/>
|
1522
|
-
</xsl:attribute>
|
1523
|
-
</xsl:for-each>
|
1524
1492
|
|
1525
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1526
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1527
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1528
|
-
</xsl:if>
|
1529
1493
|
|
1530
|
-
<xsl:choose>
|
1531
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1532
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1533
|
-
<fo:table-column column-width="{@width}"/>
|
1534
|
-
</xsl:for-each>
|
1535
|
-
</xsl:when>
|
1536
|
-
<xsl:otherwise>
|
1537
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1538
|
-
<xsl:choose>
|
1539
|
-
<xsl:when test=". = 1 or . = 0">
|
1540
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1541
|
-
</xsl:when>
|
1542
|
-
<xsl:otherwise>
|
1543
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1544
|
-
</xsl:otherwise>
|
1545
|
-
</xsl:choose>
|
1546
|
-
</xsl:for-each>
|
1547
|
-
</xsl:otherwise>
|
1548
|
-
</xsl:choose>
|
1549
1494
|
|
1550
|
-
<xsl:
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
</xsl:otherwise>
|
1557
|
-
</xsl:choose>
|
1495
|
+
<xsl:variable name="table_width">
|
1496
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1497
|
+
100%
|
1498
|
+
|
1499
|
+
|
1500
|
+
</xsl:variable>
|
1558
1501
|
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
</xsl:attribute>
|
1576
|
-
</xsl:for-each>
|
1502
|
+
<xsl:variable name="table_attributes">
|
1503
|
+
<attribute name="table-layout">fixed</attribute>
|
1504
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
1505
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1506
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1507
|
+
|
1508
|
+
|
1509
|
+
|
1510
|
+
|
1511
|
+
|
1512
|
+
|
1513
|
+
|
1514
|
+
|
1515
|
+
|
1516
|
+
|
1517
|
+
</xsl:variable>
|
1577
1518
|
|
1578
|
-
|
1519
|
+
|
1520
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1521
|
+
|
1522
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1523
|
+
<xsl:attribute name="{@name}">
|
1524
|
+
<xsl:value-of select="."/>
|
1525
|
+
</xsl:attribute>
|
1526
|
+
</xsl:for-each>
|
1527
|
+
|
1528
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1529
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1530
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1531
|
+
</xsl:if>
|
1532
|
+
|
1533
|
+
<xsl:choose>
|
1534
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1535
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1536
|
+
<fo:table-column column-width="{@width}"/>
|
1537
|
+
</xsl:for-each>
|
1538
|
+
</xsl:when>
|
1539
|
+
<xsl:otherwise>
|
1540
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1541
|
+
<xsl:choose>
|
1542
|
+
<xsl:when test=". = 1 or . = 0">
|
1543
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1544
|
+
</xsl:when>
|
1545
|
+
<xsl:otherwise>
|
1546
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1547
|
+
</xsl:otherwise>
|
1548
|
+
</xsl:choose>
|
1549
|
+
</xsl:for-each>
|
1550
|
+
</xsl:otherwise>
|
1551
|
+
</xsl:choose>
|
1552
|
+
|
1579
1553
|
<xsl:choose>
|
1580
|
-
<xsl:when test="
|
1581
|
-
<
|
1554
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1555
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1582
1556
|
</xsl:when>
|
1583
1557
|
<xsl:otherwise>
|
1584
|
-
<
|
1558
|
+
<xsl:apply-templates/>
|
1585
1559
|
</xsl:otherwise>
|
1586
1560
|
</xsl:choose>
|
1561
|
+
|
1562
|
+
</fo:table>
|
1563
|
+
|
1564
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1565
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1566
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1567
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1568
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1569
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1570
|
+
</xsl:call-template>
|
1587
1571
|
</xsl:for-each>
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1572
|
+
|
1573
|
+
<!-- insert footer as table -->
|
1574
|
+
<!-- <fo:table>
|
1575
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1576
|
+
<xsl:attribute name="{@name}">
|
1577
|
+
<xsl:value-of select="."/>
|
1578
|
+
</xsl:attribute>
|
1579
|
+
</xsl:for-each>
|
1580
|
+
|
1581
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1582
|
+
<xsl:choose>
|
1583
|
+
<xsl:when test=". = 1 or . = 0">
|
1584
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1585
|
+
</xsl:when>
|
1586
|
+
<xsl:otherwise>
|
1587
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1588
|
+
</xsl:otherwise>
|
1589
|
+
</xsl:choose>
|
1590
|
+
</xsl:for-each>
|
1591
|
+
</fo:table>-->
|
1592
|
+
|
1593
|
+
|
1594
|
+
|
1595
|
+
|
1596
|
+
|
1597
|
+
</fo:block-container>
|
1598
|
+
</xsl:variable>
|
1599
|
+
|
1600
|
+
|
1601
|
+
|
1602
|
+
<xsl:choose>
|
1603
|
+
<xsl:when test="@width">
|
1604
|
+
|
1605
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
1606
|
+
|
1607
|
+
<fo:table table-layout="fixed" width="100%">
|
1608
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1609
|
+
<fo:table-column column-width="{@width}"/>
|
1610
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1611
|
+
<fo:table-body>
|
1612
|
+
<fo:table-row>
|
1613
|
+
<fo:table-cell column-number="2">
|
1614
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
1615
|
+
</fo:table-cell>
|
1616
|
+
</fo:table-row>
|
1617
|
+
</fo:table-body>
|
1618
|
+
</fo:table>
|
1619
|
+
|
1620
|
+
|
1621
|
+
|
1622
|
+
|
1623
|
+
</xsl:when>
|
1624
|
+
<xsl:otherwise>
|
1625
|
+
<xsl:copy-of select="$table"/>
|
1626
|
+
</xsl:otherwise>
|
1627
|
+
</xsl:choose>
|
1628
|
+
|
1595
1629
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1596
1630
|
<xsl:if test="normalize-space() != ''">
|
1597
1631
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -2402,7 +2436,7 @@
|
|
2402
2436
|
<xsl:with-param name="table" select="$html-table"/>
|
2403
2437
|
</xsl:call-template>
|
2404
2438
|
</xsl:variable>
|
2405
|
-
<!-- colwidths=<xsl:
|
2439
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2406
2440
|
<xsl:variable name="maxlength_dt">
|
2407
2441
|
<xsl:call-template name="getMaxLength_dt"/>
|
2408
2442
|
</xsl:variable>
|
@@ -2431,13 +2465,22 @@
|
|
2431
2465
|
</xsl:when>
|
2432
2466
|
<xsl:otherwise>
|
2433
2467
|
<xsl:choose>
|
2468
|
+
<!-- to set width check most wide chars like `W` -->
|
2434
2469
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2435
|
-
<fo:table-column column-width="
|
2436
|
-
<fo:table-column column-width="
|
2470
|
+
<fo:table-column column-width="7%"/>
|
2471
|
+
<fo:table-column column-width="93%"/>
|
2437
2472
|
</xsl:when>
|
2438
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like
|
2439
|
-
<fo:table-column column-width="
|
2440
|
-
<fo:table-column column-width="
|
2473
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
2474
|
+
<fo:table-column column-width="15%"/>
|
2475
|
+
<fo:table-column column-width="85%"/>
|
2476
|
+
</xsl:when>
|
2477
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2478
|
+
<fo:table-column column-width="20%"/>
|
2479
|
+
<fo:table-column column-width="80%"/>
|
2480
|
+
</xsl:when>
|
2481
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2482
|
+
<fo:table-column column-width="25%"/>
|
2483
|
+
<fo:table-column column-width="75%"/>
|
2441
2484
|
</xsl:when>
|
2442
2485
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2443
2486
|
<fo:table-column column-width="60%"/>
|
@@ -2744,6 +2787,10 @@
|
|
2744
2787
|
<xsl:param name="text" select="."/>
|
2745
2788
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2746
2789
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2790
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
2791
|
+
<xsl:param name="text" select="."/>
|
2792
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2793
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
2747
2794
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2748
2795
|
<xsl:param name="text" select="."/>
|
2749
2796
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -3004,6 +3051,11 @@
|
|
3004
3051
|
<!-- replace start and end spaces to non-break space -->
|
3005
3052
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3006
3053
|
</xsl:copy>
|
3054
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
3055
|
+
<xsl:copy>
|
3056
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3057
|
+
</xsl:copy>
|
3058
|
+
<mathml:mspace width="0.5ex"/>
|
3007
3059
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3008
3060
|
<xsl:variable name="target">
|
3009
3061
|
<xsl:choose>
|
@@ -3025,7 +3077,10 @@
|
|
3025
3077
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3026
3078
|
<xsl:choose>
|
3027
3079
|
<xsl:when test="normalize-space(.) = ''">
|
3028
|
-
<xsl:value-of select="$target"/>
|
3080
|
+
<!-- <xsl:value-of select="$target"/> -->
|
3081
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
3082
|
+
<xsl:with-param name="text" select="$target"/>
|
3083
|
+
</xsl:call-template>
|
3029
3084
|
</xsl:when>
|
3030
3085
|
<xsl:otherwise>
|
3031
3086
|
<xsl:apply-templates/>
|
@@ -3500,6 +3555,8 @@
|
|
3500
3555
|
<xsl:copy>
|
3501
3556
|
<xsl:apply-templates mode="contents_item"/>
|
3502
3557
|
</xsl:copy>
|
3558
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3559
|
+
<xsl:copy-of select="."/>
|
3503
3560
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3504
3561
|
<xsl:text> </xsl:text>
|
3505
3562
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3906,11 +3963,13 @@
|
|
3906
3963
|
</xsl:if>
|
3907
3964
|
</xsl:if>
|
3908
3965
|
|
3966
|
+
|
3909
3967
|
<fo:block-container margin-left="0mm">
|
3910
3968
|
|
3911
3969
|
<fo:block xsl:use-attribute-sets="quote-style">
|
3912
3970
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
3913
|
-
|
3971
|
+
|
3972
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
3914
3973
|
</fo:block>
|
3915
3974
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3916
3975
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4320,7 +4379,7 @@
|
|
4320
4379
|
<xsl:param name="charDelim" select="', '"/>
|
4321
4380
|
<xsl:choose>
|
4322
4381
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4323
|
-
<xsl:for-each select="
|
4382
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4324
4383
|
<xsl:sort data-type="text" order="ascending"/>
|
4325
4384
|
<xsl:call-template name="insertKeyword">
|
4326
4385
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4329,7 +4388,7 @@
|
|
4329
4388
|
</xsl:for-each>
|
4330
4389
|
</xsl:when>
|
4331
4390
|
<xsl:otherwise>
|
4332
|
-
<xsl:for-each select="
|
4391
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4333
4392
|
<xsl:call-template name="insertKeyword">
|
4334
4393
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4335
4394
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4346,6 +4405,9 @@
|
|
4346
4405
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4347
4406
|
</xsl:choose>
|
4348
4407
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4408
|
+
<xsl:variable name="lang">
|
4409
|
+
<xsl:call-template name="getLang"/>
|
4410
|
+
</xsl:variable>
|
4349
4411
|
<fo:declarations>
|
4350
4412
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4351
4413
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -4358,13 +4420,16 @@
|
|
4358
4420
|
<!-- Dublin Core properties go here -->
|
4359
4421
|
<dc:title>
|
4360
4422
|
<xsl:variable name="title">
|
4361
|
-
|
4362
|
-
|
4363
|
-
|
4364
|
-
|
4365
|
-
|
4366
|
-
|
4367
|
-
|
4423
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4424
|
+
|
4425
|
+
|
4426
|
+
|
4427
|
+
|
4428
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
4429
|
+
|
4430
|
+
|
4431
|
+
|
4432
|
+
</xsl:for-each>
|
4368
4433
|
</xsl:variable>
|
4369
4434
|
<xsl:choose>
|
4370
4435
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -4376,17 +4441,21 @@
|
|
4376
4441
|
</xsl:choose>
|
4377
4442
|
</dc:title>
|
4378
4443
|
<dc:creator>
|
4379
|
-
|
4380
|
-
|
4381
|
-
|
4382
|
-
|
4383
|
-
|
4384
|
-
|
4444
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4445
|
+
|
4446
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
4447
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
4448
|
+
<xsl:if test="position() != last()">; </xsl:if>
|
4449
|
+
</xsl:for-each>
|
4385
4450
|
|
4386
4451
|
|
4387
4452
|
|
4453
|
+
</xsl:for-each>
|
4454
|
+
</dc:creator>
|
4455
|
+
<dc:description>
|
4456
|
+
<xsl:variable name="abstract">
|
4388
4457
|
|
4389
|
-
<xsl:copy-of select="
|
4458
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
|
4390
4459
|
|
4391
4460
|
|
4392
4461
|
</xsl:variable>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
248
|
- !ruby/object:Gem::Version
|
249
249
|
version: '0'
|
250
250
|
requirements: []
|
251
|
-
rubygems_version: 3.
|
251
|
+
rubygems_version: 3.1.4
|
252
252
|
signing_key:
|
253
253
|
specification_version: 4
|
254
254
|
summary: metanorma-csa lets you write CSA Normal Documents (CSAND) in AsciiDoc.
|