metanorma-iho 0.3.0 → 0.3.5
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 +4 -4
- data/.github/workflows/rake.yml +3 -13
- data/.hound.yml +5 -0
- data/.rubocop.yml +4 -8
- data/lib/asciidoctor/iho/biblio.rng +1 -0
- data/lib/asciidoctor/iho/converter.rb +8 -6
- data/lib/asciidoctor/iho/iho.rng +3 -0
- data/lib/asciidoctor/iho/isodoc.rng +191 -3
- data/lib/isodoc/iho/base_convert.rb +40 -46
- data/lib/isodoc/iho/iho.specification.xsl +533 -67
- data/lib/isodoc/iho/iho.standard.xsl +533 -67
- data/lib/isodoc/iho/init.rb +4 -4
- data/lib/isodoc/iho/xref.rb +1 -2
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- data/metanorma.yml +3 -0
- metadata +4 -3
@@ -1085,6 +1085,9 @@
|
|
1085
1085
|
<title-continued lang="en">(continued)</title-continued>
|
1086
1086
|
<title-continued lang="fr">(continué)</title-continued>
|
1087
1087
|
|
1088
|
+
</xsl:variable><xsl:variable name="bibdata">
|
1089
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
1090
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
1088
1091
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1089
1092
|
<xsl:param name="name"/>
|
1090
1093
|
<xsl:param name="lang"/>
|
@@ -1110,13 +1113,16 @@
|
|
1110
1113
|
</xsl:choose>
|
1111
1114
|
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1112
1115
|
|
1116
|
+
|
1113
1117
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1114
1118
|
|
1119
|
+
|
1115
1120
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1116
1121
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1117
1122
|
|
1118
1123
|
|
1119
1124
|
|
1125
|
+
|
1120
1126
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1121
1127
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1122
1128
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1168,7 +1174,7 @@
|
|
1168
1174
|
|
1169
1175
|
|
1170
1176
|
|
1171
|
-
|
1177
|
+
|
1172
1178
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
1173
1179
|
|
1174
1180
|
|
@@ -1185,6 +1191,7 @@
|
|
1185
1191
|
|
1186
1192
|
|
1187
1193
|
|
1194
|
+
|
1188
1195
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1189
1196
|
|
1190
1197
|
|
@@ -1204,9 +1211,7 @@
|
|
1204
1211
|
|
1205
1212
|
|
1206
1213
|
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1214
|
+
|
1210
1215
|
|
1211
1216
|
|
1212
1217
|
|
@@ -1236,8 +1241,10 @@
|
|
1236
1241
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
1237
1242
|
|
1238
1243
|
|
1244
|
+
|
1239
1245
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1240
1246
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1247
|
+
|
1241
1248
|
|
1242
1249
|
|
1243
1250
|
|
@@ -1255,6 +1262,9 @@
|
|
1255
1262
|
|
1256
1263
|
|
1257
1264
|
|
1265
|
+
|
1266
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
1267
|
+
|
1258
1268
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1259
1269
|
|
1260
1270
|
|
@@ -1266,19 +1276,23 @@
|
|
1266
1276
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1267
1277
|
|
1268
1278
|
|
1279
|
+
|
1269
1280
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1270
1281
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1271
1282
|
|
1272
1283
|
|
1284
|
+
|
1273
1285
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1274
1286
|
|
1275
1287
|
|
1276
1288
|
|
1277
1289
|
|
1290
|
+
|
1278
1291
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1279
1292
|
|
1280
1293
|
|
1281
1294
|
|
1295
|
+
|
1282
1296
|
|
1283
1297
|
|
1284
1298
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -1295,12 +1309,14 @@
|
|
1295
1309
|
|
1296
1310
|
|
1297
1311
|
|
1312
|
+
|
1298
1313
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1299
1314
|
|
1300
1315
|
|
1301
1316
|
|
1302
1317
|
|
1303
1318
|
|
1319
|
+
|
1304
1320
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1305
1321
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
1306
1322
|
|
@@ -1332,6 +1348,7 @@
|
|
1332
1348
|
|
1333
1349
|
|
1334
1350
|
|
1351
|
+
|
1335
1352
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1336
1353
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1337
1354
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
@@ -1339,9 +1356,12 @@
|
|
1339
1356
|
|
1340
1357
|
|
1341
1358
|
|
1359
|
+
|
1342
1360
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1361
|
+
|
1343
1362
|
|
1344
1363
|
|
1364
|
+
|
1345
1365
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1346
1366
|
|
1347
1367
|
|
@@ -1364,9 +1384,11 @@
|
|
1364
1384
|
|
1365
1385
|
|
1366
1386
|
|
1387
|
+
|
1367
1388
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1368
1389
|
|
1369
1390
|
|
1391
|
+
|
1370
1392
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1371
1393
|
|
1372
1394
|
|
@@ -1374,12 +1396,14 @@
|
|
1374
1396
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1375
1397
|
|
1376
1398
|
|
1399
|
+
|
1377
1400
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1378
1401
|
|
1379
1402
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
1380
1403
|
|
1381
1404
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1382
1405
|
|
1406
|
+
|
1383
1407
|
|
1384
1408
|
|
1385
1409
|
|
@@ -1400,6 +1424,7 @@
|
|
1400
1424
|
|
1401
1425
|
|
1402
1426
|
|
1427
|
+
|
1403
1428
|
|
1404
1429
|
|
1405
1430
|
|
@@ -1413,10 +1438,12 @@
|
|
1413
1438
|
|
1414
1439
|
|
1415
1440
|
|
1441
|
+
|
1416
1442
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1417
1443
|
|
1418
1444
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1419
1445
|
|
1446
|
+
|
1420
1447
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1421
1448
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1422
1449
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -1443,20 +1470,37 @@
|
|
1443
1470
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1444
1471
|
|
1445
1472
|
|
1473
|
+
|
1446
1474
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1447
1475
|
|
1476
|
+
|
1448
1477
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1449
1478
|
|
1450
1479
|
|
1451
1480
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1452
1481
|
|
1453
|
-
|
1482
|
+
|
1483
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1484
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1485
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1454
1486
|
<xsl:attribute name="color">red</xsl:attribute>
|
1455
1487
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1456
|
-
|
1457
|
-
<xsl:attribute name="color"
|
1488
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1489
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1490
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1491
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1492
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1493
|
+
<xsl:text>red</xsl:text>
|
1494
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1495
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1458
1496
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1459
|
-
</xsl:attribute-set><xsl:
|
1497
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1498
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1499
|
+
|
1500
|
+
|
1501
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1502
|
+
|
1503
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1460
1504
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1461
1505
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1462
1506
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1501,18 +1545,19 @@
|
|
1501
1545
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1502
1546
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1503
1547
|
|
1548
|
+
<xsl:variable name="table-preamble">
|
1549
|
+
|
1550
|
+
|
1551
|
+
</xsl:variable>
|
1552
|
+
|
1504
1553
|
<xsl:variable name="table">
|
1505
1554
|
|
1506
1555
|
<xsl:variable name="simple-table">
|
1507
|
-
<xsl:call-template name="getSimpleTable"/>
|
1556
|
+
<xsl:call-template name="getSimpleTable"/>
|
1508
1557
|
</xsl:variable>
|
1509
1558
|
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
1559
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1515
|
-
<fo:block> </fo:block>
|
1560
|
+
<fo:block> </fo:block>
|
1516
1561
|
</xsl:if> -->
|
1517
1562
|
|
1518
1563
|
<!-- $namespace = 'iso' or -->
|
@@ -1525,7 +1570,7 @@
|
|
1525
1570
|
|
1526
1571
|
|
1527
1572
|
|
1528
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1573
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1529
1574
|
|
1530
1575
|
<!-- <xsl:variable name="cols-count">
|
1531
1576
|
<xsl:choose>
|
@@ -1544,8 +1589,6 @@
|
|
1544
1589
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1545
1590
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1546
1591
|
|
1547
|
-
|
1548
|
-
|
1549
1592
|
<xsl:variable name="colwidths">
|
1550
1593
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1551
1594
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1573,9 +1616,11 @@
|
|
1573
1616
|
</xsl:choose>
|
1574
1617
|
</xsl:variable>
|
1575
1618
|
|
1619
|
+
|
1576
1620
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1577
1621
|
|
1578
1622
|
|
1623
|
+
|
1579
1624
|
|
1580
1625
|
|
1581
1626
|
|
@@ -1585,6 +1630,8 @@
|
|
1585
1630
|
|
1586
1631
|
|
1587
1632
|
|
1633
|
+
|
1634
|
+
|
1588
1635
|
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
1589
1636
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1590
1637
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -1608,6 +1655,8 @@
|
|
1608
1655
|
|
1609
1656
|
|
1610
1657
|
|
1658
|
+
|
1659
|
+
|
1611
1660
|
|
1612
1661
|
|
1613
1662
|
|
@@ -1617,6 +1666,7 @@
|
|
1617
1666
|
|
1618
1667
|
|
1619
1668
|
|
1669
|
+
|
1620
1670
|
</xsl:variable>
|
1621
1671
|
|
1622
1672
|
|
@@ -1700,7 +1750,8 @@
|
|
1700
1750
|
</fo:block-container>
|
1701
1751
|
</xsl:variable>
|
1702
1752
|
|
1703
|
-
|
1753
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1754
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1704
1755
|
|
1705
1756
|
<xsl:choose>
|
1706
1757
|
<xsl:when test="@width">
|
@@ -1714,7 +1765,14 @@
|
|
1714
1765
|
<fo:table-body>
|
1715
1766
|
<fo:table-row>
|
1716
1767
|
<fo:table-cell column-number="2">
|
1717
|
-
<
|
1768
|
+
<xsl:copy-of select="$table-preamble"/>
|
1769
|
+
<fo:block>
|
1770
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1771
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1772
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1773
|
+
</xsl:call-template>
|
1774
|
+
<xsl:copy-of select="$table"/>
|
1775
|
+
</fo:block>
|
1718
1776
|
</fo:table-cell>
|
1719
1777
|
</fo:table-row>
|
1720
1778
|
</fo:table-body>
|
@@ -1725,16 +1783,45 @@
|
|
1725
1783
|
|
1726
1784
|
</xsl:when>
|
1727
1785
|
<xsl:otherwise>
|
1728
|
-
<xsl:
|
1786
|
+
<xsl:choose>
|
1787
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1788
|
+
<xsl:copy-of select="$table-preamble"/>
|
1789
|
+
<fo:block>
|
1790
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1791
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1792
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1793
|
+
</xsl:call-template>
|
1794
|
+
<xsl:copy-of select="$table"/>
|
1795
|
+
</fo:block>
|
1796
|
+
</xsl:when>
|
1797
|
+
<xsl:otherwise>
|
1798
|
+
<xsl:copy-of select="$table-preamble"/>
|
1799
|
+
<xsl:copy-of select="$table"/>
|
1800
|
+
</xsl:otherwise>
|
1801
|
+
</xsl:choose>
|
1729
1802
|
</xsl:otherwise>
|
1730
1803
|
</xsl:choose>
|
1731
1804
|
|
1732
1805
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1806
|
+
<xsl:param name="continued"/>
|
1733
1807
|
<xsl:if test="normalize-space() != ''">
|
1734
1808
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1735
1809
|
|
1736
1810
|
|
1737
|
-
|
1811
|
+
|
1812
|
+
|
1813
|
+
|
1814
|
+
<xsl:choose>
|
1815
|
+
<xsl:when test="$continued = 'true'">
|
1816
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1817
|
+
|
1818
|
+
</xsl:when>
|
1819
|
+
<xsl:otherwise>
|
1820
|
+
<xsl:apply-templates/>
|
1821
|
+
</xsl:otherwise>
|
1822
|
+
</xsl:choose>
|
1823
|
+
|
1824
|
+
|
1738
1825
|
</fo:block>
|
1739
1826
|
</xsl:if>
|
1740
1827
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1786,7 +1873,7 @@
|
|
1786
1873
|
</xsl:for-each>
|
1787
1874
|
</xsl:when>
|
1788
1875
|
<xsl:otherwise>
|
1789
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1876
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1790
1877
|
<xsl:variable name="td_text">
|
1791
1878
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1792
1879
|
|
@@ -1871,21 +1958,22 @@
|
|
1871
1958
|
<!-- font-weight="bold" -->
|
1872
1959
|
<fo:table-header>
|
1873
1960
|
|
1961
|
+
|
1874
1962
|
<xsl:apply-templates/>
|
1875
1963
|
</fo:table-header>
|
1876
1964
|
</xsl:template><xsl:template name="table-header-title">
|
1877
|
-
<xsl:param name="cols-count"/>
|
1965
|
+
<xsl:param name="cols-count"/>
|
1878
1966
|
<!-- row for title -->
|
1879
1967
|
<fo:table-row>
|
1880
1968
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
1881
|
-
|
1969
|
+
|
1970
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1971
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
1972
|
+
</xsl:apply-templates>
|
1882
1973
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1883
1974
|
<xsl:call-template name="fn_name_display"/>
|
1884
|
-
</xsl:for-each>
|
1885
|
-
|
1886
|
-
<xsl:text> </xsl:text>
|
1887
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1888
|
-
</fo:block>
|
1975
|
+
</xsl:for-each>
|
1976
|
+
|
1889
1977
|
</fo:table-cell>
|
1890
1978
|
</fo:table-row>
|
1891
1979
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2106,6 +2194,7 @@
|
|
2106
2194
|
|
2107
2195
|
|
2108
2196
|
|
2197
|
+
|
2109
2198
|
</xsl:if>
|
2110
2199
|
<xsl:if test="$parent-name = 'tfoot'">
|
2111
2200
|
|
@@ -2115,6 +2204,10 @@
|
|
2115
2204
|
|
2116
2205
|
|
2117
2206
|
|
2207
|
+
|
2208
|
+
|
2209
|
+
|
2210
|
+
|
2118
2211
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2119
2212
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2120
2213
|
</xsl:if> -->
|
@@ -2126,7 +2219,8 @@
|
|
2126
2219
|
<xsl:attribute name="text-align">
|
2127
2220
|
<xsl:choose>
|
2128
2221
|
<xsl:when test="@align">
|
2129
|
-
<xsl:
|
2222
|
+
<xsl:call-template name="setAlignment"/>
|
2223
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2130
2224
|
</xsl:when>
|
2131
2225
|
<xsl:otherwise>center</xsl:otherwise>
|
2132
2226
|
</xsl:choose>
|
@@ -2142,6 +2236,11 @@
|
|
2142
2236
|
|
2143
2237
|
|
2144
2238
|
|
2239
|
+
|
2240
|
+
|
2241
|
+
<xsl:if test="$lang = 'ar'">
|
2242
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2243
|
+
</xsl:if>
|
2145
2244
|
<xsl:if test="@colspan">
|
2146
2245
|
<xsl:attribute name="number-columns-spanned">
|
2147
2246
|
<xsl:value-of select="@colspan"/>
|
@@ -2173,11 +2272,15 @@
|
|
2173
2272
|
<xsl:attribute name="text-align">
|
2174
2273
|
<xsl:choose>
|
2175
2274
|
<xsl:when test="@align">
|
2176
|
-
<xsl:
|
2275
|
+
<xsl:call-template name="setAlignment"/>
|
2276
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2177
2277
|
</xsl:when>
|
2178
2278
|
<xsl:otherwise>left</xsl:otherwise>
|
2179
2279
|
</xsl:choose>
|
2180
2280
|
</xsl:attribute>
|
2281
|
+
<xsl:if test="$lang = 'ar'">
|
2282
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2283
|
+
</xsl:if>
|
2181
2284
|
<!-- and ancestor::*[local-name() = 'thead'] -->
|
2182
2285
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2183
2286
|
|
@@ -2191,6 +2294,13 @@
|
|
2191
2294
|
|
2192
2295
|
|
2193
2296
|
|
2297
|
+
|
2298
|
+
|
2299
|
+
|
2300
|
+
|
2301
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2302
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2303
|
+
</xsl:if>
|
2194
2304
|
<xsl:if test="@colspan">
|
2195
2305
|
<xsl:attribute name="number-columns-spanned">
|
2196
2306
|
<xsl:value-of select="@colspan"/>
|
@@ -2323,13 +2433,13 @@
|
|
2323
2433
|
</xsl:choose>
|
2324
2434
|
</xsl:variable>
|
2325
2435
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2326
|
-
<xsl:element name="{$ns}:table">
|
2436
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2327
2437
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2328
2438
|
<tbody>
|
2329
2439
|
<xsl:apply-templates mode="dl"/>
|
2330
2440
|
</tbody>
|
2331
2441
|
</xsl:for-each>
|
2332
|
-
</xsl:element>
|
2442
|
+
<!-- </xsl:element> -->
|
2333
2443
|
</xsl:variable>
|
2334
2444
|
|
2335
2445
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2408,6 +2518,7 @@
|
|
2408
2518
|
|
2409
2519
|
|
2410
2520
|
|
2521
|
+
|
2411
2522
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2412
2523
|
|
2413
2524
|
|
@@ -2420,6 +2531,8 @@
|
|
2420
2531
|
<xsl:apply-templates/>
|
2421
2532
|
</fo:inline>
|
2422
2533
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2534
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2535
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2423
2536
|
<fo:block-container>
|
2424
2537
|
|
2425
2538
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2436,6 +2549,12 @@
|
|
2436
2549
|
</xsl:attribute>
|
2437
2550
|
|
2438
2551
|
</xsl:if>
|
2552
|
+
|
2553
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2554
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2555
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2556
|
+
</xsl:call-template>
|
2557
|
+
|
2439
2558
|
<fo:block-container>
|
2440
2559
|
|
2441
2560
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2491,6 +2610,7 @@
|
|
2491
2610
|
|
2492
2611
|
|
2493
2612
|
|
2613
|
+
|
2494
2614
|
<xsl:variable name="title-key">
|
2495
2615
|
|
2496
2616
|
|
@@ -2547,11 +2667,11 @@
|
|
2547
2667
|
</xsl:choose>
|
2548
2668
|
</xsl:variable>
|
2549
2669
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2550
|
-
<xsl:element name="{$ns}:table">
|
2670
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2551
2671
|
<tbody>
|
2552
2672
|
<xsl:apply-templates mode="dl"/>
|
2553
2673
|
</tbody>
|
2554
|
-
</xsl:element>
|
2674
|
+
<!-- </xsl:element> -->
|
2555
2675
|
</xsl:variable>
|
2556
2676
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2557
2677
|
<xsl:variable name="colwidths">
|
@@ -2705,6 +2825,7 @@
|
|
2705
2825
|
|
2706
2826
|
<fo:table-row>
|
2707
2827
|
|
2828
|
+
|
2708
2829
|
<fo:table-cell>
|
2709
2830
|
|
2710
2831
|
<fo:block margin-top="6pt">
|
@@ -2723,6 +2844,7 @@
|
|
2723
2844
|
|
2724
2845
|
|
2725
2846
|
|
2847
|
+
|
2726
2848
|
<xsl:apply-templates/>
|
2727
2849
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2728
2850
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2779,6 +2901,8 @@
|
|
2779
2901
|
|
2780
2902
|
<xsl:apply-templates/>
|
2781
2903
|
</fo:inline>
|
2904
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
2905
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
2782
2906
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
2783
2907
|
<fo:inline font-size="80%" vertical-align="super">
|
2784
2908
|
<xsl:apply-templates/>
|
@@ -2804,6 +2928,7 @@
|
|
2804
2928
|
|
2805
2929
|
|
2806
2930
|
|
2931
|
+
|
2807
2932
|
|
2808
2933
|
</xsl:variable>
|
2809
2934
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2822,9 +2947,71 @@
|
|
2822
2947
|
<xsl:apply-templates/>
|
2823
2948
|
</fo:inline>
|
2824
2949
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
2825
|
-
<
|
2826
|
-
<xsl:
|
2827
|
-
|
2950
|
+
<xsl:choose>
|
2951
|
+
<xsl:when test="@amendment">
|
2952
|
+
<fo:inline>
|
2953
|
+
<xsl:call-template name="insertTag">
|
2954
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2955
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2956
|
+
</xsl:call-template>
|
2957
|
+
<xsl:apply-templates/>
|
2958
|
+
<xsl:call-template name="insertTag">
|
2959
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2960
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2961
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2962
|
+
</xsl:call-template>
|
2963
|
+
</fo:inline>
|
2964
|
+
</xsl:when>
|
2965
|
+
<xsl:when test="@corrigenda">
|
2966
|
+
<fo:inline>
|
2967
|
+
<xsl:call-template name="insertTag">
|
2968
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2969
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2970
|
+
</xsl:call-template>
|
2971
|
+
<xsl:apply-templates/>
|
2972
|
+
<xsl:call-template name="insertTag">
|
2973
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2974
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2975
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2976
|
+
</xsl:call-template>
|
2977
|
+
</fo:inline>
|
2978
|
+
</xsl:when>
|
2979
|
+
<xsl:otherwise>
|
2980
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2981
|
+
<xsl:apply-templates/>
|
2982
|
+
</fo:inline>
|
2983
|
+
</xsl:otherwise>
|
2984
|
+
</xsl:choose>
|
2985
|
+
|
2986
|
+
</xsl:template><xsl:template name="insertTag">
|
2987
|
+
<xsl:param name="type"/>
|
2988
|
+
<xsl:param name="kind"/>
|
2989
|
+
<xsl:param name="value"/>
|
2990
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
2991
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
2992
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
2993
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
2994
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
2995
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
2996
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
2997
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2998
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2999
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
3000
|
+
<g>
|
3001
|
+
<xsl:if test="$type = 'closing'">
|
3002
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
3003
|
+
</xsl:if>
|
3004
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
3005
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
3006
|
+
</g>
|
3007
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
3008
|
+
<xsl:if test="$type = 'closing'">
|
3009
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
3010
|
+
</xsl:if>
|
3011
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
3012
|
+
</text>
|
3013
|
+
</svg>
|
3014
|
+
</fo:instream-foreign-object>
|
2828
3015
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2829
3016
|
<fo:inline xsl:use-attribute-sets="del-style">
|
2830
3017
|
<xsl:apply-templates/>
|
@@ -3123,11 +3310,15 @@
|
|
3123
3310
|
</xsl:apply-templates>
|
3124
3311
|
</xsl:template><xsl:template name="getLang">
|
3125
3312
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3313
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3126
3314
|
<xsl:variable name="language">
|
3127
3315
|
<xsl:choose>
|
3128
3316
|
<xsl:when test="$language_current != ''">
|
3129
3317
|
<xsl:value-of select="$language_current"/>
|
3130
3318
|
</xsl:when>
|
3319
|
+
<xsl:when test="$language_current_2 != ''">
|
3320
|
+
<xsl:value-of select="$language_current_2"/>
|
3321
|
+
</xsl:when>
|
3131
3322
|
<xsl:otherwise>
|
3132
3323
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3133
3324
|
</xsl:otherwise>
|
@@ -3167,13 +3358,23 @@
|
|
3167
3358
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3168
3359
|
<xsl:value-of select="substring($str, 2)"/>
|
3169
3360
|
</xsl:template><xsl:template match="mathml:math">
|
3170
|
-
<
|
3361
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3362
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3363
|
+
|
3364
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3365
|
+
|
3366
|
+
|
3367
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3368
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3369
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3370
|
+
</xsl:call-template>
|
3171
3371
|
|
3172
3372
|
<xsl:variable name="mathml">
|
3173
3373
|
<xsl:apply-templates select="." mode="mathml"/>
|
3174
3374
|
</xsl:variable>
|
3175
3375
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3176
3376
|
|
3377
|
+
|
3177
3378
|
<!-- <xsl:copy-of select="."/> -->
|
3178
3379
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3179
3380
|
</fo:instream-foreign-object>
|
@@ -3191,9 +3392,27 @@
|
|
3191
3392
|
<xsl:copy>
|
3192
3393
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3193
3394
|
</xsl:copy>
|
3194
|
-
<
|
3395
|
+
<xsl:choose>
|
3396
|
+
<!-- if in msub, then don't add space -->
|
3397
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3398
|
+
<!-- if next char in digit, don't add space -->
|
3399
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3400
|
+
<xsl:otherwise>
|
3401
|
+
<mathml:mspace width="0.5ex"/>
|
3402
|
+
</xsl:otherwise>
|
3403
|
+
</xsl:choose>
|
3195
3404
|
</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">
|
3196
3405
|
<xsl:variable name="target">
|
3406
|
+
<xsl:choose>
|
3407
|
+
<xsl:when test="@updatetype = 'true'">
|
3408
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3409
|
+
</xsl:when>
|
3410
|
+
<xsl:otherwise>
|
3411
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3412
|
+
</xsl:otherwise>
|
3413
|
+
</xsl:choose>
|
3414
|
+
</xsl:variable>
|
3415
|
+
<xsl:variable name="target_text">
|
3197
3416
|
<xsl:choose>
|
3198
3417
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3199
3418
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3205,20 +3424,21 @@
|
|
3205
3424
|
</xsl:variable>
|
3206
3425
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3207
3426
|
|
3427
|
+
|
3208
3428
|
<xsl:choose>
|
3209
|
-
<xsl:when test="$
|
3429
|
+
<xsl:when test="$target_text = ''">
|
3210
3430
|
<xsl:apply-templates/>
|
3211
3431
|
</xsl:when>
|
3212
3432
|
<xsl:otherwise>
|
3213
|
-
<fo:basic-link external-destination="{
|
3433
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3214
3434
|
<xsl:choose>
|
3215
3435
|
<xsl:when test="normalize-space(.) = ''">
|
3216
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3217
3436
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3218
|
-
<xsl:with-param name="text" select="$
|
3437
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3219
3438
|
</xsl:call-template>
|
3220
3439
|
</xsl:when>
|
3221
3440
|
<xsl:otherwise>
|
3441
|
+
<!-- output text from <link>text</link> -->
|
3222
3442
|
<xsl:apply-templates/>
|
3223
3443
|
</xsl:otherwise>
|
3224
3444
|
</xsl:choose>
|
@@ -3334,6 +3554,7 @@
|
|
3334
3554
|
|
3335
3555
|
|
3336
3556
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3557
|
+
|
3337
3558
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3338
3559
|
</fo:inline>
|
3339
3560
|
<xsl:apply-templates/>
|
@@ -3359,7 +3580,9 @@
|
|
3359
3580
|
</xsl:choose>
|
3360
3581
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3361
3582
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3583
|
+
|
3362
3584
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3585
|
+
|
3363
3586
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3364
3587
|
</fo:inline>
|
3365
3588
|
<xsl:apply-templates/>
|
@@ -3421,16 +3644,27 @@
|
|
3421
3644
|
</fo:inline>
|
3422
3645
|
</xsl:if>
|
3423
3646
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3647
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3648
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3424
3649
|
<fo:block-container id="{@id}">
|
3425
3650
|
|
3651
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3652
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3653
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3654
|
+
</xsl:call-template>
|
3655
|
+
|
3426
3656
|
<fo:block>
|
3657
|
+
|
3427
3658
|
<xsl:apply-templates/>
|
3428
3659
|
</fo:block>
|
3429
3660
|
<xsl:call-template name="fn_display_figure"/>
|
3430
3661
|
<xsl:for-each select="*[local-name() = 'note']">
|
3431
3662
|
<xsl:call-template name="note"/>
|
3432
3663
|
</xsl:for-each>
|
3433
|
-
|
3664
|
+
|
3665
|
+
|
3666
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3667
|
+
|
3434
3668
|
</fo:block-container>
|
3435
3669
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3436
3670
|
<fo:block id="{@id}">
|
@@ -3442,6 +3676,8 @@
|
|
3442
3676
|
<xsl:apply-templates/>
|
3443
3677
|
</fo:block>
|
3444
3678
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3679
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3680
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3445
3681
|
<xsl:choose>
|
3446
3682
|
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3447
3683
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
@@ -3457,7 +3693,26 @@
|
|
3457
3693
|
<xsl:variable name="src">
|
3458
3694
|
<xsl:call-template name="image_src"/>
|
3459
3695
|
</xsl:variable>
|
3460
|
-
|
3696
|
+
|
3697
|
+
<xsl:choose>
|
3698
|
+
<xsl:when test="$isDeleted = 'true'">
|
3699
|
+
<!-- enclose in svg -->
|
3700
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3701
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3702
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3703
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3704
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3705
|
+
|
3706
|
+
|
3707
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3708
|
+
|
3709
|
+
</fo:instream-foreign-object>
|
3710
|
+
</xsl:when>
|
3711
|
+
<xsl:otherwise>
|
3712
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3713
|
+
</xsl:otherwise>
|
3714
|
+
</xsl:choose>
|
3715
|
+
|
3461
3716
|
</fo:block>
|
3462
3717
|
</xsl:otherwise>
|
3463
3718
|
</xsl:choose>
|
@@ -3473,21 +3728,70 @@
|
|
3473
3728
|
<xsl:value-of select="@src"/>
|
3474
3729
|
</xsl:otherwise>
|
3475
3730
|
</xsl:choose>
|
3731
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3732
|
+
<xsl:choose>
|
3733
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3734
|
+
<xsl:variable name="src">
|
3735
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3736
|
+
</xsl:variable>
|
3737
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3738
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3739
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
3740
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3741
|
+
</svg>
|
3742
|
+
</xsl:when>
|
3743
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3744
|
+
<xsl:variable name="src">
|
3745
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3746
|
+
</xsl:variable>
|
3747
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3748
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3749
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3750
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3751
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
3752
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3753
|
+
</svg>
|
3754
|
+
</xsl:when>
|
3755
|
+
<xsl:otherwise>
|
3756
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3757
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3758
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3759
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3760
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3761
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3762
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3763
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3764
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3765
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
3766
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3767
|
+
<xsl:call-template name="svg_cross">
|
3768
|
+
<xsl:with-param name="width" select="$width"/>
|
3769
|
+
<xsl:with-param name="height" select="$height"/>
|
3770
|
+
</xsl:call-template>
|
3771
|
+
</svg>
|
3772
|
+
</xsl:otherwise>
|
3773
|
+
</xsl:choose>
|
3774
|
+
|
3775
|
+
</xsl:template><xsl:template name="svg_cross">
|
3776
|
+
<xsl:param name="width"/>
|
3777
|
+
<xsl:param name="height"/>
|
3778
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
3779
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
3476
3780
|
</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">
|
3477
3781
|
<xsl:apply-templates mode="contents"/>
|
3478
3782
|
<xsl:text> </xsl:text>
|
3479
3783
|
</xsl:template><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="bookmarks">
|
3480
3784
|
<xsl:apply-templates mode="bookmarks"/>
|
3481
3785
|
<xsl:text> </xsl:text>
|
3482
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3786
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3483
3787
|
<xsl:value-of select="."/>
|
3484
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3788
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3485
3789
|
<xsl:value-of select="."/>
|
3486
3790
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3487
3791
|
<xsl:apply-templates mode="contents"/>
|
3488
3792
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3489
3793
|
<xsl:apply-templates mode="bookmarks"/>
|
3490
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3794
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3491
3795
|
<xsl:apply-templates select="."/>
|
3492
3796
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3493
3797
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3635,6 +3939,7 @@
|
|
3635
3939
|
<xsl:if test="normalize-space() != ''">
|
3636
3940
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3637
3941
|
|
3942
|
+
|
3638
3943
|
<xsl:apply-templates/>
|
3639
3944
|
</fo:block>
|
3640
3945
|
</xsl:if>
|
@@ -3686,6 +3991,8 @@
|
|
3686
3991
|
</fo:list-item-body>
|
3687
3992
|
</fo:list-item>
|
3688
3993
|
</fo:list-block>
|
3994
|
+
</xsl:template><xsl:template name="extractSection">
|
3995
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3689
3996
|
</xsl:template><xsl:template name="extractTitle">
|
3690
3997
|
<xsl:choose>
|
3691
3998
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3712,6 +4019,8 @@
|
|
3712
4019
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3713
4020
|
|
3714
4021
|
<fo:block-container margin-left="0mm">
|
4022
|
+
<xsl:copy-of select="@id"/>
|
4023
|
+
|
3715
4024
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3716
4025
|
<xsl:attribute name="margin-left">
|
3717
4026
|
<xsl:choose>
|
@@ -3722,7 +4031,9 @@
|
|
3722
4031
|
|
3723
4032
|
</xsl:if>
|
3724
4033
|
<fo:block-container margin-left="0mm">
|
3725
|
-
|
4034
|
+
|
4035
|
+
|
4036
|
+
|
3726
4037
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3727
4038
|
<xsl:variable name="_font-size">
|
3728
4039
|
|
@@ -3733,6 +4044,7 @@
|
|
3733
4044
|
|
3734
4045
|
|
3735
4046
|
|
4047
|
+
|
3736
4048
|
|
3737
4049
|
|
3738
4050
|
|
@@ -3750,10 +4062,14 @@
|
|
3750
4062
|
</xsl:choose>
|
3751
4063
|
</xsl:attribute>
|
3752
4064
|
</xsl:if>
|
3753
|
-
|
3754
|
-
|
4065
|
+
|
4066
|
+
<xsl:apply-templates/>
|
4067
|
+
</fo:block>
|
4068
|
+
|
4069
|
+
|
3755
4070
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3756
4071
|
|
4072
|
+
|
3757
4073
|
</fo:block-container>
|
3758
4074
|
</fo:block-container>
|
3759
4075
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -3988,6 +4304,7 @@
|
|
3988
4304
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
3989
4305
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
3990
4306
|
|
4307
|
+
|
3991
4308
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3992
4309
|
|
3993
4310
|
<xsl:variable name="element">
|
@@ -4015,6 +4332,7 @@
|
|
4015
4332
|
<xsl:variable name="element">
|
4016
4333
|
block
|
4017
4334
|
|
4335
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
4018
4336
|
</xsl:variable>
|
4019
4337
|
<xsl:choose>
|
4020
4338
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -4022,7 +4340,7 @@
|
|
4022
4340
|
<xsl:apply-templates/>
|
4023
4341
|
</fo:inline>
|
4024
4342
|
</xsl:when>
|
4025
|
-
<xsl:when test="normalize-space($element)
|
4343
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4026
4344
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
4027
4345
|
<xsl:apply-templates/>
|
4028
4346
|
</fo:block>
|
@@ -4054,7 +4372,7 @@
|
|
4054
4372
|
</fo:inline>
|
4055
4373
|
</xsl:otherwise>
|
4056
4374
|
</xsl:choose>
|
4057
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4375
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4058
4376
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4059
4377
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4060
4378
|
<xsl:variable name="termsource_text">
|
@@ -4063,13 +4381,15 @@
|
|
4063
4381
|
|
4064
4382
|
<xsl:choose>
|
4065
4383
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4066
|
-
<xsl:apply-templates/>
|
4384
|
+
<!-- <xsl:apply-templates /> -->
|
4385
|
+
<xsl:copy-of select="$termsource_text"/>
|
4067
4386
|
</xsl:when>
|
4068
4387
|
<xsl:otherwise>
|
4069
4388
|
|
4070
4389
|
<xsl:text>[</xsl:text>
|
4071
4390
|
|
4072
|
-
<xsl:apply-templates/>
|
4391
|
+
<!-- <xsl:apply-templates /> -->
|
4392
|
+
<xsl:copy-of select="$termsource_text"/>
|
4073
4393
|
|
4074
4394
|
<xsl:text>]</xsl:text>
|
4075
4395
|
|
@@ -4080,20 +4400,29 @@
|
|
4080
4400
|
<xsl:if test="normalize-space() != ''">
|
4081
4401
|
<xsl:value-of select="."/>
|
4082
4402
|
</xsl:if>
|
4083
|
-
</xsl:template><xsl:
|
4403
|
+
</xsl:template><xsl:variable name="localized.source">
|
4404
|
+
<xsl:call-template name="getLocalizedString">
|
4405
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4406
|
+
</xsl:call-template>
|
4407
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4084
4408
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4409
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4410
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4411
|
+
</xsl:if>
|
4085
4412
|
|
4086
4413
|
<fo:inline>
|
4087
4414
|
|
4088
4415
|
|
4089
4416
|
|
4090
4417
|
|
4418
|
+
|
4419
|
+
|
4091
4420
|
<xsl:call-template name="getTitle">
|
4092
4421
|
<xsl:with-param name="name" select="'title-source'"/>
|
4093
4422
|
</xsl:call-template>
|
4423
|
+
<xsl:text>: </xsl:text>
|
4094
4424
|
|
4095
4425
|
|
4096
|
-
<xsl:text>: </xsl:text>
|
4097
4426
|
</fo:inline>
|
4098
4427
|
|
4099
4428
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
@@ -4220,6 +4549,7 @@
|
|
4220
4549
|
|
4221
4550
|
|
4222
4551
|
|
4552
|
+
|
4223
4553
|
</xsl:variable>
|
4224
4554
|
|
4225
4555
|
<xsl:variable name="padding-right">
|
@@ -4245,7 +4575,8 @@
|
|
4245
4575
|
</fo:inline>
|
4246
4576
|
</xsl:when>
|
4247
4577
|
<xsl:otherwise>
|
4248
|
-
<
|
4578
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4579
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4249
4580
|
</xsl:otherwise>
|
4250
4581
|
</xsl:choose>
|
4251
4582
|
|
@@ -4299,7 +4630,6 @@
|
|
4299
4630
|
|
4300
4631
|
|
4301
4632
|
|
4302
|
-
|
4303
4633
|
<xsl:apply-templates/>
|
4304
4634
|
</fo:block>
|
4305
4635
|
|
@@ -4316,6 +4646,7 @@
|
|
4316
4646
|
<xsl:call-template name="setId"/>
|
4317
4647
|
|
4318
4648
|
|
4649
|
+
|
4319
4650
|
<xsl:apply-templates/>
|
4320
4651
|
</fo:block>
|
4321
4652
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4342,7 +4673,7 @@
|
|
4342
4673
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4343
4674
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4344
4675
|
<xsl:choose>
|
4345
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4676
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4346
4677
|
<fo:block-container>
|
4347
4678
|
<xsl:attribute name="margin-left">
|
4348
4679
|
<xsl:choose>
|
@@ -4352,6 +4683,7 @@
|
|
4352
4683
|
</xsl:attribute>
|
4353
4684
|
|
4354
4685
|
|
4686
|
+
|
4355
4687
|
<fo:block-container margin-left="0mm">
|
4356
4688
|
<fo:block>
|
4357
4689
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4652,21 +4984,25 @@
|
|
4652
4984
|
</xsl:choose>
|
4653
4985
|
<!-- end IHO bibitem processing -->
|
4654
4986
|
|
4987
|
+
|
4988
|
+
|
4989
|
+
|
4990
|
+
|
4655
4991
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4656
4992
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
4657
4993
|
<xsl:choose>
|
4658
4994
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4659
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
4995
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
4660
4996
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4661
4997
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4662
|
-
</xsl:if>
|
4998
|
+
</xsl:if> -->
|
4663
4999
|
<xsl:value-of select="$_doc_ident"/>
|
4664
5000
|
</xsl:when>
|
4665
5001
|
<xsl:otherwise>
|
4666
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
5002
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4667
5003
|
<xsl:if test="$type != ''">
|
4668
5004
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4669
|
-
</xsl:if>
|
5005
|
+
</xsl:if> -->
|
4670
5006
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4671
5007
|
</xsl:otherwise>
|
4672
5008
|
</xsl:choose>
|
@@ -4708,6 +5044,70 @@
|
|
4708
5044
|
<xsl:value-of select="substring(.,1,1)"/>
|
4709
5045
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4710
5046
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5047
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
5048
|
+
<fo:block>
|
5049
|
+
<xsl:apply-templates/>
|
5050
|
+
</fo:block>
|
5051
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
5052
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5053
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
5054
|
+
<fo:inline>
|
5055
|
+
<xsl:call-template name="text_input"/>
|
5056
|
+
</fo:inline>
|
5057
|
+
</xsl:template><xsl:template name="text_input">
|
5058
|
+
<xsl:variable name="count">
|
5059
|
+
<xsl:choose>
|
5060
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
5061
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
5062
|
+
<xsl:otherwise>10</xsl:otherwise>
|
5063
|
+
</xsl:choose>
|
5064
|
+
</xsl:variable>
|
5065
|
+
<xsl:call-template name="repeat">
|
5066
|
+
<xsl:with-param name="char" select="'_'"/>
|
5067
|
+
<xsl:with-param name="count" select="$count"/>
|
5068
|
+
</xsl:call-template>
|
5069
|
+
<xsl:text> </xsl:text>
|
5070
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
5071
|
+
<xsl:variable name="caption">
|
5072
|
+
<xsl:choose>
|
5073
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
5074
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
5075
|
+
</xsl:choose>
|
5076
|
+
</xsl:variable>
|
5077
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
5078
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
5079
|
+
<fo:inline padding-right="1mm">
|
5080
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5081
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5082
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5083
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5084
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5085
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5086
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
5087
|
+
</svg>
|
5088
|
+
</fo:instream-foreign-object>
|
5089
|
+
</fo:inline>
|
5090
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
5091
|
+
<fo:inline padding-right="1mm">
|
5092
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5093
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5094
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5095
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5096
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5097
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5098
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
5099
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
5100
|
+
</svg>
|
5101
|
+
</fo:instream-foreign-object>
|
5102
|
+
</fo:inline>
|
5103
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
5104
|
+
<fo:inline>
|
5105
|
+
<xsl:call-template name="text_input"/>
|
5106
|
+
</fo:inline>
|
5107
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
5108
|
+
<fo:block-container border="1pt solid black" width="50%">
|
5109
|
+
<fo:block> </fo:block>
|
5110
|
+
</fo:block-container>
|
4711
5111
|
</xsl:template><xsl:template name="convertDate">
|
4712
5112
|
<xsl:param name="date"/>
|
4713
5113
|
<xsl:param name="format" select="'short'"/>
|
@@ -4915,6 +5315,9 @@
|
|
4915
5315
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
4916
5316
|
<xsl:value-of select="$level_total - 1"/>
|
4917
5317
|
</xsl:when>
|
5318
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5319
|
+
<xsl:value-of select="$level_total - 1"/>
|
5320
|
+
</xsl:when>
|
4918
5321
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
4919
5322
|
<xsl:value-of select="$level_total - 2"/>
|
4920
5323
|
</xsl:when>
|
@@ -4980,6 +5383,7 @@
|
|
4980
5383
|
|
4981
5384
|
|
4982
5385
|
|
5386
|
+
|
4983
5387
|
<xsl:value-of select="document('')//*/namespace::iho"/>
|
4984
5388
|
|
4985
5389
|
|
@@ -5039,17 +5443,79 @@
|
|
5039
5443
|
</xsl:call-template>
|
5040
5444
|
</xsl:if>
|
5041
5445
|
</xsl:template><xsl:template name="getLocalizedString">
|
5042
|
-
<xsl:param name="key"/>
|
5446
|
+
<xsl:param name="key"/>
|
5043
5447
|
|
5044
5448
|
<xsl:variable name="curr_lang">
|
5045
5449
|
<xsl:call-template name="getLang"/>
|
5046
5450
|
</xsl:variable>
|
5047
5451
|
|
5452
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5453
|
+
|
5048
5454
|
<xsl:choose>
|
5455
|
+
<xsl:when test="$data_value != ''">
|
5456
|
+
<xsl:value-of select="$data_value"/>
|
5457
|
+
</xsl:when>
|
5049
5458
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5050
5459
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5051
5460
|
</xsl:when>
|
5052
|
-
<xsl:otherwise
|
5461
|
+
<xsl:otherwise>
|
5462
|
+
<xsl:variable name="key_">
|
5463
|
+
<xsl:call-template name="capitalize">
|
5464
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5465
|
+
</xsl:call-template>
|
5466
|
+
</xsl:variable>
|
5467
|
+
<xsl:value-of select="$key_"/>
|
5468
|
+
</xsl:otherwise>
|
5053
5469
|
</xsl:choose>
|
5054
5470
|
|
5471
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5472
|
+
<xsl:param name="isAdded"/>
|
5473
|
+
<xsl:param name="isDeleted"/>
|
5474
|
+
<xsl:choose>
|
5475
|
+
<xsl:when test="local-name() = 'math'">
|
5476
|
+
<xsl:if test="$isAdded = 'true'">
|
5477
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5478
|
+
</xsl:if>
|
5479
|
+
<xsl:if test="$isDeleted = 'true'">
|
5480
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5481
|
+
</xsl:if>
|
5482
|
+
</xsl:when>
|
5483
|
+
<xsl:otherwise>
|
5484
|
+
<xsl:if test="$isAdded = 'true'">
|
5485
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5486
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5487
|
+
</xsl:if>
|
5488
|
+
<xsl:if test="$isDeleted = 'true'">
|
5489
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5490
|
+
<xsl:if test="local-name() = 'table'">
|
5491
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5492
|
+
</xsl:if>
|
5493
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5494
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5495
|
+
</xsl:if>
|
5496
|
+
</xsl:otherwise>
|
5497
|
+
</xsl:choose>
|
5498
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5499
|
+
<xsl:if test="$lang = 'ar'">
|
5500
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5501
|
+
</xsl:if>
|
5502
|
+
</xsl:template><xsl:template name="setAlignment">
|
5503
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5504
|
+
<xsl:choose>
|
5505
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5506
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5507
|
+
<xsl:when test="$align != ''">
|
5508
|
+
<xsl:value-of select="$align"/>
|
5509
|
+
</xsl:when>
|
5510
|
+
</xsl:choose>
|
5511
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
5512
|
+
<xsl:param name="default">left</xsl:param>
|
5513
|
+
<xsl:attribute name="text-align">
|
5514
|
+
<xsl:choose>
|
5515
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
5516
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
5517
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
5518
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
5519
|
+
</xsl:choose>
|
5520
|
+
</xsl:attribute>
|
5055
5521
|
</xsl:template></xsl:stylesheet>
|