metanorma-cc 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: 592ff816792c6d03e0182d5325ebe691df92fcea5fd2c04c2bbf80171304bfff
4
- data.tar.gz: bee03576d60eee64d84c330e69f124b742ceeb9bbcef125b1f44992ca30c3430
3
+ metadata.gz: f500db67325bf5ec4bbf645bfeafc69d10a13efc9b4eb6e57721b813daff15f4
4
+ data.tar.gz: cd833b906e604cbf0f6d232b800aed778f036afc502f45d7ea1b7f432682c747
5
5
  SHA512:
6
- metadata.gz: 199be67c2dc4fd62dcd032301b9403f2ba0d367a9ec6b2ba446ec973e4e89a9471bf756c6ca9f05d946b201f2d11c9468a330bfbbd0033ac03c6d906a4e8d014
7
- data.tar.gz: c63e25d8740dd29c403403231da436d5e19dc751e25b792dda3d7787aa2e7739fc0aa5c21796f5f6232f0316eef95aeff3f5f98ff700eb6faca658994234dd22
6
+ metadata.gz: e0ca4ea71960d72b87c1454c57ec50016d4cb2813e4cf21a57fc262d10c6ef6a52b7ec61d89ab425ca20b19cf0d472fc84b75cb3daf8df92850686625bd47f93
7
+ data.tar.gz: 96ef529b12a8276e9d84189ac61bbf55849ae9363ed5dad85bf16b535c2041e844ece82cce25838fb1e6dbac809768aede15ea25cfc35dbe15b388bc446374d6
@@ -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>
@@ -1332,195 +1332,229 @@
1332
1332
  <xsl:call-template name="add-zero-spaces-java"/>
1333
1333
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1334
1334
 
1335
- <xsl:variable name="simple-table">
1336
- <xsl:call-template name="getSimpleTable"/>
1337
- </xsl:variable>
1335
+ <xsl:variable name="table">
1338
1336
 
1339
-
1340
-
1341
-
1342
-
1343
- <!-- <xsl:if test="$namespace = 'bipm'">
1344
- <fo:block>&#xA0;</fo:block>
1345
- </xsl:if> -->
1346
-
1347
- <!-- $namespace = 'iso' or -->
1348
-
1349
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1350
-
1351
-
1352
-
1353
- <xsl:call-template name="fn_name_display"/>
1337
+ <xsl:variable name="simple-table">
1338
+ <xsl:call-template name="getSimpleTable"/>
1339
+ </xsl:variable>
1354
1340
 
1355
1341
 
1356
-
1357
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1358
-
1359
- <!-- <xsl:variable name="cols-count">
1360
- <xsl:choose>
1361
- <xsl:when test="*[local-name()='thead']">
1362
- <xsl:call-template name="calculate-columns-numbers">
1363
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1364
- </xsl:call-template>
1365
- </xsl:when>
1366
- <xsl:otherwise>
1367
- <xsl:call-template name="calculate-columns-numbers">
1368
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1369
- </xsl:call-template>
1370
- </xsl:otherwise>
1371
- </xsl:choose>
1372
- </xsl:variable> -->
1373
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1374
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1375
-
1376
-
1377
-
1378
- <xsl:variable name="colwidths">
1379
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1380
- <xsl:call-template name="calculate-column-widths">
1381
- <xsl:with-param name="cols-count" select="$cols-count"/>
1382
- <xsl:with-param name="table" select="$simple-table"/>
1383
- </xsl:call-template>
1384
- </xsl:if>
1385
- </xsl:variable>
1386
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1387
-
1388
- <!-- <xsl:variable name="colwidths2">
1389
- <xsl:call-template name="calculate-column-widths">
1390
- <xsl:with-param name="cols-count" select="$cols-count"/>
1391
- </xsl:call-template>
1392
- </xsl:variable> -->
1393
-
1394
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1395
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1396
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1397
-
1398
- <xsl:variable name="margin-left">
1399
- <xsl:choose>
1400
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1401
- <xsl:otherwise>0</xsl:otherwise>
1402
- </xsl:choose>
1403
- </xsl:variable>
1404
-
1405
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1406
1342
 
1407
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1408
1343
 
1409
1344
 
1410
-
1411
-
1412
-
1345
+ <!-- <xsl:if test="$namespace = 'bipm'">
1346
+ <fo:block>&#xA0;</fo:block>
1347
+ </xsl:if> -->
1413
1348
 
1349
+ <!-- $namespace = 'iso' or -->
1414
1350
 
1415
-
1351
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1416
1352
 
1353
+
1417
1354
 
1355
+ <xsl:call-template name="fn_name_display"/>
1418
1356
 
1357
+
1419
1358
 
1359
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1420
1360
 
1361
+ <!-- <xsl:variable name="cols-count">
1362
+ <xsl:choose>
1363
+ <xsl:when test="*[local-name()='thead']">
1364
+ <xsl:call-template name="calculate-columns-numbers">
1365
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1366
+ </xsl:call-template>
1367
+ </xsl:when>
1368
+ <xsl:otherwise>
1369
+ <xsl:call-template name="calculate-columns-numbers">
1370
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1371
+ </xsl:call-template>
1372
+ </xsl:otherwise>
1373
+ </xsl:choose>
1374
+ </xsl:variable> -->
1375
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1376
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1421
1377
 
1422
1378
 
1423
- <xsl:variable name="table_attributes">
1424
- <attribute name="table-layout">fixed</attribute>
1425
- <attribute name="width">
1426
- <xsl:choose>
1427
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1428
- <xsl:otherwise>100%</xsl:otherwise>
1429
- </xsl:choose>
1430
- </attribute>
1431
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1432
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1379
+
1380
+ <xsl:variable name="colwidths">
1381
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1382
+ <xsl:call-template name="calculate-column-widths">
1383
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1384
+ <xsl:with-param name="table" select="$simple-table"/>
1385
+ </xsl:call-template>
1386
+ </xsl:if>
1387
+ </xsl:variable>
1388
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1389
+
1390
+ <!-- <xsl:variable name="colwidths2">
1391
+ <xsl:call-template name="calculate-column-widths">
1392
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1393
+ </xsl:call-template>
1394
+ </xsl:variable> -->
1395
+
1396
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1397
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
1398
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1399
+
1400
+ <xsl:variable name="margin-left">
1401
+ <xsl:choose>
1402
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1403
+ <xsl:otherwise>0</xsl:otherwise>
1404
+ </xsl:choose>
1405
+ </xsl:variable>
1406
+
1407
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1433
1408
 
1409
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1434
1410
 
1435
1411
 
1412
+
1413
+
1414
+
1436
1415
 
1437
-
1438
-
1439
-
1440
1416
 
1441
-
1417
+
1442
1418
 
1443
- </xsl:variable>
1444
-
1445
-
1446
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1447
1419
 
1448
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1449
- <xsl:attribute name="{@name}">
1450
- <xsl:value-of select="."/>
1451
- </xsl:attribute>
1452
- </xsl:for-each>
1453
1420
 
1454
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1455
- <xsl:if test="$isNoteOrFnExist = 'true'">
1456
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1457
- </xsl:if>
1458
1421
 
1459
- <xsl:choose>
1460
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1461
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1462
- <fo:table-column column-width="{@width}"/>
1463
- </xsl:for-each>
1464
- </xsl:when>
1465
- <xsl:otherwise>
1466
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1467
- <xsl:choose>
1468
- <xsl:when test=". = 1 or . = 0">
1469
- <fo:table-column column-width="proportional-column-width(2)"/>
1470
- </xsl:when>
1471
- <xsl:otherwise>
1472
- <fo:table-column column-width="proportional-column-width({.})"/>
1473
- </xsl:otherwise>
1474
- </xsl:choose>
1475
- </xsl:for-each>
1476
- </xsl:otherwise>
1477
- </xsl:choose>
1478
1422
 
1479
- <xsl:choose>
1480
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1481
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1482
- </xsl:when>
1483
- <xsl:otherwise>
1484
- <xsl:apply-templates/>
1485
- </xsl:otherwise>
1486
- </xsl:choose>
1487
1423
 
1488
- </fo:table>
1489
-
1490
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1491
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1492
- <xsl:call-template name="insertTableFooterInSeparateTable">
1493
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
1494
- <xsl:with-param name="colwidths" select="$colwidths"/>
1495
- <xsl:with-param name="colgroup" select="$colgroup"/>
1496
- </xsl:call-template>
1497
- </xsl:for-each>
1498
-
1499
- <!-- insert footer as table -->
1500
- <!-- <fo:table>
1501
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1502
- <xsl:attribute name="{@name}">
1503
- <xsl:value-of select="."/>
1504
- </xsl:attribute>
1505
- </xsl:for-each>
1424
+ <xsl:variable name="table_width">
1425
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1426
+ 100%
1427
+
1428
+
1429
+ </xsl:variable>
1506
1430
 
1507
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1431
+ <xsl:variable name="table_attributes">
1432
+ <attribute name="table-layout">fixed</attribute>
1433
+ <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1434
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1435
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+ </xsl:variable>
1447
+
1448
+
1449
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1450
+
1451
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1452
+ <xsl:attribute name="{@name}">
1453
+ <xsl:value-of select="."/>
1454
+ </xsl:attribute>
1455
+ </xsl:for-each>
1456
+
1457
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1458
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1459
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1460
+ </xsl:if>
1461
+
1462
+ <xsl:choose>
1463
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1464
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1465
+ <fo:table-column column-width="{@width}"/>
1466
+ </xsl:for-each>
1467
+ </xsl:when>
1468
+ <xsl:otherwise>
1469
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1470
+ <xsl:choose>
1471
+ <xsl:when test=". = 1 or . = 0">
1472
+ <fo:table-column column-width="proportional-column-width(2)"/>
1473
+ </xsl:when>
1474
+ <xsl:otherwise>
1475
+ <fo:table-column column-width="proportional-column-width({.})"/>
1476
+ </xsl:otherwise>
1477
+ </xsl:choose>
1478
+ </xsl:for-each>
1479
+ </xsl:otherwise>
1480
+ </xsl:choose>
1481
+
1508
1482
  <xsl:choose>
1509
- <xsl:when test=". = 1 or . = 0">
1510
- <fo:table-column column-width="proportional-column-width(2)"/>
1483
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1484
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1511
1485
  </xsl:when>
1512
1486
  <xsl:otherwise>
1513
- <fo:table-column column-width="proportional-column-width({.})"/>
1487
+ <xsl:apply-templates/>
1514
1488
  </xsl:otherwise>
1515
1489
  </xsl:choose>
1490
+
1491
+ </fo:table>
1492
+
1493
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1494
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1495
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1496
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1497
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1498
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1499
+ </xsl:call-template>
1516
1500
  </xsl:for-each>
1517
- </fo:table>-->
1518
-
1519
-
1520
-
1521
-
1522
-
1523
- </fo:block-container>
1501
+
1502
+ <!-- insert footer as table -->
1503
+ <!-- <fo:table>
1504
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1505
+ <xsl:attribute name="{@name}">
1506
+ <xsl:value-of select="."/>
1507
+ </xsl:attribute>
1508
+ </xsl:for-each>
1509
+
1510
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1511
+ <xsl:choose>
1512
+ <xsl:when test=". = 1 or . = 0">
1513
+ <fo:table-column column-width="proportional-column-width(2)"/>
1514
+ </xsl:when>
1515
+ <xsl:otherwise>
1516
+ <fo:table-column column-width="proportional-column-width({.})"/>
1517
+ </xsl:otherwise>
1518
+ </xsl:choose>
1519
+ </xsl:for-each>
1520
+ </fo:table>-->
1521
+
1522
+
1523
+
1524
+
1525
+
1526
+ </fo:block-container>
1527
+ </xsl:variable>
1528
+
1529
+
1530
+
1531
+ <xsl:choose>
1532
+ <xsl:when test="@width">
1533
+
1534
+ <!-- centered table when table name is centered (see table-name-style) -->
1535
+
1536
+ <fo:table table-layout="fixed" width="100%">
1537
+ <fo:table-column column-width="proportional-column-width(1)"/>
1538
+ <fo:table-column column-width="{@width}"/>
1539
+ <fo:table-column column-width="proportional-column-width(1)"/>
1540
+ <fo:table-body>
1541
+ <fo:table-row>
1542
+ <fo:table-cell column-number="2">
1543
+ <fo:block><xsl:copy-of select="$table"/></fo:block>
1544
+ </fo:table-cell>
1545
+ </fo:table-row>
1546
+ </fo:table-body>
1547
+ </fo:table>
1548
+
1549
+
1550
+
1551
+
1552
+ </xsl:when>
1553
+ <xsl:otherwise>
1554
+ <xsl:copy-of select="$table"/>
1555
+ </xsl:otherwise>
1556
+ </xsl:choose>
1557
+
1524
1558
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1525
1559
  <xsl:if test="normalize-space() != ''">
1526
1560
  <fo:block xsl:use-attribute-sets="table-name-style">
@@ -2333,7 +2367,7 @@
2333
2367
  <xsl:with-param name="table" select="$html-table"/>
2334
2368
  </xsl:call-template>
2335
2369
  </xsl:variable>
2336
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2370
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2337
2371
  <xsl:variable name="maxlength_dt">
2338
2372
  <xsl:call-template name="getMaxLength_dt"/>
2339
2373
  </xsl:variable>
@@ -2362,13 +2396,22 @@
2362
2396
  </xsl:when>
2363
2397
  <xsl:otherwise>
2364
2398
  <xsl:choose>
2399
+ <!-- to set width check most wide chars like `W` -->
2365
2400
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
2366
- <fo:table-column column-width="5%"/>
2367
- <fo:table-column column-width="95%"/>
2401
+ <fo:table-column column-width="7%"/>
2402
+ <fo:table-column column-width="93%"/>
2403
+ </xsl:when>
2404
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like ABC, etc -->
2405
+ <fo:table-column column-width="15%"/>
2406
+ <fo:table-column column-width="85%"/>
2368
2407
  </xsl:when>
2369
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
2370
- <fo:table-column column-width="10%"/>
2371
- <fo:table-column column-width="90%"/>
2408
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 7"> <!-- if dt contains short text like ABCDEF, etc -->
2409
+ <fo:table-column column-width="20%"/>
2410
+ <fo:table-column column-width="80%"/>
2411
+ </xsl:when>
2412
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
2413
+ <fo:table-column column-width="25%"/>
2414
+ <fo:table-column column-width="75%"/>
2372
2415
  </xsl:when>
2373
2416
  <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
2374
2417
  <fo:table-column column-width="60%"/>
@@ -2677,6 +2720,10 @@
2677
2720
  <xsl:param name="text" select="."/>
2678
2721
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2679
2722
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
2723
+ </xsl:template><xsl:template name="add-zero-spaces-link-java">
2724
+ <xsl:param name="text" select="."/>
2725
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2726
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
2680
2727
  </xsl:template><xsl:template name="add-zero-spaces">
2681
2728
  <xsl:param name="text" select="."/>
2682
2729
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
@@ -2937,6 +2984,11 @@
2937
2984
  <!-- replace start and end spaces to non-break space -->
2938
2985
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
2939
2986
  </xsl:copy>
2987
+ </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
2988
+ <xsl:copy>
2989
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
2990
+ </xsl:copy>
2991
+ <mathml:mspace width="0.5ex"/>
2940
2992
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2941
2993
  <xsl:variable name="target">
2942
2994
  <xsl:choose>
@@ -2958,7 +3010,10 @@
2958
3010
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2959
3011
  <xsl:choose>
2960
3012
  <xsl:when test="normalize-space(.) = ''">
2961
- <xsl:value-of select="$target"/>
3013
+ <!-- <xsl:value-of select="$target"/> -->
3014
+ <xsl:call-template name="add-zero-spaces-link-java">
3015
+ <xsl:with-param name="text" select="$target"/>
3016
+ </xsl:call-template>
2962
3017
  </xsl:when>
2963
3018
  <xsl:otherwise>
2964
3019
  <xsl:apply-templates/>
@@ -3429,6 +3484,8 @@
3429
3484
  <xsl:copy>
3430
3485
  <xsl:apply-templates mode="contents_item"/>
3431
3486
  </xsl:copy>
3487
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
3488
+ <xsl:copy-of select="."/>
3432
3489
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3433
3490
  <xsl:text> </xsl:text>
3434
3491
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3835,11 +3892,13 @@
3835
3892
  </xsl:if>
3836
3893
  </xsl:if>
3837
3894
 
3895
+
3838
3896
  <fo:block-container margin-left="0mm">
3839
3897
 
3840
3898
  <fo:block xsl:use-attribute-sets="quote-style">
3841
3899
  <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
3842
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
3900
+
3901
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
3843
3902
  </fo:block>
3844
3903
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3845
3904
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -4258,7 +4317,7 @@
4258
4317
  <xsl:param name="charDelim" select="', '"/>
4259
4318
  <xsl:choose>
4260
4319
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
4261
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4320
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4262
4321
  <xsl:sort data-type="text" order="ascending"/>
4263
4322
  <xsl:call-template name="insertKeyword">
4264
4323
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -4267,7 +4326,7 @@
4267
4326
  </xsl:for-each>
4268
4327
  </xsl:when>
4269
4328
  <xsl:otherwise>
4270
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4329
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4271
4330
  <xsl:call-template name="insertKeyword">
4272
4331
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
4273
4332
  <xsl:with-param name="charDelim" select="$charDelim"/>
@@ -4284,6 +4343,9 @@
4284
4343
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
4285
4344
  </xsl:choose>
4286
4345
  </xsl:template><xsl:template name="addPDFUAmeta">
4346
+ <xsl:variable name="lang">
4347
+ <xsl:call-template name="getLang"/>
4348
+ </xsl:variable>
4287
4349
  <fo:declarations>
4288
4350
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4289
4351
  <pdf:dictionary type="normal" key="ViewerPreferences">
@@ -4296,13 +4358,16 @@
4296
4358
  <!-- Dublin Core properties go here -->
4297
4359
  <dc:title>
4298
4360
  <xsl:variable name="title">
4299
-
4300
-
4301
-
4302
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
4303
-
4304
-
4305
-
4361
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4362
+
4363
+
4364
+
4365
+
4366
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
4367
+
4368
+
4369
+
4370
+ </xsl:for-each>
4306
4371
  </xsl:variable>
4307
4372
  <xsl:choose>
4308
4373
  <xsl:when test="normalize-space($title) != ''">
@@ -4314,17 +4379,21 @@
4314
4379
  </xsl:choose>
4315
4380
  </dc:title>
4316
4381
  <dc:creator>
4317
-
4318
-
4319
-
4320
- </dc:creator>
4321
- <dc:description>
4322
- <xsl:variable name="abstract">
4382
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4383
+
4384
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
4385
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
4386
+ <xsl:if test="position() != last()">; </xsl:if>
4387
+ </xsl:for-each>
4323
4388
 
4324
- <xsl:copy-of select="/*/*[local-name() = 'bibliography']/*[local-name() = 'references']/*[local-name() = 'bibitem']/*[local-name() = 'abstract']//text()"/>
4325
4389
 
4326
4390
 
4391
+ </xsl:for-each>
4392
+ </dc:creator>
4393
+ <dc:description>
4394
+ <xsl:variable name="abstract">
4327
4395
 
4396
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
4328
4397
 
4329
4398
 
4330
4399
  </xsl:variable>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
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-cc
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: metanorma-generic
@@ -251,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
251
  - !ruby/object:Gem::Version
252
252
  version: '0'
253
253
  requirements: []
254
- rubygems_version: 3.0.3
254
+ rubygems_version: 3.1.4
255
255
  signing_key:
256
256
  specification_version: 4
257
257
  summary: metanorma-cc lets you write CalConnect standards in AsciiDoc.