metanorma-un 0.6.1 → 0.6.6
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 +209 -4
- data/lib/asciidoctor/un/un.rng +3 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +555 -78
- data/lib/isodoc/un/un.plenary.xsl +555 -78
- data/lib/isodoc/un/un.recommendation.xsl +555 -78
- data/lib/metanorma/un/version.rb +1 -1
- data/metanorma-unece.gemspec +3 -3
- metadata +7 -7
@@ -12,8 +12,12 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
<xsl:variable name="debug">false</xsl:variable>
|
15
|
-
<xsl:variable name="pageWidth" select="
|
16
|
-
<xsl:variable name="pageHeight" select="
|
15
|
+
<xsl:variable name="pageWidth" select="210"/>
|
16
|
+
<xsl:variable name="pageHeight" select="297"/>
|
17
|
+
<xsl:variable name="marginLeftRight1" select="40"/>
|
18
|
+
<xsl:variable name="marginLeftRight2" select="40"/>
|
19
|
+
<xsl:variable name="marginTop" select="30"/>
|
20
|
+
<xsl:variable name="marginBottom" select="34"/>
|
17
21
|
|
18
22
|
<xsl:variable name="contents">
|
19
23
|
<contents>
|
@@ -44,7 +48,7 @@
|
|
44
48
|
<fo:root font-family="Times New Roman, STIX Two Math, Source Han Sans" font-size="10pt" xml:lang="{$lang}">
|
45
49
|
<fo:layout-master-set>
|
46
50
|
<!-- Cover page -->
|
47
|
-
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
51
|
+
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
48
52
|
<fo:region-body margin-top="20mm" margin-bottom="10mm" margin-left="50mm" margin-right="21mm"/>
|
49
53
|
<fo:region-before extent="20mm"/>
|
50
54
|
<fo:region-after extent="10mm"/>
|
@@ -52,25 +56,25 @@
|
|
52
56
|
<fo:region-end extent="19mm"/>
|
53
57
|
</fo:simple-page-master>
|
54
58
|
|
55
|
-
<fo:simple-page-master master-name="document-preface" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
56
|
-
<fo:region-body margin-top="
|
57
|
-
<fo:region-before region-name="header" extent="
|
58
|
-
<fo:region-after region-name="footer" extent="
|
59
|
+
<fo:simple-page-master master-name="document-preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
60
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="19.5mm" margin-right="19.5mm"/>
|
61
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
62
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
59
63
|
<fo:region-start region-name="left" extent="19.5mm"/>
|
60
64
|
<fo:region-end region-name="right" extent="19.5mm"/>
|
61
65
|
</fo:simple-page-master>
|
62
66
|
|
63
|
-
<fo:simple-page-master master-name="blank" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
64
|
-
<fo:region-body margin-top="
|
67
|
+
<fo:simple-page-master master-name="blank" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
68
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="19.5mm" margin-right="19.5mm"/>
|
65
69
|
<fo:region-start region-name="left" extent="19.5mm"/>
|
66
70
|
<fo:region-end region-name="right" extent="19.5mm"/>
|
67
71
|
</fo:simple-page-master>
|
68
72
|
|
69
73
|
<!-- Document pages -->
|
70
|
-
<fo:simple-page-master master-name="document" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
71
|
-
<fo:region-body margin-top="
|
72
|
-
<fo:region-before region-name="header" extent="
|
73
|
-
<fo:region-after region-name="footer" extent="
|
74
|
+
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
75
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
76
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
77
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
74
78
|
<fo:region-start region-name="left" extent="19.5mm"/>
|
75
79
|
<fo:region-end region-name="right" extent="19.5mm"/>
|
76
80
|
</fo:simple-page-master>
|
@@ -1185,6 +1189,9 @@
|
|
1185
1189
|
<title-continued lang="en">(continued)</title-continued>
|
1186
1190
|
<title-continued lang="fr">(continué)</title-continued>
|
1187
1191
|
|
1192
|
+
</xsl:variable><xsl:variable name="bibdata">
|
1193
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
1194
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
1188
1195
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1189
1196
|
<xsl:param name="name"/>
|
1190
1197
|
<xsl:param name="lang"/>
|
@@ -1215,6 +1222,8 @@
|
|
1215
1222
|
|
1216
1223
|
|
1217
1224
|
|
1225
|
+
|
1226
|
+
|
1218
1227
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1219
1228
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1220
1229
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1260,7 +1269,7 @@
|
|
1260
1269
|
|
1261
1270
|
|
1262
1271
|
|
1263
|
-
|
1272
|
+
|
1264
1273
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
1265
1274
|
|
1266
1275
|
|
@@ -1273,6 +1282,7 @@
|
|
1273
1282
|
|
1274
1283
|
|
1275
1284
|
|
1285
|
+
|
1276
1286
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1277
1287
|
|
1278
1288
|
|
@@ -1289,9 +1299,7 @@
|
|
1289
1299
|
|
1290
1300
|
|
1291
1301
|
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1302
|
+
|
1295
1303
|
|
1296
1304
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1297
1305
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1326,8 +1334,10 @@
|
|
1326
1334
|
|
1327
1335
|
|
1328
1336
|
|
1337
|
+
|
1329
1338
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1330
1339
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1340
|
+
|
1331
1341
|
|
1332
1342
|
|
1333
1343
|
|
@@ -1347,6 +1357,9 @@
|
|
1347
1357
|
|
1348
1358
|
|
1349
1359
|
|
1360
|
+
|
1361
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
1362
|
+
|
1350
1363
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1351
1364
|
|
1352
1365
|
|
@@ -1359,15 +1372,20 @@
|
|
1359
1372
|
|
1360
1373
|
|
1361
1374
|
|
1375
|
+
|
1376
|
+
|
1362
1377
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1363
1378
|
|
1364
1379
|
|
1365
1380
|
|
1366
1381
|
|
1382
|
+
|
1383
|
+
|
1367
1384
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1368
1385
|
|
1369
1386
|
|
1370
1387
|
|
1388
|
+
|
1371
1389
|
|
1372
1390
|
|
1373
1391
|
|
@@ -1383,6 +1401,7 @@
|
|
1383
1401
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1384
1402
|
|
1385
1403
|
|
1404
|
+
|
1386
1405
|
</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">
|
1387
1406
|
|
1388
1407
|
|
@@ -1396,6 +1415,7 @@
|
|
1396
1415
|
|
1397
1416
|
|
1398
1417
|
|
1418
|
+
|
1399
1419
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1400
1420
|
|
1401
1421
|
|
@@ -1420,13 +1440,17 @@
|
|
1420
1440
|
|
1421
1441
|
|
1422
1442
|
|
1443
|
+
|
1423
1444
|
|
1424
1445
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1425
1446
|
|
1426
1447
|
|
1448
|
+
|
1427
1449
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1450
|
+
|
1428
1451
|
|
1429
1452
|
|
1453
|
+
|
1430
1454
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1431
1455
|
|
1432
1456
|
|
@@ -1445,14 +1469,18 @@
|
|
1445
1469
|
|
1446
1470
|
|
1447
1471
|
|
1472
|
+
|
1473
|
+
|
1448
1474
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1449
1475
|
|
1450
1476
|
|
1451
1477
|
|
1478
|
+
|
1452
1479
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1453
1480
|
|
1454
1481
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1455
1482
|
|
1483
|
+
|
1456
1484
|
|
1457
1485
|
|
1458
1486
|
|
@@ -1466,6 +1494,7 @@
|
|
1466
1494
|
|
1467
1495
|
|
1468
1496
|
|
1497
|
+
|
1469
1498
|
|
1470
1499
|
|
1471
1500
|
|
@@ -1484,6 +1513,7 @@
|
|
1484
1513
|
|
1485
1514
|
|
1486
1515
|
|
1516
|
+
|
1487
1517
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1488
1518
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1489
1519
|
|
@@ -1492,6 +1522,7 @@
|
|
1492
1522
|
|
1493
1523
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1494
1524
|
|
1525
|
+
|
1495
1526
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1496
1527
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1497
1528
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -1516,11 +1547,14 @@
|
|
1516
1547
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1517
1548
|
|
1518
1549
|
|
1550
|
+
|
1519
1551
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1520
1552
|
|
1553
|
+
|
1521
1554
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1522
1555
|
|
1523
1556
|
|
1557
|
+
|
1524
1558
|
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1525
1559
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1526
1560
|
</xsl:variable><xsl:attribute-set name="add-style">
|
@@ -1539,6 +1573,8 @@
|
|
1539
1573
|
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1540
1574
|
|
1541
1575
|
|
1576
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1577
|
+
|
1542
1578
|
</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">
|
1543
1579
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1544
1580
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -1549,14 +1585,15 @@
|
|
1549
1585
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1550
1586
|
|
1551
1587
|
<!-- Normative references -->
|
1552
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1588
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
|
1553
1589
|
<!-- Terms and definitions -->
|
1554
1590
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1555
1591
|
<!-- Another main sections -->
|
1556
1592
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1557
1593
|
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1558
1594
|
<!-- Bibliography -->
|
1559
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1595
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
1596
|
+
|
1560
1597
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1561
1598
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1562
1599
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
@@ -1592,11 +1629,11 @@
|
|
1592
1629
|
<xsl:variable name="table">
|
1593
1630
|
|
1594
1631
|
<xsl:variable name="simple-table">
|
1595
|
-
<xsl:call-template name="getSimpleTable"/>
|
1632
|
+
<xsl:call-template name="getSimpleTable"/>
|
1596
1633
|
</xsl:variable>
|
1597
1634
|
|
1598
1635
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1599
|
-
<fo:block> </fo:block>
|
1636
|
+
<fo:block> </fo:block>
|
1600
1637
|
</xsl:if> -->
|
1601
1638
|
|
1602
1639
|
<!-- $namespace = 'iso' or -->
|
@@ -1659,6 +1696,7 @@
|
|
1659
1696
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1660
1697
|
|
1661
1698
|
|
1699
|
+
|
1662
1700
|
|
1663
1701
|
|
1664
1702
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
@@ -1676,6 +1714,8 @@
|
|
1676
1714
|
|
1677
1715
|
|
1678
1716
|
|
1717
|
+
|
1718
|
+
|
1679
1719
|
<xsl:variable name="table_width">
|
1680
1720
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1681
1721
|
|
@@ -1698,6 +1738,7 @@
|
|
1698
1738
|
|
1699
1739
|
|
1700
1740
|
|
1741
|
+
|
1701
1742
|
|
1702
1743
|
|
1703
1744
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
@@ -1709,6 +1750,7 @@
|
|
1709
1750
|
|
1710
1751
|
|
1711
1752
|
|
1753
|
+
|
1712
1754
|
</xsl:variable>
|
1713
1755
|
|
1714
1756
|
|
@@ -1842,11 +1884,25 @@
|
|
1842
1884
|
</xsl:choose>
|
1843
1885
|
|
1844
1886
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1887
|
+
<xsl:param name="continued"/>
|
1845
1888
|
<xsl:if test="normalize-space() != ''">
|
1846
1889
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1847
1890
|
|
1848
1891
|
|
1849
|
-
|
1892
|
+
|
1893
|
+
|
1894
|
+
|
1895
|
+
<xsl:choose>
|
1896
|
+
<xsl:when test="$continued = 'true'">
|
1897
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1898
|
+
|
1899
|
+
</xsl:when>
|
1900
|
+
<xsl:otherwise>
|
1901
|
+
<xsl:apply-templates/>
|
1902
|
+
</xsl:otherwise>
|
1903
|
+
</xsl:choose>
|
1904
|
+
|
1905
|
+
|
1850
1906
|
</fo:block>
|
1851
1907
|
</xsl:if>
|
1852
1908
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1983,21 +2039,22 @@
|
|
1983
2039
|
<!-- font-weight="bold" -->
|
1984
2040
|
<fo:table-header>
|
1985
2041
|
|
2042
|
+
|
1986
2043
|
<xsl:apply-templates/>
|
1987
2044
|
</fo:table-header>
|
1988
2045
|
</xsl:template><xsl:template name="table-header-title">
|
1989
|
-
<xsl:param name="cols-count"/>
|
2046
|
+
<xsl:param name="cols-count"/>
|
1990
2047
|
<!-- row for title -->
|
1991
2048
|
<fo:table-row>
|
1992
2049
|
<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">
|
1993
|
-
|
2050
|
+
|
2051
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
2052
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
2053
|
+
</xsl:apply-templates>
|
1994
2054
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1995
2055
|
<xsl:call-template name="fn_name_display"/>
|
1996
|
-
</xsl:for-each>
|
1997
|
-
|
1998
|
-
<xsl:text> </xsl:text>
|
1999
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2000
|
-
</fo:block>
|
2056
|
+
</xsl:for-each>
|
2057
|
+
|
2001
2058
|
</fo:table-cell>
|
2002
2059
|
</fo:table-row>
|
2003
2060
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2218,6 +2275,7 @@
|
|
2218
2275
|
|
2219
2276
|
|
2220
2277
|
|
2278
|
+
|
2221
2279
|
</xsl:if>
|
2222
2280
|
<xsl:if test="$parent-name = 'tfoot'">
|
2223
2281
|
|
@@ -2227,6 +2285,10 @@
|
|
2227
2285
|
|
2228
2286
|
|
2229
2287
|
|
2288
|
+
|
2289
|
+
|
2290
|
+
|
2291
|
+
|
2230
2292
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2231
2293
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2232
2294
|
</xsl:if> -->
|
@@ -2251,6 +2313,7 @@
|
|
2251
2313
|
|
2252
2314
|
|
2253
2315
|
|
2316
|
+
|
2254
2317
|
|
2255
2318
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
2256
2319
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
@@ -2271,6 +2334,7 @@
|
|
2271
2334
|
|
2272
2335
|
|
2273
2336
|
|
2337
|
+
|
2274
2338
|
<xsl:if test="$lang = 'ar'">
|
2275
2339
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2276
2340
|
</xsl:if>
|
@@ -2322,6 +2386,8 @@
|
|
2322
2386
|
|
2323
2387
|
|
2324
2388
|
|
2389
|
+
|
2390
|
+
|
2325
2391
|
<xsl:if test="ancestor::*[local-name()='sections']">
|
2326
2392
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2327
2393
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
@@ -2331,6 +2397,9 @@
|
|
2331
2397
|
|
2332
2398
|
|
2333
2399
|
|
2400
|
+
|
2401
|
+
|
2402
|
+
|
2334
2403
|
<xsl:if test=".//*[local-name() = 'table']">
|
2335
2404
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2336
2405
|
</xsl:if>
|
@@ -2360,6 +2429,7 @@
|
|
2360
2429
|
|
2361
2430
|
|
2362
2431
|
|
2432
|
+
|
2363
2433
|
<fo:inline padding-right="2mm">
|
2364
2434
|
|
2365
2435
|
|
@@ -2413,6 +2483,7 @@
|
|
2413
2483
|
|
2414
2484
|
|
2415
2485
|
|
2486
|
+
|
2416
2487
|
<xsl:value-of select="@reference"/>
|
2417
2488
|
|
2418
2489
|
|
@@ -2556,6 +2627,10 @@
|
|
2556
2627
|
|
2557
2628
|
|
2558
2629
|
|
2630
|
+
|
2631
|
+
|
2632
|
+
|
2633
|
+
|
2559
2634
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2560
2635
|
|
2561
2636
|
|
@@ -2647,6 +2722,7 @@
|
|
2647
2722
|
|
2648
2723
|
|
2649
2724
|
|
2725
|
+
|
2650
2726
|
<xsl:variable name="title-key">
|
2651
2727
|
|
2652
2728
|
|
@@ -2857,6 +2933,7 @@
|
|
2857
2933
|
|
2858
2934
|
<fo:table-row>
|
2859
2935
|
|
2936
|
+
|
2860
2937
|
<fo:table-cell>
|
2861
2938
|
|
2862
2939
|
<fo:block margin-top="6pt">
|
@@ -2872,6 +2949,7 @@
|
|
2872
2949
|
|
2873
2950
|
|
2874
2951
|
|
2952
|
+
|
2875
2953
|
<xsl:apply-templates/>
|
2876
2954
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2877
2955
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2928,6 +3006,8 @@
|
|
2928
3006
|
|
2929
3007
|
<xsl:apply-templates/>
|
2930
3008
|
</fo:inline>
|
3009
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
3010
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
2931
3011
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
2932
3012
|
<fo:inline font-size="80%" vertical-align="super">
|
2933
3013
|
<xsl:apply-templates/>
|
@@ -2953,6 +3033,7 @@
|
|
2953
3033
|
|
2954
3034
|
|
2955
3035
|
|
3036
|
+
|
2956
3037
|
|
2957
3038
|
</xsl:variable>
|
2958
3039
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -3334,11 +3415,15 @@
|
|
3334
3415
|
</xsl:apply-templates>
|
3335
3416
|
</xsl:template><xsl:template name="getLang">
|
3336
3417
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3418
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3337
3419
|
<xsl:variable name="language">
|
3338
3420
|
<xsl:choose>
|
3339
3421
|
<xsl:when test="$language_current != ''">
|
3340
3422
|
<xsl:value-of select="$language_current"/>
|
3341
3423
|
</xsl:when>
|
3424
|
+
<xsl:when test="$language_current_2 != ''">
|
3425
|
+
<xsl:value-of select="$language_current_2"/>
|
3426
|
+
</xsl:when>
|
3342
3427
|
<xsl:otherwise>
|
3343
3428
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3344
3429
|
</xsl:otherwise>
|
@@ -3412,9 +3497,27 @@
|
|
3412
3497
|
<xsl:copy>
|
3413
3498
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3414
3499
|
</xsl:copy>
|
3415
|
-
<
|
3500
|
+
<xsl:choose>
|
3501
|
+
<!-- if in msub, then don't add space -->
|
3502
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
3503
|
+
<!-- if next char in digit, don't add space -->
|
3504
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
3505
|
+
<xsl:otherwise>
|
3506
|
+
<mathml:mspace width="0.5ex"/>
|
3507
|
+
</xsl:otherwise>
|
3508
|
+
</xsl:choose>
|
3416
3509
|
</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">
|
3417
3510
|
<xsl:variable name="target">
|
3511
|
+
<xsl:choose>
|
3512
|
+
<xsl:when test="@updatetype = 'true'">
|
3513
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
3514
|
+
</xsl:when>
|
3515
|
+
<xsl:otherwise>
|
3516
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3517
|
+
</xsl:otherwise>
|
3518
|
+
</xsl:choose>
|
3519
|
+
</xsl:variable>
|
3520
|
+
<xsl:variable name="target_text">
|
3418
3521
|
<xsl:choose>
|
3419
3522
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3420
3523
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -3426,20 +3529,22 @@
|
|
3426
3529
|
</xsl:variable>
|
3427
3530
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3428
3531
|
|
3532
|
+
|
3533
|
+
|
3429
3534
|
<xsl:choose>
|
3430
|
-
<xsl:when test="$
|
3535
|
+
<xsl:when test="$target_text = ''">
|
3431
3536
|
<xsl:apply-templates/>
|
3432
3537
|
</xsl:when>
|
3433
3538
|
<xsl:otherwise>
|
3434
|
-
<fo:basic-link external-destination="{
|
3539
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
3435
3540
|
<xsl:choose>
|
3436
3541
|
<xsl:when test="normalize-space(.) = ''">
|
3437
|
-
<!-- <xsl:value-of select="$target"/> -->
|
3438
3542
|
<xsl:call-template name="add-zero-spaces-link-java">
|
3439
|
-
<xsl:with-param name="text" select="$
|
3543
|
+
<xsl:with-param name="text" select="$target_text"/>
|
3440
3544
|
</xsl:call-template>
|
3441
3545
|
</xsl:when>
|
3442
3546
|
<xsl:otherwise>
|
3547
|
+
<!-- output text from <link>text</link> -->
|
3443
3548
|
<xsl:apply-templates/>
|
3444
3549
|
</xsl:otherwise>
|
3445
3550
|
</xsl:choose>
|
@@ -3564,6 +3669,7 @@
|
|
3564
3669
|
|
3565
3670
|
|
3566
3671
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3672
|
+
|
3567
3673
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3568
3674
|
</fo:inline>
|
3569
3675
|
<xsl:apply-templates/>
|
@@ -3589,7 +3695,9 @@
|
|
3589
3695
|
</xsl:choose>
|
3590
3696
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3591
3697
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3698
|
+
|
3592
3699
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3700
|
+
|
3593
3701
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3594
3702
|
</fo:inline>
|
3595
3703
|
<xsl:apply-templates/>
|
@@ -3665,13 +3773,17 @@
|
|
3665
3773
|
</xsl:call-template>
|
3666
3774
|
|
3667
3775
|
<fo:block>
|
3776
|
+
|
3668
3777
|
<xsl:apply-templates/>
|
3669
3778
|
</fo:block>
|
3670
3779
|
<xsl:call-template name="fn_display_figure"/>
|
3671
3780
|
<xsl:for-each select="*[local-name() = 'note']">
|
3672
3781
|
<xsl:call-template name="note"/>
|
3673
3782
|
</xsl:for-each>
|
3674
|
-
|
3783
|
+
|
3784
|
+
|
3785
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3786
|
+
|
3675
3787
|
</fo:block-container>
|
3676
3788
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3677
3789
|
<fo:block id="{@id}">
|
@@ -3789,21 +3901,249 @@
|
|
3789
3901
|
<xsl:param name="height"/>
|
3790
3902
|
<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; "/>
|
3791
3903
|
<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; "/>
|
3904
|
+
</xsl:template><xsl:variable name="figure_name_height">14</xsl:variable><xsl:variable name="width_effective" select="$pageWidth - $marginLeftRight1 - $marginLeftRight2"/><xsl:variable name="height_effective" select="$pageHeight - $marginTop - $marginBottom - $figure_name_height"/><xsl:variable name="image_dpi" select="96"/><xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/><xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image']) and *[local-name() = 'svg']]/*[local-name() = 'name']/*[local-name() = 'bookmark']" priority="2"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
3905
|
+
<xsl:param name="name"/>
|
3906
|
+
|
3907
|
+
<xsl:variable name="svg_content">
|
3908
|
+
<xsl:apply-templates select="." mode="svg_update"/>
|
3909
|
+
</xsl:variable>
|
3910
|
+
|
3911
|
+
<xsl:variable name="alt-text">
|
3912
|
+
<xsl:choose>
|
3913
|
+
<xsl:when test="normalize-space(../*[local-name() = 'name']) != ''">
|
3914
|
+
<xsl:value-of select="../*[local-name() = 'name']"/>
|
3915
|
+
</xsl:when>
|
3916
|
+
<xsl:when test="normalize-space($name) != ''">
|
3917
|
+
<xsl:value-of select="$name"/>
|
3918
|
+
</xsl:when>
|
3919
|
+
<xsl:otherwise>Figure</xsl:otherwise>
|
3920
|
+
</xsl:choose>
|
3921
|
+
</xsl:variable>
|
3922
|
+
|
3923
|
+
<xsl:choose>
|
3924
|
+
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
3925
|
+
<fo:block>
|
3926
|
+
<xsl:variable name="width" select="@width"/>
|
3927
|
+
<xsl:variable name="height" select="@height"/>
|
3928
|
+
|
3929
|
+
<xsl:variable name="scale_x">
|
3930
|
+
<xsl:choose>
|
3931
|
+
<xsl:when test="$width > $width_effective_px">
|
3932
|
+
<xsl:value-of select="$width_effective_px div $width"/>
|
3933
|
+
</xsl:when>
|
3934
|
+
<xsl:otherwise>1</xsl:otherwise>
|
3935
|
+
</xsl:choose>
|
3936
|
+
</xsl:variable>
|
3937
|
+
|
3938
|
+
<xsl:variable name="scale_y">
|
3939
|
+
<xsl:choose>
|
3940
|
+
<xsl:when test="$height * $scale_x > $height_effective_px">
|
3941
|
+
<xsl:value-of select="$height_effective_px div ($height * $scale_x)"/>
|
3942
|
+
</xsl:when>
|
3943
|
+
<xsl:otherwise>1</xsl:otherwise>
|
3944
|
+
</xsl:choose>
|
3945
|
+
</xsl:variable>
|
3946
|
+
|
3947
|
+
<xsl:variable name="scale">
|
3948
|
+
<xsl:choose>
|
3949
|
+
<xsl:when test="$scale_y != 1">
|
3950
|
+
<xsl:value-of select="$scale_x * $scale_y"/>
|
3951
|
+
</xsl:when>
|
3952
|
+
<xsl:otherwise>
|
3953
|
+
<xsl:value-of select="$scale_x"/>
|
3954
|
+
</xsl:otherwise>
|
3955
|
+
</xsl:choose>
|
3956
|
+
</xsl:variable>
|
3957
|
+
|
3958
|
+
<xsl:variable name="width_scale" select="round($width * $scale)"/>
|
3959
|
+
<xsl:variable name="height_scale" select="round($height * $scale)"/>
|
3960
|
+
|
3961
|
+
<fo:table table-layout="fixed" width="100%">
|
3962
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
3963
|
+
<fo:table-column column-width="{$width_scale}px"/>
|
3964
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
3965
|
+
<fo:table-body>
|
3966
|
+
<fo:table-row>
|
3967
|
+
<fo:table-cell column-number="2">
|
3968
|
+
<fo:block>
|
3969
|
+
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
3970
|
+
<xsl:if test="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
3971
|
+
<fo:block line-height="0" font-size="0">
|
3972
|
+
<xsl:for-each select="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
3973
|
+
<xsl:call-template name="bookmark"/>
|
3974
|
+
</xsl:for-each>
|
3975
|
+
</fo:block>
|
3976
|
+
</xsl:if>
|
3977
|
+
<fo:block text-depth="0" line-height="0" font-size="0">
|
3978
|
+
|
3979
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
3980
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3981
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3982
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3983
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3984
|
+
|
3985
|
+
<xsl:apply-templates select="xalan:nodeset($svg_content)" mode="svg_remove_a"/>
|
3986
|
+
</fo:instream-foreign-object>
|
3987
|
+
</fo:block>
|
3988
|
+
|
3989
|
+
<xsl:apply-templates select=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]" mode="svg_imagemap_links">
|
3990
|
+
<xsl:with-param name="scale" select="$scale"/>
|
3991
|
+
</xsl:apply-templates>
|
3992
|
+
</fo:block-container>
|
3993
|
+
</fo:block>
|
3994
|
+
</fo:table-cell>
|
3995
|
+
</fo:table-row>
|
3996
|
+
</fo:table-body>
|
3997
|
+
</fo:table>
|
3998
|
+
</fo:block>
|
3999
|
+
|
4000
|
+
</xsl:when>
|
4001
|
+
<xsl:otherwise>
|
4002
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
4003
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
4004
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
4005
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
4006
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4007
|
+
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
4008
|
+
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
4009
|
+
<!-- effective height / width = 1.48, 1.4 - with title -->
|
4010
|
+
<xsl:if test="@height > (@width * 1.4)"> <!-- for images with big height -->
|
4011
|
+
<xsl:variable name="width" select="((@width * 1.4) div @height) * 100"/>
|
4012
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
4013
|
+
</xsl:if>
|
4014
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4015
|
+
<xsl:copy-of select="$svg_content"/>
|
4016
|
+
</fo:instream-foreign-object>
|
4017
|
+
</fo:block>
|
4018
|
+
</xsl:otherwise>
|
4019
|
+
</xsl:choose>
|
4020
|
+
</xsl:template><xsl:template match="@*|node()" mode="svg_update">
|
4021
|
+
<xsl:copy>
|
4022
|
+
<xsl:apply-templates select="@*|node()" mode="svg_update"/>
|
4023
|
+
</xsl:copy>
|
4024
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
4025
|
+
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
4026
|
+
<xsl:value-of select="."/>
|
4027
|
+
</xsl:attribute>
|
4028
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4029
|
+
<xsl:variable name="svg_content" select="document(@src)"/>
|
4030
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4031
|
+
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
4032
|
+
<xsl:call-template name="image_svg">
|
4033
|
+
<xsl:with-param name="name" select="$name"/>
|
4034
|
+
</xsl:call-template>
|
4035
|
+
</xsl:for-each>
|
4036
|
+
</xsl:template><xsl:template match="@*|node()" mode="svg_remove_a">
|
4037
|
+
<xsl:copy>
|
4038
|
+
<xsl:apply-templates select="@*|node()" mode="svg_remove_a"/>
|
4039
|
+
</xsl:copy>
|
4040
|
+
</xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_remove_a">
|
4041
|
+
<xsl:apply-templates mode="svg_remove_a"/>
|
4042
|
+
</xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_imagemap_links">
|
4043
|
+
<xsl:param name="scale"/>
|
4044
|
+
<xsl:variable name="dest">
|
4045
|
+
<xsl:choose>
|
4046
|
+
<xsl:when test="starts-with(@href, '#')">
|
4047
|
+
<xsl:value-of select="substring-after(@href, '#')"/>
|
4048
|
+
</xsl:when>
|
4049
|
+
<xsl:otherwise>
|
4050
|
+
<xsl:value-of select="@href"/>
|
4051
|
+
</xsl:otherwise>
|
4052
|
+
</xsl:choose>
|
4053
|
+
</xsl:variable>
|
4054
|
+
<xsl:for-each select="./*[local-name() = 'rect']">
|
4055
|
+
<xsl:call-template name="insertSVGMapLink">
|
4056
|
+
<xsl:with-param name="left" select="floor(@x * $scale)"/>
|
4057
|
+
<xsl:with-param name="top" select="floor(@y * $scale)"/>
|
4058
|
+
<xsl:with-param name="width" select="floor(@width * $scale)"/>
|
4059
|
+
<xsl:with-param name="height" select="floor(@height * $scale)"/>
|
4060
|
+
<xsl:with-param name="dest" select="$dest"/>
|
4061
|
+
</xsl:call-template>
|
4062
|
+
</xsl:for-each>
|
4063
|
+
|
4064
|
+
<xsl:for-each select="./*[local-name() = 'polygon']">
|
4065
|
+
<xsl:variable name="points">
|
4066
|
+
<xsl:call-template name="split">
|
4067
|
+
<xsl:with-param name="pText" select="@points"/>
|
4068
|
+
</xsl:call-template>
|
4069
|
+
</xsl:variable>
|
4070
|
+
<xsl:variable name="x_coords">
|
4071
|
+
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
|
4072
|
+
<xsl:sort select="." data-type="number"/>
|
4073
|
+
<x><xsl:value-of select="."/></x>
|
4074
|
+
</xsl:for-each>
|
4075
|
+
</xsl:variable>
|
4076
|
+
<xsl:variable name="y_coords">
|
4077
|
+
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
|
4078
|
+
<xsl:sort select="." data-type="number"/>
|
4079
|
+
<y><xsl:value-of select="."/></y>
|
4080
|
+
</xsl:for-each>
|
4081
|
+
</xsl:variable>
|
4082
|
+
<xsl:variable name="x" select="xalan:nodeset($x_coords)//x[1]"/>
|
4083
|
+
<xsl:variable name="y" select="xalan:nodeset($y_coords)//y[1]"/>
|
4084
|
+
<xsl:variable name="width" select="xalan:nodeset($x_coords)//x[last()] - $x"/>
|
4085
|
+
<xsl:variable name="height" select="xalan:nodeset($y_coords)//y[last()] - $y"/>
|
4086
|
+
<xsl:call-template name="insertSVGMapLink">
|
4087
|
+
<xsl:with-param name="left" select="floor($x * $scale)"/>
|
4088
|
+
<xsl:with-param name="top" select="floor($y * $scale)"/>
|
4089
|
+
<xsl:with-param name="width" select="floor($width * $scale)"/>
|
4090
|
+
<xsl:with-param name="height" select="floor($height * $scale)"/>
|
4091
|
+
<xsl:with-param name="dest" select="$dest"/>
|
4092
|
+
</xsl:call-template>
|
4093
|
+
</xsl:for-each>
|
4094
|
+
|
4095
|
+
<xsl:for-each select="./*[local-name() = 'circle']">
|
4096
|
+
<xsl:call-template name="insertSVGMapLink">
|
4097
|
+
<xsl:with-param name="left" select="floor((@cx - @r) * $scale)"/>
|
4098
|
+
<xsl:with-param name="top" select="floor((@cy - @r) * $scale)"/>
|
4099
|
+
<xsl:with-param name="width" select="floor(@r * 2 * $scale)"/>
|
4100
|
+
<xsl:with-param name="height" select="floor(@r * 2 * $scale)"/>
|
4101
|
+
<xsl:with-param name="dest" select="$dest"/>
|
4102
|
+
</xsl:call-template>
|
4103
|
+
</xsl:for-each>
|
4104
|
+
<xsl:for-each select="./*[local-name() = 'ellipse']">
|
4105
|
+
<xsl:call-template name="insertSVGMapLink">
|
4106
|
+
<xsl:with-param name="left" select="floor((@cx - @rx) * $scale)"/>
|
4107
|
+
<xsl:with-param name="top" select="floor((@cy - @ry) * $scale)"/>
|
4108
|
+
<xsl:with-param name="width" select="floor(@rx * 2 * $scale)"/>
|
4109
|
+
<xsl:with-param name="height" select="floor(@ry * 2 * $scale)"/>
|
4110
|
+
<xsl:with-param name="dest" select="$dest"/>
|
4111
|
+
</xsl:call-template>
|
4112
|
+
</xsl:for-each>
|
4113
|
+
</xsl:template><xsl:template name="insertSVGMapLink">
|
4114
|
+
<xsl:param name="left"/>
|
4115
|
+
<xsl:param name="top"/>
|
4116
|
+
<xsl:param name="width"/>
|
4117
|
+
<xsl:param name="height"/>
|
4118
|
+
<xsl:param name="dest"/>
|
4119
|
+
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
4120
|
+
<fo:block font-size="1pt">
|
4121
|
+
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
4122
|
+
<fo:inline-container inline-progression-dimension="100%">
|
4123
|
+
<fo:block-container height="{$height - 1}px" width="100%">
|
4124
|
+
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
4125
|
+
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
4126
|
+
</xsl:if> -->
|
4127
|
+
<fo:block> </fo:block></fo:block-container>
|
4128
|
+
</fo:inline-container>
|
4129
|
+
</fo:basic-link>
|
4130
|
+
</fo:block>
|
4131
|
+
</fo:block-container>
|
3792
4132
|
</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">
|
3793
4133
|
<xsl:apply-templates mode="contents"/>
|
3794
4134
|
<xsl:text> </xsl:text>
|
3795
4135
|
</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">
|
3796
4136
|
<xsl:apply-templates mode="bookmarks"/>
|
3797
4137
|
<xsl:text> </xsl:text>
|
3798
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4138
|
+
</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">
|
3799
4139
|
<xsl:value-of select="."/>
|
3800
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4140
|
+
</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">
|
3801
4141
|
<xsl:value-of select="."/>
|
3802
4142
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3803
4143
|
<xsl:apply-templates mode="contents"/>
|
3804
4144
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3805
4145
|
<xsl:apply-templates mode="bookmarks"/>
|
3806
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4146
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3807
4147
|
<xsl:apply-templates select="."/>
|
3808
4148
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3809
4149
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3817,28 +4157,39 @@
|
|
3817
4157
|
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3818
4158
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3819
4159
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4160
|
+
<xsl:if test="@bundle = 'true'">
|
4161
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
4162
|
+
</xsl:if>
|
3820
4163
|
<fo:bookmark-title>
|
3821
|
-
<xsl:variable name="bookmark-title_">
|
3822
|
-
<xsl:call-template name="getLangVersion">
|
3823
|
-
<xsl:with-param name="lang" select="@lang"/>
|
3824
|
-
<xsl:with-param name="doctype" select="@doctype"/>
|
3825
|
-
<xsl:with-param name="title" select="@title-part"/>
|
3826
|
-
</xsl:call-template>
|
3827
|
-
</xsl:variable>
|
3828
4164
|
<xsl:choose>
|
3829
|
-
<xsl:when test="normalize-space(
|
3830
|
-
<xsl:
|
3831
|
-
|
3832
|
-
|
4165
|
+
<xsl:when test="not(normalize-space(@bundle) = 'true')"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
|
4166
|
+
<xsl:variable name="bookmark-title_">
|
4167
|
+
<xsl:call-template name="getLangVersion">
|
4168
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4169
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
4170
|
+
<xsl:with-param name="title" select="@title-part"/>
|
4171
|
+
</xsl:call-template>
|
4172
|
+
</xsl:variable>
|
3833
4173
|
<xsl:choose>
|
3834
|
-
<xsl:when test="
|
3835
|
-
|
3836
|
-
|
3837
|
-
<xsl:otherwise
|
4174
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4175
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4176
|
+
</xsl:when>
|
4177
|
+
<xsl:otherwise>
|
4178
|
+
<xsl:choose>
|
4179
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4180
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4181
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4182
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4183
|
+
</xsl:choose>
|
4184
|
+
</xsl:otherwise>
|
3838
4185
|
</xsl:choose>
|
4186
|
+
</xsl:when>
|
4187
|
+
<xsl:otherwise>
|
4188
|
+
<xsl:value-of select="@title-part"/>
|
3839
4189
|
</xsl:otherwise>
|
3840
4190
|
</xsl:choose>
|
3841
4191
|
</fo:bookmark-title>
|
4192
|
+
|
3842
4193
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3843
4194
|
|
3844
4195
|
<xsl:call-template name="insertFigureBookmarks">
|
@@ -3937,20 +4288,28 @@
|
|
3937
4288
|
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3938
4289
|
</xsl:choose>
|
3939
4290
|
</xsl:template><xsl:template match="item" mode="bookmark">
|
3940
|
-
<
|
3941
|
-
|
3942
|
-
|
3943
|
-
|
3944
|
-
<xsl:
|
3945
|
-
|
3946
|
-
|
3947
|
-
|
3948
|
-
|
3949
|
-
|
4291
|
+
<xsl:choose>
|
4292
|
+
<xsl:when test="@id != ''">
|
4293
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4294
|
+
<fo:bookmark-title>
|
4295
|
+
<xsl:if test="@section != ''">
|
4296
|
+
<xsl:value-of select="@section"/>
|
4297
|
+
<xsl:text> </xsl:text>
|
4298
|
+
</xsl:if>
|
4299
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4300
|
+
</fo:bookmark-title>
|
4301
|
+
<xsl:apply-templates mode="bookmark"/>
|
4302
|
+
</fo:bookmark>
|
4303
|
+
</xsl:when>
|
4304
|
+
<xsl:otherwise>
|
4305
|
+
<xsl:apply-templates mode="bookmark"/>
|
4306
|
+
</xsl:otherwise>
|
4307
|
+
</xsl:choose>
|
3950
4308
|
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
3951
4309
|
<xsl:if test="normalize-space() != ''">
|
3952
4310
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3953
4311
|
|
4312
|
+
|
3954
4313
|
<xsl:apply-templates/>
|
3955
4314
|
</fo:block>
|
3956
4315
|
</xsl:if>
|
@@ -4002,6 +4361,8 @@
|
|
4002
4361
|
</fo:list-item-body>
|
4003
4362
|
</fo:list-item>
|
4004
4363
|
</fo:list-block>
|
4364
|
+
</xsl:template><xsl:template name="extractSection">
|
4365
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4005
4366
|
</xsl:template><xsl:template name="extractTitle">
|
4006
4367
|
<xsl:choose>
|
4007
4368
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -4028,6 +4389,8 @@
|
|
4028
4389
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4029
4390
|
|
4030
4391
|
<fo:block-container margin-left="0mm">
|
4392
|
+
<xsl:copy-of select="@id"/>
|
4393
|
+
|
4031
4394
|
<xsl:if test="parent::*[local-name() = 'note']">
|
4032
4395
|
<xsl:attribute name="margin-left">
|
4033
4396
|
<xsl:choose>
|
@@ -4038,7 +4401,9 @@
|
|
4038
4401
|
|
4039
4402
|
</xsl:if>
|
4040
4403
|
<fo:block-container margin-left="0mm">
|
4041
|
-
|
4404
|
+
|
4405
|
+
|
4406
|
+
|
4042
4407
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4043
4408
|
<xsl:variable name="_font-size">
|
4044
4409
|
|
@@ -4049,6 +4414,7 @@
|
|
4049
4414
|
|
4050
4415
|
|
4051
4416
|
|
4417
|
+
|
4052
4418
|
|
4053
4419
|
|
4054
4420
|
|
@@ -4066,10 +4432,14 @@
|
|
4066
4432
|
</xsl:choose>
|
4067
4433
|
</xsl:attribute>
|
4068
4434
|
</xsl:if>
|
4069
|
-
|
4070
|
-
|
4435
|
+
|
4436
|
+
<xsl:apply-templates/>
|
4437
|
+
</fo:block>
|
4438
|
+
|
4439
|
+
|
4071
4440
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4072
4441
|
|
4442
|
+
|
4073
4443
|
</fo:block-container>
|
4074
4444
|
</fo:block-container>
|
4075
4445
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -4304,6 +4674,7 @@
|
|
4304
4674
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
4305
4675
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
4306
4676
|
|
4677
|
+
|
4307
4678
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4308
4679
|
|
4309
4680
|
<xsl:variable name="element">
|
@@ -4376,7 +4747,7 @@
|
|
4376
4747
|
</fo:inline>
|
4377
4748
|
</xsl:otherwise>
|
4378
4749
|
</xsl:choose>
|
4379
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4750
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4380
4751
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4381
4752
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4382
4753
|
<xsl:variable name="termsource_text">
|
@@ -4385,13 +4756,15 @@
|
|
4385
4756
|
|
4386
4757
|
<xsl:choose>
|
4387
4758
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4388
|
-
<xsl:apply-templates/>
|
4759
|
+
<!-- <xsl:apply-templates /> -->
|
4760
|
+
<xsl:copy-of select="$termsource_text"/>
|
4389
4761
|
</xsl:when>
|
4390
4762
|
<xsl:otherwise>
|
4391
4763
|
|
4392
4764
|
<xsl:text>[</xsl:text>
|
4393
4765
|
|
4394
|
-
<xsl:apply-templates/>
|
4766
|
+
<!-- <xsl:apply-templates /> -->
|
4767
|
+
<xsl:copy-of select="$termsource_text"/>
|
4395
4768
|
|
4396
4769
|
<xsl:text>]</xsl:text>
|
4397
4770
|
|
@@ -4402,8 +4775,15 @@
|
|
4402
4775
|
<xsl:if test="normalize-space() != ''">
|
4403
4776
|
<xsl:value-of select="."/>
|
4404
4777
|
</xsl:if>
|
4405
|
-
</xsl:template><xsl:
|
4778
|
+
</xsl:template><xsl:variable name="localized.source">
|
4779
|
+
<xsl:call-template name="getLocalizedString">
|
4780
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4781
|
+
</xsl:call-template>
|
4782
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4406
4783
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4784
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4785
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4786
|
+
</xsl:if>
|
4407
4787
|
|
4408
4788
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4409
4789
|
<xsl:apply-templates/>
|
@@ -4475,6 +4855,7 @@
|
|
4475
4855
|
</xsl:if>
|
4476
4856
|
|
4477
4857
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4858
|
+
|
4478
4859
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4479
4860
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
4480
4861
|
</xsl:if>
|
@@ -4518,6 +4899,7 @@
|
|
4518
4899
|
|
4519
4900
|
|
4520
4901
|
|
4902
|
+
|
4521
4903
|
<xsl:choose>
|
4522
4904
|
<xsl:when test="ancestor::un:annex and $depth >= 2">9.5</xsl:when>
|
4523
4905
|
<xsl:when test="ancestor::un:sections">9.5</xsl:when>
|
@@ -4612,7 +4994,6 @@
|
|
4612
4994
|
<xsl:attribute name="margin-top">3pt</xsl:attribute>
|
4613
4995
|
</xsl:if>
|
4614
4996
|
|
4615
|
-
|
4616
4997
|
<xsl:apply-templates/>
|
4617
4998
|
</fo:block>
|
4618
4999
|
|
@@ -4629,6 +5010,7 @@
|
|
4629
5010
|
<xsl:call-template name="setId"/>
|
4630
5011
|
|
4631
5012
|
|
5013
|
+
|
4632
5014
|
<xsl:apply-templates/>
|
4633
5015
|
</fo:block>
|
4634
5016
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -4660,7 +5042,7 @@
|
|
4660
5042
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4661
5043
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4662
5044
|
<xsl:choose>
|
4663
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
5045
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4664
5046
|
<fo:block-container>
|
4665
5047
|
<xsl:attribute name="margin-left">
|
4666
5048
|
<xsl:choose>
|
@@ -4670,6 +5052,7 @@
|
|
4670
5052
|
</xsl:attribute>
|
4671
5053
|
|
4672
5054
|
|
5055
|
+
|
4673
5056
|
<fo:block-container margin-left="0mm">
|
4674
5057
|
<fo:block>
|
4675
5058
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4871,21 +5254,25 @@
|
|
4871
5254
|
|
4872
5255
|
|
4873
5256
|
|
5257
|
+
|
5258
|
+
|
5259
|
+
|
5260
|
+
|
4874
5261
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4875
5262
|
<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')]"/>
|
4876
5263
|
<xsl:choose>
|
4877
5264
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4878
|
-
<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"/>
|
5265
|
+
<!-- <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"/>
|
4879
5266
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4880
5267
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4881
|
-
</xsl:if>
|
5268
|
+
</xsl:if> -->
|
4882
5269
|
<xsl:value-of select="$_doc_ident"/>
|
4883
5270
|
</xsl:when>
|
4884
5271
|
<xsl:otherwise>
|
4885
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
5272
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4886
5273
|
<xsl:if test="$type != ''">
|
4887
5274
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4888
|
-
</xsl:if>
|
5275
|
+
</xsl:if> -->
|
4889
5276
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4890
5277
|
</xsl:otherwise>
|
4891
5278
|
</xsl:choose>
|
@@ -4927,6 +5314,70 @@
|
|
4927
5314
|
<xsl:value-of select="substring(.,1,1)"/>
|
4928
5315
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4929
5316
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5317
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
5318
|
+
<fo:block>
|
5319
|
+
<xsl:apply-templates/>
|
5320
|
+
</fo:block>
|
5321
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
5322
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
5323
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
5324
|
+
<fo:inline>
|
5325
|
+
<xsl:call-template name="text_input"/>
|
5326
|
+
</fo:inline>
|
5327
|
+
</xsl:template><xsl:template name="text_input">
|
5328
|
+
<xsl:variable name="count">
|
5329
|
+
<xsl:choose>
|
5330
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
5331
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
5332
|
+
<xsl:otherwise>10</xsl:otherwise>
|
5333
|
+
</xsl:choose>
|
5334
|
+
</xsl:variable>
|
5335
|
+
<xsl:call-template name="repeat">
|
5336
|
+
<xsl:with-param name="char" select="'_'"/>
|
5337
|
+
<xsl:with-param name="count" select="$count"/>
|
5338
|
+
</xsl:call-template>
|
5339
|
+
<xsl:text> </xsl:text>
|
5340
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
5341
|
+
<xsl:variable name="caption">
|
5342
|
+
<xsl:choose>
|
5343
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
5344
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
5345
|
+
</xsl:choose>
|
5346
|
+
</xsl:variable>
|
5347
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
5348
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
5349
|
+
<fo:inline padding-right="1mm">
|
5350
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5351
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5352
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5353
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5354
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5355
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5356
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
5357
|
+
</svg>
|
5358
|
+
</fo:instream-foreign-object>
|
5359
|
+
</fo:inline>
|
5360
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
5361
|
+
<fo:inline padding-right="1mm">
|
5362
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5363
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5364
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5365
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5366
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5367
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5368
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
5369
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
5370
|
+
</svg>
|
5371
|
+
</fo:instream-foreign-object>
|
5372
|
+
</fo:inline>
|
5373
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
5374
|
+
<fo:inline>
|
5375
|
+
<xsl:call-template name="text_input"/>
|
5376
|
+
</fo:inline>
|
5377
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
5378
|
+
<fo:block-container border="1pt solid black" width="50%">
|
5379
|
+
<fo:block> </fo:block>
|
5380
|
+
</fo:block-container>
|
4930
5381
|
</xsl:template><xsl:template name="convertDate">
|
4931
5382
|
<xsl:param name="date"/>
|
4932
5383
|
<xsl:param name="format" select="'short'"/>
|
@@ -5134,6 +5585,9 @@
|
|
5134
5585
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
5135
5586
|
<xsl:value-of select="$level_total - 1"/>
|
5136
5587
|
</xsl:when>
|
5588
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
5589
|
+
<xsl:value-of select="$level_total - 1"/>
|
5590
|
+
</xsl:when>
|
5137
5591
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
5138
5592
|
<xsl:value-of select="$level_total - 2"/>
|
5139
5593
|
</xsl:when>
|
@@ -5192,6 +5646,7 @@
|
|
5192
5646
|
|
5193
5647
|
|
5194
5648
|
|
5649
|
+
|
5195
5650
|
<xsl:value-of select="document('')//*/namespace::un"/>
|
5196
5651
|
|
5197
5652
|
|
@@ -5258,17 +5713,29 @@
|
|
5258
5713
|
</xsl:call-template>
|
5259
5714
|
</xsl:if>
|
5260
5715
|
</xsl:template><xsl:template name="getLocalizedString">
|
5261
|
-
<xsl:param name="key"/>
|
5716
|
+
<xsl:param name="key"/>
|
5262
5717
|
|
5263
5718
|
<xsl:variable name="curr_lang">
|
5264
5719
|
<xsl:call-template name="getLang"/>
|
5265
5720
|
</xsl:variable>
|
5266
5721
|
|
5722
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5723
|
+
|
5267
5724
|
<xsl:choose>
|
5725
|
+
<xsl:when test="$data_value != ''">
|
5726
|
+
<xsl:value-of select="$data_value"/>
|
5727
|
+
</xsl:when>
|
5268
5728
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5269
5729
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5270
5730
|
</xsl:when>
|
5271
|
-
<xsl:otherwise
|
5731
|
+
<xsl:otherwise>
|
5732
|
+
<xsl:variable name="key_">
|
5733
|
+
<xsl:call-template name="capitalize">
|
5734
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
5735
|
+
</xsl:call-template>
|
5736
|
+
</xsl:variable>
|
5737
|
+
<xsl:value-of select="$key_"/>
|
5738
|
+
</xsl:otherwise>
|
5272
5739
|
</xsl:choose>
|
5273
5740
|
|
5274
5741
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
@@ -5311,4 +5778,14 @@
|
|
5311
5778
|
<xsl:value-of select="$align"/>
|
5312
5779
|
</xsl:when>
|
5313
5780
|
</xsl:choose>
|
5781
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
5782
|
+
<xsl:param name="default">left</xsl:param>
|
5783
|
+
<xsl:attribute name="text-align">
|
5784
|
+
<xsl:choose>
|
5785
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
5786
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
5787
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
5788
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
5789
|
+
</xsl:choose>
|
5790
|
+
</xsl:attribute>
|
5314
5791
|
</xsl:template></xsl:stylesheet>
|