metanorma-mpfa 0.5.12 → 0.6.0
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 +9 -32
- data/.gitignore +2 -0
- data/.rubocop.yml +6 -2
- data/lib/asciidoctor/mpfa/biblio.rng +4 -6
- data/lib/asciidoctor/mpfa/isodoc.rng +235 -3
- data/lib/asciidoctor/mpfa/mpfd.rng +6 -0
- data/lib/isodoc/mpfa/html/htmlstyle.css +7 -0
- data/lib/isodoc/mpfa/html_convert.rb +0 -1
- data/lib/isodoc/mpfa/{mpfd.circular.xsl → mpfa.circular.xsl} +536 -266
- data/lib/isodoc/mpfa/{mpfd.compliance-standards-for-mpf-trustees.xsl → mpfa.compliance-standards-for-mpf-trustees.xsl} +536 -266
- data/lib/isodoc/mpfa/{mpfd.guidelines.xsl → mpfa.guidelines.xsl} +536 -266
- data/lib/isodoc/mpfa/{mpfd.standards.xsl → mpfa.standards.xsl} +536 -266
- data/lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl +4713 -0
- data/lib/isodoc/mpfa/pdf_convert.rb +1 -1
- data/lib/isodoc/mpfa/word_convert.rb +0 -1
- data/lib/metanorma/mpfa/version.rb +1 -1
- data/metanorma-mpfd.gemspec +6 -6
- metadata +32 -32
- data/lib/isodoc/mpfa/mpfd.supervision-of-mpf-intermediaries.xsl +0 -4443
@@ -115,6 +115,13 @@ a.FootnoteRef + a.FootnoteRef:before {
|
|
115
115
|
content: ", ";
|
116
116
|
vertical-align: super; }
|
117
117
|
|
118
|
+
.addition {
|
119
|
+
color: blue; }
|
120
|
+
|
121
|
+
.deletion {
|
122
|
+
color: red;
|
123
|
+
text-decoration: line-through; }
|
124
|
+
|
118
125
|
#standard-band {
|
119
126
|
background-color: #0AC442; }
|
120
127
|
|
@@ -3,7 +3,9 @@
|
|
3
3
|
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
|
+
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
6
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
|
+
<xsl:param name="basepath"/>
|
7
9
|
|
8
10
|
<xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
|
9
11
|
|
@@ -94,7 +96,9 @@
|
|
94
96
|
|
95
97
|
</fo:layout-master-set>
|
96
98
|
|
97
|
-
<
|
99
|
+
<fo:declarations>
|
100
|
+
<xsl:call-template name="addPDFUAmeta"/>
|
101
|
+
</fo:declarations>
|
98
102
|
|
99
103
|
<xsl:call-template name="addBookmarks">
|
100
104
|
<xsl:with-param name="contents" select="$contents"/>
|
@@ -1039,6 +1043,7 @@
|
|
1039
1043
|
|
1040
1044
|
|
1041
1045
|
|
1046
|
+
|
1042
1047
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1043
1048
|
|
1044
1049
|
|
@@ -1230,12 +1235,18 @@
|
|
1230
1235
|
|
1231
1236
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1232
1237
|
|
1233
|
-
|
1238
|
+
|
1234
1239
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1235
1240
|
|
1236
1241
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1237
1242
|
|
1238
1243
|
|
1244
|
+
</xsl:attribute-set><xsl:attribute-set name="add-style">
|
1245
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1246
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1247
|
+
</xsl:attribute-set><xsl:attribute-set name="del-style">
|
1248
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1249
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1239
1250
|
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1240
1251
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1241
1252
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -1281,200 +1292,234 @@
|
|
1281
1292
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1282
1293
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1283
1294
|
|
1284
|
-
<xsl:variable name="
|
1285
|
-
<xsl:call-template name="getSimpleTable"/>
|
1286
|
-
</xsl:variable>
|
1295
|
+
<xsl:variable name="table">
|
1287
1296
|
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
<!-- <xsl:if test="$namespace = 'bipm'">
|
1293
|
-
<fo:block> </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"/>
|
1297
|
+
<xsl:variable name="simple-table">
|
1298
|
+
<xsl:call-template name="getSimpleTable"/>
|
1299
|
+
</xsl:variable>
|
1303
1300
|
|
1304
1301
|
|
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) > 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
1302
|
|
1356
1303
|
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
1304
|
|
1305
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1306
|
+
<fo:block> </fo:block>
|
1307
|
+
</xsl:if> -->
|
1361
1308
|
|
1362
|
-
|
1309
|
+
<!-- $namespace = 'iso' or -->
|
1363
1310
|
|
1311
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1364
1312
|
|
1313
|
+
|
1365
1314
|
|
1315
|
+
<xsl:call-template name="fn_name_display"/>
|
1366
1316
|
|
1367
|
-
|
1368
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1369
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1317
|
+
|
1370
1318
|
|
1319
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1371
1320
|
|
1321
|
+
<!-- <xsl:variable name="cols-count">
|
1322
|
+
<xsl:choose>
|
1323
|
+
<xsl:when test="*[local-name()='thead']">
|
1324
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1325
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1326
|
+
</xsl:call-template>
|
1327
|
+
</xsl:when>
|
1328
|
+
<xsl:otherwise>
|
1329
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1330
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1331
|
+
</xsl:call-template>
|
1332
|
+
</xsl:otherwise>
|
1333
|
+
</xsl:choose>
|
1334
|
+
</xsl:variable> -->
|
1335
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1336
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1372
1337
|
|
1373
1338
|
|
1374
|
-
|
1375
|
-
|
1376
|
-
<
|
1377
|
-
<xsl:
|
1378
|
-
<xsl:
|
1379
|
-
<xsl:
|
1380
|
-
</xsl:
|
1381
|
-
</
|
1382
|
-
|
1383
|
-
|
1339
|
+
|
1340
|
+
<xsl:variable name="colwidths">
|
1341
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1342
|
+
<xsl:call-template name="calculate-column-widths">
|
1343
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1344
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1345
|
+
</xsl:call-template>
|
1346
|
+
</xsl:if>
|
1347
|
+
</xsl:variable>
|
1348
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1349
|
+
|
1350
|
+
<!-- <xsl:variable name="colwidths2">
|
1351
|
+
<xsl:call-template name="calculate-column-widths">
|
1352
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1353
|
+
</xsl:call-template>
|
1354
|
+
</xsl:variable> -->
|
1355
|
+
|
1356
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1357
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1358
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1359
|
+
|
1360
|
+
<xsl:variable name="margin-left">
|
1361
|
+
<xsl:choose>
|
1362
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1363
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1364
|
+
</xsl:choose>
|
1365
|
+
</xsl:variable>
|
1366
|
+
|
1367
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1384
1368
|
|
1385
1369
|
|
1370
|
+
|
1371
|
+
|
1372
|
+
|
1386
1373
|
|
1387
1374
|
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1375
|
+
|
1391
1376
|
|
1392
1377
|
|
1393
|
-
<attribute name="border-top">2pt solid black</attribute>
|
1394
|
-
<attribute name="border-bottom">2pt solid black</attribute>
|
1395
|
-
|
1396
1378
|
|
1397
|
-
</xsl:variable>
|
1398
|
-
|
1399
|
-
|
1400
|
-
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1401
1379
|
|
1402
|
-
|
1403
|
-
<xsl:attribute name="
|
1404
|
-
|
1405
|
-
</xsl:attribute>
|
1406
|
-
</xsl:for-each>
|
1380
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1381
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1382
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1407
1383
|
|
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
1384
|
|
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
1385
|
|
1433
|
-
<xsl:
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
</xsl:otherwise>
|
1440
|
-
</xsl:choose>
|
1386
|
+
<xsl:variable name="table_width">
|
1387
|
+
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1388
|
+
100%
|
1389
|
+
|
1390
|
+
|
1391
|
+
</xsl:variable>
|
1441
1392
|
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
<
|
1458
|
-
|
1459
|
-
|
1393
|
+
<xsl:variable name="table_attributes">
|
1394
|
+
<attribute name="table-layout">fixed</attribute>
|
1395
|
+
<attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
|
1396
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1397
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1398
|
+
|
1399
|
+
|
1400
|
+
|
1401
|
+
|
1402
|
+
|
1403
|
+
|
1404
|
+
|
1405
|
+
|
1406
|
+
|
1407
|
+
<attribute name="border-top">2pt solid black</attribute>
|
1408
|
+
<attribute name="border-bottom">2pt solid black</attribute>
|
1409
|
+
|
1410
|
+
|
1411
|
+
</xsl:variable>
|
1460
1412
|
|
1461
|
-
|
1413
|
+
|
1414
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1415
|
+
|
1416
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1417
|
+
<xsl:attribute name="{@name}">
|
1418
|
+
<xsl:value-of select="."/>
|
1419
|
+
</xsl:attribute>
|
1420
|
+
</xsl:for-each>
|
1421
|
+
|
1422
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1423
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1424
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1425
|
+
</xsl:if>
|
1426
|
+
|
1427
|
+
<xsl:choose>
|
1428
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1429
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1430
|
+
<fo:table-column column-width="{@width}"/>
|
1431
|
+
</xsl:for-each>
|
1432
|
+
</xsl:when>
|
1433
|
+
<xsl:otherwise>
|
1434
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1435
|
+
<xsl:choose>
|
1436
|
+
<xsl:when test=". = 1 or . = 0">
|
1437
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1438
|
+
</xsl:when>
|
1439
|
+
<xsl:otherwise>
|
1440
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1441
|
+
</xsl:otherwise>
|
1442
|
+
</xsl:choose>
|
1443
|
+
</xsl:for-each>
|
1444
|
+
</xsl:otherwise>
|
1445
|
+
</xsl:choose>
|
1446
|
+
|
1462
1447
|
<xsl:choose>
|
1463
|
-
<xsl:when test="
|
1464
|
-
<
|
1448
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1449
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1465
1450
|
</xsl:when>
|
1466
1451
|
<xsl:otherwise>
|
1467
|
-
<
|
1452
|
+
<xsl:apply-templates/>
|
1468
1453
|
</xsl:otherwise>
|
1469
1454
|
</xsl:choose>
|
1455
|
+
|
1456
|
+
</fo:table>
|
1457
|
+
|
1458
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1459
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1460
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1461
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1462
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1463
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1464
|
+
</xsl:call-template>
|
1470
1465
|
</xsl:for-each>
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1466
|
+
|
1467
|
+
<!-- insert footer as table -->
|
1468
|
+
<!-- <fo:table>
|
1469
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1470
|
+
<xsl:attribute name="{@name}">
|
1471
|
+
<xsl:value-of select="."/>
|
1472
|
+
</xsl:attribute>
|
1473
|
+
</xsl:for-each>
|
1474
|
+
|
1475
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1476
|
+
<xsl:choose>
|
1477
|
+
<xsl:when test=". = 1 or . = 0">
|
1478
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1479
|
+
</xsl:when>
|
1480
|
+
<xsl:otherwise>
|
1481
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1482
|
+
</xsl:otherwise>
|
1483
|
+
</xsl:choose>
|
1484
|
+
</xsl:for-each>
|
1485
|
+
</fo:table>-->
|
1486
|
+
|
1487
|
+
|
1488
|
+
|
1489
|
+
|
1490
|
+
|
1491
|
+
</fo:block-container>
|
1492
|
+
</xsl:variable>
|
1493
|
+
|
1494
|
+
|
1495
|
+
|
1496
|
+
<xsl:choose>
|
1497
|
+
<xsl:when test="@width">
|
1498
|
+
|
1499
|
+
<!-- centered table when table name is centered (see table-name-style) -->
|
1500
|
+
|
1501
|
+
<fo:table table-layout="fixed" width="100%">
|
1502
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1503
|
+
<fo:table-column column-width="{@width}"/>
|
1504
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
1505
|
+
<fo:table-body>
|
1506
|
+
<fo:table-row>
|
1507
|
+
<fo:table-cell column-number="2">
|
1508
|
+
<fo:block><xsl:copy-of select="$table"/></fo:block>
|
1509
|
+
</fo:table-cell>
|
1510
|
+
</fo:table-row>
|
1511
|
+
</fo:table-body>
|
1512
|
+
</fo:table>
|
1513
|
+
|
1514
|
+
|
1515
|
+
|
1516
|
+
|
1517
|
+
</xsl:when>
|
1518
|
+
<xsl:otherwise>
|
1519
|
+
<xsl:copy-of select="$table"/>
|
1520
|
+
</xsl:otherwise>
|
1521
|
+
</xsl:choose>
|
1522
|
+
|
1478
1523
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1479
1524
|
<xsl:if test="normalize-space() != ''">
|
1480
1525
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -1602,7 +1647,15 @@
|
|
1602
1647
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1603
1648
|
<xsl:value-of select="@target"/>
|
1604
1649
|
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1605
|
-
<xsl:variable name="
|
1650
|
+
<xsl:variable name="mathml">
|
1651
|
+
<xsl:for-each select="*">
|
1652
|
+
<xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
|
1653
|
+
<xsl:copy-of select="."/>
|
1654
|
+
</xsl:if>
|
1655
|
+
</xsl:for-each>
|
1656
|
+
</xsl:variable>
|
1657
|
+
|
1658
|
+
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
1606
1659
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1607
1660
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1608
1661
|
<xsl:param name="cols-count"/>
|
@@ -2288,7 +2341,7 @@
|
|
2288
2341
|
<xsl:with-param name="table" select="$html-table"/>
|
2289
2342
|
</xsl:call-template>
|
2290
2343
|
</xsl:variable>
|
2291
|
-
<!-- colwidths=<xsl:
|
2344
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2292
2345
|
<xsl:variable name="maxlength_dt">
|
2293
2346
|
<xsl:call-template name="getMaxLength_dt"/>
|
2294
2347
|
</xsl:variable>
|
@@ -2317,13 +2370,22 @@
|
|
2317
2370
|
</xsl:when>
|
2318
2371
|
<xsl:otherwise>
|
2319
2372
|
<xsl:choose>
|
2373
|
+
<!-- to set width check most wide chars like `W` -->
|
2320
2374
|
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
2321
|
-
<fo:table-column column-width="
|
2322
|
-
<fo:table-column column-width="
|
2375
|
+
<fo:table-column column-width="7%"/>
|
2376
|
+
<fo:table-column column-width="93%"/>
|
2377
|
+
</xsl:when>
|
2378
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like ABC, etc -->
|
2379
|
+
<fo:table-column column-width="15%"/>
|
2380
|
+
<fo:table-column column-width="85%"/>
|
2381
|
+
</xsl:when>
|
2382
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 7"> <!-- if dt contains short text like ABCDEF, etc -->
|
2383
|
+
<fo:table-column column-width="20%"/>
|
2384
|
+
<fo:table-column column-width="80%"/>
|
2323
2385
|
</xsl:when>
|
2324
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <=
|
2325
|
-
<fo:table-column column-width="
|
2326
|
-
<fo:table-column column-width="
|
2386
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 10"> <!-- if dt contains short text like ABCDEFEF, etc -->
|
2387
|
+
<fo:table-column column-width="25%"/>
|
2388
|
+
<fo:table-column column-width="75%"/>
|
2327
2389
|
</xsl:when>
|
2328
2390
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2329
2391
|
<fo:table-column column-width="60%"/>
|
@@ -2537,8 +2599,16 @@
|
|
2537
2599
|
<fo:inline text-decoration="underline">
|
2538
2600
|
<xsl:apply-templates/>
|
2539
2601
|
</fo:inline>
|
2602
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
2603
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2604
|
+
<xsl:apply-templates/>
|
2605
|
+
</fo:inline>
|
2540
2606
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2541
|
-
<fo:inline
|
2607
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
2608
|
+
<xsl:apply-templates/>
|
2609
|
+
</fo:inline>
|
2610
|
+
</xsl:template><xsl:template match="*[local-name()='hi']">
|
2611
|
+
<fo:inline background-color="yellow">
|
2542
2612
|
<xsl:apply-templates/>
|
2543
2613
|
</fo:inline>
|
2544
2614
|
</xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
@@ -2630,6 +2700,10 @@
|
|
2630
2700
|
<xsl:param name="text" select="."/>
|
2631
2701
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2632
2702
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2703
|
+
</xsl:template><xsl:template name="add-zero-spaces-link-java">
|
2704
|
+
<xsl:param name="text" select="."/>
|
2705
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2706
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |,)','$1')"/>
|
2633
2707
|
</xsl:template><xsl:template name="add-zero-spaces">
|
2634
2708
|
<xsl:param name="text" select="."/>
|
2635
2709
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
@@ -2877,6 +2951,7 @@
|
|
2877
2951
|
<xsl:apply-templates select="." mode="mathml"/>
|
2878
2952
|
</xsl:variable>
|
2879
2953
|
<fo:instream-foreign-object fox:alt-text="Math">
|
2954
|
+
|
2880
2955
|
<!-- <xsl:copy-of select="."/> -->
|
2881
2956
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2882
2957
|
</fo:instream-foreign-object>
|
@@ -2890,7 +2965,12 @@
|
|
2890
2965
|
<!-- replace start and end spaces to non-break space -->
|
2891
2966
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2892
2967
|
</xsl:copy>
|
2893
|
-
</xsl:template><xsl:template match="
|
2968
|
+
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
2969
|
+
<xsl:copy>
|
2970
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2971
|
+
</xsl:copy>
|
2972
|
+
<mathml:mspace width="0.5ex"/>
|
2973
|
+
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2894
2974
|
<xsl:variable name="target">
|
2895
2975
|
<xsl:choose>
|
2896
2976
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -2911,7 +2991,10 @@
|
|
2911
2991
|
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2912
2992
|
<xsl:choose>
|
2913
2993
|
<xsl:when test="normalize-space(.) = ''">
|
2914
|
-
<xsl:value-of select="$target"/>
|
2994
|
+
<!-- <xsl:value-of select="$target"/> -->
|
2995
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
2996
|
+
<xsl:with-param name="text" select="$target"/>
|
2997
|
+
</xsl:call-template>
|
2915
2998
|
</xsl:when>
|
2916
2999
|
<xsl:otherwise>
|
2917
3000
|
<xsl:apply-templates/>
|
@@ -2921,8 +3004,6 @@
|
|
2921
3004
|
</xsl:otherwise>
|
2922
3005
|
</xsl:choose>
|
2923
3006
|
</fo:inline>
|
2924
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
2925
|
-
<fo:inline id="{@id}"/>
|
2926
3007
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
2927
3008
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
2928
3009
|
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
@@ -3129,27 +3210,43 @@
|
|
3129
3210
|
<fo:block id="{@id}">
|
3130
3211
|
<xsl:apply-templates/>
|
3131
3212
|
</fo:block>
|
3213
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3132
3214
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
3133
3215
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
3134
3216
|
<xsl:apply-templates/>
|
3135
3217
|
</fo:block>
|
3136
3218
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3137
|
-
<
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3141
|
-
|
3142
|
-
|
3143
|
-
|
3144
|
-
|
3145
|
-
|
3146
|
-
|
3147
|
-
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3219
|
+
<xsl:choose>
|
3220
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3221
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
3222
|
+
<xsl:variable name="src">
|
3223
|
+
<xsl:call-template name="image_src"/>
|
3224
|
+
</xsl:variable>
|
3225
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
3226
|
+
</fo:inline>
|
3227
|
+
</xsl:when>
|
3228
|
+
<xsl:otherwise>
|
3229
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
3230
|
+
|
3231
|
+
<xsl:variable name="src">
|
3232
|
+
<xsl:call-template name="image_src"/>
|
3233
|
+
</xsl:variable>
|
3234
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3235
|
+
</fo:block>
|
3236
|
+
</xsl:otherwise>
|
3237
|
+
</xsl:choose>
|
3238
|
+
</xsl:template><xsl:template name="image_src">
|
3239
|
+
<xsl:choose>
|
3240
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3241
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3242
|
+
</xsl:when>
|
3243
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3244
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3245
|
+
</xsl:when>
|
3246
|
+
<xsl:otherwise>
|
3247
|
+
<xsl:value-of select="@src"/>
|
3248
|
+
</xsl:otherwise>
|
3249
|
+
</xsl:choose>
|
3153
3250
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3154
3251
|
<xsl:apply-templates mode="contents"/>
|
3155
3252
|
<xsl:text> </xsl:text>
|
@@ -3382,6 +3479,8 @@
|
|
3382
3479
|
<xsl:copy>
|
3383
3480
|
<xsl:apply-templates mode="contents_item"/>
|
3384
3481
|
</xsl:copy>
|
3482
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
3483
|
+
<xsl:copy-of select="."/>
|
3385
3484
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3386
3485
|
<xsl:text> </xsl:text>
|
3387
3486
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -3710,10 +3809,11 @@
|
|
3710
3809
|
</xsl:choose>
|
3711
3810
|
|
3712
3811
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3713
|
-
|
3812
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
3714
3813
|
<xsl:variable name="element">
|
3715
3814
|
block
|
3716
3815
|
|
3816
|
+
|
3717
3817
|
</xsl:variable>
|
3718
3818
|
<xsl:choose>
|
3719
3819
|
<xsl:when test="normalize-space($element) = 'block'">
|
@@ -3784,11 +3884,13 @@
|
|
3784
3884
|
</xsl:if>
|
3785
3885
|
</xsl:if>
|
3786
3886
|
|
3887
|
+
|
3787
3888
|
<fo:block-container margin-left="0mm">
|
3788
3889
|
|
3789
3890
|
<fo:block xsl:use-attribute-sets="quote-style">
|
3790
3891
|
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
3791
|
-
|
3892
|
+
|
3893
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
3792
3894
|
</fo:block>
|
3793
3895
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3794
3896
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -3811,32 +3913,50 @@
|
|
3811
3913
|
<xsl:text>— </xsl:text>
|
3812
3914
|
<xsl:apply-templates/>
|
3813
3915
|
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
3814
|
-
|
3815
|
-
|
3816
|
-
|
3817
|
-
|
3818
|
-
|
3819
|
-
|
3820
|
-
|
3821
|
-
|
3822
|
-
|
3823
|
-
|
3824
|
-
|
3825
|
-
|
3826
|
-
|
3827
|
-
|
3828
|
-
|
3829
|
-
|
3830
|
-
|
3831
|
-
|
3832
|
-
|
3833
|
-
|
3834
|
-
|
3835
|
-
|
3836
|
-
|
3837
|
-
|
3838
|
-
|
3839
|
-
|
3916
|
+
|
3917
|
+
<xsl:variable name="bibitemid">
|
3918
|
+
<xsl:choose>
|
3919
|
+
<xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"/>
|
3920
|
+
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
3921
|
+
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
3922
|
+
</xsl:choose>
|
3923
|
+
</xsl:variable>
|
3924
|
+
|
3925
|
+
<xsl:choose>
|
3926
|
+
<xsl:when test="normalize-space($bibitemid) != ''">
|
3927
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
3928
|
+
<xsl:if test="@type = 'footnote'">
|
3929
|
+
|
3930
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
3931
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3932
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
3933
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3934
|
+
|
3935
|
+
|
3936
|
+
</xsl:if>
|
3937
|
+
|
3938
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3939
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
3940
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
3941
|
+
</xsl:if>
|
3942
|
+
<xsl:if test="@type = 'inline'">
|
3943
|
+
|
3944
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
3945
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3946
|
+
|
3947
|
+
|
3948
|
+
|
3949
|
+
</xsl:if>
|
3950
|
+
|
3951
|
+
<xsl:apply-templates/>
|
3952
|
+
</fo:basic-link>
|
3953
|
+
|
3954
|
+
</fo:inline>
|
3955
|
+
</xsl:when>
|
3956
|
+
<xsl:otherwise>
|
3957
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3958
|
+
</xsl:otherwise>
|
3959
|
+
</xsl:choose>
|
3840
3960
|
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
3841
3961
|
<!-- zero-space char -->
|
3842
3962
|
<xsl:variable name="depth">
|
@@ -4009,6 +4129,153 @@
|
|
4009
4129
|
</fo:block>
|
4010
4130
|
</xsl:otherwise>
|
4011
4131
|
</xsl:choose>
|
4132
|
+
</xsl:template><xsl:variable name="index" select="document($external_index)"/><xsl:variable name="dash" select="'–'"/><xsl:variable name="bookmark_in_fn">
|
4133
|
+
<xsl:for-each select="//*[local-name() = 'bookmark'][ancestor::*[local-name() = 'fn']]">
|
4134
|
+
<bookmark><xsl:value-of select="@id"/></bookmark>
|
4135
|
+
</xsl:for-each>
|
4136
|
+
</xsl:variable><xsl:template match="@*|node()" mode="index_add_id">
|
4137
|
+
<xsl:copy>
|
4138
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id"/>
|
4139
|
+
</xsl:copy>
|
4140
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
4141
|
+
<xsl:variable name="id">
|
4142
|
+
<xsl:call-template name="generateIndexXrefId"/>
|
4143
|
+
</xsl:variable>
|
4144
|
+
<xsl:copy> <!-- add id to xref -->
|
4145
|
+
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
4146
|
+
<xsl:attribute name="id">
|
4147
|
+
<xsl:value-of select="$id"/>
|
4148
|
+
</xsl:attribute>
|
4149
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4150
|
+
</xsl:copy>
|
4151
|
+
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
4152
|
+
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
4153
|
+
<xsl:if test="@to">
|
4154
|
+
<xsl:value-of select="$dash"/>
|
4155
|
+
<xsl:copy>
|
4156
|
+
<xsl:copy-of select="@*"/>
|
4157
|
+
<xsl:attribute name="target"><xsl:value-of select="@to"/></xsl:attribute>
|
4158
|
+
<xsl:attribute name="id">
|
4159
|
+
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
4160
|
+
</xsl:attribute>
|
4161
|
+
<xsl:apply-templates mode="index_add_id"/>
|
4162
|
+
</xsl:copy>
|
4163
|
+
</xsl:if>
|
4164
|
+
</xsl:template><xsl:template match="@*|node()" mode="index_update">
|
4165
|
+
<xsl:copy>
|
4166
|
+
<xsl:apply-templates select="@*|node()" mode="index_update"/>
|
4167
|
+
</xsl:copy>
|
4168
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" mode="index_update">
|
4169
|
+
<xsl:copy>
|
4170
|
+
<xsl:apply-templates select="@*" mode="index_update"/>
|
4171
|
+
<xsl:apply-templates select="node()[1]" mode="process_li_element"/>
|
4172
|
+
</xsl:copy>
|
4173
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']/node()" mode="process_li_element" priority="2">
|
4174
|
+
<xsl:param name="element"/>
|
4175
|
+
<xsl:param name="remove" select="'false'"/>
|
4176
|
+
<xsl:param name="target"/>
|
4177
|
+
<!-- <node></node> -->
|
4178
|
+
<xsl:choose>
|
4179
|
+
<xsl:when test="self::text() and (normalize-space(.) = ',' or normalize-space(.) = $dash) and $remove = 'true'">
|
4180
|
+
<!-- skip text (i.e. remove it) and process next element -->
|
4181
|
+
<!-- [removed_<xsl:value-of select="."/>] -->
|
4182
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4183
|
+
<xsl:with-param name="target"><xsl:value-of select="$target"/></xsl:with-param>
|
4184
|
+
</xsl:apply-templates>
|
4185
|
+
</xsl:when>
|
4186
|
+
<xsl:when test="self::text()">
|
4187
|
+
<xsl:value-of select="."/>
|
4188
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4189
|
+
</xsl:when>
|
4190
|
+
<xsl:when test="self::* and local-name(.) = 'xref'">
|
4191
|
+
<xsl:variable name="id" select="@id"/>
|
4192
|
+
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
4193
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4194
|
+
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
4195
|
+
|
4196
|
+
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
4197
|
+
<xsl:variable name="page_prev" select="$index//item[@id = $id_prev]"/>
|
4198
|
+
|
4199
|
+
<xsl:choose>
|
4200
|
+
<!-- 2nd pass -->
|
4201
|
+
<!-- if page is equal to page for next and page is not the end of range -->
|
4202
|
+
<xsl:when test="$page != '' and $page_next != '' and $page = $page_next and not(contains($page, '_to'))"> <!-- case: 12, 12-14 -->
|
4203
|
+
<!-- skip element (i.e. remove it) and remove next text ',' -->
|
4204
|
+
<!-- [removed_xref] -->
|
4205
|
+
|
4206
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4207
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4208
|
+
<xsl:with-param name="target">
|
4209
|
+
<xsl:choose>
|
4210
|
+
<xsl:when test="$target != ''"><xsl:value-of select="$target"/></xsl:when>
|
4211
|
+
<xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise>
|
4212
|
+
</xsl:choose>
|
4213
|
+
</xsl:with-param>
|
4214
|
+
</xsl:apply-templates>
|
4215
|
+
</xsl:when>
|
4216
|
+
|
4217
|
+
<xsl:when test="$page != '' and $page_prev != '' and $page = $page_prev and contains($page_prev, '_to')"> <!-- case: 12-14, 14, ... -->
|
4218
|
+
<!-- remove xref -->
|
4219
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element">
|
4220
|
+
<xsl:with-param name="remove">true</xsl:with-param>
|
4221
|
+
</xsl:apply-templates>
|
4222
|
+
</xsl:when>
|
4223
|
+
|
4224
|
+
<xsl:otherwise>
|
4225
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4226
|
+
<xsl:with-param name="target" select="$target"/>
|
4227
|
+
</xsl:apply-templates>
|
4228
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4229
|
+
</xsl:otherwise>
|
4230
|
+
</xsl:choose>
|
4231
|
+
</xsl:when>
|
4232
|
+
<xsl:when test="self::* and local-name(.) = 'ul'">
|
4233
|
+
<!-- ul -->
|
4234
|
+
<xsl:apply-templates select="." mode="index_update"/>
|
4235
|
+
</xsl:when>
|
4236
|
+
<xsl:otherwise>
|
4237
|
+
<xsl:apply-templates select="." mode="xref_copy">
|
4238
|
+
<xsl:with-param name="target" select="$target"/>
|
4239
|
+
</xsl:apply-templates>
|
4240
|
+
<xsl:apply-templates select="following-sibling::node()[1]" mode="process_li_element"/>
|
4241
|
+
</xsl:otherwise>
|
4242
|
+
</xsl:choose>
|
4243
|
+
</xsl:template><xsl:template match="@*|node()" mode="xref_copy">
|
4244
|
+
<xsl:param name="target"/>
|
4245
|
+
<xsl:copy>
|
4246
|
+
<xsl:apply-templates select="@*" mode="xref_copy"/>
|
4247
|
+
<xsl:if test="$target != '' and not(xalan:nodeset($bookmark_in_fn)//bookmark[. = $target])">
|
4248
|
+
<xsl:attribute name="target"><xsl:value-of select="$target"/></xsl:attribute>
|
4249
|
+
</xsl:if>
|
4250
|
+
<xsl:apply-templates select="node()" mode="xref_copy"/>
|
4251
|
+
</xsl:copy>
|
4252
|
+
</xsl:template><xsl:template name="generateIndexXrefId">
|
4253
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4254
|
+
|
4255
|
+
<xsl:variable name="docid">
|
4256
|
+
<xsl:call-template name="getDocumentId"/>
|
4257
|
+
</xsl:variable>
|
4258
|
+
<xsl:variable name="item_number">
|
4259
|
+
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
4260
|
+
</xsl:variable>
|
4261
|
+
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
4262
|
+
<xsl:value-of select="concat($docid, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
4263
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'clause']" priority="4">
|
4264
|
+
<xsl:apply-templates/>
|
4265
|
+
<fo:block>
|
4266
|
+
<xsl:if test="following-sibling::*[local-name() = 'clause']">
|
4267
|
+
<fo:block> </fo:block>
|
4268
|
+
</xsl:if>
|
4269
|
+
</fo:block>
|
4270
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'ul']" priority="4">
|
4271
|
+
<xsl:apply-templates/>
|
4272
|
+
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
4273
|
+
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
4274
|
+
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4275
|
+
<xsl:apply-templates/>
|
4276
|
+
</fo:block>
|
4277
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
4278
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
4012
4279
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4013
4280
|
<!-- <row>
|
4014
4281
|
<date>05-07-2013</date>
|
@@ -4196,7 +4463,7 @@
|
|
4196
4463
|
<xsl:param name="charDelim" select="', '"/>
|
4197
4464
|
<xsl:choose>
|
4198
4465
|
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4199
|
-
<xsl:for-each select="
|
4466
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4200
4467
|
<xsl:sort data-type="text" order="ascending"/>
|
4201
4468
|
<xsl:call-template name="insertKeyword">
|
4202
4469
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
@@ -4205,7 +4472,7 @@
|
|
4205
4472
|
</xsl:for-each>
|
4206
4473
|
</xsl:when>
|
4207
4474
|
<xsl:otherwise>
|
4208
|
-
<xsl:for-each select="
|
4475
|
+
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4209
4476
|
<xsl:call-template name="insertKeyword">
|
4210
4477
|
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4211
4478
|
<xsl:with-param name="charDelim" select="$charDelim"/>
|
@@ -4222,61 +4489,64 @@
|
|
4222
4489
|
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4223
4490
|
</xsl:choose>
|
4224
4491
|
</xsl:template><xsl:template name="addPDFUAmeta">
|
4225
|
-
<
|
4226
|
-
<
|
4227
|
-
|
4228
|
-
|
4229
|
-
|
4230
|
-
|
4231
|
-
|
4232
|
-
|
4233
|
-
|
4234
|
-
|
4235
|
-
|
4236
|
-
|
4492
|
+
<xsl:variable name="lang">
|
4493
|
+
<xsl:call-template name="getLang"/>
|
4494
|
+
</xsl:variable>
|
4495
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
4496
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
4497
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
4498
|
+
</pdf:dictionary>
|
4499
|
+
</pdf:catalog>
|
4500
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
4501
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
4502
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
4503
|
+
<!-- Dublin Core properties go here -->
|
4504
|
+
<dc:title>
|
4505
|
+
<xsl:variable name="title">
|
4506
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4507
|
+
|
4237
4508
|
|
4238
4509
|
|
4239
4510
|
|
4240
|
-
<xsl:value-of select="
|
4511
|
+
<xsl:value-of select="*[local-name() = 'title'][@language = $lang]"/>
|
4241
4512
|
|
4242
4513
|
|
4243
4514
|
|
4244
|
-
</xsl:
|
4245
|
-
|
4246
|
-
|
4247
|
-
|
4248
|
-
|
4249
|
-
|
4250
|
-
|
4251
|
-
</xsl:
|
4252
|
-
</xsl:
|
4253
|
-
</
|
4254
|
-
|
4515
|
+
</xsl:for-each>
|
4516
|
+
</xsl:variable>
|
4517
|
+
<xsl:choose>
|
4518
|
+
<xsl:when test="normalize-space($title) != ''">
|
4519
|
+
<xsl:value-of select="$title"/>
|
4520
|
+
</xsl:when>
|
4521
|
+
<xsl:otherwise>
|
4522
|
+
<xsl:text> </xsl:text>
|
4523
|
+
</xsl:otherwise>
|
4524
|
+
</xsl:choose>
|
4525
|
+
</dc:title>
|
4526
|
+
<dc:creator>
|
4527
|
+
<xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
|
4255
4528
|
|
4256
4529
|
|
4257
4530
|
|
4258
|
-
</
|
4259
|
-
|
4260
|
-
|
4261
|
-
|
4262
|
-
|
4263
|
-
|
4264
|
-
|
4265
|
-
|
4266
|
-
|
4267
|
-
|
4268
|
-
|
4269
|
-
|
4270
|
-
|
4271
|
-
|
4272
|
-
|
4273
|
-
<
|
4274
|
-
|
4275
|
-
|
4276
|
-
|
4277
|
-
</rdf:RDF>
|
4278
|
-
</x:xmpmeta>
|
4279
|
-
</fo:declarations>
|
4531
|
+
</xsl:for-each>
|
4532
|
+
</dc:creator>
|
4533
|
+
<dc:description>
|
4534
|
+
<xsl:variable name="abstract">
|
4535
|
+
|
4536
|
+
|
4537
|
+
</xsl:variable>
|
4538
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
4539
|
+
</dc:description>
|
4540
|
+
<pdf:Keywords>
|
4541
|
+
<xsl:call-template name="insertKeywords"/>
|
4542
|
+
</pdf:Keywords>
|
4543
|
+
</rdf:Description>
|
4544
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
4545
|
+
<!-- XMP properties go here -->
|
4546
|
+
<xmp:CreatorTool/>
|
4547
|
+
</rdf:Description>
|
4548
|
+
</rdf:RDF>
|
4549
|
+
</x:xmpmeta>
|
4280
4550
|
</xsl:template><xsl:template name="getId">
|
4281
4551
|
<xsl:choose>
|
4282
4552
|
<xsl:when test="../@id">
|