metanorma-nist 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -2
- data/lib/asciidoctor/nist/biblio.rng +1 -0
- data/lib/asciidoctor/nist/isodoc.rng +175 -3
- data/lib/isodoc/nist/metadata.rb +65 -43
- data/lib/isodoc/nist/nist.csts.xsl +459 -61
- data/lib/isodoc/nist/nist.cswp.xsl +459 -61
- data/lib/isodoc/nist/nist.sp.xsl +459 -61
- data/lib/metanorma/nist/version.rb +1 -1
- metadata +2 -2
@@ -1161,6 +1161,9 @@
|
|
1161
1161
|
<title-continued lang="en">(continued)</title-continued>
|
1162
1162
|
<title-continued lang="fr">(continué)</title-continued>
|
1163
1163
|
|
1164
|
+
</xsl:variable><xsl:variable name="bibdata">
|
1165
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
1166
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
1164
1167
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1165
1168
|
<xsl:param name="name"/>
|
1166
1169
|
<xsl:param name="lang"/>
|
@@ -1186,10 +1189,12 @@
|
|
1186
1189
|
</xsl:choose>
|
1187
1190
|
</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">
|
1188
1191
|
|
1192
|
+
|
1189
1193
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1190
1194
|
|
1191
1195
|
|
1192
1196
|
|
1197
|
+
|
1193
1198
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1194
1199
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1195
1200
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -1305,6 +1310,7 @@
|
|
1305
1310
|
|
1306
1311
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1307
1312
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1313
|
+
|
1308
1314
|
|
1309
1315
|
|
1310
1316
|
|
@@ -1334,6 +1340,7 @@
|
|
1334
1340
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1335
1341
|
|
1336
1342
|
|
1343
|
+
|
1337
1344
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1338
1345
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1339
1346
|
|
@@ -1349,6 +1356,7 @@
|
|
1349
1356
|
|
1350
1357
|
|
1351
1358
|
|
1359
|
+
|
1352
1360
|
|
1353
1361
|
|
1354
1362
|
|
@@ -1376,6 +1384,7 @@
|
|
1376
1384
|
|
1377
1385
|
|
1378
1386
|
|
1387
|
+
|
1379
1388
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1380
1389
|
|
1381
1390
|
|
@@ -1396,11 +1405,13 @@
|
|
1396
1405
|
|
1397
1406
|
|
1398
1407
|
|
1408
|
+
|
1399
1409
|
|
1400
1410
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1401
1411
|
|
1402
1412
|
|
1403
1413
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1414
|
+
|
1404
1415
|
|
1405
1416
|
|
1406
1417
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -1421,6 +1432,7 @@
|
|
1421
1432
|
|
1422
1433
|
|
1423
1434
|
|
1435
|
+
|
1424
1436
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1425
1437
|
|
1426
1438
|
|
@@ -1429,6 +1441,7 @@
|
|
1429
1441
|
|
1430
1442
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1431
1443
|
|
1444
|
+
|
1432
1445
|
|
1433
1446
|
|
1434
1447
|
|
@@ -1460,6 +1473,7 @@
|
|
1460
1473
|
|
1461
1474
|
|
1462
1475
|
|
1476
|
+
|
1463
1477
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1464
1478
|
|
1465
1479
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
@@ -1467,6 +1481,7 @@
|
|
1467
1481
|
|
1468
1482
|
|
1469
1483
|
|
1484
|
+
|
1470
1485
|
<xsl:attribute name="width">75%</xsl:attribute>
|
1471
1486
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
1472
1487
|
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
@@ -1488,13 +1503,32 @@
|
|
1488
1503
|
|
1489
1504
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1490
1505
|
|
1491
|
-
|
1506
|
+
|
1492
1507
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1493
1508
|
|
1494
1509
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1495
1510
|
|
1496
1511
|
|
1497
|
-
|
1512
|
+
|
1513
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1514
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1515
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1516
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1517
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1518
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1519
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1520
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1521
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1522
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1523
|
+
<xsl:text>red</xsl:text>
|
1524
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1525
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1526
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1527
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1528
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1529
|
+
|
1530
|
+
|
1531
|
+
</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">
|
1498
1532
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1499
1533
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1500
1534
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1539,16 +1573,17 @@
|
|
1539
1573
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1540
1574
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1541
1575
|
|
1576
|
+
<xsl:variable name="table-preamble">
|
1577
|
+
|
1578
|
+
|
1579
|
+
</xsl:variable>
|
1580
|
+
|
1542
1581
|
<xsl:variable name="table">
|
1543
1582
|
|
1544
1583
|
<xsl:variable name="simple-table">
|
1545
1584
|
<xsl:call-template name="getSimpleTable"/>
|
1546
1585
|
</xsl:variable>
|
1547
1586
|
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
1587
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1553
1588
|
<fo:block> </fo:block>
|
1554
1589
|
</xsl:if> -->
|
@@ -1561,7 +1596,7 @@
|
|
1561
1596
|
|
1562
1597
|
|
1563
1598
|
|
1564
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1599
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1565
1600
|
|
1566
1601
|
<!-- <xsl:variable name="cols-count">
|
1567
1602
|
<xsl:choose>
|
@@ -1580,8 +1615,6 @@
|
|
1580
1615
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1581
1616
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1582
1617
|
|
1583
|
-
|
1584
|
-
|
1585
1618
|
<xsl:variable name="colwidths">
|
1586
1619
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1587
1620
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1609,9 +1642,11 @@
|
|
1609
1642
|
</xsl:choose>
|
1610
1643
|
</xsl:variable>
|
1611
1644
|
|
1645
|
+
|
1612
1646
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1613
1647
|
|
1614
1648
|
|
1649
|
+
|
1615
1650
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1616
1651
|
|
1617
1652
|
|
@@ -1636,6 +1671,8 @@
|
|
1636
1671
|
|
1637
1672
|
|
1638
1673
|
|
1674
|
+
|
1675
|
+
|
1639
1676
|
<xsl:variable name="table_width">
|
1640
1677
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
1641
1678
|
100%
|
@@ -1652,6 +1689,8 @@
|
|
1652
1689
|
|
1653
1690
|
|
1654
1691
|
|
1692
|
+
|
1693
|
+
|
1655
1694
|
|
1656
1695
|
|
1657
1696
|
|
@@ -1741,7 +1780,8 @@
|
|
1741
1780
|
</fo:block-container>
|
1742
1781
|
</xsl:variable>
|
1743
1782
|
|
1744
|
-
|
1783
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1784
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1745
1785
|
|
1746
1786
|
<xsl:choose>
|
1747
1787
|
<xsl:when test="@width">
|
@@ -1755,7 +1795,14 @@
|
|
1755
1795
|
<fo:table-body>
|
1756
1796
|
<fo:table-row>
|
1757
1797
|
<fo:table-cell column-number="2">
|
1758
|
-
<
|
1798
|
+
<xsl:copy-of select="$table-preamble"/>
|
1799
|
+
<fo:block>
|
1800
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1801
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1802
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1803
|
+
</xsl:call-template>
|
1804
|
+
<xsl:copy-of select="$table"/>
|
1805
|
+
</fo:block>
|
1759
1806
|
</fo:table-cell>
|
1760
1807
|
</fo:table-row>
|
1761
1808
|
</fo:table-body>
|
@@ -1766,16 +1813,42 @@
|
|
1766
1813
|
|
1767
1814
|
</xsl:when>
|
1768
1815
|
<xsl:otherwise>
|
1769
|
-
<xsl:
|
1816
|
+
<xsl:choose>
|
1817
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1818
|
+
<xsl:copy-of select="$table-preamble"/>
|
1819
|
+
<fo:block>
|
1820
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1821
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1822
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1823
|
+
</xsl:call-template>
|
1824
|
+
<xsl:copy-of select="$table"/>
|
1825
|
+
</fo:block>
|
1826
|
+
</xsl:when>
|
1827
|
+
<xsl:otherwise>
|
1828
|
+
<xsl:copy-of select="$table-preamble"/>
|
1829
|
+
<xsl:copy-of select="$table"/>
|
1830
|
+
</xsl:otherwise>
|
1831
|
+
</xsl:choose>
|
1770
1832
|
</xsl:otherwise>
|
1771
1833
|
</xsl:choose>
|
1772
1834
|
|
1773
1835
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1836
|
+
<xsl:param name="continued"/>
|
1774
1837
|
<xsl:if test="normalize-space() != ''">
|
1775
1838
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1776
1839
|
|
1777
1840
|
|
1778
|
-
<xsl:
|
1841
|
+
<xsl:choose>
|
1842
|
+
<xsl:when test="$continued = 'true'">
|
1843
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1844
|
+
|
1845
|
+
</xsl:when>
|
1846
|
+
<xsl:otherwise>
|
1847
|
+
<xsl:apply-templates/>
|
1848
|
+
</xsl:otherwise>
|
1849
|
+
</xsl:choose>
|
1850
|
+
|
1851
|
+
|
1779
1852
|
</fo:block>
|
1780
1853
|
</xsl:if>
|
1781
1854
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1827,7 +1900,7 @@
|
|
1827
1900
|
</xsl:for-each>
|
1828
1901
|
</xsl:when>
|
1829
1902
|
<xsl:otherwise>
|
1830
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1903
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1831
1904
|
<xsl:variable name="td_text">
|
1832
1905
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1833
1906
|
|
@@ -1915,18 +1988,18 @@
|
|
1915
1988
|
<xsl:apply-templates/>
|
1916
1989
|
</fo:table-header>
|
1917
1990
|
</xsl:template><xsl:template name="table-header-title">
|
1918
|
-
<xsl:param name="cols-count"/>
|
1991
|
+
<xsl:param name="cols-count"/>
|
1919
1992
|
<!-- row for title -->
|
1920
1993
|
<fo:table-row>
|
1921
1994
|
<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">
|
1922
|
-
|
1995
|
+
|
1996
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1997
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
1998
|
+
</xsl:apply-templates>
|
1923
1999
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1924
2000
|
<xsl:call-template name="fn_name_display"/>
|
1925
|
-
</xsl:for-each>
|
1926
|
-
|
1927
|
-
<xsl:text> </xsl:text>
|
1928
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1929
|
-
</fo:block>
|
2001
|
+
</xsl:for-each>
|
2002
|
+
|
1930
2003
|
</fo:table-cell>
|
1931
2004
|
</fo:table-row>
|
1932
2005
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -2150,6 +2223,7 @@
|
|
2150
2223
|
|
2151
2224
|
|
2152
2225
|
|
2226
|
+
|
2153
2227
|
</xsl:if>
|
2154
2228
|
<xsl:if test="$parent-name = 'tfoot'">
|
2155
2229
|
|
@@ -2170,7 +2244,8 @@
|
|
2170
2244
|
<xsl:attribute name="text-align">
|
2171
2245
|
<xsl:choose>
|
2172
2246
|
<xsl:when test="@align">
|
2173
|
-
<xsl:
|
2247
|
+
<xsl:call-template name="setAlignment"/>
|
2248
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2174
2249
|
</xsl:when>
|
2175
2250
|
<xsl:otherwise>center</xsl:otherwise>
|
2176
2251
|
</xsl:choose>
|
@@ -2179,6 +2254,7 @@
|
|
2179
2254
|
|
2180
2255
|
|
2181
2256
|
|
2257
|
+
|
2182
2258
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2183
2259
|
<xsl:attribute name="background-color">black</xsl:attribute>
|
2184
2260
|
<xsl:attribute name="color">white</xsl:attribute>
|
@@ -2190,6 +2266,9 @@
|
|
2190
2266
|
|
2191
2267
|
|
2192
2268
|
|
2269
|
+
<xsl:if test="$lang = 'ar'">
|
2270
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2271
|
+
</xsl:if>
|
2193
2272
|
<xsl:if test="@colspan">
|
2194
2273
|
<xsl:attribute name="number-columns-spanned">
|
2195
2274
|
<xsl:value-of select="@colspan"/>
|
@@ -2221,11 +2300,16 @@
|
|
2221
2300
|
<xsl:attribute name="text-align">
|
2222
2301
|
<xsl:choose>
|
2223
2302
|
<xsl:when test="@align">
|
2224
|
-
<xsl:
|
2303
|
+
<xsl:call-template name="setAlignment"/>
|
2304
|
+
<!-- <xsl:value-of select="@align"/> -->
|
2225
2305
|
</xsl:when>
|
2226
2306
|
<xsl:otherwise>left</xsl:otherwise>
|
2227
2307
|
</xsl:choose>
|
2228
2308
|
</xsl:attribute>
|
2309
|
+
<xsl:if test="$lang = 'ar'">
|
2310
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2311
|
+
</xsl:if>
|
2312
|
+
|
2229
2313
|
|
2230
2314
|
|
2231
2315
|
|
@@ -2241,6 +2325,9 @@
|
|
2241
2325
|
</xsl:if>
|
2242
2326
|
|
2243
2327
|
|
2328
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2329
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2330
|
+
</xsl:if>
|
2244
2331
|
<xsl:if test="@colspan">
|
2245
2332
|
<xsl:attribute name="number-columns-spanned">
|
2246
2333
|
<xsl:value-of select="@colspan"/>
|
@@ -2372,13 +2459,13 @@
|
|
2372
2459
|
</xsl:choose>
|
2373
2460
|
</xsl:variable>
|
2374
2461
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2375
|
-
<xsl:element name="{$ns}:table">
|
2462
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2376
2463
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2377
2464
|
<tbody>
|
2378
2465
|
<xsl:apply-templates mode="dl"/>
|
2379
2466
|
</tbody>
|
2380
2467
|
</xsl:for-each>
|
2381
|
-
</xsl:element>
|
2468
|
+
<!-- </xsl:element> -->
|
2382
2469
|
</xsl:variable>
|
2383
2470
|
|
2384
2471
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2474,6 +2561,8 @@
|
|
2474
2561
|
<xsl:apply-templates/>
|
2475
2562
|
</fo:inline>
|
2476
2563
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2564
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2565
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2477
2566
|
<fo:block-container>
|
2478
2567
|
|
2479
2568
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2490,6 +2579,12 @@
|
|
2490
2579
|
</xsl:attribute>
|
2491
2580
|
|
2492
2581
|
</xsl:if>
|
2582
|
+
|
2583
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2584
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2585
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2586
|
+
</xsl:call-template>
|
2587
|
+
|
2493
2588
|
<fo:block-container>
|
2494
2589
|
|
2495
2590
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2605,11 +2700,11 @@
|
|
2605
2700
|
</xsl:choose>
|
2606
2701
|
</xsl:variable>
|
2607
2702
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2608
|
-
<xsl:element name="{$ns}:table">
|
2703
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2609
2704
|
<tbody>
|
2610
2705
|
<xsl:apply-templates mode="dl"/>
|
2611
2706
|
</tbody>
|
2612
|
-
</xsl:element>
|
2707
|
+
<!-- </xsl:element> -->
|
2613
2708
|
</xsl:variable>
|
2614
2709
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2615
2710
|
<xsl:variable name="colwidths">
|
@@ -2875,6 +2970,7 @@
|
|
2875
2970
|
|
2876
2971
|
|
2877
2972
|
|
2973
|
+
|
2878
2974
|
|
2879
2975
|
</xsl:variable>
|
2880
2976
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2892,8 +2988,74 @@
|
|
2892
2988
|
<fo:inline text-decoration="underline">
|
2893
2989
|
<xsl:apply-templates/>
|
2894
2990
|
</fo:inline>
|
2991
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
2992
|
+
<xsl:choose>
|
2993
|
+
<xsl:when test="@amendment">
|
2994
|
+
<fo:inline>
|
2995
|
+
<xsl:call-template name="insertTag">
|
2996
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2997
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2998
|
+
</xsl:call-template>
|
2999
|
+
<xsl:apply-templates/>
|
3000
|
+
<xsl:call-template name="insertTag">
|
3001
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
3002
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
3003
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
3004
|
+
</xsl:call-template>
|
3005
|
+
</fo:inline>
|
3006
|
+
</xsl:when>
|
3007
|
+
<xsl:when test="@corrigenda">
|
3008
|
+
<fo:inline>
|
3009
|
+
<xsl:call-template name="insertTag">
|
3010
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
3011
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
3012
|
+
</xsl:call-template>
|
3013
|
+
<xsl:apply-templates/>
|
3014
|
+
<xsl:call-template name="insertTag">
|
3015
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
3016
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
3017
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
3018
|
+
</xsl:call-template>
|
3019
|
+
</fo:inline>
|
3020
|
+
</xsl:when>
|
3021
|
+
<xsl:otherwise>
|
3022
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
3023
|
+
<xsl:apply-templates/>
|
3024
|
+
</fo:inline>
|
3025
|
+
</xsl:otherwise>
|
3026
|
+
</xsl:choose>
|
3027
|
+
|
3028
|
+
</xsl:template><xsl:template name="insertTag">
|
3029
|
+
<xsl:param name="type"/>
|
3030
|
+
<xsl:param name="kind"/>
|
3031
|
+
<xsl:param name="value"/>
|
3032
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
3033
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
3034
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
3035
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
3036
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
3037
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
3038
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
3039
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3040
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3041
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
3042
|
+
<g>
|
3043
|
+
<xsl:if test="$type = 'closing'">
|
3044
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
3045
|
+
</xsl:if>
|
3046
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
3047
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
3048
|
+
</g>
|
3049
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
3050
|
+
<xsl:if test="$type = 'closing'">
|
3051
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
3052
|
+
</xsl:if>
|
3053
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
3054
|
+
</text>
|
3055
|
+
</svg>
|
3056
|
+
</fo:instream-foreign-object>
|
2895
3057
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2896
|
-
<fo:inline
|
3058
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
2897
3059
|
<xsl:apply-templates/>
|
2898
3060
|
</fo:inline>
|
2899
3061
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -3190,11 +3352,15 @@
|
|
3190
3352
|
</xsl:apply-templates>
|
3191
3353
|
</xsl:template><xsl:template name="getLang">
|
3192
3354
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3355
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3193
3356
|
<xsl:variable name="language">
|
3194
3357
|
<xsl:choose>
|
3195
3358
|
<xsl:when test="$language_current != ''">
|
3196
3359
|
<xsl:value-of select="$language_current"/>
|
3197
3360
|
</xsl:when>
|
3361
|
+
<xsl:when test="$language_current_2 != ''">
|
3362
|
+
<xsl:value-of select="$language_current_2"/>
|
3363
|
+
</xsl:when>
|
3198
3364
|
<xsl:otherwise>
|
3199
3365
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3200
3366
|
</xsl:otherwise>
|
@@ -3234,13 +3400,23 @@
|
|
3234
3400
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3235
3401
|
<xsl:value-of select="substring($str, 2)"/>
|
3236
3402
|
</xsl:template><xsl:template match="mathml:math">
|
3237
|
-
<
|
3403
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3404
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3405
|
+
|
3406
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3407
|
+
|
3408
|
+
|
3409
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3410
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3411
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3412
|
+
</xsl:call-template>
|
3238
3413
|
|
3239
3414
|
<xsl:variable name="mathml">
|
3240
3415
|
<xsl:apply-templates select="." mode="mathml"/>
|
3241
3416
|
</xsl:variable>
|
3242
3417
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3243
3418
|
|
3419
|
+
|
3244
3420
|
<!-- <xsl:copy-of select="."/> -->
|
3245
3421
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3246
3422
|
</fo:instream-foreign-object>
|
@@ -3397,6 +3573,7 @@
|
|
3397
3573
|
|
3398
3574
|
|
3399
3575
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3576
|
+
|
3400
3577
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3401
3578
|
</fo:inline>
|
3402
3579
|
<xsl:apply-templates/>
|
@@ -3423,6 +3600,7 @@
|
|
3423
3600
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3424
3601
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3425
3602
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3603
|
+
|
3426
3604
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3427
3605
|
</fo:inline>
|
3428
3606
|
<xsl:apply-templates/>
|
@@ -3488,8 +3666,15 @@
|
|
3488
3666
|
</fo:inline>
|
3489
3667
|
</xsl:if>
|
3490
3668
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3669
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3670
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3491
3671
|
<fo:block-container id="{@id}">
|
3492
3672
|
|
3673
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3674
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3675
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3676
|
+
</xsl:call-template>
|
3677
|
+
|
3493
3678
|
<fo:block>
|
3494
3679
|
<xsl:apply-templates/>
|
3495
3680
|
</fo:block>
|
@@ -3497,7 +3682,10 @@
|
|
3497
3682
|
<xsl:for-each select="*[local-name() = 'note']">
|
3498
3683
|
<xsl:call-template name="note"/>
|
3499
3684
|
</xsl:for-each>
|
3500
|
-
|
3685
|
+
|
3686
|
+
|
3687
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3688
|
+
|
3501
3689
|
</fo:block-container>
|
3502
3690
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3503
3691
|
<fo:block id="{@id}">
|
@@ -3509,40 +3697,122 @@
|
|
3509
3697
|
<xsl:apply-templates/>
|
3510
3698
|
</fo:block>
|
3511
3699
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3512
|
-
<
|
3513
|
-
|
3514
|
-
|
3515
|
-
<xsl:
|
3516
|
-
<
|
3517
|
-
<xsl:
|
3518
|
-
<xsl:
|
3519
|
-
</xsl:
|
3520
|
-
<
|
3521
|
-
|
3522
|
-
|
3523
|
-
|
3524
|
-
|
3525
|
-
|
3526
|
-
|
3527
|
-
|
3528
|
-
|
3529
|
-
|
3530
|
-
|
3700
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3701
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3702
|
+
<xsl:choose>
|
3703
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3704
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
3705
|
+
<xsl:variable name="src">
|
3706
|
+
<xsl:call-template name="image_src"/>
|
3707
|
+
</xsl:variable>
|
3708
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
3709
|
+
</fo:inline>
|
3710
|
+
</xsl:when>
|
3711
|
+
<xsl:otherwise>
|
3712
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
3713
|
+
|
3714
|
+
<xsl:variable name="src">
|
3715
|
+
<xsl:call-template name="image_src"/>
|
3716
|
+
</xsl:variable>
|
3717
|
+
|
3718
|
+
<xsl:choose>
|
3719
|
+
<xsl:when test="$isDeleted = 'true'">
|
3720
|
+
<!-- enclose in svg -->
|
3721
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3722
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3723
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3724
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3725
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3726
|
+
|
3727
|
+
|
3728
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3729
|
+
|
3730
|
+
</fo:instream-foreign-object>
|
3731
|
+
</xsl:when>
|
3732
|
+
<xsl:otherwise>
|
3733
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3734
|
+
</xsl:otherwise>
|
3735
|
+
</xsl:choose>
|
3736
|
+
|
3737
|
+
</fo:block>
|
3738
|
+
</xsl:otherwise>
|
3739
|
+
</xsl:choose>
|
3740
|
+
</xsl:template><xsl:template name="image_src">
|
3741
|
+
<xsl:choose>
|
3742
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3743
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3744
|
+
</xsl:when>
|
3745
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3746
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3747
|
+
</xsl:when>
|
3748
|
+
<xsl:otherwise>
|
3749
|
+
<xsl:value-of select="@src"/>
|
3750
|
+
</xsl:otherwise>
|
3751
|
+
</xsl:choose>
|
3752
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3753
|
+
<xsl:choose>
|
3754
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3755
|
+
<xsl:variable name="src">
|
3756
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3757
|
+
</xsl:variable>
|
3758
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3759
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3760
|
+
<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">
|
3761
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3762
|
+
</svg>
|
3763
|
+
</xsl:when>
|
3764
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3765
|
+
<xsl:variable name="src">
|
3766
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3767
|
+
</xsl:variable>
|
3768
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3769
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3770
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3771
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3772
|
+
<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">
|
3773
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3774
|
+
</svg>
|
3775
|
+
</xsl:when>
|
3776
|
+
<xsl:otherwise>
|
3777
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3778
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3779
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3780
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3781
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3782
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3783
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3784
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3785
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3786
|
+
<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">
|
3787
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3788
|
+
<xsl:call-template name="svg_cross">
|
3789
|
+
<xsl:with-param name="width" select="$width"/>
|
3790
|
+
<xsl:with-param name="height" select="$height"/>
|
3791
|
+
</xsl:call-template>
|
3792
|
+
</svg>
|
3793
|
+
</xsl:otherwise>
|
3794
|
+
</xsl:choose>
|
3795
|
+
|
3796
|
+
</xsl:template><xsl:template name="svg_cross">
|
3797
|
+
<xsl:param name="width"/>
|
3798
|
+
<xsl:param name="height"/>
|
3799
|
+
<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; "/>
|
3800
|
+
<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; "/>
|
3531
3801
|
</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">
|
3532
3802
|
<xsl:apply-templates mode="contents"/>
|
3533
3803
|
<xsl:text> </xsl:text>
|
3534
3804
|
</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">
|
3535
3805
|
<xsl:apply-templates mode="bookmarks"/>
|
3536
3806
|
<xsl:text> </xsl:text>
|
3537
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3807
|
+
</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">
|
3538
3808
|
<xsl:value-of select="."/>
|
3539
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3809
|
+
</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">
|
3540
3810
|
<xsl:value-of select="."/>
|
3541
3811
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3542
3812
|
<xsl:apply-templates mode="contents"/>
|
3543
3813
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3544
3814
|
<xsl:apply-templates mode="bookmarks"/>
|
3545
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3815
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3546
3816
|
<xsl:apply-templates select="."/>
|
3547
3817
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3548
3818
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3745,6 +4015,8 @@
|
|
3745
4015
|
</fo:list-item-body>
|
3746
4016
|
</fo:list-item>
|
3747
4017
|
</fo:list-block>
|
4018
|
+
</xsl:template><xsl:template name="extractSection">
|
4019
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3748
4020
|
</xsl:template><xsl:template name="extractTitle">
|
3749
4021
|
<xsl:choose>
|
3750
4022
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3792,6 +4064,7 @@
|
|
3792
4064
|
|
3793
4065
|
|
3794
4066
|
|
4067
|
+
|
3795
4068
|
|
3796
4069
|
|
3797
4070
|
10
|
@@ -4074,6 +4347,7 @@
|
|
4074
4347
|
<xsl:variable name="element">
|
4075
4348
|
block
|
4076
4349
|
|
4350
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
4077
4351
|
</xsl:variable>
|
4078
4352
|
<xsl:choose>
|
4079
4353
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -4081,7 +4355,7 @@
|
|
4081
4355
|
<xsl:apply-templates/>
|
4082
4356
|
</fo:inline>
|
4083
4357
|
</xsl:when>
|
4084
|
-
<xsl:when test="normalize-space($element)
|
4358
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4085
4359
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
4086
4360
|
<xsl:apply-templates/>
|
4087
4361
|
</fo:block>
|
@@ -4118,7 +4392,7 @@
|
|
4118
4392
|
</fo:inline>
|
4119
4393
|
</xsl:otherwise>
|
4120
4394
|
</xsl:choose>
|
4121
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4395
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
4122
4396
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4123
4397
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4124
4398
|
<xsl:variable name="termsource_text">
|
@@ -4127,13 +4401,15 @@
|
|
4127
4401
|
|
4128
4402
|
<xsl:choose>
|
4129
4403
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4130
|
-
<xsl:apply-templates/>
|
4404
|
+
<!-- <xsl:apply-templates /> -->
|
4405
|
+
<xsl:copy-of select="$termsource_text"/>
|
4131
4406
|
</xsl:when>
|
4132
4407
|
<xsl:otherwise>
|
4133
4408
|
|
4134
4409
|
<xsl:text>[</xsl:text>
|
4135
4410
|
|
4136
|
-
<xsl:apply-templates/>
|
4411
|
+
<!-- <xsl:apply-templates /> -->
|
4412
|
+
<xsl:copy-of select="$termsource_text"/>
|
4137
4413
|
|
4138
4414
|
<xsl:text>]</xsl:text>
|
4139
4415
|
|
@@ -4144,8 +4420,15 @@
|
|
4144
4420
|
<xsl:if test="normalize-space() != ''">
|
4145
4421
|
<xsl:value-of select="."/>
|
4146
4422
|
</xsl:if>
|
4147
|
-
</xsl:template><xsl:
|
4423
|
+
</xsl:template><xsl:variable name="localized.source">
|
4424
|
+
<xsl:call-template name="getLocalizedString">
|
4425
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4426
|
+
</xsl:call-template>
|
4427
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4148
4428
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4429
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4430
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4431
|
+
</xsl:if>
|
4149
4432
|
|
4150
4433
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4151
4434
|
<xsl:apply-templates/>
|
@@ -4294,7 +4577,8 @@
|
|
4294
4577
|
</fo:inline>
|
4295
4578
|
</xsl:when>
|
4296
4579
|
<xsl:otherwise>
|
4297
|
-
<
|
4580
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4581
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
4298
4582
|
</xsl:otherwise>
|
4299
4583
|
</xsl:choose>
|
4300
4584
|
|
@@ -4348,7 +4632,6 @@
|
|
4348
4632
|
|
4349
4633
|
|
4350
4634
|
|
4351
|
-
|
4352
4635
|
<xsl:apply-templates/>
|
4353
4636
|
</fo:block>
|
4354
4637
|
|
@@ -4397,7 +4680,7 @@
|
|
4397
4680
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4398
4681
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4399
4682
|
<xsl:choose>
|
4400
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4683
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4401
4684
|
<fo:block-container>
|
4402
4685
|
<xsl:attribute name="margin-left">
|
4403
4686
|
<xsl:choose>
|
@@ -4407,6 +4690,7 @@
|
|
4407
4690
|
</xsl:attribute>
|
4408
4691
|
|
4409
4692
|
|
4693
|
+
|
4410
4694
|
<fo:block-container margin-left="0mm">
|
4411
4695
|
<fo:block>
|
4412
4696
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4610,6 +4894,10 @@
|
|
4610
4894
|
|
4611
4895
|
|
4612
4896
|
|
4897
|
+
|
4898
|
+
|
4899
|
+
|
4900
|
+
|
4613
4901
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4614
4902
|
<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')]"/>
|
4615
4903
|
<xsl:choose>
|
@@ -4666,6 +4954,70 @@
|
|
4666
4954
|
<xsl:value-of select="substring(.,1,1)"/>
|
4667
4955
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4668
4956
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4957
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
4958
|
+
<fo:block>
|
4959
|
+
<xsl:apply-templates/>
|
4960
|
+
</fo:block>
|
4961
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
4962
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4963
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
4964
|
+
<fo:inline>
|
4965
|
+
<xsl:call-template name="text_input"/>
|
4966
|
+
</fo:inline>
|
4967
|
+
</xsl:template><xsl:template name="text_input">
|
4968
|
+
<xsl:variable name="count">
|
4969
|
+
<xsl:choose>
|
4970
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
4971
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
4972
|
+
<xsl:otherwise>10</xsl:otherwise>
|
4973
|
+
</xsl:choose>
|
4974
|
+
</xsl:variable>
|
4975
|
+
<xsl:call-template name="repeat">
|
4976
|
+
<xsl:with-param name="char" select="'_'"/>
|
4977
|
+
<xsl:with-param name="count" select="$count"/>
|
4978
|
+
</xsl:call-template>
|
4979
|
+
<xsl:text> </xsl:text>
|
4980
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
4981
|
+
<xsl:variable name="caption">
|
4982
|
+
<xsl:choose>
|
4983
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
4984
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
4985
|
+
</xsl:choose>
|
4986
|
+
</xsl:variable>
|
4987
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
4988
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
4989
|
+
<fo:inline padding-right="1mm">
|
4990
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4991
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4992
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4993
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4994
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4995
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4996
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
4997
|
+
</svg>
|
4998
|
+
</fo:instream-foreign-object>
|
4999
|
+
</fo:inline>
|
5000
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
5001
|
+
<fo:inline padding-right="1mm">
|
5002
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
5003
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
5004
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5005
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5006
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5007
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
5008
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
5009
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
5010
|
+
</svg>
|
5011
|
+
</fo:instream-foreign-object>
|
5012
|
+
</fo:inline>
|
5013
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
5014
|
+
<fo:inline>
|
5015
|
+
<xsl:call-template name="text_input"/>
|
5016
|
+
</fo:inline>
|
5017
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
5018
|
+
<fo:block-container border="1pt solid black" width="50%">
|
5019
|
+
<fo:block> </fo:block>
|
5020
|
+
</fo:block-container>
|
4669
5021
|
</xsl:template><xsl:template name="convertDate">
|
4670
5022
|
<xsl:param name="date"/>
|
4671
5023
|
<xsl:param name="format" select="'short'"/>
|
@@ -4932,6 +5284,7 @@
|
|
4932
5284
|
|
4933
5285
|
|
4934
5286
|
|
5287
|
+
|
4935
5288
|
<xsl:value-of select="document('')//*/namespace::nist"/>
|
4936
5289
|
|
4937
5290
|
|
@@ -4997,17 +5350,62 @@
|
|
4997
5350
|
</xsl:call-template>
|
4998
5351
|
</xsl:if>
|
4999
5352
|
</xsl:template><xsl:template name="getLocalizedString">
|
5000
|
-
<xsl:param name="key"/>
|
5353
|
+
<xsl:param name="key"/>
|
5001
5354
|
|
5002
5355
|
<xsl:variable name="curr_lang">
|
5003
5356
|
<xsl:call-template name="getLang"/>
|
5004
5357
|
</xsl:variable>
|
5005
5358
|
|
5359
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5360
|
+
|
5006
5361
|
<xsl:choose>
|
5362
|
+
<xsl:when test="$data_value != ''">
|
5363
|
+
<xsl:value-of select="$data_value"/>
|
5364
|
+
</xsl:when>
|
5007
5365
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5008
5366
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5009
5367
|
</xsl:when>
|
5010
5368
|
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
5011
5369
|
</xsl:choose>
|
5012
5370
|
|
5371
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5372
|
+
<xsl:param name="isAdded"/>
|
5373
|
+
<xsl:param name="isDeleted"/>
|
5374
|
+
<xsl:choose>
|
5375
|
+
<xsl:when test="local-name() = 'math'">
|
5376
|
+
<xsl:if test="$isAdded = 'true'">
|
5377
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5378
|
+
</xsl:if>
|
5379
|
+
<xsl:if test="$isDeleted = 'true'">
|
5380
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5381
|
+
</xsl:if>
|
5382
|
+
</xsl:when>
|
5383
|
+
<xsl:otherwise>
|
5384
|
+
<xsl:if test="$isAdded = 'true'">
|
5385
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5386
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5387
|
+
</xsl:if>
|
5388
|
+
<xsl:if test="$isDeleted = 'true'">
|
5389
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5390
|
+
<xsl:if test="local-name() = 'table'">
|
5391
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5392
|
+
</xsl:if>
|
5393
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5394
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5395
|
+
</xsl:if>
|
5396
|
+
</xsl:otherwise>
|
5397
|
+
</xsl:choose>
|
5398
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5399
|
+
<xsl:if test="$lang = 'ar'">
|
5400
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5401
|
+
</xsl:if>
|
5402
|
+
</xsl:template><xsl:template name="setAlignment">
|
5403
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5404
|
+
<xsl:choose>
|
5405
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5406
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5407
|
+
<xsl:when test="$align != ''">
|
5408
|
+
<xsl:value-of select="$align"/>
|
5409
|
+
</xsl:when>
|
5410
|
+
</xsl:choose>
|
5013
5411
|
</xsl:template></xsl:stylesheet>
|