metanorma-m3aawg 1.6.5 → 1.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61c7453fc66f2ef72400f75a2064c1cdb3137b581ec67770c7ce1e1ff70a3fa4
4
- data.tar.gz: e28b2e5a2d09a6e19d5fe0d52241835b7700857ca2b0eac032819b5df9db7819
3
+ metadata.gz: bcd3ba861b70713d5782bc66f4e12a8c6f4c327ab4eb16d43232121d01236dc4
4
+ data.tar.gz: 6546e0efcec8cd0680d673272fc0567e4a77c8adad1abfb0c2996ff7b43b64c4
5
5
  SHA512:
6
- metadata.gz: 51d535955b6710fc27fab095060627c5bdc9cbb29122893fbce99412f993146ba3395f46f79cf0d3b3ae4a6a65332f97e04fbd5bddb83810f1d6cc6ccf359d03
7
- data.tar.gz: acf4946122cc080f7f79cc4ba334b2d1929a7351f789423c3143ffca4abb2870ae5410469c58ddde57fdb57fb4c8acacd8c0052e31191300a15af94001c7c45f
6
+ metadata.gz: 5e49aef4506a2c960771a0adf10c8be34722c24f195645e333e807529841ddbe3967ca608780bfb7edfa1d443177a96851c2964c86e348ac99d392c79b747418
7
+ data.tar.gz: e10a71799bad6095866ccf96f2a2544d761a2069572c577d3fbc999d6ff02f63e02d80a357028f8ad5576366082046411a364c7a8ef086b56d1deb4730254e52
data/.rubocop.yml CHANGED
@@ -4,7 +4,3 @@
4
4
 
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
- AllCops:
8
- TargetRubyVersion: 2.3
9
- Rails:
10
- Enabled: true
@@ -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>
@@ -1418,193 +1418,227 @@
1418
1418
  <xsl:call-template name="add-zero-spaces-java"/>
1419
1419
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1420
1420
 
1421
- <xsl:variable name="simple-table">
1422
- <xsl:call-template name="getSimpleTable"/>
1423
- </xsl:variable>
1421
+ <xsl:variable name="table">
1424
1422
 
1425
-
1426
-
1427
-
1428
-
1429
- <!-- <xsl:if test="$namespace = 'bipm'">
1430
- <fo:block>&#xA0;</fo:block>
1431
- </xsl:if> -->
1432
-
1433
- <!-- $namespace = 'iso' or -->
1434
-
1435
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1436
-
1437
-
1438
-
1439
- <xsl:call-template name="fn_name_display"/>
1423
+ <xsl:variable name="simple-table">
1424
+ <xsl:call-template name="getSimpleTable"/>
1425
+ </xsl:variable>
1440
1426
 
1441
1427
 
1442
-
1443
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1444
-
1445
- <!-- <xsl:variable name="cols-count">
1446
- <xsl:choose>
1447
- <xsl:when test="*[local-name()='thead']">
1448
- <xsl:call-template name="calculate-columns-numbers">
1449
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1450
- </xsl:call-template>
1451
- </xsl:when>
1452
- <xsl:otherwise>
1453
- <xsl:call-template name="calculate-columns-numbers">
1454
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1455
- </xsl:call-template>
1456
- </xsl:otherwise>
1457
- </xsl:choose>
1458
- </xsl:variable> -->
1459
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1460
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1461
-
1462
-
1463
-
1464
- <xsl:variable name="colwidths">
1465
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1466
- <xsl:call-template name="calculate-column-widths">
1467
- <xsl:with-param name="cols-count" select="$cols-count"/>
1468
- <xsl:with-param name="table" select="$simple-table"/>
1469
- </xsl:call-template>
1470
- </xsl:if>
1471
- </xsl:variable>
1472
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1473
-
1474
- <!-- <xsl:variable name="colwidths2">
1475
- <xsl:call-template name="calculate-column-widths">
1476
- <xsl:with-param name="cols-count" select="$cols-count"/>
1477
- </xsl:call-template>
1478
- </xsl:variable> -->
1479
-
1480
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1481
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1482
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1483
-
1484
- <xsl:variable name="margin-left">
1485
- <xsl:choose>
1486
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1487
- <xsl:otherwise>0</xsl:otherwise>
1488
- </xsl:choose>
1489
- </xsl:variable>
1490
-
1491
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1492
1428
 
1493
1429
 
1494
-
1495
-
1496
-
1497
1430
 
1431
+ <!-- <xsl:if test="$namespace = 'bipm'">
1432
+ <fo:block>&#xA0;</fo:block>
1433
+ </xsl:if> -->
1498
1434
 
1499
-
1435
+ <!-- $namespace = 'iso' or -->
1500
1436
 
1437
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1501
1438
 
1439
+
1440
+
1441
+ <xsl:call-template name="fn_name_display"/>
1502
1442
 
1443
+
1503
1444
 
1445
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1504
1446
 
1447
+ <!-- <xsl:variable name="cols-count">
1448
+ <xsl:choose>
1449
+ <xsl:when test="*[local-name()='thead']">
1450
+ <xsl:call-template name="calculate-columns-numbers">
1451
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1452
+ </xsl:call-template>
1453
+ </xsl:when>
1454
+ <xsl:otherwise>
1455
+ <xsl:call-template name="calculate-columns-numbers">
1456
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1457
+ </xsl:call-template>
1458
+ </xsl:otherwise>
1459
+ </xsl:choose>
1460
+ </xsl:variable> -->
1461
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1462
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1505
1463
 
1506
1464
 
1507
- <xsl:variable name="table_attributes">
1508
- <attribute name="table-layout">fixed</attribute>
1509
- <attribute name="width">
1510
- <xsl:choose>
1511
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1512
- <xsl:otherwise>100%</xsl:otherwise>
1513
- </xsl:choose>
1514
- </attribute>
1515
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1516
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1465
+
1466
+ <xsl:variable name="colwidths">
1467
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1468
+ <xsl:call-template name="calculate-column-widths">
1469
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1470
+ <xsl:with-param name="table" select="$simple-table"/>
1471
+ </xsl:call-template>
1472
+ </xsl:if>
1473
+ </xsl:variable>
1474
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1475
+
1476
+ <!-- <xsl:variable name="colwidths2">
1477
+ <xsl:call-template name="calculate-column-widths">
1478
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1479
+ </xsl:call-template>
1480
+ </xsl:variable> -->
1481
+
1482
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1483
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
1484
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1485
+
1486
+ <xsl:variable name="margin-left">
1487
+ <xsl:choose>
1488
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1489
+ <xsl:otherwise>0</xsl:otherwise>
1490
+ </xsl:choose>
1491
+ </xsl:variable>
1492
+
1493
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1517
1494
 
1518
1495
 
1496
+
1497
+
1498
+
1519
1499
 
1520
1500
 
1521
-
1522
-
1523
-
1501
+
1524
1502
 
1525
-
1526
1503
 
1527
- </xsl:variable>
1528
-
1529
-
1530
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1531
1504
 
1532
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1533
- <xsl:attribute name="{@name}">
1534
- <xsl:value-of select="."/>
1535
- </xsl:attribute>
1536
- </xsl:for-each>
1537
1505
 
1538
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1539
- <xsl:if test="$isNoteOrFnExist = 'true'">
1540
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1541
- </xsl:if>
1542
1506
 
1543
- <xsl:choose>
1544
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1545
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1546
- <fo:table-column column-width="{@width}"/>
1547
- </xsl:for-each>
1548
- </xsl:when>
1549
- <xsl:otherwise>
1550
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1551
- <xsl:choose>
1552
- <xsl:when test=". = 1 or . = 0">
1553
- <fo:table-column column-width="proportional-column-width(2)"/>
1554
- </xsl:when>
1555
- <xsl:otherwise>
1556
- <fo:table-column column-width="proportional-column-width({.})"/>
1557
- </xsl:otherwise>
1558
- </xsl:choose>
1559
- </xsl:for-each>
1560
- </xsl:otherwise>
1561
- </xsl:choose>
1562
1507
 
1563
- <xsl:choose>
1564
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1565
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1566
- </xsl:when>
1567
- <xsl:otherwise>
1568
- <xsl:apply-templates/>
1569
- </xsl:otherwise>
1570
- </xsl:choose>
1508
+ <xsl:variable name="table_width">
1509
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1510
+ 100%
1511
+
1512
+
1513
+ </xsl:variable>
1571
1514
 
1572
- </fo:table>
1573
-
1574
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1575
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1576
- <xsl:call-template name="insertTableFooterInSeparateTable">
1577
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
1578
- <xsl:with-param name="colwidths" select="$colwidths"/>
1579
- <xsl:with-param name="colgroup" select="$colgroup"/>
1580
- </xsl:call-template>
1581
- </xsl:for-each>
1582
-
1583
- <!-- insert footer as table -->
1584
- <!-- <fo:table>
1585
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1586
- <xsl:attribute name="{@name}">
1587
- <xsl:value-of select="."/>
1588
- </xsl:attribute>
1589
- </xsl:for-each>
1515
+ <xsl:variable name="table_attributes">
1516
+ <attribute name="table-layout">fixed</attribute>
1517
+ <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1518
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1519
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+
1526
+
1527
+
1528
+
1529
+
1530
+ </xsl:variable>
1590
1531
 
1591
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1532
+
1533
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1534
+
1535
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1536
+ <xsl:attribute name="{@name}">
1537
+ <xsl:value-of select="."/>
1538
+ </xsl:attribute>
1539
+ </xsl:for-each>
1540
+
1541
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1542
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1543
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1544
+ </xsl:if>
1545
+
1546
+ <xsl:choose>
1547
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1548
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1549
+ <fo:table-column column-width="{@width}"/>
1550
+ </xsl:for-each>
1551
+ </xsl:when>
1552
+ <xsl:otherwise>
1553
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1554
+ <xsl:choose>
1555
+ <xsl:when test=". = 1 or . = 0">
1556
+ <fo:table-column column-width="proportional-column-width(2)"/>
1557
+ </xsl:when>
1558
+ <xsl:otherwise>
1559
+ <fo:table-column column-width="proportional-column-width({.})"/>
1560
+ </xsl:otherwise>
1561
+ </xsl:choose>
1562
+ </xsl:for-each>
1563
+ </xsl:otherwise>
1564
+ </xsl:choose>
1565
+
1592
1566
  <xsl:choose>
1593
- <xsl:when test=". = 1 or . = 0">
1594
- <fo:table-column column-width="proportional-column-width(2)"/>
1567
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1568
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1595
1569
  </xsl:when>
1596
1570
  <xsl:otherwise>
1597
- <fo:table-column column-width="proportional-column-width({.})"/>
1571
+ <xsl:apply-templates/>
1598
1572
  </xsl:otherwise>
1599
1573
  </xsl:choose>
1574
+
1575
+ </fo:table>
1576
+
1577
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1578
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1579
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1580
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1581
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1582
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1583
+ </xsl:call-template>
1600
1584
  </xsl:for-each>
1601
- </fo:table>-->
1602
-
1603
-
1604
-
1605
-
1606
-
1607
- </fo:block-container>
1585
+
1586
+ <!-- insert footer as table -->
1587
+ <!-- <fo:table>
1588
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1589
+ <xsl:attribute name="{@name}">
1590
+ <xsl:value-of select="."/>
1591
+ </xsl:attribute>
1592
+ </xsl:for-each>
1593
+
1594
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1595
+ <xsl:choose>
1596
+ <xsl:when test=". = 1 or . = 0">
1597
+ <fo:table-column column-width="proportional-column-width(2)"/>
1598
+ </xsl:when>
1599
+ <xsl:otherwise>
1600
+ <fo:table-column column-width="proportional-column-width({.})"/>
1601
+ </xsl:otherwise>
1602
+ </xsl:choose>
1603
+ </xsl:for-each>
1604
+ </fo:table>-->
1605
+
1606
+
1607
+
1608
+
1609
+
1610
+ </fo:block-container>
1611
+ </xsl:variable>
1612
+
1613
+
1614
+
1615
+ <xsl:choose>
1616
+ <xsl:when test="@width">
1617
+
1618
+ <!-- centered table when table name is centered (see table-name-style) -->
1619
+
1620
+ <fo:table table-layout="fixed" width="100%">
1621
+ <fo:table-column column-width="proportional-column-width(1)"/>
1622
+ <fo:table-column column-width="{@width}"/>
1623
+ <fo:table-column column-width="proportional-column-width(1)"/>
1624
+ <fo:table-body>
1625
+ <fo:table-row>
1626
+ <fo:table-cell column-number="2">
1627
+ <fo:block><xsl:copy-of select="$table"/></fo:block>
1628
+ </fo:table-cell>
1629
+ </fo:table-row>
1630
+ </fo:table-body>
1631
+ </fo:table>
1632
+
1633
+
1634
+
1635
+
1636
+ </xsl:when>
1637
+ <xsl:otherwise>
1638
+ <xsl:copy-of select="$table"/>
1639
+ </xsl:otherwise>
1640
+ </xsl:choose>
1641
+
1608
1642
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1609
1643
  <xsl:if test="normalize-space() != ''">
1610
1644
  <fo:block xsl:use-attribute-sets="table-name-style">
@@ -2417,7 +2451,7 @@
2417
2451
  <xsl:with-param name="table" select="$html-table"/>
2418
2452
  </xsl:call-template>
2419
2453
  </xsl:variable>
2420
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2454
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2421
2455
  <xsl:variable name="maxlength_dt">
2422
2456
  <xsl:call-template name="getMaxLength_dt"/>
2423
2457
  </xsl:variable>
@@ -2446,13 +2480,22 @@
2446
2480
  </xsl:when>
2447
2481
  <xsl:otherwise>
2448
2482
  <xsl:choose>
2483
+ <!-- to set width check most wide chars like `W` -->
2449
2484
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
2450
- <fo:table-column column-width="5%"/>
2451
- <fo:table-column column-width="95%"/>
2485
+ <fo:table-column column-width="7%"/>
2486
+ <fo:table-column column-width="93%"/>
2487
+ </xsl:when>
2488
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like ABC, etc -->
2489
+ <fo:table-column column-width="15%"/>
2490
+ <fo:table-column column-width="85%"/>
2452
2491
  </xsl:when>
2453
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
2454
- <fo:table-column column-width="10%"/>
2455
- <fo:table-column column-width="90%"/>
2492
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 7"> <!-- if dt contains short text like ABCDEF, etc -->
2493
+ <fo:table-column column-width="20%"/>
2494
+ <fo:table-column column-width="80%"/>
2495
+ </xsl:when>
2496
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
2497
+ <fo:table-column column-width="25%"/>
2498
+ <fo:table-column column-width="75%"/>
2456
2499
  </xsl:when>
2457
2500
  <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
2458
2501
  <fo:table-column column-width="60%"/>
@@ -2764,6 +2807,10 @@
2764
2807
  <xsl:param name="text" select="."/>
2765
2808
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2766
2809
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
2810
+ </xsl:template><xsl:template name="add-zero-spaces-link-java">
2811
+ <xsl:param name="text" select="."/>
2812
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2813
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
2767
2814
  </xsl:template><xsl:template name="add-zero-spaces">
2768
2815
  <xsl:param name="text" select="."/>
2769
2816
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
@@ -3024,6 +3071,11 @@
3024
3071
  <!-- replace start and end spaces to non-break space -->
3025
3072
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3026
3073
  </xsl:copy>
3074
+ </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
3075
+ <xsl:copy>
3076
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
3077
+ </xsl:copy>
3078
+ <mathml:mspace width="0.5ex"/>
3027
3079
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3028
3080
  <xsl:variable name="target">
3029
3081
  <xsl:choose>
@@ -3045,7 +3097,10 @@
3045
3097
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3046
3098
  <xsl:choose>
3047
3099
  <xsl:when test="normalize-space(.) = ''">
3048
- <xsl:value-of select="$target"/>
3100
+ <!-- <xsl:value-of select="$target"/> -->
3101
+ <xsl:call-template name="add-zero-spaces-link-java">
3102
+ <xsl:with-param name="text" select="$target"/>
3103
+ </xsl:call-template>
3049
3104
  </xsl:when>
3050
3105
  <xsl:otherwise>
3051
3106
  <xsl:apply-templates/>
@@ -3522,6 +3577,8 @@
3522
3577
  <xsl:copy>
3523
3578
  <xsl:apply-templates mode="contents_item"/>
3524
3579
  </xsl:copy>
3580
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
3581
+ <xsl:copy-of select="."/>
3525
3582
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3526
3583
  <xsl:text> </xsl:text>
3527
3584
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3915,11 +3972,13 @@
3915
3972
  </xsl:if>
3916
3973
  </xsl:if>
3917
3974
 
3975
+
3918
3976
  <fo:block-container margin-left="0mm">
3919
3977
 
3920
3978
  <fo:block xsl:use-attribute-sets="quote-style">
3921
3979
  <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
3922
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
3980
+
3981
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
3923
3982
  </fo:block>
3924
3983
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3925
3984
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -4339,7 +4398,7 @@
4339
4398
  <xsl:param name="charDelim" select="', '"/>
4340
4399
  <xsl:choose>
4341
4400
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
4342
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4401
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4343
4402
  <xsl:sort data-type="text" order="ascending"/>
4344
4403
  <xsl:call-template name="insertKeyword">
4345
4404
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -4348,7 +4407,7 @@
4348
4407
  </xsl:for-each>
4349
4408
  </xsl:when>
4350
4409
  <xsl:otherwise>
4351
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4410
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4352
4411
  <xsl:call-template name="insertKeyword">
4353
4412
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
4354
4413
  <xsl:with-param name="charDelim" select="$charDelim"/>
@@ -4365,6 +4424,9 @@
4365
4424
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
4366
4425
  </xsl:choose>
4367
4426
  </xsl:template><xsl:template name="addPDFUAmeta">
4427
+ <xsl:variable name="lang">
4428
+ <xsl:call-template name="getLang"/>
4429
+ </xsl:variable>
4368
4430
  <fo:declarations>
4369
4431
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4370
4432
  <pdf:dictionary type="normal" key="ViewerPreferences">
@@ -4377,13 +4439,16 @@
4377
4439
  <!-- Dublin Core properties go here -->
4378
4440
  <dc:title>
4379
4441
  <xsl:variable name="title">
4380
-
4381
-
4382
-
4383
-
4384
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title']"/>
4385
-
4386
-
4442
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4443
+
4444
+
4445
+
4446
+
4447
+
4448
+ <xsl:value-of select="*[local-name() = 'title']"/>
4449
+
4450
+
4451
+ </xsl:for-each>
4387
4452
  </xsl:variable>
4388
4453
  <xsl:choose>
4389
4454
  <xsl:when test="normalize-space($title) != ''">
@@ -4395,17 +4460,21 @@
4395
4460
  </xsl:choose>
4396
4461
  </dc:title>
4397
4462
  <dc:creator>
4398
-
4399
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
4400
-
4401
-
4402
-
4463
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4464
+
4465
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
4466
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
4467
+ <xsl:if test="position() != last()">; </xsl:if>
4468
+ </xsl:for-each>
4469
+
4470
+
4471
+
4472
+ </xsl:for-each>
4403
4473
  </dc:creator>
4404
4474
  <dc:description>
4405
4475
  <xsl:variable name="abstract">
4406
4476
 
4407
-
4408
-
4477
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4409
4478
 
4410
4479
 
4411
4480
  </xsl:variable>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "1.6.5"
3
+ VERSION = "1.6.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3aawg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.5
4
+ version: 1.6.6
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-01-25 00:00:00.000000000 Z
11
+ date: 2021-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
276
  - !ruby/object:Gem::Version
277
277
  version: '0'
278
278
  requirements: []
279
- rubygems_version: 3.0.3
279
+ rubygems_version: 3.1.4
280
280
  signing_key:
281
281
  specification_version: 4
282
282
  summary: metanorma-m3d lets you write M3AAWG Documents in AsciiDoc.