metanorma-mpfa 0.5.12 → 0.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0467ad12b2ffb1cf2ea0b8e5c3978b9a468f9c742c177f29fbe80ad407f51a2f
4
- data.tar.gz: 9a2e33c2c864553d1808945a114478287f7db0d3182b967772dff3ba959cd290
3
+ metadata.gz: 7b1577410b152c3962957cca6f40310e2b208d2459b29eaafc4b65bc3312ce9a
4
+ data.tar.gz: 60e2bf959a0b64e8cf7467bc27401796080e1acab16e6202eee66b1f013c4e7b
5
5
  SHA512:
6
- metadata.gz: 75f5316070167ca1a4637a475b5cf0b2bfdafc6705fbbb88d456e0d535be5409748dffc2a5c683cccd1f54d9ab6dd9dfdb2ece99ac97f7de2e0babae245f17d4
7
- data.tar.gz: e52103a7422b8df892d85f94dfae8f2795922aaea99ce7b2e98c5096854cc78a9dbbc95579941ad9e1a804a5a6343930a8e52079d68fc558f7efadc5dc7ec110
6
+ metadata.gz: f1d63a067e5478941717072dbae5f8cfbea45caf7855a80424afe8dc68b2a6e826da72c0eef49da09a2d171894709ef87686503cfa50a8f9f85ec943a1f50cd1
7
+ data.tar.gz: 1d277cc228fea2a4d492d333f8b95e3d71086e518ebf715c1fabe919c3157d9a88014f1786cc11455ed86527402e79e04ff739cf0f59b235150fb47e374772a3
@@ -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>
@@ -1281,200 +1281,234 @@
1281
1281
  <xsl:call-template name="add-zero-spaces-java"/>
1282
1282
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1283
1283
 
1284
- <xsl:variable name="simple-table">
1285
- <xsl:call-template name="getSimpleTable"/>
1286
- </xsl:variable>
1284
+ <xsl:variable name="table">
1287
1285
 
1288
-
1289
-
1290
-
1291
-
1292
- <!-- <xsl:if test="$namespace = 'bipm'">
1293
- <fo:block>&#xA0;</fo:block>
1294
- </xsl:if> -->
1295
-
1296
- <!-- $namespace = 'iso' or -->
1297
-
1298
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1299
-
1300
-
1301
-
1302
- <xsl:call-template name="fn_name_display"/>
1286
+ <xsl:variable name="simple-table">
1287
+ <xsl:call-template name="getSimpleTable"/>
1288
+ </xsl:variable>
1303
1289
 
1304
1290
 
1305
-
1306
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1307
-
1308
- <!-- <xsl:variable name="cols-count">
1309
- <xsl:choose>
1310
- <xsl:when test="*[local-name()='thead']">
1311
- <xsl:call-template name="calculate-columns-numbers">
1312
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1313
- </xsl:call-template>
1314
- </xsl:when>
1315
- <xsl:otherwise>
1316
- <xsl:call-template name="calculate-columns-numbers">
1317
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1318
- </xsl:call-template>
1319
- </xsl:otherwise>
1320
- </xsl:choose>
1321
- </xsl:variable> -->
1322
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1323
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1324
-
1325
-
1326
-
1327
- <xsl:variable name="colwidths">
1328
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1329
- <xsl:call-template name="calculate-column-widths">
1330
- <xsl:with-param name="cols-count" select="$cols-count"/>
1331
- <xsl:with-param name="table" select="$simple-table"/>
1332
- </xsl:call-template>
1333
- </xsl:if>
1334
- </xsl:variable>
1335
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1336
-
1337
- <!-- <xsl:variable name="colwidths2">
1338
- <xsl:call-template name="calculate-column-widths">
1339
- <xsl:with-param name="cols-count" select="$cols-count"/>
1340
- </xsl:call-template>
1341
- </xsl:variable> -->
1342
-
1343
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1344
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1345
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1346
-
1347
- <xsl:variable name="margin-left">
1348
- <xsl:choose>
1349
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1350
- <xsl:otherwise>0</xsl:otherwise>
1351
- </xsl:choose>
1352
- </xsl:variable>
1353
-
1354
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1355
1291
 
1356
1292
 
1357
-
1358
-
1359
-
1360
1293
 
1294
+ <!-- <xsl:if test="$namespace = 'bipm'">
1295
+ <fo:block>&#xA0;</fo:block>
1296
+ </xsl:if> -->
1361
1297
 
1362
-
1298
+ <!-- $namespace = 'iso' or -->
1363
1299
 
1300
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1364
1301
 
1302
+
1365
1303
 
1304
+ <xsl:call-template name="fn_name_display"/>
1366
1305
 
1367
- <xsl:attribute name="space-after">12pt</xsl:attribute>
1368
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1369
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1306
+
1370
1307
 
1308
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1371
1309
 
1310
+ <!-- <xsl:variable name="cols-count">
1311
+ <xsl:choose>
1312
+ <xsl:when test="*[local-name()='thead']">
1313
+ <xsl:call-template name="calculate-columns-numbers">
1314
+ <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1315
+ </xsl:call-template>
1316
+ </xsl:when>
1317
+ <xsl:otherwise>
1318
+ <xsl:call-template name="calculate-columns-numbers">
1319
+ <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1320
+ </xsl:call-template>
1321
+ </xsl:otherwise>
1322
+ </xsl:choose>
1323
+ </xsl:variable> -->
1324
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1325
+ <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1372
1326
 
1373
1327
 
1374
- <xsl:variable name="table_attributes">
1375
- <attribute name="table-layout">fixed</attribute>
1376
- <attribute name="width">
1377
- <xsl:choose>
1378
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1379
- <xsl:otherwise>100%</xsl:otherwise>
1380
- </xsl:choose>
1381
- </attribute>
1382
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1383
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1328
+
1329
+ <xsl:variable name="colwidths">
1330
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1331
+ <xsl:call-template name="calculate-column-widths">
1332
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1333
+ <xsl:with-param name="table" select="$simple-table"/>
1334
+ </xsl:call-template>
1335
+ </xsl:if>
1336
+ </xsl:variable>
1337
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1338
+
1339
+ <!-- <xsl:variable name="colwidths2">
1340
+ <xsl:call-template name="calculate-column-widths">
1341
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1342
+ </xsl:call-template>
1343
+ </xsl:variable> -->
1344
+
1345
+ <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1346
+ colwidthsNew=<xsl:copy-of select="$colwidths"/>
1347
+ colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1348
+
1349
+ <xsl:variable name="margin-left">
1350
+ <xsl:choose>
1351
+ <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1352
+ <xsl:otherwise>0</xsl:otherwise>
1353
+ </xsl:choose>
1354
+ </xsl:variable>
1355
+
1356
+ <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1384
1357
 
1385
1358
 
1359
+
1360
+
1361
+
1386
1362
 
1387
1363
 
1388
-
1389
-
1390
-
1364
+
1391
1365
 
1392
1366
 
1393
- <attribute name="border-top">2pt solid black</attribute>
1394
- <attribute name="border-bottom">2pt solid black</attribute>
1395
-
1396
1367
 
1397
- </xsl:variable>
1398
-
1399
-
1400
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1401
1368
 
1402
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1403
- <xsl:attribute name="{@name}">
1404
- <xsl:value-of select="."/>
1405
- </xsl:attribute>
1406
- </xsl:for-each>
1369
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
1370
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
1371
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
1407
1372
 
1408
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1409
- <xsl:if test="$isNoteOrFnExist = 'true'">
1410
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1411
- </xsl:if>
1412
1373
 
1413
- <xsl:choose>
1414
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1415
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1416
- <fo:table-column column-width="{@width}"/>
1417
- </xsl:for-each>
1418
- </xsl:when>
1419
- <xsl:otherwise>
1420
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1421
- <xsl:choose>
1422
- <xsl:when test=". = 1 or . = 0">
1423
- <fo:table-column column-width="proportional-column-width(2)"/>
1424
- </xsl:when>
1425
- <xsl:otherwise>
1426
- <fo:table-column column-width="proportional-column-width({.})"/>
1427
- </xsl:otherwise>
1428
- </xsl:choose>
1429
- </xsl:for-each>
1430
- </xsl:otherwise>
1431
- </xsl:choose>
1432
1374
 
1433
- <xsl:choose>
1434
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1435
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1436
- </xsl:when>
1437
- <xsl:otherwise>
1438
- <xsl:apply-templates/>
1439
- </xsl:otherwise>
1440
- </xsl:choose>
1375
+ <xsl:variable name="table_width">
1376
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1377
+ 100%
1378
+
1379
+
1380
+ </xsl:variable>
1381
+
1382
+ <xsl:variable name="table_attributes">
1383
+ <attribute name="table-layout">fixed</attribute>
1384
+ <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
1385
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1386
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1387
+
1388
+
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+ <attribute name="border-top">2pt solid black</attribute>
1397
+ <attribute name="border-bottom">2pt solid black</attribute>
1398
+
1399
+
1400
+ </xsl:variable>
1441
1401
 
1442
- </fo:table>
1443
-
1444
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1445
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1446
- <xsl:call-template name="insertTableFooterInSeparateTable">
1447
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
1448
- <xsl:with-param name="colwidths" select="$colwidths"/>
1449
- <xsl:with-param name="colgroup" select="$colgroup"/>
1450
- </xsl:call-template>
1451
- </xsl:for-each>
1452
-
1453
- <!-- insert footer as table -->
1454
- <!-- <fo:table>
1455
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1456
- <xsl:attribute name="{@name}">
1457
- <xsl:value-of select="."/>
1458
- </xsl:attribute>
1459
- </xsl:for-each>
1460
1402
 
1461
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1403
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1404
+
1405
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1406
+ <xsl:attribute name="{@name}">
1407
+ <xsl:value-of select="."/>
1408
+ </xsl:attribute>
1409
+ </xsl:for-each>
1410
+
1411
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1412
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1413
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1414
+ </xsl:if>
1415
+
1416
+ <xsl:choose>
1417
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1418
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1419
+ <fo:table-column column-width="{@width}"/>
1420
+ </xsl:for-each>
1421
+ </xsl:when>
1422
+ <xsl:otherwise>
1423
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1424
+ <xsl:choose>
1425
+ <xsl:when test=". = 1 or . = 0">
1426
+ <fo:table-column column-width="proportional-column-width(2)"/>
1427
+ </xsl:when>
1428
+ <xsl:otherwise>
1429
+ <fo:table-column column-width="proportional-column-width({.})"/>
1430
+ </xsl:otherwise>
1431
+ </xsl:choose>
1432
+ </xsl:for-each>
1433
+ </xsl:otherwise>
1434
+ </xsl:choose>
1435
+
1462
1436
  <xsl:choose>
1463
- <xsl:when test=". = 1 or . = 0">
1464
- <fo:table-column column-width="proportional-column-width(2)"/>
1437
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1438
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1465
1439
  </xsl:when>
1466
1440
  <xsl:otherwise>
1467
- <fo:table-column column-width="proportional-column-width({.})"/>
1441
+ <xsl:apply-templates/>
1468
1442
  </xsl:otherwise>
1469
1443
  </xsl:choose>
1444
+
1445
+ </fo:table>
1446
+
1447
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1448
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1449
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1450
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1451
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1452
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1453
+ </xsl:call-template>
1470
1454
  </xsl:for-each>
1471
- </fo:table>-->
1472
-
1473
-
1474
-
1475
-
1476
-
1477
- </fo:block-container>
1455
+
1456
+ <!-- insert footer as table -->
1457
+ <!-- <fo:table>
1458
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1459
+ <xsl:attribute name="{@name}">
1460
+ <xsl:value-of select="."/>
1461
+ </xsl:attribute>
1462
+ </xsl:for-each>
1463
+
1464
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1465
+ <xsl:choose>
1466
+ <xsl:when test=". = 1 or . = 0">
1467
+ <fo:table-column column-width="proportional-column-width(2)"/>
1468
+ </xsl:when>
1469
+ <xsl:otherwise>
1470
+ <fo:table-column column-width="proportional-column-width({.})"/>
1471
+ </xsl:otherwise>
1472
+ </xsl:choose>
1473
+ </xsl:for-each>
1474
+ </fo:table>-->
1475
+
1476
+
1477
+
1478
+
1479
+
1480
+ </fo:block-container>
1481
+ </xsl:variable>
1482
+
1483
+
1484
+
1485
+ <xsl:choose>
1486
+ <xsl:when test="@width">
1487
+
1488
+ <!-- centered table when table name is centered (see table-name-style) -->
1489
+
1490
+ <fo:table table-layout="fixed" width="100%">
1491
+ <fo:table-column column-width="proportional-column-width(1)"/>
1492
+ <fo:table-column column-width="{@width}"/>
1493
+ <fo:table-column column-width="proportional-column-width(1)"/>
1494
+ <fo:table-body>
1495
+ <fo:table-row>
1496
+ <fo:table-cell column-number="2">
1497
+ <fo:block><xsl:copy-of select="$table"/></fo:block>
1498
+ </fo:table-cell>
1499
+ </fo:table-row>
1500
+ </fo:table-body>
1501
+ </fo:table>
1502
+
1503
+
1504
+
1505
+
1506
+ </xsl:when>
1507
+ <xsl:otherwise>
1508
+ <xsl:copy-of select="$table"/>
1509
+ </xsl:otherwise>
1510
+ </xsl:choose>
1511
+
1478
1512
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1479
1513
  <xsl:if test="normalize-space() != ''">
1480
1514
  <fo:block xsl:use-attribute-sets="table-name-style">
@@ -2288,7 +2322,7 @@
2288
2322
  <xsl:with-param name="table" select="$html-table"/>
2289
2323
  </xsl:call-template>
2290
2324
  </xsl:variable>
2291
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2325
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2292
2326
  <xsl:variable name="maxlength_dt">
2293
2327
  <xsl:call-template name="getMaxLength_dt"/>
2294
2328
  </xsl:variable>
@@ -2317,13 +2351,22 @@
2317
2351
  </xsl:when>
2318
2352
  <xsl:otherwise>
2319
2353
  <xsl:choose>
2354
+ <!-- to set width check most wide chars like `W` -->
2320
2355
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
2321
- <fo:table-column column-width="5%"/>
2322
- <fo:table-column column-width="95%"/>
2356
+ <fo:table-column column-width="7%"/>
2357
+ <fo:table-column column-width="93%"/>
2358
+ </xsl:when>
2359
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like ABC, etc -->
2360
+ <fo:table-column column-width="15%"/>
2361
+ <fo:table-column column-width="85%"/>
2323
2362
  </xsl:when>
2324
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
2325
- <fo:table-column column-width="10%"/>
2326
- <fo:table-column column-width="90%"/>
2363
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 7"> <!-- if dt contains short text like ABCDEF, etc -->
2364
+ <fo:table-column column-width="20%"/>
2365
+ <fo:table-column column-width="80%"/>
2366
+ </xsl:when>
2367
+ <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
2368
+ <fo:table-column column-width="25%"/>
2369
+ <fo:table-column column-width="75%"/>
2327
2370
  </xsl:when>
2328
2371
  <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
2329
2372
  <fo:table-column column-width="60%"/>
@@ -2630,6 +2673,10 @@
2630
2673
  <xsl:param name="text" select="."/>
2631
2674
  <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2632
2675
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
2676
+ </xsl:template><xsl:template name="add-zero-spaces-link-java">
2677
+ <xsl:param name="text" select="."/>
2678
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2679
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1​')"/>
2633
2680
  </xsl:template><xsl:template name="add-zero-spaces">
2634
2681
  <xsl:param name="text" select="."/>
2635
2682
  <xsl:variable name="zero-space-after-chars">-</xsl:variable>
@@ -2890,6 +2937,11 @@
2890
2937
  <!-- replace start and end spaces to non-break space -->
2891
2938
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
2892
2939
  </xsl:copy>
2940
+ </xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
2941
+ <xsl:copy>
2942
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
2943
+ </xsl:copy>
2944
+ <mathml:mspace width="0.5ex"/>
2893
2945
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2894
2946
  <xsl:variable name="target">
2895
2947
  <xsl:choose>
@@ -2911,7 +2963,10 @@
2911
2963
  <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2912
2964
  <xsl:choose>
2913
2965
  <xsl:when test="normalize-space(.) = ''">
2914
- <xsl:value-of select="$target"/>
2966
+ <!-- <xsl:value-of select="$target"/> -->
2967
+ <xsl:call-template name="add-zero-spaces-link-java">
2968
+ <xsl:with-param name="text" select="$target"/>
2969
+ </xsl:call-template>
2915
2970
  </xsl:when>
2916
2971
  <xsl:otherwise>
2917
2972
  <xsl:apply-templates/>
@@ -3382,6 +3437,8 @@
3382
3437
  <xsl:copy>
3383
3438
  <xsl:apply-templates mode="contents_item"/>
3384
3439
  </xsl:copy>
3440
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
3441
+ <xsl:copy-of select="."/>
3385
3442
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3386
3443
  <xsl:text> </xsl:text>
3387
3444
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3784,11 +3841,13 @@
3784
3841
  </xsl:if>
3785
3842
  </xsl:if>
3786
3843
 
3844
+
3787
3845
  <fo:block-container margin-left="0mm">
3788
3846
 
3789
3847
  <fo:block xsl:use-attribute-sets="quote-style">
3790
3848
  <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
3791
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
3849
+
3850
+ <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
3792
3851
  </fo:block>
3793
3852
  <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3794
3853
  <fo:block xsl:use-attribute-sets="quote-source-style">
@@ -4196,7 +4255,7 @@
4196
4255
  <xsl:param name="charDelim" select="', '"/>
4197
4256
  <xsl:choose>
4198
4257
  <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
4199
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4258
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4200
4259
  <xsl:sort data-type="text" order="ascending"/>
4201
4260
  <xsl:call-template name="insertKeyword">
4202
4261
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
@@ -4205,7 +4264,7 @@
4205
4264
  </xsl:for-each>
4206
4265
  </xsl:when>
4207
4266
  <xsl:otherwise>
4208
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4267
+ <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4209
4268
  <xsl:call-template name="insertKeyword">
4210
4269
  <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
4211
4270
  <xsl:with-param name="charDelim" select="$charDelim"/>
@@ -4222,6 +4281,9 @@
4222
4281
  <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
4223
4282
  </xsl:choose>
4224
4283
  </xsl:template><xsl:template name="addPDFUAmeta">
4284
+ <xsl:variable name="lang">
4285
+ <xsl:call-template name="getLang"/>
4286
+ </xsl:variable>
4225
4287
  <fo:declarations>
4226
4288
  <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4227
4289
  <pdf:dictionary type="normal" key="ViewerPreferences">
@@ -4234,13 +4296,16 @@
4234
4296
  <!-- Dublin Core properties go here -->
4235
4297
  <dc:title>
4236
4298
  <xsl:variable name="title">
4237
-
4238
-
4239
-
4240
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
4241
-
4242
-
4243
-
4299
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4300
+
4301
+
4302
+
4303
+
4304
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
4305
+
4306
+
4307
+
4308
+ </xsl:for-each>
4244
4309
  </xsl:variable>
4245
4310
  <xsl:choose>
4246
4311
  <xsl:when test="normalize-space($title) != ''">
@@ -4252,15 +4317,14 @@
4252
4317
  </xsl:choose>
4253
4318
  </dc:title>
4254
4319
  <dc:creator>
4255
-
4256
-
4257
-
4258
- </dc:creator>
4259
- <dc:description>
4260
- <xsl:variable name="abstract">
4320
+ <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
4261
4321
 
4262
4322
 
4263
4323
 
4324
+ </xsl:for-each>
4325
+ </dc:creator>
4326
+ <dc:description>
4327
+ <xsl:variable name="abstract">
4264
4328
 
4265
4329
 
4266
4330
  </xsl:variable>