metanorma-mpfa 0.5.9 → 0.5.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +11 -22
- data/.rubocop.yml +1 -4
- data/lib/asciidoctor/mpfa/basicdoc.rng +20 -3
- data/lib/asciidoctor/mpfa/isodoc.rng +118 -4
- data/lib/asciidoctor/mpfa/mpfd.rng +6 -0
- data/lib/isodoc/mpfa/base_convert.rb +3 -3
- data/lib/isodoc/mpfa/html_convert.rb +2 -2
- data/lib/isodoc/mpfa/{mpfd.circular.xsl → mpfa.circular.xsl} +421 -190
- data/lib/isodoc/mpfa/{mpfd.compliance-standards-for-mpf-trustees.xsl → mpfa.compliance-standards-for-mpf-trustees.xsl} +421 -190
- data/lib/isodoc/mpfa/{mpfd.guidelines.xsl → mpfa.guidelines.xsl} +421 -190
- data/lib/isodoc/mpfa/{mpfd.standards.xsl → mpfa.standards.xsl} +421 -190
- data/lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl +4507 -0
- data/lib/isodoc/mpfa/pdf_convert.rb +1 -1
- data/lib/isodoc/mpfa/word_convert.rb +2 -2
- data/lib/metanorma/mpfa/processor.rb +8 -0
- data/lib/metanorma/mpfa/version.rb +1 -1
- data/metanorma-mpfd.gemspec +2 -2
- metadata +12 -12
- data/lib/isodoc/mpfa/mpfd.supervision-of-mpf-intermediaries.xsl +0 -4276
@@ -1138,6 +1138,7 @@
|
|
1138
1138
|
|
1139
1139
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1140
1140
|
|
1141
|
+
|
1141
1142
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1142
1143
|
|
1143
1144
|
|
@@ -1145,6 +1146,7 @@
|
|
1145
1146
|
|
1146
1147
|
|
1147
1148
|
|
1149
|
+
|
1148
1150
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1149
1151
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
1150
1152
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
@@ -1277,197 +1279,236 @@
|
|
1277
1279
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1278
1280
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1279
1281
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1280
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
1282
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1281
1283
|
|
1282
|
-
<xsl:variable name="
|
1283
|
-
<xsl:call-template name="getSimpleTable"/>
|
1284
|
-
</xsl:variable>
|
1284
|
+
<xsl:variable name="table">
|
1285
1285
|
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1291
|
-
<fo:block> </fo:block>
|
1292
|
-
</xsl:if> -->
|
1293
|
-
|
1294
|
-
<!-- $namespace = 'iso' or -->
|
1295
|
-
|
1296
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
<xsl:call-template name="fn_name_display"/>
|
1286
|
+
<xsl:variable name="simple-table">
|
1287
|
+
<xsl:call-template name="getSimpleTable"/>
|
1288
|
+
</xsl:variable>
|
1301
1289
|
|
1302
1290
|
|
1303
|
-
|
1304
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1305
|
-
|
1306
|
-
<!-- <xsl:variable name="cols-count">
|
1307
|
-
<xsl:choose>
|
1308
|
-
<xsl:when test="*[local-name()='thead']">
|
1309
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1310
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1311
|
-
</xsl:call-template>
|
1312
|
-
</xsl:when>
|
1313
|
-
<xsl:otherwise>
|
1314
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1315
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1316
|
-
</xsl:call-template>
|
1317
|
-
</xsl:otherwise>
|
1318
|
-
</xsl:choose>
|
1319
|
-
</xsl:variable> -->
|
1320
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1321
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
<xsl:variable name="colwidths">
|
1326
|
-
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1327
|
-
<xsl:call-template name="calculate-column-widths">
|
1328
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1329
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
1330
|
-
</xsl:call-template>
|
1331
|
-
</xsl:if>
|
1332
|
-
</xsl:variable>
|
1333
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1334
|
-
|
1335
|
-
<!-- <xsl:variable name="colwidths2">
|
1336
|
-
<xsl:call-template name="calculate-column-widths">
|
1337
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1338
|
-
</xsl:call-template>
|
1339
|
-
</xsl:variable> -->
|
1340
|
-
|
1341
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1342
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1343
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1344
|
-
|
1345
|
-
<xsl:variable name="margin-left">
|
1346
|
-
<xsl:choose>
|
1347
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1348
|
-
<xsl:otherwise>0</xsl:otherwise>
|
1349
|
-
</xsl:choose>
|
1350
|
-
</xsl:variable>
|
1351
|
-
|
1352
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1353
1291
|
|
1354
1292
|
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
1293
|
|
1294
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1295
|
+
<fo:block> </fo:block>
|
1296
|
+
</xsl:if> -->
|
1359
1297
|
|
1360
|
-
|
1298
|
+
<!-- $namespace = 'iso' or -->
|
1361
1299
|
|
1300
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1362
1301
|
|
1302
|
+
|
1363
1303
|
|
1304
|
+
<xsl:call-template name="fn_name_display"/>
|
1364
1305
|
|
1365
|
-
|
1366
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1367
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1306
|
+
|
1368
1307
|
|
1308
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1369
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"/> -->
|
1370
1326
|
|
1371
1327
|
|
1372
|
-
|
1373
|
-
|
1374
|
-
<
|
1375
|
-
|
1376
|
-
|
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) > 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">
|
1377
1357
|
|
1378
1358
|
|
1359
|
+
|
1360
|
+
|
1361
|
+
|
1379
1362
|
|
1380
1363
|
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1364
|
+
|
1384
1365
|
|
1385
1366
|
|
1386
|
-
<attribute name="border-top">2pt solid black</attribute>
|
1387
|
-
<attribute name="border-bottom">2pt solid black</attribute>
|
1388
|
-
|
1389
1367
|
|
1390
|
-
</xsl:variable>
|
1391
|
-
|
1392
|
-
|
1393
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1394
1368
|
|
1395
|
-
|
1396
|
-
<xsl:attribute name="
|
1397
|
-
|
1398
|
-
</xsl:attribute>
|
1399
|
-
</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>
|
1400
1372
|
|
1401
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1402
|
-
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1403
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1404
|
-
</xsl:if>
|
1405
1373
|
|
1406
|
-
<xsl:choose>
|
1407
|
-
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1408
|
-
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1409
|
-
<fo:table-column column-width="{@width}"/>
|
1410
|
-
</xsl:for-each>
|
1411
|
-
</xsl:when>
|
1412
|
-
<xsl:otherwise>
|
1413
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1414
|
-
<xsl:choose>
|
1415
|
-
<xsl:when test=". = 1 or . = 0">
|
1416
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1417
|
-
</xsl:when>
|
1418
|
-
<xsl:otherwise>
|
1419
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1420
|
-
</xsl:otherwise>
|
1421
|
-
</xsl:choose>
|
1422
|
-
</xsl:for-each>
|
1423
|
-
</xsl:otherwise>
|
1424
|
-
</xsl:choose>
|
1425
1374
|
|
1426
|
-
<xsl:
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
</xsl:otherwise>
|
1433
|
-
</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>
|
1434
1381
|
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
<
|
1451
|
-
|
1452
|
-
|
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>
|
1453
1401
|
|
1454
|
-
|
1402
|
+
|
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
|
+
|
1455
1416
|
<xsl:choose>
|
1456
|
-
<xsl:when test="
|
1457
|
-
<
|
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>
|
1458
1421
|
</xsl:when>
|
1459
1422
|
<xsl:otherwise>
|
1460
|
-
<
|
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>
|
1461
1433
|
</xsl:otherwise>
|
1462
1434
|
</xsl:choose>
|
1435
|
+
|
1436
|
+
<xsl:choose>
|
1437
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1438
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1439
|
+
</xsl:when>
|
1440
|
+
<xsl:otherwise>
|
1441
|
+
<xsl:apply-templates/>
|
1442
|
+
</xsl:otherwise>
|
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>
|
1463
1454
|
</xsl:for-each>
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
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
|
+
|
1471
1512
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1472
1513
|
<xsl:if test="normalize-space() != ''">
|
1473
1514
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -2147,7 +2188,9 @@
|
|
2147
2188
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2148
2189
|
<fo:block-container>
|
2149
2190
|
|
2150
|
-
<xsl:
|
2191
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2192
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2193
|
+
</xsl:if>
|
2151
2194
|
|
2152
2195
|
|
2153
2196
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -2162,6 +2205,7 @@
|
|
2162
2205
|
<fo:block-container>
|
2163
2206
|
|
2164
2207
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2208
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2165
2209
|
|
2166
2210
|
|
2167
2211
|
<xsl:variable name="parent" select="local-name(..)"/>
|
@@ -2278,7 +2322,7 @@
|
|
2278
2322
|
<xsl:with-param name="table" select="$html-table"/>
|
2279
2323
|
</xsl:call-template>
|
2280
2324
|
</xsl:variable>
|
2281
|
-
<!-- colwidths=<xsl:
|
2325
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2282
2326
|
<xsl:variable name="maxlength_dt">
|
2283
2327
|
<xsl:call-template name="getMaxLength_dt"/>
|
2284
2328
|
</xsl:variable>
|
@@ -2307,13 +2351,22 @@
|
|
2307
2351
|
</xsl:when>
|
2308
2352
|
<xsl:otherwise>
|
2309
2353
|
<xsl:choose>
|
2354
|
+
<!-- to set width check most wide chars like `W` -->
|
2310
2355
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2311
|
-
<fo:table-column column-width="
|
2312
|
-
<fo:table-column column-width="
|
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) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
2360
|
+
<fo:table-column column-width="15%"/>
|
2361
|
+
<fo:table-column column-width="85%"/>
|
2362
|
+
</xsl:when>
|
2363
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2364
|
+
<fo:table-column column-width="20%"/>
|
2365
|
+
<fo:table-column column-width="80%"/>
|
2313
2366
|
</xsl:when>
|
2314
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
2315
|
-
<fo:table-column column-width="
|
2316
|
-
<fo:table-column column-width="
|
2367
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2368
|
+
<fo:table-column column-width="25%"/>
|
2369
|
+
<fo:table-column column-width="75%"/>
|
2317
2370
|
</xsl:when>
|
2318
2371
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2319
2372
|
<fo:table-column column-width="60%"/>
|
@@ -2345,12 +2398,32 @@
|
|
2345
2398
|
</xsl:otherwise>
|
2346
2399
|
</xsl:choose>
|
2347
2400
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
2348
|
-
<xsl:
|
2349
|
-
<xsl:
|
2350
|
-
|
2351
|
-
<xsl:
|
2352
|
-
|
2353
|
-
|
2401
|
+
<xsl:variable name="lengths">
|
2402
|
+
<xsl:for-each select="*[local-name()='dt']">
|
2403
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
2404
|
+
<xsl:variable name="attributes">
|
2405
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
2406
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
2407
|
+
</xsl:variable>
|
2408
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
2409
|
+
</xsl:for-each>
|
2410
|
+
</xsl:variable>
|
2411
|
+
<xsl:variable name="maxLength">
|
2412
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
2413
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
2414
|
+
<xsl:if test="position() = 1">
|
2415
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2416
|
+
</xsl:if>
|
2417
|
+
</xsl:for-each> -->
|
2418
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
2419
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2420
|
+
<xsl:if test="position() = 1">
|
2421
|
+
<xsl:value-of select="."/>
|
2422
|
+
</xsl:if>
|
2423
|
+
</xsl:for-each>
|
2424
|
+
</xsl:variable>
|
2425
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
2426
|
+
<xsl:value-of select="$maxLength"/>
|
2354
2427
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
2355
2428
|
<xsl:param name="key_iso"/>
|
2356
2429
|
|
@@ -2489,6 +2562,7 @@
|
|
2489
2562
|
|
2490
2563
|
|
2491
2564
|
|
2565
|
+
|
2492
2566
|
|
2493
2567
|
</xsl:variable>
|
2494
2568
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2502,6 +2576,10 @@
|
|
2502
2576
|
</xsl:if>
|
2503
2577
|
<xsl:apply-templates/>
|
2504
2578
|
</fo:inline>
|
2579
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
2580
|
+
<fo:inline text-decoration="underline">
|
2581
|
+
<xsl:apply-templates/>
|
2582
|
+
</fo:inline>
|
2505
2583
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2506
2584
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2507
2585
|
<xsl:apply-templates/>
|
@@ -2595,6 +2673,10 @@
|
|
2595
2673
|
<xsl:param name="text" select="."/>
|
2596
2674
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2597
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')"/>
|
2598
2680
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2599
2681
|
<xsl:param name="text" select="."/>
|
2600
2682
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -2855,6 +2937,11 @@
|
|
2855
2937
|
<!-- replace start and end spaces to non-break space -->
|
2856
2938
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2857
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"/>
|
2858
2945
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2859
2946
|
<xsl:variable name="target">
|
2860
2947
|
<xsl:choose>
|
@@ -2876,7 +2963,10 @@
|
|
2876
2963
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2877
2964
|
<xsl:choose>
|
2878
2965
|
<xsl:when test="normalize-space(.) = ''">
|
2879
|
-
<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>
|
2880
2970
|
</xsl:when>
|
2881
2971
|
<xsl:otherwise>
|
2882
2972
|
<xsl:apply-templates/>
|
@@ -3078,7 +3168,7 @@
|
|
3078
3168
|
</xsl:if> -->
|
3079
3169
|
</fo:inline>
|
3080
3170
|
</xsl:if>
|
3081
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3171
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3082
3172
|
<fo:block-container id="{@id}">
|
3083
3173
|
|
3084
3174
|
<fo:block>
|
@@ -3147,6 +3237,8 @@
|
|
3147
3237
|
<xsl:variable name="bookmark-title_">
|
3148
3238
|
<xsl:call-template name="getLangVersion">
|
3149
3239
|
<xsl:with-param name="lang" select="@lang"/>
|
3240
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
3241
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3150
3242
|
</xsl:call-template>
|
3151
3243
|
</xsl:variable>
|
3152
3244
|
<xsl:choose>
|
@@ -3164,13 +3256,34 @@
|
|
3164
3256
|
</xsl:choose>
|
3165
3257
|
</fo:bookmark-title>
|
3166
3258
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3259
|
+
|
3260
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3261
|
+
<xsl:with-param name="contents" select="contents"/>
|
3262
|
+
</xsl:call-template>
|
3263
|
+
|
3264
|
+
<xsl:call-template name="insertTableBookmarks">
|
3265
|
+
<xsl:with-param name="contents" select="contents"/>
|
3266
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3267
|
+
</xsl:call-template>
|
3268
|
+
|
3167
3269
|
</fo:bookmark>
|
3168
3270
|
|
3169
3271
|
</xsl:for-each>
|
3170
3272
|
</xsl:when>
|
3171
3273
|
<xsl:otherwise>
|
3172
3274
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3275
|
+
|
3173
3276
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3277
|
+
|
3278
|
+
<xsl:call-template name="insertFigureBookmarks">
|
3279
|
+
<xsl:with-param name="contents" select="contents"/>
|
3280
|
+
</xsl:call-template>
|
3281
|
+
|
3282
|
+
<xsl:call-template name="insertTableBookmarks">
|
3283
|
+
<xsl:with-param name="contents" select="contents"/>
|
3284
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3285
|
+
</xsl:call-template>
|
3286
|
+
|
3174
3287
|
</xsl:for-each>
|
3175
3288
|
</xsl:otherwise>
|
3176
3289
|
</xsl:choose>
|
@@ -3189,8 +3302,44 @@
|
|
3189
3302
|
|
3190
3303
|
</fo:bookmark-tree>
|
3191
3304
|
</xsl:if>
|
3305
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
3306
|
+
<xsl:param name="contents"/>
|
3307
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
3308
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
3309
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
3310
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
3311
|
+
<fo:bookmark internal-destination="{@id}">
|
3312
|
+
<fo:bookmark-title>
|
3313
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3314
|
+
</fo:bookmark-title>
|
3315
|
+
</fo:bookmark>
|
3316
|
+
</xsl:for-each>
|
3317
|
+
</fo:bookmark>
|
3318
|
+
</xsl:if>
|
3319
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
3320
|
+
<xsl:param name="contents"/>
|
3321
|
+
<xsl:param name="lang"/>
|
3322
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
3323
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
3324
|
+
<fo:bookmark-title>
|
3325
|
+
<xsl:choose>
|
3326
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
3327
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
3328
|
+
</xsl:choose>
|
3329
|
+
</fo:bookmark-title>
|
3330
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
3331
|
+
<fo:bookmark internal-destination="{@id}">
|
3332
|
+
<fo:bookmark-title>
|
3333
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3334
|
+
</fo:bookmark-title>
|
3335
|
+
</fo:bookmark>
|
3336
|
+
</xsl:for-each>
|
3337
|
+
</fo:bookmark>
|
3338
|
+
</xsl:if>
|
3192
3339
|
</xsl:template><xsl:template name="getLangVersion">
|
3193
3340
|
<xsl:param name="lang"/>
|
3341
|
+
<xsl:param name="doctype" select="''"/>
|
3342
|
+
<xsl:param name="title" select="''"/>
|
3194
3343
|
<xsl:choose>
|
3195
3344
|
<xsl:when test="$lang = 'en'">
|
3196
3345
|
|
@@ -3226,6 +3375,12 @@
|
|
3226
3375
|
<!-- <xsl:text> </xsl:text> -->
|
3227
3376
|
</xsl:template><xsl:template name="getSection">
|
3228
3377
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3378
|
+
<!--
|
3379
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
3380
|
+
<xsl:value-of select="."/>
|
3381
|
+
</xsl:for-each>
|
3382
|
+
-->
|
3383
|
+
|
3229
3384
|
</xsl:template><xsl:template name="getName">
|
3230
3385
|
<xsl:choose>
|
3231
3386
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -3278,6 +3433,12 @@
|
|
3278
3433
|
<xsl:copy>
|
3279
3434
|
<xsl:apply-templates mode="contents_item"/>
|
3280
3435
|
</xsl:copy>
|
3436
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
3437
|
+
<xsl:copy>
|
3438
|
+
<xsl:apply-templates mode="contents_item"/>
|
3439
|
+
</xsl:copy>
|
3440
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3441
|
+
<xsl:copy-of select="."/>
|
3281
3442
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3282
3443
|
<xsl:text> </xsl:text>
|
3283
3444
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3303,6 +3464,7 @@
|
|
3303
3464
|
|
3304
3465
|
|
3305
3466
|
|
3467
|
+
|
3306
3468
|
|
3307
3469
|
|
3308
3470
|
|
@@ -3679,10 +3841,13 @@
|
|
3679
3841
|
</xsl:if>
|
3680
3842
|
</xsl:if>
|
3681
3843
|
|
3844
|
+
|
3682
3845
|
<fo:block-container margin-left="0mm">
|
3683
3846
|
|
3684
3847
|
<fo:block xsl:use-attribute-sets="quote-style">
|
3685
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3848
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
3849
|
+
|
3850
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
3686
3851
|
</fo:block>
|
3687
3852
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3688
3853
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -3831,6 +3996,7 @@
|
|
3831
3996
|
|
3832
3997
|
|
3833
3998
|
|
3999
|
+
|
3834
4000
|
|
3835
4001
|
|
3836
4002
|
|
@@ -3842,7 +4008,7 @@
|
|
3842
4008
|
|
3843
4009
|
|
3844
4010
|
|
3845
|
-
</xsl:template><xsl:template match="
|
4011
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
3846
4012
|
<fo:block break-after="page"/>
|
3847
4013
|
<fo:block>
|
3848
4014
|
<xsl:call-template name="setId"/>
|
@@ -3850,7 +4016,8 @@
|
|
3850
4016
|
</fo:block>
|
3851
4017
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3852
4018
|
<fo:block>
|
3853
|
-
<xsl:call-template name="setId"/>
|
4019
|
+
<xsl:call-template name="setId"/>
|
4020
|
+
|
3854
4021
|
|
3855
4022
|
<xsl:apply-templates/>
|
3856
4023
|
</fo:block>
|
@@ -3996,6 +4163,8 @@
|
|
3996
4163
|
<xsl:value-of select="translate(.,'. ','')"/>
|
3997
4164
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
3998
4165
|
<xsl:value-of select="substring(.,1,1)"/>
|
4166
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4167
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3999
4168
|
</xsl:template><xsl:template name="convertDate">
|
4000
4169
|
<xsl:param name="date"/>
|
4001
4170
|
<xsl:param name="format" select="'short'"/>
|
@@ -4020,6 +4189,57 @@
|
|
4020
4189
|
</xsl:variable>
|
4021
4190
|
<xsl:variable name="result">
|
4022
4191
|
<xsl:choose>
|
4192
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4193
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4194
|
+
<xsl:text> </xsl:text>
|
4195
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4196
|
+
</xsl:when>
|
4197
|
+
<xsl:when test="$format = 'ddMM'">
|
4198
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4199
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4200
|
+
</xsl:when>
|
4201
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
4202
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4203
|
+
</xsl:when>
|
4204
|
+
<xsl:otherwise>
|
4205
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
4206
|
+
</xsl:otherwise>
|
4207
|
+
</xsl:choose>
|
4208
|
+
</xsl:variable>
|
4209
|
+
<xsl:value-of select="$result"/>
|
4210
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
4211
|
+
<xsl:param name="date"/>
|
4212
|
+
<xsl:param name="format" select="'short'"/>
|
4213
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
4214
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
4215
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
4216
|
+
<xsl:variable name="monthStr">
|
4217
|
+
<xsl:choose>
|
4218
|
+
<xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
|
4219
|
+
<xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
|
4220
|
+
<xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
|
4221
|
+
<xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
|
4222
|
+
<xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
|
4223
|
+
<xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
|
4224
|
+
<xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
|
4225
|
+
<xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
|
4226
|
+
<xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
|
4227
|
+
<xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
|
4228
|
+
<xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
|
4229
|
+
<xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
|
4230
|
+
</xsl:choose>
|
4231
|
+
</xsl:variable>
|
4232
|
+
<xsl:variable name="result">
|
4233
|
+
<xsl:choose>
|
4234
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
4235
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4236
|
+
<xsl:text> </xsl:text>
|
4237
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
4238
|
+
</xsl:when>
|
4239
|
+
<xsl:when test="$format = 'ddMM'">
|
4240
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
4241
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
4242
|
+
</xsl:when>
|
4023
4243
|
<xsl:when test="$format = 'short' or $day = ''">
|
4024
4244
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4025
4245
|
</xsl:when>
|
@@ -4035,7 +4255,7 @@
|
|
4035
4255
|
<xsl:param name="charDelim" select="', '"/>
|
4036
4256
|
<xsl:choose>
|
4037
4257
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4038
|
-
<xsl:for-each select="
|
4258
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4039
4259
|
<xsl:sort data-type="text" order="ascending"/>
|
4040
4260
|
<xsl:call-template name="insertKeyword">
|
4041
4261
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4044,7 +4264,7 @@
|
|
4044
4264
|
</xsl:for-each>
|
4045
4265
|
</xsl:when>
|
4046
4266
|
<xsl:otherwise>
|
4047
|
-
<xsl:for-each select="
|
4267
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4048
4268
|
<xsl:call-template name="insertKeyword">
|
4049
4269
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4050
4270
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4061,6 +4281,9 @@
|
|
4061
4281
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4062
4282
|
</xsl:choose>
|
4063
4283
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4284
|
+
<xsl:variable name="lang">
|
4285
|
+
<xsl:call-template name="getLang"/>
|
4286
|
+
</xsl:variable>
|
4064
4287
|
<fo:declarations>
|
4065
4288
|
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4066
4289
|
<pdf:dictionary type="normal" key="ViewerPreferences">
|
@@ -4073,13 +4296,16 @@
|
|
4073
4296
|
<!-- Dublin Core properties go here -->
|
4074
4297
|
<dc:title>
|
4075
4298
|
<xsl:variable name="title">
|
4076
|
-
|
4077
|
-
|
4078
|
-
|
4079
|
-
|
4080
|
-
|
4081
|
-
|
4082
|
-
|
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>
|
4083
4309
|
</xsl:variable>
|
4084
4310
|
<xsl:choose>
|
4085
4311
|
<xsl:when test="normalize-space($title) != ''">
|
@@ -4091,15 +4317,14 @@
|
|
4091
4317
|
</xsl:choose>
|
4092
4318
|
</dc:title>
|
4093
4319
|
<dc:creator>
|
4094
|
-
|
4095
|
-
|
4096
|
-
|
4097
|
-
</dc:creator>
|
4098
|
-
<dc:description>
|
4099
|
-
<xsl:variable name="abstract">
|
4320
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4100
4321
|
|
4101
4322
|
|
4102
4323
|
|
4324
|
+
</xsl:for-each>
|
4325
|
+
</dc:creator>
|
4326
|
+
<dc:description>
|
4327
|
+
<xsl:variable name="abstract">
|
4103
4328
|
|
4104
4329
|
|
4105
4330
|
</xsl:variable>
|
@@ -4212,6 +4437,7 @@
|
|
4212
4437
|
<xsl:value-of select="document('')//*/namespace::mpfd"/>
|
4213
4438
|
|
4214
4439
|
|
4440
|
+
|
4215
4441
|
</xsl:variable>
|
4216
4442
|
<xsl:if test="$documentNS != $XSLNS">
|
4217
4443
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4271,6 +4497,11 @@
|
|
4271
4497
|
<xsl:call-template name="getLang"/>
|
4272
4498
|
</xsl:variable>
|
4273
4499
|
|
4274
|
-
<xsl:
|
4500
|
+
<xsl:choose>
|
4501
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4502
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4503
|
+
</xsl:when>
|
4504
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4505
|
+
</xsl:choose>
|
4275
4506
|
|
4276
4507
|
</xsl:template></xsl:stylesheet>
|