metanorma-un 0.6.0 → 0.6.5
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 +12 -11
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/lib/asciidoctor/un/biblio.rng +1 -0
- data/lib/asciidoctor/un/isodoc.rng +191 -3
- data/lib/asciidoctor/un/un.rng +3 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +538 -66
- data/lib/isodoc/un/un.plenary.xsl +538 -66
- data/lib/isodoc/un/un.recommendation.xsl +538 -66
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +1 -1
- metadata +3 -3
@@ -1185,6 +1185,9 @@
|
|
1185
1185
|
<title-continued lang="en">(continued)</title-continued>
|
1186
1186
|
<title-continued lang="fr">(continué)</title-continued>
|
1187
1187
|
|
1188
|
+
</xsl:variable><xsl:variable name="bibdata">
|
1189
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
1190
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
1188
1191
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1189
1192
|
<xsl:param name="name"/>
|
1190
1193
|
<xsl:param name="lang"/>
|
@@ -1210,10 +1213,13 @@
|
|
1210
1213
|
</xsl:choose>
|
1211
1214
|
</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">
|
1212
1215
|
|
1216
|
+
|
1213
1217
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1214
1218
|
|
1215
1219
|
|
1216
1220
|
|
1221
|
+
|
1222
|
+
|
1217
1223
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1218
1224
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1219
1225
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1259,7 +1265,7 @@
|
|
1259
1265
|
|
1260
1266
|
|
1261
1267
|
|
1262
|
-
|
1268
|
+
|
1263
1269
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
1264
1270
|
|
1265
1271
|
|
@@ -1272,6 +1278,7 @@
|
|
1272
1278
|
|
1273
1279
|
|
1274
1280
|
|
1281
|
+
|
1275
1282
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1276
1283
|
|
1277
1284
|
|
@@ -1288,9 +1295,7 @@
|
|
1288
1295
|
|
1289
1296
|
|
1290
1297
|
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1298
|
+
|
1294
1299
|
|
1295
1300
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1296
1301
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1325,8 +1330,10 @@
|
|
1325
1330
|
|
1326
1331
|
|
1327
1332
|
|
1333
|
+
|
1328
1334
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1329
1335
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1336
|
+
|
1330
1337
|
|
1331
1338
|
|
1332
1339
|
|
@@ -1346,6 +1353,9 @@
|
|
1346
1353
|
|
1347
1354
|
|
1348
1355
|
|
1356
|
+
|
1357
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
1358
|
+
|
1349
1359
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1350
1360
|
|
1351
1361
|
|
@@ -1358,15 +1368,19 @@
|
|
1358
1368
|
|
1359
1369
|
|
1360
1370
|
|
1371
|
+
|
1372
|
+
|
1361
1373
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1362
1374
|
|
1363
1375
|
|
1364
1376
|
|
1365
1377
|
|
1378
|
+
|
1366
1379
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1367
1380
|
|
1368
1381
|
|
1369
1382
|
|
1383
|
+
|
1370
1384
|
|
1371
1385
|
|
1372
1386
|
|
@@ -1382,6 +1396,7 @@
|
|
1382
1396
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1383
1397
|
|
1384
1398
|
|
1399
|
+
|
1385
1400
|
</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">
|
1386
1401
|
|
1387
1402
|
|
@@ -1395,6 +1410,7 @@
|
|
1395
1410
|
|
1396
1411
|
|
1397
1412
|
|
1413
|
+
|
1398
1414
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1399
1415
|
|
1400
1416
|
|
@@ -1419,13 +1435,17 @@
|
|
1419
1435
|
|
1420
1436
|
|
1421
1437
|
|
1438
|
+
|
1422
1439
|
|
1423
1440
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1424
1441
|
|
1425
1442
|
|
1443
|
+
|
1426
1444
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1445
|
+
|
1427
1446
|
|
1428
1447
|
|
1448
|
+
|
1429
1449
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1430
1450
|
|
1431
1451
|
|
@@ -1444,14 +1464,18 @@
|
|
1444
1464
|
|
1445
1465
|
|
1446
1466
|
|
1467
|
+
|
1468
|
+
|
1447
1469
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1448
1470
|
|
1449
1471
|
|
1450
1472
|
|
1473
|
+
|
1451
1474
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1452
1475
|
|
1453
1476
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1454
1477
|
|
1478
|
+
|
1455
1479
|
|
1456
1480
|
|
1457
1481
|
|
@@ -1465,6 +1489,7 @@
|
|
1465
1489
|
|
1466
1490
|
|
1467
1491
|
|
1492
|
+
|
1468
1493
|
|
1469
1494
|
|
1470
1495
|
|
@@ -1483,6 +1508,7 @@
|
|
1483
1508
|
|
1484
1509
|
|
1485
1510
|
|
1511
|
+
|
1486
1512
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1487
1513
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1488
1514
|
|
@@ -1491,6 +1517,7 @@
|
|
1491
1517
|
|
1492
1518
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1493
1519
|
|
1520
|
+
|
1494
1521
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1495
1522
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1496
1523
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -1515,18 +1542,35 @@
|
|
1515
1542
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1516
1543
|
|
1517
1544
|
|
1545
|
+
|
1518
1546
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1519
1547
|
|
1548
|
+
|
1520
1549
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1521
1550
|
|
1522
1551
|
|
1523
|
-
|
1552
|
+
|
1553
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1554
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1555
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1524
1556
|
<xsl:attribute name="color">red</xsl:attribute>
|
1525
1557
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1526
|
-
|
1527
|
-
<xsl:attribute name="color"
|
1558
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1559
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1560
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1561
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1562
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1563
|
+
<xsl:text>red</xsl:text>
|
1564
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1565
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1528
1566
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1529
|
-
</xsl:attribute-set><xsl:
|
1567
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1568
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1569
|
+
|
1570
|
+
|
1571
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1572
|
+
|
1573
|
+
</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">
|
1530
1574
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1531
1575
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1532
1576
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1571,18 +1615,19 @@
|
|
1571
1615
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1572
1616
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1573
1617
|
|
1618
|
+
<xsl:variable name="table-preamble">
|
1619
|
+
|
1620
|
+
|
1621
|
+
</xsl:variable>
|
1622
|
+
|
1574
1623
|
<xsl:variable name="table">
|
1575
1624
|
|
1576
1625
|
<xsl:variable name="simple-table">
|
1577
|
-
<xsl:call-template name="getSimpleTable"/>
|
1626
|
+
<xsl:call-template name="getSimpleTable"/>
|
1578
1627
|
</xsl:variable>
|
1579
1628
|
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
1629
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1585
|
-
<fo:block> </fo:block>
|
1630
|
+
<fo:block> </fo:block>
|
1586
1631
|
</xsl:if> -->
|
1587
1632
|
|
1588
1633
|
<!-- $namespace = 'iso' or -->
|
@@ -1595,7 +1640,7 @@
|
|
1595
1640
|
|
1596
1641
|
|
1597
1642
|
|
1598
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1643
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1599
1644
|
|
1600
1645
|
<!-- <xsl:variable name="cols-count">
|
1601
1646
|
<xsl:choose>
|
@@ -1614,8 +1659,6 @@
|
|
1614
1659
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1615
1660
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1616
1661
|
|
1617
|
-
|
1618
|
-
|
1619
1662
|
<xsl:variable name="colwidths">
|
1620
1663
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1621
1664
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1643,9 +1686,11 @@
|
|
1643
1686
|
</xsl:choose>
|
1644
1687
|
</xsl:variable>
|
1645
1688
|
|
1689
|
+
|
1646
1690
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1647
1691
|
|
1648
1692
|
|
1693
|
+
|
1649
1694
|
|
1650
1695
|
|
1651
1696
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
@@ -1663,6 +1708,8 @@
|
|
1663
1708
|
|
1664
1709
|
|
1665
1710
|
|
1711
|
+
|
1712
|
+
|
1666
1713
|
<xsl:variable name="table_width">
|
1667
1714
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1668
1715
|
|
@@ -1684,6 +1731,8 @@
|
|
1684
1731
|
|
1685
1732
|
|
1686
1733
|
|
1734
|
+
|
1735
|
+
|
1687
1736
|
|
1688
1737
|
|
1689
1738
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
@@ -1695,6 +1744,7 @@
|
|
1695
1744
|
|
1696
1745
|
|
1697
1746
|
|
1747
|
+
|
1698
1748
|
</xsl:variable>
|
1699
1749
|
|
1700
1750
|
|
@@ -1778,7 +1828,8 @@
|
|
1778
1828
|
</fo:block-container>
|
1779
1829
|
</xsl:variable>
|
1780
1830
|
|
1781
|
-
|
1831
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1832
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1782
1833
|
|
1783
1834
|
<xsl:choose>
|
1784
1835
|
<xsl:when test="@width">
|
@@ -1787,21 +1838,65 @@
|
|
1787
1838
|
|
1788
1839
|
|
1789
1840
|
|
1790
|
-
<xsl:
|
1841
|
+
<xsl:choose>
|
1842
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1843
|
+
<xsl:copy-of select="$table-preamble"/>
|
1844
|
+
<fo:block>
|
1845
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1846
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1847
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1848
|
+
</xsl:call-template>
|
1849
|
+
<xsl:copy-of select="$table"/>
|
1850
|
+
</fo:block>
|
1851
|
+
</xsl:when>
|
1852
|
+
<xsl:otherwise>
|
1853
|
+
<xsl:copy-of select="$table-preamble"/>
|
1854
|
+
<xsl:copy-of select="$table"/>
|
1855
|
+
</xsl:otherwise>
|
1856
|
+
</xsl:choose>
|
1791
1857
|
|
1792
1858
|
|
1793
1859
|
</xsl:when>
|
1794
1860
|
<xsl:otherwise>
|
1795
|
-
<xsl:
|
1861
|
+
<xsl:choose>
|
1862
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1863
|
+
<xsl:copy-of select="$table-preamble"/>
|
1864
|
+
<fo:block>
|
1865
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1866
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1867
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1868
|
+
</xsl:call-template>
|
1869
|
+
<xsl:copy-of select="$table"/>
|
1870
|
+
</fo:block>
|
1871
|
+
</xsl:when>
|
1872
|
+
<xsl:otherwise>
|
1873
|
+
<xsl:copy-of select="$table-preamble"/>
|
1874
|
+
<xsl:copy-of select="$table"/>
|
1875
|
+
</xsl:otherwise>
|
1876
|
+
</xsl:choose>
|
1796
1877
|
</xsl:otherwise>
|
1797
1878
|
</xsl:choose>
|
1798
1879
|
|
1799
1880
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1881
|
+
<xsl:param name="continued"/>
|
1800
1882
|
<xsl:if test="normalize-space() != ''">
|
1801
1883
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1802
1884
|
|
1803
1885
|
|
1804
|
-
|
1886
|
+
|
1887
|
+
|
1888
|
+
|
1889
|
+
<xsl:choose>
|
1890
|
+
<xsl:when test="$continued = 'true'">
|
1891
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1892
|
+
|
1893
|
+
</xsl:when>
|
1894
|
+
<xsl:otherwise>
|
1895
|
+
<xsl:apply-templates/>
|
1896
|
+
</xsl:otherwise>
|
1897
|
+
</xsl:choose>
|
1898
|
+
|
1899
|
+
|
1805
1900
|
</fo:block>
|
1806
1901
|
</xsl:if>
|
1807
1902
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1853,7 +1948,7 @@
|
|
1853
1948
|
</xsl:for-each>
|
1854
1949
|
</xsl:when>
|
1855
1950
|
<xsl:otherwise>
|
1856
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1951
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1857
1952
|
<xsl:variable name="td_text">
|
1858
1953
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1859
1954
|
|
@@ -1938,21 +2033,22 @@
|
|
1938
2033
|
<!-- font-weight="bold" -->
|
1939
2034
|
<fo:table-header>
|
1940
2035
|
|
2036
|
+
|
1941
2037
|
<xsl:apply-templates/>
|
1942
2038
|
</fo:table-header>
|
1943
2039
|
</xsl:template><xsl:template name="table-header-title">
|
1944
|
-
<xsl:param name="cols-count"/>
|
2040
|
+
<xsl:param name="cols-count"/>
|
1945
2041
|
<!-- row for title -->
|
1946
2042
|
<fo:table-row>
|
1947
2043
|
<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">
|
1948
|
-
|
2044
|
+
|
2045
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
2046
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
2047
|
+
</xsl:apply-templates>
|
1949
2048
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1950
2049
|
<xsl:call-template name="fn_name_display"/>
|
1951
|
-
</xsl:for-each>
|
1952
|
-
|
1953
|
-
<xsl:text> </xsl:text>
|
1954
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1955
|
-
</fo:block>
|
2050
|
+
</xsl:for-each>
|
2051
|
+
|
1956
2052
|
</fo:table-cell>
|
1957
2053
|
</fo:table-row>
|
1958
2054
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2173,6 +2269,7 @@
|
|
2173
2269
|
|
2174
2270
|
|
2175
2271
|
|
2272
|
+
|
2176
2273
|
</xsl:if>
|
2177
2274
|
<xsl:if test="$parent-name = 'tfoot'">
|
2178
2275
|
|
@@ -2182,6 +2279,10 @@
|
|
2182
2279
|
|
2183
2280
|
|
2184
2281
|
|
2282
|
+
|
2283
|
+
|
2284
|
+
|
2285
|
+
|
2185
2286
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2186
2287
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2187
2288
|
</xsl:if> -->
|
@@ -2193,7 +2294,8 @@
|
|
2193
2294
|
<xsl:attribute name="text-align">
|
2194
2295
|
<xsl:choose>
|
2195
2296
|
<xsl:when test="@align">
|
2196
|
-
<xsl:
|
2297
|
+
<xsl:call-template name="setAlignment"/>
|
2298
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2197
2299
|
</xsl:when>
|
2198
2300
|
<xsl:otherwise>center</xsl:otherwise>
|
2199
2301
|
</xsl:choose>
|
@@ -2205,6 +2307,7 @@
|
|
2205
2307
|
|
2206
2308
|
|
2207
2309
|
|
2310
|
+
|
2208
2311
|
|
2209
2312
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
2210
2313
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
@@ -2225,6 +2328,10 @@
|
|
2225
2328
|
|
2226
2329
|
|
2227
2330
|
|
2331
|
+
|
2332
|
+
<xsl:if test="$lang = 'ar'">
|
2333
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2334
|
+
</xsl:if>
|
2228
2335
|
<xsl:if test="@colspan">
|
2229
2336
|
<xsl:attribute name="number-columns-spanned">
|
2230
2337
|
<xsl:value-of select="@colspan"/>
|
@@ -2256,11 +2363,16 @@
|
|
2256
2363
|
<xsl:attribute name="text-align">
|
2257
2364
|
<xsl:choose>
|
2258
2365
|
<xsl:when test="@align">
|
2259
|
-
<xsl:
|
2366
|
+
<xsl:call-template name="setAlignment"/>
|
2367
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2260
2368
|
</xsl:when>
|
2261
2369
|
<xsl:otherwise>left</xsl:otherwise>
|
2262
2370
|
</xsl:choose>
|
2263
2371
|
</xsl:attribute>
|
2372
|
+
<xsl:if test="$lang = 'ar'">
|
2373
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2374
|
+
</xsl:if>
|
2375
|
+
|
2264
2376
|
|
2265
2377
|
|
2266
2378
|
|
@@ -2278,6 +2390,12 @@
|
|
2278
2390
|
|
2279
2391
|
|
2280
2392
|
|
2393
|
+
|
2394
|
+
|
2395
|
+
|
2396
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2397
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2398
|
+
</xsl:if>
|
2281
2399
|
<xsl:if test="@colspan">
|
2282
2400
|
<xsl:attribute name="number-columns-spanned">
|
2283
2401
|
<xsl:value-of select="@colspan"/>
|
@@ -2415,13 +2533,13 @@
|
|
2415
2533
|
</xsl:choose>
|
2416
2534
|
</xsl:variable>
|
2417
2535
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2418
|
-
<xsl:element name="{$ns}:table">
|
2536
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2419
2537
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2420
2538
|
<tbody>
|
2421
2539
|
<xsl:apply-templates mode="dl"/>
|
2422
2540
|
</tbody>
|
2423
2541
|
</xsl:for-each>
|
2424
|
-
</xsl:element>
|
2542
|
+
<!-- </xsl:element> -->
|
2425
2543
|
</xsl:variable>
|
2426
2544
|
|
2427
2545
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2500,6 +2618,7 @@
|
|
2500
2618
|
|
2501
2619
|
|
2502
2620
|
|
2621
|
+
|
2503
2622
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2504
2623
|
|
2505
2624
|
|
@@ -2512,6 +2631,8 @@
|
|
2512
2631
|
<xsl:apply-templates/>
|
2513
2632
|
</fo:inline>
|
2514
2633
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2634
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2635
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2515
2636
|
<fo:block-container>
|
2516
2637
|
|
2517
2638
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2528,6 +2649,12 @@
|
|
2528
2649
|
</xsl:attribute>
|
2529
2650
|
|
2530
2651
|
</xsl:if>
|
2652
|
+
|
2653
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2654
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2655
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2656
|
+
</xsl:call-template>
|
2657
|
+
|
2531
2658
|
<fo:block-container>
|
2532
2659
|
|
2533
2660
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2583,6 +2710,7 @@
|
|
2583
2710
|
|
2584
2711
|
|
2585
2712
|
|
2713
|
+
|
2586
2714
|
<xsl:variable name="title-key">
|
2587
2715
|
|
2588
2716
|
|
@@ -2635,11 +2763,11 @@
|
|
2635
2763
|
</xsl:choose>
|
2636
2764
|
</xsl:variable>
|
2637
2765
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2638
|
-
<xsl:element name="{$ns}:table">
|
2766
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2639
2767
|
<tbody>
|
2640
2768
|
<xsl:apply-templates mode="dl"/>
|
2641
2769
|
</tbody>
|
2642
|
-
</xsl:element>
|
2770
|
+
<!-- </xsl:element> -->
|
2643
2771
|
</xsl:variable>
|
2644
2772
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2645
2773
|
<xsl:variable name="colwidths">
|
@@ -2793,6 +2921,7 @@
|
|
2793
2921
|
|
2794
2922
|
<fo:table-row>
|
2795
2923
|
|
2924
|
+
|
2796
2925
|
<fo:table-cell>
|
2797
2926
|
|
2798
2927
|
<fo:block margin-top="6pt">
|
@@ -2808,6 +2937,7 @@
|
|
2808
2937
|
|
2809
2938
|
|
2810
2939
|
|
2940
|
+
|
2811
2941
|
<xsl:apply-templates/>
|
2812
2942
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2813
2943
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2864,6 +2994,8 @@
|
|
2864
2994
|
|
2865
2995
|
<xsl:apply-templates/>
|
2866
2996
|
</fo:inline>
|
2997
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
2998
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
2867
2999
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
2868
3000
|
<fo:inline font-size="80%" vertical-align="super">
|
2869
3001
|
<xsl:apply-templates/>
|
@@ -2889,6 +3021,7 @@
|
|
2889
3021
|
|
2890
3022
|
|
2891
3023
|
|
3024
|
+
|
2892
3025
|
|
2893
3026
|
</xsl:variable>
|
2894
3027
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2907,9 +3040,71 @@
|
|
2907
3040
|
<xsl:apply-templates/>
|
2908
3041
|
</fo:inline>
|
2909
3042
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
2910
|
-
<
|
2911
|
-
<xsl:
|
2912
|
-
|
3043
|
+
<xsl:choose>
|
3044
|
+
<xsl:when test="@amendment">
|
3045
|
+
<fo:inline>
|
3046
|
+
<xsl:call-template name="insertTag">
|
3047
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
3048
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
3049
|
+
</xsl:call-template>
|
3050
|
+
<xsl:apply-templates/>
|
3051
|
+
<xsl:call-template name="insertTag">
|
3052
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
3053
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
3054
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
3055
|
+
</xsl:call-template>
|
3056
|
+
</fo:inline>
|
3057
|
+
</xsl:when>
|
3058
|
+
<xsl:when test="@corrigenda">
|
3059
|
+
<fo:inline>
|
3060
|
+
<xsl:call-template name="insertTag">
|
3061
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
3062
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
3063
|
+
</xsl:call-template>
|
3064
|
+
<xsl:apply-templates/>
|
3065
|
+
<xsl:call-template name="insertTag">
|
3066
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
3067
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
3068
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
3069
|
+
</xsl:call-template>
|
3070
|
+
</fo:inline>
|
3071
|
+
</xsl:when>
|
3072
|
+
<xsl:otherwise>
|
3073
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
3074
|
+
<xsl:apply-templates/>
|
3075
|
+
</fo:inline>
|
3076
|
+
</xsl:otherwise>
|
3077
|
+
</xsl:choose>
|
3078
|
+
|
3079
|
+
</xsl:template><xsl:template name="insertTag">
|
3080
|
+
<xsl:param name="type"/>
|
3081
|
+
<xsl:param name="kind"/>
|
3082
|
+
<xsl:param name="value"/>
|
3083
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
3084
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
3085
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
3086
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
3087
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
3088
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
3089
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
3090
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3091
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3092
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
3093
|
+
<g>
|
3094
|
+
<xsl:if test="$type = 'closing'">
|
3095
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
3096
|
+
</xsl:if>
|
3097
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
3098
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
3099
|
+
</g>
|
3100
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
3101
|
+
<xsl:if test="$type = 'closing'">
|
3102
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
3103
|
+
</xsl:if>
|
3104
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
3105
|
+
</text>
|
3106
|
+
</svg>
|
3107
|
+
</fo:instream-foreign-object>
|
2913
3108
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2914
3109
|
<fo:inline xsl:use-attribute-sets="del-style">
|
2915
3110
|
<xsl:apply-templates/>
|
@@ -3208,11 +3403,15 @@
|
|
3208
3403
|
</xsl:apply-templates>
|
3209
3404
|
</xsl:template><xsl:template name="getLang">
|
3210
3405
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3406
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3211
3407
|
<xsl:variable name="language">
|
3212
3408
|
<xsl:choose>
|
3213
3409
|
<xsl:when test="$language_current != ''">
|
3214
3410
|
<xsl:value-of select="$language_current"/>
|
3215
3411
|
</xsl:when>
|
3412
|
+
<xsl:when test="$language_current_2 != ''">
|
3413
|
+
<xsl:value-of select="$language_current_2"/>
|
3414
|
+
</xsl:when>
|
3216
3415
|
<xsl:otherwise>
|
3217
3416
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3218
3417
|
</xsl:otherwise>
|
@@ -3252,13 +3451,23 @@
|
|
3252
3451
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3253
3452
|
<xsl:value-of select="substring($str, 2)"/>
|
3254
3453
|
</xsl:template><xsl:template match="mathml:math">
|
3255
|
-
<
|
3454
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3455
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3456
|
+
|
3457
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3458
|
+
|
3459
|
+
|
3460
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3461
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3462
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3463
|
+
</xsl:call-template>
|
3256
3464
|
|
3257
3465
|
<xsl:variable name="mathml">
|
3258
3466
|
<xsl:apply-templates select="." mode="mathml"/>
|
3259
3467
|
</xsl:variable>
|
3260
3468
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3261
3469
|
|
3470
|
+
|
3262
3471
|
<!-- <xsl:copy-of select="."/> -->
|
3263
3472
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3264
3473
|
</fo:instream-foreign-object>
|
@@ -3276,9 +3485,27 @@
|
|
3276
3485
|
<xsl:copy>
|
3277
3486
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3278
3487
|
</xsl:copy>
|
3279
|
-
<
|
3488
|
+
<xsl:choose>
|
3489
|
+
<!-- if in msub, then don't add space -->
|
3490
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3491
|
+
<!-- if next char in digit, don't add space -->
|
3492
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3493
|
+
<xsl:otherwise>
|
3494
|
+
<mathml:mspace width="0.5ex"/>
|
3495
|
+
</xsl:otherwise>
|
3496
|
+
</xsl:choose>
|
3280
3497
|
</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">
|
3281
3498
|
<xsl:variable name="target">
|
3499
|
+
<xsl:choose>
|
3500
|
+
<xsl:when test="@updatetype = 'true'">
|
3501
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3502
|
+
</xsl:when>
|
3503
|
+
<xsl:otherwise>
|
3504
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3505
|
+
</xsl:otherwise>
|
3506
|
+
</xsl:choose>
|
3507
|
+
</xsl:variable>
|
3508
|
+
<xsl:variable name="target_text">
|
3282
3509
|
<xsl:choose>
|
3283
3510
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3284
3511
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3290,20 +3517,21 @@
|
|
3290
3517
|
</xsl:variable>
|
3291
3518
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3292
3519
|
|
3520
|
+
|
3293
3521
|
<xsl:choose>
|
3294
|
-
<xsl:when test="$
|
3522
|
+
<xsl:when test="$target_text = ''">
|
3295
3523
|
<xsl:apply-templates/>
|
3296
3524
|
</xsl:when>
|
3297
3525
|
<xsl:otherwise>
|
3298
|
-
<fo:basic-link external-destination="{
|
3526
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3299
3527
|
<xsl:choose>
|
3300
3528
|
<xsl:when test="normalize-space(.) = ''">
|
3301
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3302
3529
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3303
|
-
<xsl:with-param name="text" select="$
|
3530
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3304
3531
|
</xsl:call-template>
|
3305
3532
|
</xsl:when>
|
3306
3533
|
<xsl:otherwise>
|
3534
|
+
<!-- output text from <link>text</link> -->
|
3307
3535
|
<xsl:apply-templates/>
|
3308
3536
|
</xsl:otherwise>
|
3309
3537
|
</xsl:choose>
|
@@ -3428,6 +3656,7 @@
|
|
3428
3656
|
|
3429
3657
|
|
3430
3658
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3659
|
+
|
3431
3660
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3432
3661
|
</fo:inline>
|
3433
3662
|
<xsl:apply-templates/>
|
@@ -3453,7 +3682,9 @@
|
|
3453
3682
|
</xsl:choose>
|
3454
3683
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3455
3684
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3685
|
+
|
3456
3686
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3687
|
+
|
3457
3688
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3458
3689
|
</fo:inline>
|
3459
3690
|
<xsl:apply-templates/>
|
@@ -3519,16 +3750,27 @@
|
|
3519
3750
|
</fo:inline>
|
3520
3751
|
</xsl:if>
|
3521
3752
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3753
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3754
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3522
3755
|
<fo:block-container id="{@id}">
|
3523
3756
|
|
3757
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3758
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3759
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3760
|
+
</xsl:call-template>
|
3761
|
+
|
3524
3762
|
<fo:block>
|
3763
|
+
|
3525
3764
|
<xsl:apply-templates/>
|
3526
3765
|
</fo:block>
|
3527
3766
|
<xsl:call-template name="fn_display_figure"/>
|
3528
3767
|
<xsl:for-each select="*[local-name() = 'note']">
|
3529
3768
|
<xsl:call-template name="note"/>
|
3530
3769
|
</xsl:for-each>
|
3531
|
-
|
3770
|
+
|
3771
|
+
|
3772
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3773
|
+
|
3532
3774
|
</fo:block-container>
|
3533
3775
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3534
3776
|
<fo:block id="{@id}">
|
@@ -3540,6 +3782,8 @@
|
|
3540
3782
|
<xsl:apply-templates/>
|
3541
3783
|
</fo:block>
|
3542
3784
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3785
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3786
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3543
3787
|
<xsl:choose>
|
3544
3788
|
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3545
3789
|
<fo:inline padding-left="1mm" padding-right="1mm">
|
@@ -3560,7 +3804,26 @@
|
|
3560
3804
|
<xsl:variable name="src">
|
3561
3805
|
<xsl:call-template name="image_src"/>
|
3562
3806
|
</xsl:variable>
|
3563
|
-
|
3807
|
+
|
3808
|
+
<xsl:choose>
|
3809
|
+
<xsl:when test="$isDeleted = 'true'">
|
3810
|
+
<!-- enclose in svg -->
|
3811
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3812
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3813
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3814
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3815
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3816
|
+
|
3817
|
+
|
3818
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3819
|
+
|
3820
|
+
</fo:instream-foreign-object>
|
3821
|
+
</xsl:when>
|
3822
|
+
<xsl:otherwise>
|
3823
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3824
|
+
</xsl:otherwise>
|
3825
|
+
</xsl:choose>
|
3826
|
+
|
3564
3827
|
</fo:block>
|
3565
3828
|
</xsl:otherwise>
|
3566
3829
|
</xsl:choose>
|
@@ -3576,21 +3839,70 @@
|
|
3576
3839
|
<xsl:value-of select="@src"/>
|
3577
3840
|
</xsl:otherwise>
|
3578
3841
|
</xsl:choose>
|
3842
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3843
|
+
<xsl:choose>
|
3844
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3845
|
+
<xsl:variable name="src">
|
3846
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3847
|
+
</xsl:variable>
|
3848
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3849
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3850
|
+
<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">
|
3851
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3852
|
+
</svg>
|
3853
|
+
</xsl:when>
|
3854
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3855
|
+
<xsl:variable name="src">
|
3856
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3857
|
+
</xsl:variable>
|
3858
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3859
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3860
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3861
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3862
|
+
<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">
|
3863
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3864
|
+
</svg>
|
3865
|
+
</xsl:when>
|
3866
|
+
<xsl:otherwise>
|
3867
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3868
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3869
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3870
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3871
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3872
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3873
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3874
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3875
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3876
|
+
<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">
|
3877
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3878
|
+
<xsl:call-template name="svg_cross">
|
3879
|
+
<xsl:with-param name="width" select="$width"/>
|
3880
|
+
<xsl:with-param name="height" select="$height"/>
|
3881
|
+
</xsl:call-template>
|
3882
|
+
</svg>
|
3883
|
+
</xsl:otherwise>
|
3884
|
+
</xsl:choose>
|
3885
|
+
|
3886
|
+
</xsl:template><xsl:template name="svg_cross">
|
3887
|
+
<xsl:param name="width"/>
|
3888
|
+
<xsl:param name="height"/>
|
3889
|
+
<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; "/>
|
3890
|
+
<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; "/>
|
3579
3891
|
</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">
|
3580
3892
|
<xsl:apply-templates mode="contents"/>
|
3581
3893
|
<xsl:text> </xsl:text>
|
3582
3894
|
</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">
|
3583
3895
|
<xsl:apply-templates mode="bookmarks"/>
|
3584
3896
|
<xsl:text> </xsl:text>
|
3585
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3897
|
+
</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">
|
3586
3898
|
<xsl:value-of select="."/>
|
3587
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3899
|
+
</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">
|
3588
3900
|
<xsl:value-of select="."/>
|
3589
3901
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3590
3902
|
<xsl:apply-templates mode="contents"/>
|
3591
3903
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3592
3904
|
<xsl:apply-templates mode="bookmarks"/>
|
3593
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3905
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3594
3906
|
<xsl:apply-templates select="."/>
|
3595
3907
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3596
3908
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3738,6 +4050,7 @@
|
|
3738
4050
|
<xsl:if test="normalize-space() != ''">
|
3739
4051
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3740
4052
|
|
4053
|
+
|
3741
4054
|
<xsl:apply-templates/>
|
3742
4055
|
</fo:block>
|
3743
4056
|
</xsl:if>
|
@@ -3789,6 +4102,8 @@
|
|
3789
4102
|
</fo:list-item-body>
|
3790
4103
|
</fo:list-item>
|
3791
4104
|
</fo:list-block>
|
4105
|
+
</xsl:template><xsl:template name="extractSection">
|
4106
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3792
4107
|
</xsl:template><xsl:template name="extractTitle">
|
3793
4108
|
<xsl:choose>
|
3794
4109
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3815,6 +4130,8 @@
|
|
3815
4130
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3816
4131
|
|
3817
4132
|
<fo:block-container margin-left="0mm">
|
4133
|
+
<xsl:copy-of select="@id"/>
|
4134
|
+
|
3818
4135
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3819
4136
|
<xsl:attribute name="margin-left">
|
3820
4137
|
<xsl:choose>
|
@@ -3825,7 +4142,9 @@
|
|
3825
4142
|
|
3826
4143
|
</xsl:if>
|
3827
4144
|
<fo:block-container margin-left="0mm">
|
3828
|
-
|
4145
|
+
|
4146
|
+
|
4147
|
+
|
3829
4148
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3830
4149
|
<xsl:variable name="_font-size">
|
3831
4150
|
|
@@ -3836,6 +4155,7 @@
|
|
3836
4155
|
|
3837
4156
|
|
3838
4157
|
|
4158
|
+
|
3839
4159
|
|
3840
4160
|
|
3841
4161
|
|
@@ -3853,10 +4173,14 @@
|
|
3853
4173
|
</xsl:choose>
|
3854
4174
|
</xsl:attribute>
|
3855
4175
|
</xsl:if>
|
3856
|
-
|
3857
|
-
|
4176
|
+
|
4177
|
+
<xsl:apply-templates/>
|
4178
|
+
</fo:block>
|
4179
|
+
|
4180
|
+
|
3858
4181
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3859
4182
|
|
4183
|
+
|
3860
4184
|
</fo:block-container>
|
3861
4185
|
</fo:block-container>
|
3862
4186
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -4091,6 +4415,7 @@
|
|
4091
4415
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4092
4416
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4093
4417
|
|
4418
|
+
|
4094
4419
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4095
4420
|
|
4096
4421
|
<xsl:variable name="element">
|
@@ -4118,6 +4443,7 @@
|
|
4118
4443
|
<xsl:variable name="element">
|
4119
4444
|
block
|
4120
4445
|
|
4446
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
4121
4447
|
</xsl:variable>
|
4122
4448
|
<xsl:choose>
|
4123
4449
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -4125,7 +4451,7 @@
|
|
4125
4451
|
<xsl:apply-templates/>
|
4126
4452
|
</fo:inline>
|
4127
4453
|
</xsl:when>
|
4128
|
-
<xsl:when test="normalize-space($element)
|
4454
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4129
4455
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
4130
4456
|
<xsl:apply-templates/>
|
4131
4457
|
</fo:block>
|
@@ -4162,7 +4488,7 @@
|
|
4162
4488
|
</fo:inline>
|
4163
4489
|
</xsl:otherwise>
|
4164
4490
|
</xsl:choose>
|
4165
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4491
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4166
4492
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4167
4493
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4168
4494
|
<xsl:variable name="termsource_text">
|
@@ -4171,13 +4497,15 @@
|
|
4171
4497
|
|
4172
4498
|
<xsl:choose>
|
4173
4499
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4174
|
-
<xsl:apply-templates/>
|
4500
|
+
<!-- <xsl:apply-templates /> -->
|
4501
|
+
<xsl:copy-of select="$termsource_text"/>
|
4175
4502
|
</xsl:when>
|
4176
4503
|
<xsl:otherwise>
|
4177
4504
|
|
4178
4505
|
<xsl:text>[</xsl:text>
|
4179
4506
|
|
4180
|
-
<xsl:apply-templates/>
|
4507
|
+
<!-- <xsl:apply-templates /> -->
|
4508
|
+
<xsl:copy-of select="$termsource_text"/>
|
4181
4509
|
|
4182
4510
|
<xsl:text>]</xsl:text>
|
4183
4511
|
|
@@ -4188,8 +4516,15 @@
|
|
4188
4516
|
<xsl:if test="normalize-space() != ''">
|
4189
4517
|
<xsl:value-of select="."/>
|
4190
4518
|
</xsl:if>
|
4191
|
-
</xsl:template><xsl:
|
4519
|
+
</xsl:template><xsl:variable name="localized.source">
|
4520
|
+
<xsl:call-template name="getLocalizedString">
|
4521
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4522
|
+
</xsl:call-template>
|
4523
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4192
4524
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4525
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4526
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4527
|
+
</xsl:if>
|
4193
4528
|
|
4194
4529
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4195
4530
|
<xsl:apply-templates/>
|
@@ -4304,6 +4639,7 @@
|
|
4304
4639
|
|
4305
4640
|
|
4306
4641
|
|
4642
|
+
|
4307
4643
|
<xsl:choose>
|
4308
4644
|
<xsl:when test="ancestor::un:annex and $depth >= 2">9.5</xsl:when>
|
4309
4645
|
<xsl:when test="ancestor::un:sections">9.5</xsl:when>
|
@@ -4336,7 +4672,8 @@
|
|
4336
4672
|
</fo:inline>
|
4337
4673
|
</xsl:when>
|
4338
4674
|
<xsl:otherwise>
|
4339
|
-
<
|
4675
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4676
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4340
4677
|
</xsl:otherwise>
|
4341
4678
|
</xsl:choose>
|
4342
4679
|
|
@@ -4397,7 +4734,6 @@
|
|
4397
4734
|
<xsl:attribute name="margin-top">3pt</xsl:attribute>
|
4398
4735
|
</xsl:if>
|
4399
4736
|
|
4400
|
-
|
4401
4737
|
<xsl:apply-templates/>
|
4402
4738
|
</fo:block>
|
4403
4739
|
|
@@ -4414,6 +4750,7 @@
|
|
4414
4750
|
<xsl:call-template name="setId"/>
|
4415
4751
|
|
4416
4752
|
|
4753
|
+
|
4417
4754
|
<xsl:apply-templates/>
|
4418
4755
|
</fo:block>
|
4419
4756
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4445,7 +4782,7 @@
|
|
4445
4782
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4446
4783
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4447
4784
|
<xsl:choose>
|
4448
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4785
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4449
4786
|
<fo:block-container>
|
4450
4787
|
<xsl:attribute name="margin-left">
|
4451
4788
|
<xsl:choose>
|
@@ -4455,6 +4792,7 @@
|
|
4455
4792
|
</xsl:attribute>
|
4456
4793
|
|
4457
4794
|
|
4795
|
+
|
4458
4796
|
<fo:block-container margin-left="0mm">
|
4459
4797
|
<fo:block>
|
4460
4798
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4656,21 +4994,25 @@
|
|
4656
4994
|
|
4657
4995
|
|
4658
4996
|
|
4997
|
+
|
4998
|
+
|
4999
|
+
|
5000
|
+
|
4659
5001
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4660
5002
|
<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')]"/>
|
4661
5003
|
<xsl:choose>
|
4662
5004
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4663
|
-
<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"/>
|
5005
|
+
<!-- <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"/>
|
4664
5006
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4665
5007
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4666
|
-
</xsl:if>
|
5008
|
+
</xsl:if> -->
|
4667
5009
|
<xsl:value-of select="$_doc_ident"/>
|
4668
5010
|
</xsl:when>
|
4669
5011
|
<xsl:otherwise>
|
4670
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
5012
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4671
5013
|
<xsl:if test="$type != ''">
|
4672
5014
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4673
|
-
</xsl:if>
|
5015
|
+
</xsl:if> -->
|
4674
5016
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4675
5017
|
</xsl:otherwise>
|
4676
5018
|
</xsl:choose>
|
@@ -4712,6 +5054,70 @@
|
|
4712
5054
|
<xsl:value-of select="substring(.,1,1)"/>
|
4713
5055
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4714
5056
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5057
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
5058
|
+
<fo:block>
|
5059
|
+
<xsl:apply-templates/>
|
5060
|
+
</fo:block>
|
5061
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
5062
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5063
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
5064
|
+
<fo:inline>
|
5065
|
+
<xsl:call-template name="text_input"/>
|
5066
|
+
</fo:inline>
|
5067
|
+
</xsl:template><xsl:template name="text_input">
|
5068
|
+
<xsl:variable name="count">
|
5069
|
+
<xsl:choose>
|
5070
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
5071
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
5072
|
+
<xsl:otherwise>10</xsl:otherwise>
|
5073
|
+
</xsl:choose>
|
5074
|
+
</xsl:variable>
|
5075
|
+
<xsl:call-template name="repeat">
|
5076
|
+
<xsl:with-param name="char" select="'_'"/>
|
5077
|
+
<xsl:with-param name="count" select="$count"/>
|
5078
|
+
</xsl:call-template>
|
5079
|
+
<xsl:text> </xsl:text>
|
5080
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
5081
|
+
<xsl:variable name="caption">
|
5082
|
+
<xsl:choose>
|
5083
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
5084
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
5085
|
+
</xsl:choose>
|
5086
|
+
</xsl:variable>
|
5087
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
5088
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
5089
|
+
<fo:inline padding-right="1mm">
|
5090
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5091
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5092
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5093
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5094
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5095
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5096
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
5097
|
+
</svg>
|
5098
|
+
</fo:instream-foreign-object>
|
5099
|
+
</fo:inline>
|
5100
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
5101
|
+
<fo:inline padding-right="1mm">
|
5102
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5103
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5104
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5105
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5106
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5107
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5108
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
5109
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
5110
|
+
</svg>
|
5111
|
+
</fo:instream-foreign-object>
|
5112
|
+
</fo:inline>
|
5113
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
5114
|
+
<fo:inline>
|
5115
|
+
<xsl:call-template name="text_input"/>
|
5116
|
+
</fo:inline>
|
5117
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
5118
|
+
<fo:block-container border="1pt solid black" width="50%">
|
5119
|
+
<fo:block> </fo:block>
|
5120
|
+
</fo:block-container>
|
4715
5121
|
</xsl:template><xsl:template name="convertDate">
|
4716
5122
|
<xsl:param name="date"/>
|
4717
5123
|
<xsl:param name="format" select="'short'"/>
|
@@ -4919,6 +5325,9 @@
|
|
4919
5325
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
4920
5326
|
<xsl:value-of select="$level_total - 1"/>
|
4921
5327
|
</xsl:when>
|
5328
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5329
|
+
<xsl:value-of select="$level_total - 1"/>
|
5330
|
+
</xsl:when>
|
4922
5331
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
4923
5332
|
<xsl:value-of select="$level_total - 2"/>
|
4924
5333
|
</xsl:when>
|
@@ -4977,6 +5386,7 @@
|
|
4977
5386
|
|
4978
5387
|
|
4979
5388
|
|
5389
|
+
|
4980
5390
|
<xsl:value-of select="document('')//*/namespace::un"/>
|
4981
5391
|
|
4982
5392
|
|
@@ -5043,17 +5453,79 @@
|
|
5043
5453
|
</xsl:call-template>
|
5044
5454
|
</xsl:if>
|
5045
5455
|
</xsl:template><xsl:template name="getLocalizedString">
|
5046
|
-
<xsl:param name="key"/>
|
5456
|
+
<xsl:param name="key"/>
|
5047
5457
|
|
5048
5458
|
<xsl:variable name="curr_lang">
|
5049
5459
|
<xsl:call-template name="getLang"/>
|
5050
5460
|
</xsl:variable>
|
5051
5461
|
|
5462
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5463
|
+
|
5052
5464
|
<xsl:choose>
|
5465
|
+
<xsl:when test="$data_value != ''">
|
5466
|
+
<xsl:value-of select="$data_value"/>
|
5467
|
+
</xsl:when>
|
5053
5468
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5054
5469
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5055
5470
|
</xsl:when>
|
5056
|
-
<xsl:otherwise
|
5471
|
+
<xsl:otherwise>
|
5472
|
+
<xsl:variable name="key_">
|
5473
|
+
<xsl:call-template name="capitalize">
|
5474
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5475
|
+
</xsl:call-template>
|
5476
|
+
</xsl:variable>
|
5477
|
+
<xsl:value-of select="$key_"/>
|
5478
|
+
</xsl:otherwise>
|
5057
5479
|
</xsl:choose>
|
5058
5480
|
|
5481
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5482
|
+
<xsl:param name="isAdded"/>
|
5483
|
+
<xsl:param name="isDeleted"/>
|
5484
|
+
<xsl:choose>
|
5485
|
+
<xsl:when test="local-name() = 'math'">
|
5486
|
+
<xsl:if test="$isAdded = 'true'">
|
5487
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5488
|
+
</xsl:if>
|
5489
|
+
<xsl:if test="$isDeleted = 'true'">
|
5490
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5491
|
+
</xsl:if>
|
5492
|
+
</xsl:when>
|
5493
|
+
<xsl:otherwise>
|
5494
|
+
<xsl:if test="$isAdded = 'true'">
|
5495
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5496
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5497
|
+
</xsl:if>
|
5498
|
+
<xsl:if test="$isDeleted = 'true'">
|
5499
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5500
|
+
<xsl:if test="local-name() = 'table'">
|
5501
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5502
|
+
</xsl:if>
|
5503
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5504
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5505
|
+
</xsl:if>
|
5506
|
+
</xsl:otherwise>
|
5507
|
+
</xsl:choose>
|
5508
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5509
|
+
<xsl:if test="$lang = 'ar'">
|
5510
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5511
|
+
</xsl:if>
|
5512
|
+
</xsl:template><xsl:template name="setAlignment">
|
5513
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5514
|
+
<xsl:choose>
|
5515
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5516
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5517
|
+
<xsl:when test="$align != ''">
|
5518
|
+
<xsl:value-of select="$align"/>
|
5519
|
+
</xsl:when>
|
5520
|
+
</xsl:choose>
|
5521
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
5522
|
+
<xsl:param name="default">left</xsl:param>
|
5523
|
+
<xsl:attribute name="text-align">
|
5524
|
+
<xsl:choose>
|
5525
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
5526
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
5527
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
5528
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
5529
|
+
</xsl:choose>
|
5530
|
+
</xsl:attribute>
|
5059
5531
|
</xsl:template></xsl:stylesheet>
|