metanorma-iho 0.2.15 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +8 -2
- data/lib/asciidoctor/iho/biblio.rng +5 -6
- data/lib/asciidoctor/iho/converter.rb +8 -6
- data/lib/asciidoctor/iho/isodoc.rng +305 -4
- data/lib/isodoc/iho/html/htmlstyle.css +7 -0
- data/lib/isodoc/iho/iho.specification.xsl +462 -61
- data/lib/isodoc/iho/iho.standard.xsl +462 -61
- data/lib/isodoc/iho/xref.rb +1 -2
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +4 -4
- data/metanorma.yml +3 -0
- metadata +21 -20
@@ -5,6 +5,7 @@
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
6
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
|
+
<xsl:param name="basepath"/>
|
8
9
|
|
9
10
|
|
10
11
|
|
@@ -1084,6 +1085,9 @@
|
|
1084
1085
|
<title-continued lang="en">(continued)</title-continued>
|
1085
1086
|
<title-continued lang="fr">(continué)</title-continued>
|
1086
1087
|
|
1088
|
+
</xsl:variable><xsl:variable name="bibdata">
|
1089
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
1090
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
1087
1091
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1088
1092
|
<xsl:param name="name"/>
|
1089
1093
|
<xsl:param name="lang"/>
|
@@ -1109,8 +1113,10 @@
|
|
1109
1113
|
</xsl:choose>
|
1110
1114
|
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1111
1115
|
|
1116
|
+
|
1112
1117
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1113
1118
|
|
1119
|
+
|
1114
1120
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1115
1121
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1116
1122
|
|
@@ -1237,6 +1243,7 @@
|
|
1237
1243
|
|
1238
1244
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1239
1245
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1246
|
+
|
1240
1247
|
|
1241
1248
|
|
1242
1249
|
|
@@ -1265,6 +1272,7 @@
|
|
1265
1272
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1266
1273
|
|
1267
1274
|
|
1275
|
+
|
1268
1276
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1269
1277
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1270
1278
|
|
@@ -1278,6 +1286,7 @@
|
|
1278
1286
|
|
1279
1287
|
|
1280
1288
|
|
1289
|
+
|
1281
1290
|
|
1282
1291
|
|
1283
1292
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -1300,6 +1309,7 @@
|
|
1300
1309
|
|
1301
1310
|
|
1302
1311
|
|
1312
|
+
|
1303
1313
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1304
1314
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
1305
1315
|
|
@@ -1331,6 +1341,7 @@
|
|
1331
1341
|
|
1332
1342
|
|
1333
1343
|
|
1344
|
+
|
1334
1345
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1335
1346
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1336
1347
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
@@ -1339,6 +1350,7 @@
|
|
1339
1350
|
|
1340
1351
|
|
1341
1352
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1353
|
+
|
1342
1354
|
|
1343
1355
|
|
1344
1356
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -1363,6 +1375,7 @@
|
|
1363
1375
|
|
1364
1376
|
|
1365
1377
|
|
1378
|
+
|
1366
1379
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1367
1380
|
|
1368
1381
|
|
@@ -1379,6 +1392,7 @@
|
|
1379
1392
|
|
1380
1393
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1381
1394
|
|
1395
|
+
|
1382
1396
|
|
1383
1397
|
|
1384
1398
|
|
@@ -1412,10 +1426,12 @@
|
|
1412
1426
|
|
1413
1427
|
|
1414
1428
|
|
1429
|
+
|
1415
1430
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1416
1431
|
|
1417
1432
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1418
1433
|
|
1434
|
+
|
1419
1435
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1420
1436
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1421
1437
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -1441,7 +1457,7 @@
|
|
1441
1457
|
|
1442
1458
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1443
1459
|
|
1444
|
-
|
1460
|
+
|
1445
1461
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1446
1462
|
|
1447
1463
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
@@ -1449,7 +1465,26 @@
|
|
1449
1465
|
|
1450
1466
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1451
1467
|
|
1452
|
-
|
1468
|
+
|
1469
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1470
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1471
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1472
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1473
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1474
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1475
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1476
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1477
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1478
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1479
|
+
<xsl:text>red</xsl:text>
|
1480
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1481
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1482
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1483
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1484
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1485
|
+
|
1486
|
+
|
1487
|
+
</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">
|
1453
1488
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1454
1489
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1455
1490
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1494,16 +1529,17 @@
|
|
1494
1529
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1495
1530
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1496
1531
|
|
1532
|
+
<xsl:variable name="table-preamble">
|
1533
|
+
|
1534
|
+
|
1535
|
+
</xsl:variable>
|
1536
|
+
|
1497
1537
|
<xsl:variable name="table">
|
1498
1538
|
|
1499
1539
|
<xsl:variable name="simple-table">
|
1500
1540
|
<xsl:call-template name="getSimpleTable"/>
|
1501
1541
|
</xsl:variable>
|
1502
1542
|
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
1543
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1508
1544
|
<fo:block> </fo:block>
|
1509
1545
|
</xsl:if> -->
|
@@ -1518,7 +1554,7 @@
|
|
1518
1554
|
|
1519
1555
|
|
1520
1556
|
|
1521
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1557
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1522
1558
|
|
1523
1559
|
<!-- <xsl:variable name="cols-count">
|
1524
1560
|
<xsl:choose>
|
@@ -1537,8 +1573,6 @@
|
|
1537
1573
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1538
1574
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1539
1575
|
|
1540
|
-
|
1541
|
-
|
1542
1576
|
<xsl:variable name="colwidths">
|
1543
1577
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1544
1578
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1566,9 +1600,11 @@
|
|
1566
1600
|
</xsl:choose>
|
1567
1601
|
</xsl:variable>
|
1568
1602
|
|
1603
|
+
|
1569
1604
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1570
1605
|
|
1571
1606
|
|
1607
|
+
|
1572
1608
|
|
1573
1609
|
|
1574
1610
|
|
@@ -1578,6 +1614,8 @@
|
|
1578
1614
|
|
1579
1615
|
|
1580
1616
|
|
1617
|
+
|
1618
|
+
|
1581
1619
|
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
1582
1620
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1583
1621
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -1601,6 +1639,8 @@
|
|
1601
1639
|
|
1602
1640
|
|
1603
1641
|
|
1642
|
+
|
1643
|
+
|
1604
1644
|
|
1605
1645
|
|
1606
1646
|
|
@@ -1693,7 +1733,8 @@
|
|
1693
1733
|
</fo:block-container>
|
1694
1734
|
</xsl:variable>
|
1695
1735
|
|
1696
|
-
|
1736
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1737
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1697
1738
|
|
1698
1739
|
<xsl:choose>
|
1699
1740
|
<xsl:when test="@width">
|
@@ -1707,7 +1748,14 @@
|
|
1707
1748
|
<fo:table-body>
|
1708
1749
|
<fo:table-row>
|
1709
1750
|
<fo:table-cell column-number="2">
|
1710
|
-
<
|
1751
|
+
<xsl:copy-of select="$table-preamble"/>
|
1752
|
+
<fo:block>
|
1753
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1754
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1755
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1756
|
+
</xsl:call-template>
|
1757
|
+
<xsl:copy-of select="$table"/>
|
1758
|
+
</fo:block>
|
1711
1759
|
</fo:table-cell>
|
1712
1760
|
</fo:table-row>
|
1713
1761
|
</fo:table-body>
|
@@ -1718,16 +1766,42 @@
|
|
1718
1766
|
|
1719
1767
|
</xsl:when>
|
1720
1768
|
<xsl:otherwise>
|
1721
|
-
<xsl:
|
1769
|
+
<xsl:choose>
|
1770
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1771
|
+
<xsl:copy-of select="$table-preamble"/>
|
1772
|
+
<fo:block>
|
1773
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1774
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1775
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1776
|
+
</xsl:call-template>
|
1777
|
+
<xsl:copy-of select="$table"/>
|
1778
|
+
</fo:block>
|
1779
|
+
</xsl:when>
|
1780
|
+
<xsl:otherwise>
|
1781
|
+
<xsl:copy-of select="$table-preamble"/>
|
1782
|
+
<xsl:copy-of select="$table"/>
|
1783
|
+
</xsl:otherwise>
|
1784
|
+
</xsl:choose>
|
1722
1785
|
</xsl:otherwise>
|
1723
1786
|
</xsl:choose>
|
1724
1787
|
|
1725
1788
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1789
|
+
<xsl:param name="continued"/>
|
1726
1790
|
<xsl:if test="normalize-space() != ''">
|
1727
1791
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1728
1792
|
|
1729
1793
|
|
1730
|
-
<xsl:
|
1794
|
+
<xsl:choose>
|
1795
|
+
<xsl:when test="$continued = 'true'">
|
1796
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1797
|
+
|
1798
|
+
</xsl:when>
|
1799
|
+
<xsl:otherwise>
|
1800
|
+
<xsl:apply-templates/>
|
1801
|
+
</xsl:otherwise>
|
1802
|
+
</xsl:choose>
|
1803
|
+
|
1804
|
+
|
1731
1805
|
</fo:block>
|
1732
1806
|
</xsl:if>
|
1733
1807
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1779,7 +1853,7 @@
|
|
1779
1853
|
</xsl:for-each>
|
1780
1854
|
</xsl:when>
|
1781
1855
|
<xsl:otherwise>
|
1782
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1856
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1783
1857
|
<xsl:variable name="td_text">
|
1784
1858
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1785
1859
|
|
@@ -1867,18 +1941,18 @@
|
|
1867
1941
|
<xsl:apply-templates/>
|
1868
1942
|
</fo:table-header>
|
1869
1943
|
</xsl:template><xsl:template name="table-header-title">
|
1870
|
-
<xsl:param name="cols-count"/>
|
1944
|
+
<xsl:param name="cols-count"/>
|
1871
1945
|
<!-- row for title -->
|
1872
1946
|
<fo:table-row>
|
1873
1947
|
<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">
|
1874
|
-
|
1948
|
+
|
1949
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1950
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
1951
|
+
</xsl:apply-templates>
|
1875
1952
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1876
1953
|
<xsl:call-template name="fn_name_display"/>
|
1877
|
-
</xsl:for-each>
|
1878
|
-
|
1879
|
-
<xsl:text> </xsl:text>
|
1880
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1881
|
-
</fo:block>
|
1954
|
+
</xsl:for-each>
|
1955
|
+
|
1882
1956
|
</fo:table-cell>
|
1883
1957
|
</fo:table-row>
|
1884
1958
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2099,6 +2173,7 @@
|
|
2099
2173
|
|
2100
2174
|
|
2101
2175
|
|
2176
|
+
|
2102
2177
|
</xsl:if>
|
2103
2178
|
<xsl:if test="$parent-name = 'tfoot'">
|
2104
2179
|
|
@@ -2119,7 +2194,8 @@
|
|
2119
2194
|
<xsl:attribute name="text-align">
|
2120
2195
|
<xsl:choose>
|
2121
2196
|
<xsl:when test="@align">
|
2122
|
-
<xsl:
|
2197
|
+
<xsl:call-template name="setAlignment"/>
|
2198
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2123
2199
|
</xsl:when>
|
2124
2200
|
<xsl:otherwise>center</xsl:otherwise>
|
2125
2201
|
</xsl:choose>
|
@@ -2135,6 +2211,10 @@
|
|
2135
2211
|
|
2136
2212
|
|
2137
2213
|
|
2214
|
+
|
2215
|
+
<xsl:if test="$lang = 'ar'">
|
2216
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2217
|
+
</xsl:if>
|
2138
2218
|
<xsl:if test="@colspan">
|
2139
2219
|
<xsl:attribute name="number-columns-spanned">
|
2140
2220
|
<xsl:value-of select="@colspan"/>
|
@@ -2166,11 +2246,15 @@
|
|
2166
2246
|
<xsl:attribute name="text-align">
|
2167
2247
|
<xsl:choose>
|
2168
2248
|
<xsl:when test="@align">
|
2169
|
-
<xsl:
|
2249
|
+
<xsl:call-template name="setAlignment"/>
|
2250
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2170
2251
|
</xsl:when>
|
2171
2252
|
<xsl:otherwise>left</xsl:otherwise>
|
2172
2253
|
</xsl:choose>
|
2173
2254
|
</xsl:attribute>
|
2255
|
+
<xsl:if test="$lang = 'ar'">
|
2256
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2257
|
+
</xsl:if>
|
2174
2258
|
<!-- and ancestor::*[local-name() = 'thead'] -->
|
2175
2259
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2176
2260
|
|
@@ -2184,6 +2268,10 @@
|
|
2184
2268
|
|
2185
2269
|
|
2186
2270
|
|
2271
|
+
|
2272
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2273
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2274
|
+
</xsl:if>
|
2187
2275
|
<xsl:if test="@colspan">
|
2188
2276
|
<xsl:attribute name="number-columns-spanned">
|
2189
2277
|
<xsl:value-of select="@colspan"/>
|
@@ -2316,13 +2404,13 @@
|
|
2316
2404
|
</xsl:choose>
|
2317
2405
|
</xsl:variable>
|
2318
2406
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2319
|
-
<xsl:element name="{$ns}:table">
|
2407
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2320
2408
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2321
2409
|
<tbody>
|
2322
2410
|
<xsl:apply-templates mode="dl"/>
|
2323
2411
|
</tbody>
|
2324
2412
|
</xsl:for-each>
|
2325
|
-
</xsl:element>
|
2413
|
+
<!-- </xsl:element> -->
|
2326
2414
|
</xsl:variable>
|
2327
2415
|
|
2328
2416
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2413,6 +2501,8 @@
|
|
2413
2501
|
<xsl:apply-templates/>
|
2414
2502
|
</fo:inline>
|
2415
2503
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2504
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2505
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2416
2506
|
<fo:block-container>
|
2417
2507
|
|
2418
2508
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2429,6 +2519,12 @@
|
|
2429
2519
|
</xsl:attribute>
|
2430
2520
|
|
2431
2521
|
</xsl:if>
|
2522
|
+
|
2523
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2524
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2525
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2526
|
+
</xsl:call-template>
|
2527
|
+
|
2432
2528
|
<fo:block-container>
|
2433
2529
|
|
2434
2530
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2540,11 +2636,11 @@
|
|
2540
2636
|
</xsl:choose>
|
2541
2637
|
</xsl:variable>
|
2542
2638
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2543
|
-
<xsl:element name="{$ns}:table">
|
2639
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2544
2640
|
<tbody>
|
2545
2641
|
<xsl:apply-templates mode="dl"/>
|
2546
2642
|
</tbody>
|
2547
|
-
</xsl:element>
|
2643
|
+
<!-- </xsl:element> -->
|
2548
2644
|
</xsl:variable>
|
2549
2645
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2550
2646
|
<xsl:variable name="colwidths">
|
@@ -2797,6 +2893,7 @@
|
|
2797
2893
|
|
2798
2894
|
|
2799
2895
|
|
2896
|
+
|
2800
2897
|
|
2801
2898
|
</xsl:variable>
|
2802
2899
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2814,8 +2911,74 @@
|
|
2814
2911
|
<fo:inline text-decoration="underline">
|
2815
2912
|
<xsl:apply-templates/>
|
2816
2913
|
</fo:inline>
|
2914
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
2915
|
+
<xsl:choose>
|
2916
|
+
<xsl:when test="@amendment">
|
2917
|
+
<fo:inline>
|
2918
|
+
<xsl:call-template name="insertTag">
|
2919
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2920
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2921
|
+
</xsl:call-template>
|
2922
|
+
<xsl:apply-templates/>
|
2923
|
+
<xsl:call-template name="insertTag">
|
2924
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2925
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2926
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2927
|
+
</xsl:call-template>
|
2928
|
+
</fo:inline>
|
2929
|
+
</xsl:when>
|
2930
|
+
<xsl:when test="@corrigenda">
|
2931
|
+
<fo:inline>
|
2932
|
+
<xsl:call-template name="insertTag">
|
2933
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2934
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2935
|
+
</xsl:call-template>
|
2936
|
+
<xsl:apply-templates/>
|
2937
|
+
<xsl:call-template name="insertTag">
|
2938
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2939
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2940
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2941
|
+
</xsl:call-template>
|
2942
|
+
</fo:inline>
|
2943
|
+
</xsl:when>
|
2944
|
+
<xsl:otherwise>
|
2945
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2946
|
+
<xsl:apply-templates/>
|
2947
|
+
</fo:inline>
|
2948
|
+
</xsl:otherwise>
|
2949
|
+
</xsl:choose>
|
2950
|
+
|
2951
|
+
</xsl:template><xsl:template name="insertTag">
|
2952
|
+
<xsl:param name="type"/>
|
2953
|
+
<xsl:param name="kind"/>
|
2954
|
+
<xsl:param name="value"/>
|
2955
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
2956
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
2957
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
2958
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
2959
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
2960
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
2961
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
2962
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2963
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2964
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
2965
|
+
<g>
|
2966
|
+
<xsl:if test="$type = 'closing'">
|
2967
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
2968
|
+
</xsl:if>
|
2969
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
2970
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
2971
|
+
</g>
|
2972
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
2973
|
+
<xsl:if test="$type = 'closing'">
|
2974
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
2975
|
+
</xsl:if>
|
2976
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
2977
|
+
</text>
|
2978
|
+
</svg>
|
2979
|
+
</fo:instream-foreign-object>
|
2817
2980
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2818
|
-
<fo:inline
|
2981
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
2819
2982
|
<xsl:apply-templates/>
|
2820
2983
|
</fo:inline>
|
2821
2984
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -3112,11 +3275,15 @@
|
|
3112
3275
|
</xsl:apply-templates>
|
3113
3276
|
</xsl:template><xsl:template name="getLang">
|
3114
3277
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3278
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3115
3279
|
<xsl:variable name="language">
|
3116
3280
|
<xsl:choose>
|
3117
3281
|
<xsl:when test="$language_current != ''">
|
3118
3282
|
<xsl:value-of select="$language_current"/>
|
3119
3283
|
</xsl:when>
|
3284
|
+
<xsl:when test="$language_current_2 != ''">
|
3285
|
+
<xsl:value-of select="$language_current_2"/>
|
3286
|
+
</xsl:when>
|
3120
3287
|
<xsl:otherwise>
|
3121
3288
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3122
3289
|
</xsl:otherwise>
|
@@ -3156,13 +3323,23 @@
|
|
3156
3323
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3157
3324
|
<xsl:value-of select="substring($str, 2)"/>
|
3158
3325
|
</xsl:template><xsl:template match="mathml:math">
|
3159
|
-
<
|
3326
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3327
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3328
|
+
|
3329
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3330
|
+
|
3331
|
+
|
3332
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3333
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3334
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3335
|
+
</xsl:call-template>
|
3160
3336
|
|
3161
3337
|
<xsl:variable name="mathml">
|
3162
3338
|
<xsl:apply-templates select="." mode="mathml"/>
|
3163
3339
|
</xsl:variable>
|
3164
3340
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3165
3341
|
|
3342
|
+
|
3166
3343
|
<!-- <xsl:copy-of select="."/> -->
|
3167
3344
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3168
3345
|
</fo:instream-foreign-object>
|
@@ -3323,6 +3500,7 @@
|
|
3323
3500
|
|
3324
3501
|
|
3325
3502
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3503
|
+
|
3326
3504
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3327
3505
|
</fo:inline>
|
3328
3506
|
<xsl:apply-templates/>
|
@@ -3349,6 +3527,7 @@
|
|
3349
3527
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3350
3528
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3351
3529
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3530
|
+
|
3352
3531
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3353
3532
|
</fo:inline>
|
3354
3533
|
<xsl:apply-templates/>
|
@@ -3410,8 +3589,15 @@
|
|
3410
3589
|
</fo:inline>
|
3411
3590
|
</xsl:if>
|
3412
3591
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3592
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3593
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3413
3594
|
<fo:block-container id="{@id}">
|
3414
3595
|
|
3596
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3597
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3598
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3599
|
+
</xsl:call-template>
|
3600
|
+
|
3415
3601
|
<fo:block>
|
3416
3602
|
<xsl:apply-templates/>
|
3417
3603
|
</fo:block>
|
@@ -3419,7 +3605,10 @@
|
|
3419
3605
|
<xsl:for-each select="*[local-name() = 'note']">
|
3420
3606
|
<xsl:call-template name="note"/>
|
3421
3607
|
</xsl:for-each>
|
3422
|
-
|
3608
|
+
|
3609
|
+
|
3610
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3611
|
+
|
3423
3612
|
</fo:block-container>
|
3424
3613
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3425
3614
|
<fo:block id="{@id}">
|
@@ -3431,37 +3620,122 @@
|
|
3431
3620
|
<xsl:apply-templates/>
|
3432
3621
|
</fo:block>
|
3433
3622
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3434
|
-
<
|
3435
|
-
|
3436
|
-
|
3437
|
-
<xsl:
|
3438
|
-
<
|
3439
|
-
<xsl:
|
3440
|
-
<xsl:
|
3441
|
-
</xsl:
|
3442
|
-
<
|
3443
|
-
|
3444
|
-
|
3445
|
-
|
3446
|
-
|
3447
|
-
|
3448
|
-
|
3449
|
-
|
3623
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3624
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3625
|
+
<xsl:choose>
|
3626
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3627
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
3628
|
+
<xsl:variable name="src">
|
3629
|
+
<xsl:call-template name="image_src"/>
|
3630
|
+
</xsl:variable>
|
3631
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
3632
|
+
</fo:inline>
|
3633
|
+
</xsl:when>
|
3634
|
+
<xsl:otherwise>
|
3635
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
3636
|
+
|
3637
|
+
<xsl:variable name="src">
|
3638
|
+
<xsl:call-template name="image_src"/>
|
3639
|
+
</xsl:variable>
|
3640
|
+
|
3641
|
+
<xsl:choose>
|
3642
|
+
<xsl:when test="$isDeleted = 'true'">
|
3643
|
+
<!-- enclose in svg -->
|
3644
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3645
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3646
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3647
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3648
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3649
|
+
|
3650
|
+
|
3651
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3652
|
+
|
3653
|
+
</fo:instream-foreign-object>
|
3654
|
+
</xsl:when>
|
3655
|
+
<xsl:otherwise>
|
3656
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3657
|
+
</xsl:otherwise>
|
3658
|
+
</xsl:choose>
|
3659
|
+
|
3660
|
+
</fo:block>
|
3661
|
+
</xsl:otherwise>
|
3662
|
+
</xsl:choose>
|
3663
|
+
</xsl:template><xsl:template name="image_src">
|
3664
|
+
<xsl:choose>
|
3665
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3666
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3667
|
+
</xsl:when>
|
3668
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3669
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3670
|
+
</xsl:when>
|
3671
|
+
<xsl:otherwise>
|
3672
|
+
<xsl:value-of select="@src"/>
|
3673
|
+
</xsl:otherwise>
|
3674
|
+
</xsl:choose>
|
3675
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3676
|
+
<xsl:choose>
|
3677
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3678
|
+
<xsl:variable name="src">
|
3679
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3680
|
+
</xsl:variable>
|
3681
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3682
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3683
|
+
<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">
|
3684
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3685
|
+
</svg>
|
3686
|
+
</xsl:when>
|
3687
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3688
|
+
<xsl:variable name="src">
|
3689
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3690
|
+
</xsl:variable>
|
3691
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3692
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3693
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3694
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3695
|
+
<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">
|
3696
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3697
|
+
</svg>
|
3698
|
+
</xsl:when>
|
3699
|
+
<xsl:otherwise>
|
3700
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3701
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3702
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3703
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3704
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3705
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3706
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3707
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3708
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3709
|
+
<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">
|
3710
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3711
|
+
<xsl:call-template name="svg_cross">
|
3712
|
+
<xsl:with-param name="width" select="$width"/>
|
3713
|
+
<xsl:with-param name="height" select="$height"/>
|
3714
|
+
</xsl:call-template>
|
3715
|
+
</svg>
|
3716
|
+
</xsl:otherwise>
|
3717
|
+
</xsl:choose>
|
3718
|
+
|
3719
|
+
</xsl:template><xsl:template name="svg_cross">
|
3720
|
+
<xsl:param name="width"/>
|
3721
|
+
<xsl:param name="height"/>
|
3722
|
+
<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; "/>
|
3723
|
+
<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; "/>
|
3450
3724
|
</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">
|
3451
3725
|
<xsl:apply-templates mode="contents"/>
|
3452
3726
|
<xsl:text> </xsl:text>
|
3453
3727
|
</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">
|
3454
3728
|
<xsl:apply-templates mode="bookmarks"/>
|
3455
3729
|
<xsl:text> </xsl:text>
|
3456
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3730
|
+
</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">
|
3457
3731
|
<xsl:value-of select="."/>
|
3458
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3732
|
+
</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">
|
3459
3733
|
<xsl:value-of select="."/>
|
3460
3734
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3461
3735
|
<xsl:apply-templates mode="contents"/>
|
3462
3736
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3463
3737
|
<xsl:apply-templates mode="bookmarks"/>
|
3464
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3738
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3465
3739
|
<xsl:apply-templates select="."/>
|
3466
3740
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3467
3741
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3660,6 +3934,8 @@
|
|
3660
3934
|
</fo:list-item-body>
|
3661
3935
|
</fo:list-item>
|
3662
3936
|
</fo:list-block>
|
3937
|
+
</xsl:template><xsl:template name="extractSection">
|
3938
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3663
3939
|
</xsl:template><xsl:template name="extractTitle">
|
3664
3940
|
<xsl:choose>
|
3665
3941
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3707,6 +3983,7 @@
|
|
3707
3983
|
|
3708
3984
|
|
3709
3985
|
|
3986
|
+
|
3710
3987
|
|
3711
3988
|
|
3712
3989
|
|
@@ -3989,6 +4266,7 @@
|
|
3989
4266
|
<xsl:variable name="element">
|
3990
4267
|
block
|
3991
4268
|
|
4269
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
3992
4270
|
</xsl:variable>
|
3993
4271
|
<xsl:choose>
|
3994
4272
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -3996,7 +4274,7 @@
|
|
3996
4274
|
<xsl:apply-templates/>
|
3997
4275
|
</fo:inline>
|
3998
4276
|
</xsl:when>
|
3999
|
-
<xsl:when test="normalize-space($element)
|
4277
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4000
4278
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
4001
4279
|
<xsl:apply-templates/>
|
4002
4280
|
</fo:block>
|
@@ -4028,7 +4306,7 @@
|
|
4028
4306
|
</fo:inline>
|
4029
4307
|
</xsl:otherwise>
|
4030
4308
|
</xsl:choose>
|
4031
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4309
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4032
4310
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4033
4311
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4034
4312
|
<xsl:variable name="termsource_text">
|
@@ -4037,13 +4315,15 @@
|
|
4037
4315
|
|
4038
4316
|
<xsl:choose>
|
4039
4317
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4040
|
-
<xsl:apply-templates/>
|
4318
|
+
<!-- <xsl:apply-templates /> -->
|
4319
|
+
<xsl:copy-of select="$termsource_text"/>
|
4041
4320
|
</xsl:when>
|
4042
4321
|
<xsl:otherwise>
|
4043
4322
|
|
4044
4323
|
<xsl:text>[</xsl:text>
|
4045
4324
|
|
4046
|
-
<xsl:apply-templates/>
|
4325
|
+
<!-- <xsl:apply-templates /> -->
|
4326
|
+
<xsl:copy-of select="$termsource_text"/>
|
4047
4327
|
|
4048
4328
|
<xsl:text>]</xsl:text>
|
4049
4329
|
|
@@ -4054,14 +4334,20 @@
|
|
4054
4334
|
<xsl:if test="normalize-space() != ''">
|
4055
4335
|
<xsl:value-of select="."/>
|
4056
4336
|
</xsl:if>
|
4057
|
-
</xsl:template><xsl:
|
4337
|
+
</xsl:template><xsl:variable name="localized.source">
|
4338
|
+
<xsl:call-template name="getLocalizedString">
|
4339
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4340
|
+
</xsl:call-template>
|
4341
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4058
4342
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4343
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4344
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4345
|
+
</xsl:if>
|
4059
4346
|
|
4060
4347
|
<fo:inline>
|
4061
4348
|
|
4062
4349
|
|
4063
4350
|
|
4064
|
-
|
4065
4351
|
<xsl:call-template name="getTitle">
|
4066
4352
|
<xsl:with-param name="name" select="'title-source'"/>
|
4067
4353
|
</xsl:call-template>
|
@@ -4219,7 +4505,8 @@
|
|
4219
4505
|
</fo:inline>
|
4220
4506
|
</xsl:when>
|
4221
4507
|
<xsl:otherwise>
|
4222
|
-
<
|
4508
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4509
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4223
4510
|
</xsl:otherwise>
|
4224
4511
|
</xsl:choose>
|
4225
4512
|
|
@@ -4273,7 +4560,6 @@
|
|
4273
4560
|
|
4274
4561
|
|
4275
4562
|
|
4276
|
-
|
4277
4563
|
<xsl:apply-templates/>
|
4278
4564
|
</fo:block>
|
4279
4565
|
|
@@ -4316,7 +4602,7 @@
|
|
4316
4602
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4317
4603
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4318
4604
|
<xsl:choose>
|
4319
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4605
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4320
4606
|
<fo:block-container>
|
4321
4607
|
<xsl:attribute name="margin-left">
|
4322
4608
|
<xsl:choose>
|
@@ -4326,6 +4612,7 @@
|
|
4326
4612
|
</xsl:attribute>
|
4327
4613
|
|
4328
4614
|
|
4615
|
+
|
4329
4616
|
<fo:block-container margin-left="0mm">
|
4330
4617
|
<fo:block>
|
4331
4618
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4484,8 +4771,8 @@
|
|
4484
4771
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4485
4772
|
<xsl:apply-templates/>
|
4486
4773
|
</fo:block>
|
4487
|
-
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
4488
|
-
<fo:inline id="{@id}"/>
|
4774
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
4775
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
4489
4776
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4490
4777
|
<!-- <row>
|
4491
4778
|
<date>05-07-2013</date>
|
@@ -4626,6 +4913,10 @@
|
|
4626
4913
|
</xsl:choose>
|
4627
4914
|
<!-- end IHO bibitem processing -->
|
4628
4915
|
|
4916
|
+
|
4917
|
+
|
4918
|
+
|
4919
|
+
|
4629
4920
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4630
4921
|
<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')]"/>
|
4631
4922
|
<xsl:choose>
|
@@ -4682,6 +4973,70 @@
|
|
4682
4973
|
<xsl:value-of select="substring(.,1,1)"/>
|
4683
4974
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4684
4975
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4976
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
4977
|
+
<fo:block>
|
4978
|
+
<xsl:apply-templates/>
|
4979
|
+
</fo:block>
|
4980
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
4981
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4982
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
4983
|
+
<fo:inline>
|
4984
|
+
<xsl:call-template name="text_input"/>
|
4985
|
+
</fo:inline>
|
4986
|
+
</xsl:template><xsl:template name="text_input">
|
4987
|
+
<xsl:variable name="count">
|
4988
|
+
<xsl:choose>
|
4989
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
4990
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
4991
|
+
<xsl:otherwise>10</xsl:otherwise>
|
4992
|
+
</xsl:choose>
|
4993
|
+
</xsl:variable>
|
4994
|
+
<xsl:call-template name="repeat">
|
4995
|
+
<xsl:with-param name="char" select="'_'"/>
|
4996
|
+
<xsl:with-param name="count" select="$count"/>
|
4997
|
+
</xsl:call-template>
|
4998
|
+
<xsl:text> </xsl:text>
|
4999
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
5000
|
+
<xsl:variable name="caption">
|
5001
|
+
<xsl:choose>
|
5002
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
5003
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
5004
|
+
</xsl:choose>
|
5005
|
+
</xsl:variable>
|
5006
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
5007
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
5008
|
+
<fo:inline padding-right="1mm">
|
5009
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5010
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5011
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5012
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5013
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5014
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5015
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
5016
|
+
</svg>
|
5017
|
+
</fo:instream-foreign-object>
|
5018
|
+
</fo:inline>
|
5019
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
5020
|
+
<fo:inline padding-right="1mm">
|
5021
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5022
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5023
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5024
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5025
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5026
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5027
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
5028
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
5029
|
+
</svg>
|
5030
|
+
</fo:instream-foreign-object>
|
5031
|
+
</fo:inline>
|
5032
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
5033
|
+
<fo:inline>
|
5034
|
+
<xsl:call-template name="text_input"/>
|
5035
|
+
</fo:inline>
|
5036
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
5037
|
+
<fo:block-container border="1pt solid black" width="50%">
|
5038
|
+
<fo:block> </fo:block>
|
5039
|
+
</fo:block-container>
|
4685
5040
|
</xsl:template><xsl:template name="convertDate">
|
4686
5041
|
<xsl:param name="date"/>
|
4687
5042
|
<xsl:param name="format" select="'short'"/>
|
@@ -4954,6 +5309,7 @@
|
|
4954
5309
|
|
4955
5310
|
|
4956
5311
|
|
5312
|
+
|
4957
5313
|
<xsl:value-of select="document('')//*/namespace::iho"/>
|
4958
5314
|
|
4959
5315
|
|
@@ -5013,17 +5369,62 @@
|
|
5013
5369
|
</xsl:call-template>
|
5014
5370
|
</xsl:if>
|
5015
5371
|
</xsl:template><xsl:template name="getLocalizedString">
|
5016
|
-
<xsl:param name="key"/>
|
5372
|
+
<xsl:param name="key"/>
|
5017
5373
|
|
5018
5374
|
<xsl:variable name="curr_lang">
|
5019
5375
|
<xsl:call-template name="getLang"/>
|
5020
5376
|
</xsl:variable>
|
5021
5377
|
|
5378
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5379
|
+
|
5022
5380
|
<xsl:choose>
|
5381
|
+
<xsl:when test="$data_value != ''">
|
5382
|
+
<xsl:value-of select="$data_value"/>
|
5383
|
+
</xsl:when>
|
5023
5384
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5024
5385
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5025
5386
|
</xsl:when>
|
5026
5387
|
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
5027
5388
|
</xsl:choose>
|
5028
5389
|
|
5390
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5391
|
+
<xsl:param name="isAdded"/>
|
5392
|
+
<xsl:param name="isDeleted"/>
|
5393
|
+
<xsl:choose>
|
5394
|
+
<xsl:when test="local-name() = 'math'">
|
5395
|
+
<xsl:if test="$isAdded = 'true'">
|
5396
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5397
|
+
</xsl:if>
|
5398
|
+
<xsl:if test="$isDeleted = 'true'">
|
5399
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5400
|
+
</xsl:if>
|
5401
|
+
</xsl:when>
|
5402
|
+
<xsl:otherwise>
|
5403
|
+
<xsl:if test="$isAdded = 'true'">
|
5404
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5405
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5406
|
+
</xsl:if>
|
5407
|
+
<xsl:if test="$isDeleted = 'true'">
|
5408
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5409
|
+
<xsl:if test="local-name() = 'table'">
|
5410
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5411
|
+
</xsl:if>
|
5412
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5413
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5414
|
+
</xsl:if>
|
5415
|
+
</xsl:otherwise>
|
5416
|
+
</xsl:choose>
|
5417
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5418
|
+
<xsl:if test="$lang = 'ar'">
|
5419
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5420
|
+
</xsl:if>
|
5421
|
+
</xsl:template><xsl:template name="setAlignment">
|
5422
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5423
|
+
<xsl:choose>
|
5424
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5425
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5426
|
+
<xsl:when test="$align != ''">
|
5427
|
+
<xsl:value-of select="$align"/>
|
5428
|
+
</xsl:when>
|
5429
|
+
</xsl:choose>
|
5029
5430
|
</xsl:template></xsl:stylesheet>
|