metanorma-iec 1.3.8 → 1.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iec/isodoc.rng +49 -11
- data/lib/asciidoctor/iec/isostandard.rng +4 -1
- data/lib/asciidoctor/iec/reqt.rng +15 -4
- data/lib/isodoc/iec/iec.international-standard.xsl +472 -169
- data/lib/metanorma/iec/processor.rb +1 -1
- data/lib/metanorma/iec/version.rb +1 -1
- data/spec/isodoc/iso_spec.rb +166 -172
- data/spec/spec_helper.rb +170 -165
- metadata +2 -2
@@ -1353,7 +1353,7 @@
|
|
1353
1353
|
</fo:block-container>
|
1354
1354
|
<fo:block-container margin-left="8.5mm">
|
1355
1355
|
<fo:block-container margin-left="0mm">
|
1356
|
-
<fo:block font-size="12pt" font-weight="bold" color="{$color_blue}" margin-bottom="16pt">
|
1356
|
+
<fo:block font-size="12pt" font-weight="bold" color="{$color_blue}" margin-bottom="16pt" role="H1">
|
1357
1357
|
<!-- Example:
|
1358
1358
|
Electromagnetic compatibility (EMC) –
|
1359
1359
|
Part 4-5: Testing and measurement techniques – Surge immunity test
|
@@ -1379,7 +1379,7 @@
|
|
1379
1379
|
<xsl:value-of select="$title-part"/>
|
1380
1380
|
</xsl:if>
|
1381
1381
|
</fo:block>
|
1382
|
-
<fo:block font-size="12pt" font-weight="bold">
|
1382
|
+
<fo:block font-size="12pt" font-weight="bold" role="H1">
|
1383
1383
|
<!-- Example: Compatibilité électromagnétique (CEM) –
|
1384
1384
|
Partie 4-5: Techniques d'essai et de mesure – Essai d'immunité aux ondes de
|
1385
1385
|
choc -->
|
@@ -1423,111 +1423,112 @@
|
|
1423
1423
|
<xsl:template name="insertTOCpages">
|
1424
1424
|
<xsl:param name="contents"/>
|
1425
1425
|
<fo:block-container>
|
1426
|
-
<fo:block
|
1427
|
-
<
|
1428
|
-
<xsl:
|
1429
|
-
<xsl:
|
1426
|
+
<fo:block role="TOC">
|
1427
|
+
<fo:block font-size="12pt" text-align="center" margin-bottom="22pt" role="H1">
|
1428
|
+
<xsl:variable name="title-toc">
|
1429
|
+
<xsl:call-template name="getTitle">
|
1430
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
1431
|
+
</xsl:call-template>
|
1432
|
+
</xsl:variable>
|
1433
|
+
<xsl:call-template name="addLetterSpacing">
|
1434
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
|
1430
1435
|
</xsl:call-template>
|
1431
|
-
</xsl:variable>
|
1432
|
-
<xsl:call-template name="addLetterSpacing">
|
1433
|
-
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
|
1434
|
-
</xsl:call-template>
|
1435
|
-
</fo:block>
|
1436
|
-
|
1437
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [@display = 'true']
|
1438
|
-
[@level <= 3]
|
1439
|
-
[not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
1440
|
-
<fo:block text-align-last="justify">
|
1441
|
-
<xsl:if test="@level = 1">
|
1442
|
-
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
1443
|
-
</xsl:if>
|
1444
|
-
<xsl:if test="@level = 2">
|
1445
|
-
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
1446
|
-
</xsl:if>
|
1447
|
-
<xsl:if test="@level = 3">
|
1448
|
-
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
1449
|
-
</xsl:if>
|
1450
|
-
<!-- <xsl:if test="@level >= 2 and @section != ''">
|
1451
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
1452
|
-
</xsl:if> -->
|
1453
|
-
|
1454
|
-
<!-- <xsl:choose>
|
1455
|
-
<xsl:when test="@section != '' and not(@display-section = 'false')"> -->
|
1456
|
-
<fo:list-block>
|
1457
|
-
<xsl:attribute name="margin-left">
|
1458
|
-
<xsl:choose>
|
1459
|
-
<xsl:when test="@level = 2">8mm</xsl:when>
|
1460
|
-
<xsl:when test="@level = 3">23mm</xsl:when>
|
1461
|
-
<xsl:otherwise>0mm</xsl:otherwise>
|
1462
|
-
</xsl:choose>
|
1463
|
-
</xsl:attribute>
|
1464
|
-
<xsl:attribute name="provisional-distance-between-starts">
|
1465
|
-
<xsl:choose>
|
1466
|
-
<xsl:when test="@section = ''">0mm</xsl:when>
|
1467
|
-
<xsl:when test="@level = 1">8mm</xsl:when>
|
1468
|
-
<xsl:when test="@level = 2">15mm</xsl:when>
|
1469
|
-
<xsl:when test="@level = 3">19mm</xsl:when>
|
1470
|
-
<xsl:otherwise>0mm</xsl:otherwise>
|
1471
|
-
</xsl:choose>
|
1472
|
-
</xsl:attribute>
|
1473
|
-
<fo:list-item>
|
1474
|
-
<fo:list-item-label end-indent="label-end()">
|
1475
|
-
<fo:block>
|
1476
|
-
<xsl:value-of select="@section"/>
|
1477
|
-
</fo:block>
|
1478
|
-
</fo:list-item-label>
|
1479
|
-
<fo:list-item-body start-indent="body-start()">
|
1480
|
-
<fo:block text-align-last="justify">
|
1481
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1482
|
-
<xsl:variable name="title">
|
1483
|
-
<xsl:apply-templates select="title"/>
|
1484
|
-
</xsl:variable>
|
1485
|
-
<xsl:call-template name="addLetterSpacing">
|
1486
|
-
<xsl:with-param name="text" select="$title"/>
|
1487
|
-
</xsl:call-template>
|
1488
|
-
<xsl:text> </xsl:text>
|
1489
|
-
<fo:inline keep-together.within-line="always">
|
1490
|
-
<fo:leader leader-pattern="dots"/>
|
1491
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
1492
|
-
</fo:inline>
|
1493
|
-
</fo:basic-link>
|
1494
|
-
</fo:block>
|
1495
|
-
</fo:list-item-body>
|
1496
|
-
</fo:list-item>
|
1497
|
-
</fo:list-block>
|
1498
1436
|
</fo:block>
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1437
|
+
|
1438
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [@display = 'true']
|
1439
|
+
[@level <= 3]
|
1440
|
+
[not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
1441
|
+
<fo:block text-align-last="justify" role="TOCI">
|
1442
|
+
<xsl:if test="@level = 1">
|
1443
|
+
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
1444
|
+
</xsl:if>
|
1445
|
+
<xsl:if test="@level = 2">
|
1446
|
+
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
1447
|
+
</xsl:if>
|
1448
|
+
<xsl:if test="@level = 3">
|
1449
|
+
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
1450
|
+
</xsl:if>
|
1451
|
+
<!-- <xsl:if test="@level >= 2 and @section != ''">
|
1452
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
1453
|
+
</xsl:if> -->
|
1454
|
+
|
1455
|
+
<!-- <xsl:choose>
|
1456
|
+
<xsl:when test="@section != '' and not(@display-section = 'false')"> -->
|
1457
|
+
<fo:list-block>
|
1458
|
+
<xsl:attribute name="margin-left">
|
1459
|
+
<xsl:choose>
|
1460
|
+
<xsl:when test="@level = 2">8mm</xsl:when>
|
1461
|
+
<xsl:when test="@level = 3">23mm</xsl:when>
|
1462
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
1463
|
+
</xsl:choose>
|
1464
|
+
</xsl:attribute>
|
1465
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
1466
|
+
<xsl:choose>
|
1467
|
+
<xsl:when test="@section = ''">0mm</xsl:when>
|
1468
|
+
<xsl:when test="@level = 1">8mm</xsl:when>
|
1469
|
+
<xsl:when test="@level = 2">15mm</xsl:when>
|
1470
|
+
<xsl:when test="@level = 3">19mm</xsl:when>
|
1471
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
1472
|
+
</xsl:choose>
|
1473
|
+
</xsl:attribute>
|
1474
|
+
<fo:list-item>
|
1475
|
+
<fo:list-item-label end-indent="label-end()">
|
1476
|
+
<fo:block>
|
1477
|
+
<xsl:value-of select="@section"/>
|
1478
|
+
</fo:block>
|
1479
|
+
</fo:list-item-label>
|
1480
|
+
<fo:list-item-body start-indent="body-start()">
|
1481
|
+
<fo:block text-align-last="justify">
|
1482
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1483
|
+
<xsl:variable name="title">
|
1484
|
+
<xsl:apply-templates select="title"/>
|
1485
|
+
</xsl:variable>
|
1486
|
+
<xsl:call-template name="addLetterSpacing">
|
1487
|
+
<xsl:with-param name="text" select="$title"/>
|
1488
|
+
</xsl:call-template>
|
1489
|
+
<xsl:text> </xsl:text>
|
1490
|
+
<fo:inline keep-together.within-line="always">
|
1491
|
+
<fo:leader leader-pattern="dots"/>
|
1492
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
1493
|
+
</fo:inline>
|
1494
|
+
</fo:basic-link>
|
1495
|
+
</fo:block>
|
1496
|
+
</fo:list-item-body>
|
1497
|
+
</fo:list-item>
|
1498
|
+
</fo:list-block>
|
1527
1499
|
</fo:block>
|
1528
1500
|
</xsl:for-each>
|
1529
|
-
|
1530
|
-
|
1501
|
+
|
1502
|
+
<xsl:if test="//iec:figure[@id and iec:name]">
|
1503
|
+
<fo:block margin-bottom="5pt"> </fo:block>
|
1504
|
+
<xsl:for-each select="//iec:figure[@id and iec:name]">
|
1505
|
+
<fo:block text-align-last="justify" margin-bottom="5pt" margin-left="8mm" text-indent="-8mm" role="TOCI">
|
1506
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="Figure {@id}">
|
1507
|
+
<xsl:apply-templates select="iec:name" mode="contents"/>
|
1508
|
+
<fo:inline keep-together.within-line="always">
|
1509
|
+
<fo:leader leader-pattern="dots"/>
|
1510
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
1511
|
+
</fo:inline>
|
1512
|
+
</fo:basic-link>
|
1513
|
+
</fo:block>
|
1514
|
+
</xsl:for-each>
|
1515
|
+
</xsl:if>
|
1516
|
+
|
1517
|
+
<xsl:if test="//iec:table[@id and iec:name]">
|
1518
|
+
<fo:block margin-bottom="5pt"> </fo:block>
|
1519
|
+
<xsl:for-each select="//iec:table[@id and iec:name]">
|
1520
|
+
<fo:block text-align-last="justify" margin-bottom="5pt" margin-left="8mm" text-indent="-8mm" role="TOCI">
|
1521
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="Table {@id}">
|
1522
|
+
<xsl:apply-templates select="iec:name" mode="contents"/>
|
1523
|
+
<fo:inline keep-together.within-line="always">
|
1524
|
+
<fo:leader leader-pattern="dots"/>
|
1525
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
1526
|
+
</fo:inline>
|
1527
|
+
</fo:basic-link>
|
1528
|
+
</fo:block>
|
1529
|
+
</xsl:for-each>
|
1530
|
+
</xsl:if>
|
1531
|
+
</fo:block>
|
1531
1532
|
</fo:block-container>
|
1532
1533
|
</xsl:template>
|
1533
1534
|
|
@@ -1539,7 +1540,7 @@
|
|
1539
1540
|
<fo:block><xsl:value-of select="/iec:iec-standard/iec:localized-strings/iec:localized-string[@key='IEC' and @language=$lang]"/></fo:block>
|
1540
1541
|
<fo:block>___________</fo:block>
|
1541
1542
|
<fo:block> </fo:block>
|
1542
|
-
<fo:block font-weight="bold">
|
1543
|
+
<fo:block font-weight="bold" role="H1">
|
1543
1544
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']))"/>
|
1544
1545
|
<xsl:text> — </xsl:text>
|
1545
1546
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']))"/>
|
@@ -1582,7 +1583,7 @@
|
|
1582
1583
|
<!-- <fo:block><xsl:value-of select="$organization"/></fo:block>
|
1583
1584
|
<fo:block>____________</fo:block>
|
1584
1585
|
<fo:block> </fo:block> -->
|
1585
|
-
<fo:block font-weight="bold">
|
1586
|
+
<fo:block font-weight="bold" role="H1">
|
1586
1587
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']))"/>
|
1587
1588
|
<xsl:text> — </xsl:text>
|
1588
1589
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']))"/>
|
@@ -1626,7 +1627,10 @@
|
|
1626
1627
|
</xsl:template>
|
1627
1628
|
|
1628
1629
|
<xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']//iec:title" priority="3">
|
1629
|
-
<
|
1630
|
+
<xsl:variable name="level">
|
1631
|
+
<xsl:call-template name="getLevel"/>
|
1632
|
+
</xsl:variable>
|
1633
|
+
<fo:block font-size="8pt" font-weight="bold" margin-bottom="10pt" role="H{$level}">
|
1630
1634
|
<xsl:apply-templates/>
|
1631
1635
|
</fo:block>
|
1632
1636
|
</xsl:template>
|
@@ -1653,7 +1657,10 @@
|
|
1653
1657
|
</xsl:template>
|
1654
1658
|
|
1655
1659
|
<xsl:template match="iec:feedback-statement//iec:clause/iec:title" priority="2">
|
1656
|
-
<
|
1660
|
+
<xsl:variable name="level">
|
1661
|
+
<xsl:call-template name="getLevel"/>
|
1662
|
+
</xsl:variable>
|
1663
|
+
<fo:block font-weight="bold" keep-with-next="always" role="H{$level}"><xsl:apply-templates/></fo:block>
|
1657
1664
|
</xsl:template>
|
1658
1665
|
|
1659
1666
|
<xsl:template match="iec:feedback-statement//iec:clause/iec:p" priority="2">
|
@@ -1756,7 +1763,10 @@
|
|
1756
1763
|
<!-- ============================= -->
|
1757
1764
|
|
1758
1765
|
<xsl:template match="iec:license-statement//iec:title">
|
1759
|
-
<
|
1766
|
+
<xsl:variable name="level">
|
1767
|
+
<xsl:call-template name="getLevel"/>
|
1768
|
+
</xsl:variable>
|
1769
|
+
<fo:block text-align="center" font-weight="bold" role="H{$level}">
|
1760
1770
|
<xsl:apply-templates/>
|
1761
1771
|
</fo:block>
|
1762
1772
|
</xsl:template>
|
@@ -1772,7 +1782,10 @@
|
|
1772
1782
|
</xsl:template>
|
1773
1783
|
|
1774
1784
|
<xsl:template match="iec:license-statement//iec:title" mode="cover-page-internal">
|
1775
|
-
<
|
1785
|
+
<xsl:variable name="level">
|
1786
|
+
<xsl:call-template name="getLevel"/>
|
1787
|
+
</xsl:variable>
|
1788
|
+
<fo:block text-align="center" font-weight="bold" role="H{$level}">
|
1776
1789
|
<xsl:apply-templates/>
|
1777
1790
|
</fo:block>
|
1778
1791
|
</xsl:template>
|
@@ -1890,8 +1903,9 @@
|
|
1890
1903
|
<!-- title -->
|
1891
1904
|
<!-- ====== -->
|
1892
1905
|
<xsl:template match="iec:introduction/iec:title">
|
1893
|
-
<fo:block font-size="12pt" text-align="center" margin-bottom="12pt">
|
1906
|
+
<fo:block font-size="12pt" text-align="center" margin-bottom="12pt" role="H1">
|
1894
1907
|
<xsl:apply-templates/>
|
1908
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1895
1909
|
</fo:block>
|
1896
1910
|
</xsl:template>
|
1897
1911
|
<xsl:template match="iec:introduction/iec:title/text()">
|
@@ -1901,14 +1915,15 @@
|
|
1901
1915
|
</xsl:template>
|
1902
1916
|
|
1903
1917
|
<xsl:template match="iec:annex/iec:title">
|
1904
|
-
<fo:block font-size="12pt" text-align="center" margin-bottom="32pt" keep-with-next="always">
|
1918
|
+
<fo:block font-size="12pt" text-align="center" margin-bottom="32pt" keep-with-next="always" role="H1">
|
1905
1919
|
<xsl:apply-templates/>
|
1920
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1906
1921
|
</fo:block>
|
1907
1922
|
</xsl:template>
|
1908
1923
|
|
1909
1924
|
<!-- Bibliography -->
|
1910
1925
|
<xsl:template match="iec:references[not(@normative='true')]/iec:title">
|
1911
|
-
<fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always">
|
1926
|
+
<fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always" role="H1">
|
1912
1927
|
<xsl:apply-templates/>
|
1913
1928
|
</fo:block>
|
1914
1929
|
</xsl:template>
|
@@ -1936,12 +1951,12 @@
|
|
1936
1951
|
|
1937
1952
|
<xsl:choose>
|
1938
1953
|
<xsl:when test="../@inline-header = 'true'">
|
1939
|
-
<fo:inline font-size="{$font-size}" font-weight="bold">
|
1954
|
+
<fo:inline font-size="{$font-size}" font-weight="bold" role="H{$level}">
|
1940
1955
|
<xsl:apply-templates/>
|
1941
1956
|
</fo:inline>
|
1942
1957
|
</xsl:when>
|
1943
1958
|
<xsl:otherwise>
|
1944
|
-
<fo:block font-size="{$font-size}" font-weight="bold" keep-with-next="always">
|
1959
|
+
<fo:block font-size="{$font-size}" font-weight="bold" keep-with-next="always" role="H{$level}">
|
1945
1960
|
<xsl:attribute name="space-before"> <!-- margin-top -->
|
1946
1961
|
<xsl:choose>
|
1947
1962
|
<xsl:when test="$level = 2 and ancestor::iec:annex">22pt</xsl:when>
|
@@ -1959,6 +1974,7 @@
|
|
1959
1974
|
</xsl:choose>
|
1960
1975
|
</xsl:attribute>
|
1961
1976
|
<xsl:apply-templates/>
|
1977
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1962
1978
|
</fo:block>
|
1963
1979
|
</xsl:otherwise>
|
1964
1980
|
</xsl:choose>
|
@@ -2202,8 +2218,10 @@
|
|
2202
2218
|
|
2203
2219
|
|
2204
2220
|
<xsl:template match="iec:preferred">
|
2205
|
-
|
2206
|
-
|
2221
|
+
<xsl:variable name="levelTerm">
|
2222
|
+
<xsl:call-template name="getLevelTermName"/>
|
2223
|
+
</xsl:variable>
|
2224
|
+
<fo:block line-height="1.1" space-before="14pt" role="H{$levelTerm}">
|
2207
2225
|
<fo:block font-weight="bold" keep-with-next="always">
|
2208
2226
|
<xsl:apply-templates select="ancestor::iec:term/iec:name" mode="presentation"/>
|
2209
2227
|
</fo:block>
|
@@ -2320,7 +2338,7 @@
|
|
2320
2338
|
|
2321
2339
|
|
2322
2340
|
<xsl:template name="insertHeaderFooter">
|
2323
|
-
<fo:static-content flow-name="header-even">
|
2341
|
+
<fo:static-content flow-name="header-even" role="artifact">
|
2324
2342
|
<fo:block-container height="25mm" display-align="after">
|
2325
2343
|
<fo:table table-layout="fixed" width="100%">
|
2326
2344
|
<fo:table-column column-width="45%"/>
|
@@ -2345,7 +2363,7 @@
|
|
2345
2363
|
</fo:block-container>
|
2346
2364
|
</fo:static-content>
|
2347
2365
|
|
2348
|
-
<fo:static-content flow-name="header-odd">
|
2366
|
+
<fo:static-content flow-name="header-odd" role="artifact">
|
2349
2367
|
<fo:block-container height="25mm" display-align="after">
|
2350
2368
|
<fo:table table-layout="fixed" width="100%">
|
2351
2369
|
<fo:table-column column-width="45%"/>
|
@@ -2653,11 +2671,12 @@
|
|
2653
2671
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2654
2672
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2655
2673
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
2674
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
2656
2675
|
|
2657
2676
|
|
2658
2677
|
|
2659
2678
|
|
2660
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2679
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
2661
2680
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2662
2681
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
2663
2682
|
|
@@ -2678,8 +2697,13 @@
|
|
2678
2697
|
|
2679
2698
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
2680
2699
|
|
2681
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
2682
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
2700
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
2701
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
2702
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
2703
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
2704
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
2705
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
2706
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
2683
2707
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
2684
2708
|
|
2685
2709
|
|
@@ -2750,6 +2774,7 @@
|
|
2750
2774
|
|
2751
2775
|
|
2752
2776
|
|
2777
|
+
|
2753
2778
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
2754
2779
|
|
2755
2780
|
<xsl:attribute name="padding-right">10mm</xsl:attribute>
|
@@ -2881,7 +2906,8 @@
|
|
2881
2906
|
|
2882
2907
|
|
2883
2908
|
|
2884
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2909
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2910
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
2885
2911
|
|
2886
2912
|
|
2887
2913
|
|
@@ -2974,7 +3000,7 @@
|
|
2974
3000
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2975
3001
|
|
2976
3002
|
|
2977
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
3003
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
2978
3004
|
|
2979
3005
|
|
2980
3006
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -3023,13 +3049,20 @@
|
|
3023
3049
|
|
3024
3050
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
3025
3051
|
|
3026
|
-
</xsl:attribute-set><xsl:
|
3052
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
3053
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
3054
|
+
</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="OLD_processPrefaceSectionsDefault_Contents">
|
3027
3055
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
3028
3056
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
3029
3057
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
3030
3058
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
3031
3059
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
3032
|
-
</xsl:template><xsl:template name="
|
3060
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
3061
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3062
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3063
|
+
<xsl:apply-templates select="." mode="contents"/>
|
3064
|
+
</xsl:for-each>
|
3065
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
3033
3066
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
3034
3067
|
|
3035
3068
|
<!-- Normative references -->
|
@@ -3042,13 +3075,33 @@
|
|
3042
3075
|
<!-- Bibliography -->
|
3043
3076
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
3044
3077
|
|
3045
|
-
</xsl:template><xsl:template name="
|
3078
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
3079
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3080
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3081
|
+
<xsl:apply-templates select="." mode="contents"/>
|
3082
|
+
</xsl:for-each>
|
3083
|
+
|
3084
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
3085
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3086
|
+
<xsl:apply-templates select="." mode="contents"/>
|
3087
|
+
</xsl:for-each>
|
3088
|
+
|
3089
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
3090
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3091
|
+
<xsl:apply-templates select="." mode="contents"/>
|
3092
|
+
</xsl:for-each>
|
3093
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
3046
3094
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
3047
3095
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
3048
3096
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
3049
3097
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
3050
3098
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
3051
|
-
</xsl:template><xsl:template name="
|
3099
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
3100
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3101
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3102
|
+
<xsl:apply-templates select="."/>
|
3103
|
+
</xsl:for-each>
|
3104
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
3052
3105
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
3053
3106
|
|
3054
3107
|
<!-- Normative references -->
|
@@ -3060,6 +3113,22 @@
|
|
3060
3113
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
3061
3114
|
<!-- Bibliography -->
|
3062
3115
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
3116
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
3117
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3118
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3119
|
+
<xsl:apply-templates select="."/>
|
3120
|
+
|
3121
|
+
</xsl:for-each>
|
3122
|
+
|
3123
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
3124
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3125
|
+
<xsl:apply-templates select="."/>
|
3126
|
+
</xsl:for-each>
|
3127
|
+
|
3128
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
3129
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3130
|
+
<xsl:apply-templates select="."/>
|
3131
|
+
</xsl:for-each>
|
3063
3132
|
</xsl:template><xsl:template match="text()">
|
3064
3133
|
<xsl:value-of select="."/>
|
3065
3134
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -3090,7 +3159,9 @@
|
|
3090
3159
|
|
3091
3160
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3092
3161
|
|
3093
|
-
|
3162
|
+
|
3163
|
+
|
3164
|
+
|
3094
3165
|
|
3095
3166
|
<xsl:call-template name="fn_name_display"/>
|
3096
3167
|
|
@@ -3217,6 +3288,8 @@
|
|
3217
3288
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
3218
3289
|
</xsl:if>
|
3219
3290
|
|
3291
|
+
|
3292
|
+
|
3220
3293
|
<xsl:choose>
|
3221
3294
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
3222
3295
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -3504,9 +3577,9 @@
|
|
3504
3577
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
3505
3578
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3506
3579
|
</xsl:apply-templates>
|
3507
|
-
|
3508
|
-
|
3509
|
-
|
3580
|
+
|
3581
|
+
|
3582
|
+
|
3510
3583
|
|
3511
3584
|
</fo:table-cell>
|
3512
3585
|
</fo:table-row>
|
@@ -3600,7 +3673,11 @@
|
|
3600
3673
|
|
3601
3674
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3602
3675
|
|
3603
|
-
<xsl:
|
3676
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3677
|
+
|
3678
|
+
</xsl:variable>
|
3679
|
+
|
3680
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
3604
3681
|
|
3605
3682
|
<xsl:variable name="cols-count">
|
3606
3683
|
<xsl:choose>
|
@@ -3753,6 +3830,19 @@
|
|
3753
3830
|
|
3754
3831
|
</fo:table-body>
|
3755
3832
|
|
3833
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
3834
|
+
<xsl:choose>
|
3835
|
+
<xsl:when test="substring-after(., '—') != ''">
|
3836
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
3837
|
+
</xsl:when>
|
3838
|
+
<xsl:otherwise>
|
3839
|
+
<xsl:value-of select="."/>
|
3840
|
+
</xsl:otherwise>
|
3841
|
+
</xsl:choose>
|
3842
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
3843
|
+
<xsl:apply-templates mode="presentation_name"/>
|
3844
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
3845
|
+
<xsl:apply-templates select="."/>
|
3756
3846
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
3757
3847
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
3758
3848
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -3953,14 +4043,12 @@
|
|
3953
4043
|
<xsl:apply-templates/>
|
3954
4044
|
</xsl:template><xsl:template name="fn_display">
|
3955
4045
|
<xsl:variable name="references">
|
4046
|
+
|
3956
4047
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
3957
|
-
<
|
3958
|
-
|
3959
|
-
|
3960
|
-
<xsl:apply-templates/>
|
3961
|
-
</fn>
|
4048
|
+
<xsl:call-template name="create_fn"/>
|
3962
4049
|
</xsl:for-each>
|
3963
4050
|
</xsl:variable>
|
4051
|
+
|
3964
4052
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
3965
4053
|
<xsl:variable name="reference" select="@reference"/>
|
3966
4054
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
@@ -4002,6 +4090,12 @@
|
|
4002
4090
|
</fo:block>
|
4003
4091
|
</xsl:if>
|
4004
4092
|
</xsl:for-each>
|
4093
|
+
</xsl:template><xsl:template name="create_fn">
|
4094
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
4095
|
+
|
4096
|
+
|
4097
|
+
<xsl:apply-templates/>
|
4098
|
+
</fn>
|
4005
4099
|
</xsl:template><xsl:template name="fn_name_display">
|
4006
4100
|
<!-- <xsl:variable name="references">
|
4007
4101
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -4139,7 +4233,7 @@
|
|
4139
4233
|
|
4140
4234
|
|
4141
4235
|
|
4142
|
-
<xsl:if test="ancestor::*[local-name()='
|
4236
|
+
<xsl:if test="ancestor::*[local-name()='table']">
|
4143
4237
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4144
4238
|
<!-- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute> -->
|
4145
4239
|
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
@@ -5016,16 +5110,68 @@
|
|
5016
5110
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
5017
5111
|
</xsl:call-template>
|
5018
5112
|
|
5113
|
+
|
5114
|
+
|
5019
5115
|
<xsl:variable name="mathml">
|
5020
5116
|
<xsl:apply-templates select="." mode="mathml"/>
|
5021
5117
|
</xsl:variable>
|
5022
5118
|
<fo:instream-foreign-object fox:alt-text="Math">
|
5023
5119
|
|
5024
5120
|
|
5121
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
5122
|
+
<xsl:variable name="comment_text_">
|
5123
|
+
<xsl:choose>
|
5124
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
5125
|
+
<xsl:value-of select="$comment_text_following"/>
|
5126
|
+
</xsl:when>
|
5127
|
+
<xsl:otherwise>
|
5128
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
5129
|
+
</xsl:otherwise>
|
5130
|
+
</xsl:choose>
|
5131
|
+
</xsl:variable>
|
5132
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
5133
|
+
|
5134
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
5135
|
+
<!-- put Mathin Alternate Text -->
|
5136
|
+
<xsl:attribute name="fox:alt-text">
|
5137
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
5138
|
+
</xsl:attribute>
|
5139
|
+
</xsl:if>
|
5140
|
+
|
5141
|
+
<xsl:variable name="mathml_content">
|
5142
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
5143
|
+
</xsl:variable>
|
5144
|
+
<!-- put MathML in Actual Text -->
|
5145
|
+
<xsl:attribute name="fox:actual-text">
|
5146
|
+
<xsl:value-of select="$mathml_content"/>
|
5147
|
+
</xsl:attribute>
|
5148
|
+
|
5149
|
+
|
5025
5150
|
<!-- <xsl:copy-of select="."/> -->
|
5026
5151
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
5027
5152
|
</fo:instream-foreign-object>
|
5028
5153
|
</fo:inline>
|
5154
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
5155
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
5156
|
+
<xsl:text><</xsl:text>
|
5157
|
+
<xsl:value-of select="local-name()"/>
|
5158
|
+
<xsl:if test="local-name() = 'math'">
|
5159
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
5160
|
+
</xsl:if>
|
5161
|
+
<xsl:for-each select="@*">
|
5162
|
+
<xsl:text> </xsl:text>
|
5163
|
+
<xsl:value-of select="local-name()"/>
|
5164
|
+
<xsl:text>="</xsl:text>
|
5165
|
+
<xsl:value-of select="."/>
|
5166
|
+
<xsl:text>"</xsl:text>
|
5167
|
+
</xsl:for-each>
|
5168
|
+
<xsl:text>></xsl:text>
|
5169
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
5170
|
+
<xsl:text></</xsl:text>
|
5171
|
+
<xsl:value-of select="local-name()"/>
|
5172
|
+
<xsl:text>></xsl:text>
|
5173
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
5174
|
+
<xsl:value-of select="normalize-space()"/>
|
5029
5175
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
5030
5176
|
<xsl:copy>
|
5031
5177
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -5035,19 +5181,6 @@
|
|
5035
5181
|
<!-- replace start and end spaces to non-break space -->
|
5036
5182
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
5037
5183
|
</xsl:copy>
|
5038
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
5039
|
-
<xsl:copy>
|
5040
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
5041
|
-
</xsl:copy>
|
5042
|
-
<xsl:choose>
|
5043
|
-
<!-- if in msub, then don't add space -->
|
5044
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
5045
|
-
<!-- if next char in digit, don't add space -->
|
5046
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
5047
|
-
<xsl:otherwise>
|
5048
|
-
<mathml:mspace width="0.5ex"/>
|
5049
|
-
</xsl:otherwise>
|
5050
|
-
</xsl:choose>
|
5051
5184
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
5052
5185
|
<xsl:variable name="target">
|
5053
5186
|
<xsl:choose>
|
@@ -5104,7 +5237,10 @@
|
|
5104
5237
|
</fo:block>
|
5105
5238
|
<xsl:apply-templates/>
|
5106
5239
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
5107
|
-
<
|
5240
|
+
<xsl:variable name="level">
|
5241
|
+
<xsl:call-template name="getLevel"/>
|
5242
|
+
</xsl:variable>
|
5243
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
5108
5244
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
5109
5245
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
5110
5246
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -5139,9 +5275,10 @@
|
|
5139
5275
|
|
5140
5276
|
</xsl:variable>
|
5141
5277
|
|
5278
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5142
5279
|
<xsl:choose>
|
5143
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
5144
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
5280
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
5281
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
5145
5282
|
</xsl:choose>
|
5146
5283
|
<xsl:apply-templates/>
|
5147
5284
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -5287,7 +5424,10 @@
|
|
5287
5424
|
</fo:block>
|
5288
5425
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
5289
5426
|
<xsl:if test="normalize-space() != ''">
|
5290
|
-
<
|
5427
|
+
<xsl:variable name="level">
|
5428
|
+
<xsl:call-template name="getLevelTermName"/>
|
5429
|
+
</xsl:variable>
|
5430
|
+
<fo:inline role="H{$level}">
|
5291
5431
|
<xsl:apply-templates/>
|
5292
5432
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
5293
5433
|
<xsl:text>.</xsl:text>
|
@@ -5588,6 +5728,13 @@
|
|
5588
5728
|
</xsl:attribute>
|
5589
5729
|
<xsl:apply-templates mode="svg_update"/>
|
5590
5730
|
</xsl:copy>
|
5731
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
5732
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
5733
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
5734
|
+
<xsl:call-template name="image_svg">
|
5735
|
+
<xsl:with-param name="name" select="$name"/>
|
5736
|
+
</xsl:call-template>
|
5737
|
+
</xsl:for-each>
|
5591
5738
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
5592
5739
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
5593
5740
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -5692,7 +5839,7 @@
|
|
5692
5839
|
</fo:basic-link>
|
5693
5840
|
</fo:block>
|
5694
5841
|
</fo:block-container>
|
5695
|
-
</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">
|
5842
|
+
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
|
5696
5843
|
<xsl:apply-templates mode="contents"/>
|
5697
5844
|
<xsl:text> </xsl:text>
|
5698
5845
|
</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">
|
@@ -5918,6 +6065,7 @@
|
|
5918
6065
|
</xsl:when>
|
5919
6066
|
<xsl:otherwise>
|
5920
6067
|
<xsl:apply-templates/>
|
6068
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
5921
6069
|
</xsl:otherwise>
|
5922
6070
|
</xsl:choose>
|
5923
6071
|
</fo:block>
|
@@ -6058,14 +6206,6 @@
|
|
6058
6206
|
<fo:block>
|
6059
6207
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
6060
6208
|
</fo:block>
|
6061
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
6062
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
6063
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6064
|
-
</fo:block>
|
6065
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
6066
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
6067
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
6068
|
-
</fo:block>
|
6069
6209
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
6070
6210
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
6071
6211
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -6082,6 +6222,38 @@
|
|
6082
6222
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
6083
6223
|
<xsl:apply-templates/>
|
6084
6224
|
</fo:block>
|
6225
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
6226
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
6227
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6228
|
+
</fo:block>
|
6229
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
6230
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
6231
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6232
|
+
</fo:block>
|
6233
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
6234
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
6235
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
6236
|
+
</fo:block>
|
6237
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
6238
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
6239
|
+
<xsl:apply-templates/>
|
6240
|
+
</fo:block>
|
6241
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
6242
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
6243
|
+
<xsl:apply-templates/>
|
6244
|
+
</fo:block>
|
6245
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
6246
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
6247
|
+
<xsl:apply-templates/>
|
6248
|
+
</fo:block>
|
6249
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
6250
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
6251
|
+
<xsl:apply-templates/>
|
6252
|
+
</fo:block>
|
6253
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
6254
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
6255
|
+
<xsl:apply-templates/>
|
6256
|
+
</fo:block>
|
6085
6257
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
6086
6258
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
6087
6259
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -6233,7 +6405,19 @@
|
|
6233
6405
|
</fo:inline>
|
6234
6406
|
</xsl:if>
|
6235
6407
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
6236
|
-
<
|
6408
|
+
<xsl:variable name="element">inline
|
6409
|
+
|
6410
|
+
</xsl:variable>
|
6411
|
+
<xsl:choose>
|
6412
|
+
<xsl:when test="contains($element, 'block')">
|
6413
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
6414
|
+
<xsl:apply-templates/>
|
6415
|
+
</fo:block>
|
6416
|
+
</xsl:when>
|
6417
|
+
<xsl:otherwise>
|
6418
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6419
|
+
</xsl:otherwise>
|
6420
|
+
</xsl:choose>
|
6237
6421
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
6238
6422
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
6239
6423
|
|
@@ -6335,14 +6519,15 @@
|
|
6335
6519
|
</xsl:if>
|
6336
6520
|
</xsl:template><xsl:variable name="localized.source">
|
6337
6521
|
<xsl:call-template name="getLocalizedString">
|
6338
|
-
|
6339
|
-
|
6522
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
6523
|
+
</xsl:call-template>
|
6340
6524
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
6341
6525
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6342
6526
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6343
6527
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
6344
6528
|
</xsl:if>
|
6345
6529
|
|
6530
|
+
|
6346
6531
|
<fo:inline>
|
6347
6532
|
|
6348
6533
|
|
@@ -6350,6 +6535,7 @@
|
|
6350
6535
|
|
6351
6536
|
|
6352
6537
|
|
6538
|
+
|
6353
6539
|
<xsl:call-template name="getTitle">
|
6354
6540
|
<xsl:with-param name="name" select="'title-source'"/>
|
6355
6541
|
</xsl:call-template>
|
@@ -6361,6 +6547,7 @@
|
|
6361
6547
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6362
6548
|
<xsl:apply-templates/>
|
6363
6549
|
</fo:inline>
|
6550
|
+
|
6364
6551
|
</fo:basic-link>
|
6365
6552
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
6366
6553
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -6427,6 +6614,9 @@
|
|
6427
6614
|
|
6428
6615
|
</xsl:if>
|
6429
6616
|
|
6617
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
6618
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
6619
|
+
|
6430
6620
|
|
6431
6621
|
|
6432
6622
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -6439,7 +6629,9 @@
|
|
6439
6629
|
|
6440
6630
|
|
6441
6631
|
</xsl:if>
|
6442
|
-
|
6632
|
+
|
6633
|
+
|
6634
|
+
|
6443
6635
|
<xsl:apply-templates/>
|
6444
6636
|
</fo:basic-link>
|
6445
6637
|
|
@@ -6774,6 +6966,7 @@
|
|
6774
6966
|
</xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
|
6775
6967
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
6776
6968
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
6969
|
+
|
6777
6970
|
<xsl:apply-templates/>
|
6778
6971
|
</fo:block>
|
6779
6972
|
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
@@ -6813,7 +7006,6 @@
|
|
6813
7006
|
</xsl:template><xsl:template name="processBibitem">
|
6814
7007
|
|
6815
7008
|
|
6816
|
-
<!-- end BIPM bibitem processing-->
|
6817
7009
|
|
6818
7010
|
|
6819
7011
|
|
@@ -6943,6 +7135,97 @@
|
|
6943
7135
|
<fo:block-container border="1pt solid black" width="50%">
|
6944
7136
|
<fo:block> </fo:block>
|
6945
7137
|
</fo:block-container>
|
7138
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
7139
|
+
<xsl:param name="colwidths"/>
|
7140
|
+
<xsl:variable name="colwidths_">
|
7141
|
+
<xsl:choose>
|
7142
|
+
<xsl:when test="not($colwidths)">
|
7143
|
+
<xsl:variable name="toc_table_simple">
|
7144
|
+
<tbody>
|
7145
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7146
|
+
</tbody>
|
7147
|
+
</xsl:variable>
|
7148
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
7149
|
+
<xsl:call-template name="calculate-column-widths">
|
7150
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
7151
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
7152
|
+
</xsl:call-template>
|
7153
|
+
</xsl:when>
|
7154
|
+
<xsl:otherwise>
|
7155
|
+
<xsl:copy-of select="$colwidths"/>
|
7156
|
+
</xsl:otherwise>
|
7157
|
+
</xsl:choose>
|
7158
|
+
</xsl:variable>
|
7159
|
+
<fo:block role="TOCI" space-after="16pt">
|
7160
|
+
<fo:table width="100%" table-layout="fixed">
|
7161
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
7162
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
7163
|
+
</xsl:for-each>
|
7164
|
+
<fo:table-body>
|
7165
|
+
<xsl:apply-templates/>
|
7166
|
+
</fo:table-body>
|
7167
|
+
</fo:table>
|
7168
|
+
</fo:block>
|
7169
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
7170
|
+
<fo:table-row min-height="5mm">
|
7171
|
+
<xsl:apply-templates/>
|
7172
|
+
</fo:table-row>
|
7173
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
7174
|
+
<xsl:apply-templates/>
|
7175
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
7176
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
7177
|
+
<xsl:variable name="target" select="@target"/>
|
7178
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
7179
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
7180
|
+
<fo:table-cell>
|
7181
|
+
<fo:block>
|
7182
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
7183
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
7184
|
+
<xsl:choose>
|
7185
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
7186
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
7187
|
+
</xsl:choose>
|
7188
|
+
</xsl:for-each>
|
7189
|
+
</fo:basic-link>
|
7190
|
+
</fo:block>
|
7191
|
+
</fo:table-cell>
|
7192
|
+
</xsl:for-each>
|
7193
|
+
<!-- last column - for page numbers -->
|
7194
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
7195
|
+
<fo:block>
|
7196
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
7197
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
7198
|
+
</fo:basic-link>
|
7199
|
+
</fo:block>
|
7200
|
+
</fo:table-cell>
|
7201
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
7202
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7203
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
7204
|
+
<tr>
|
7205
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7206
|
+
</tr>
|
7207
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
7208
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
7209
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
7210
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
7211
|
+
<td>
|
7212
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
7213
|
+
<xsl:copy-of select="."/>
|
7214
|
+
</xsl:for-each>
|
7215
|
+
</td>
|
7216
|
+
</xsl:for-each>
|
7217
|
+
<td>333</td> <!-- page number, just for fill -->
|
7218
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
7219
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
7220
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
7221
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
7222
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
7223
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
7224
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
7225
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
7226
|
+
</svg>
|
7227
|
+
</fo:instream-foreign-object>
|
7228
|
+
</fo:inline>
|
6946
7229
|
</xsl:template><xsl:template name="convertDate">
|
6947
7230
|
<xsl:param name="date"/>
|
6948
7231
|
<xsl:param name="format" select="'short'"/>
|
@@ -7181,6 +7464,26 @@
|
|
7181
7464
|
<xsl:value-of select="$level"/>
|
7182
7465
|
</xsl:otherwise>
|
7183
7466
|
</xsl:choose>
|
7467
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
7468
|
+
<xsl:choose>
|
7469
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
7470
|
+
<xsl:value-of select="../@depth"/>
|
7471
|
+
</xsl:when>
|
7472
|
+
<xsl:otherwise>
|
7473
|
+
<xsl:variable name="title_level_">
|
7474
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
7475
|
+
<xsl:call-template name="getLevel"/>
|
7476
|
+
</xsl:for-each>
|
7477
|
+
</xsl:variable>
|
7478
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
7479
|
+
<xsl:choose>
|
7480
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
7481
|
+
<xsl:otherwise>
|
7482
|
+
<xsl:call-template name="getLevel"/>
|
7483
|
+
</xsl:otherwise>
|
7484
|
+
</xsl:choose>
|
7485
|
+
</xsl:otherwise>
|
7486
|
+
</xsl:choose>
|
7184
7487
|
</xsl:template><xsl:template name="split">
|
7185
7488
|
<xsl:param name="pText" select="."/>
|
7186
7489
|
<xsl:param name="sep" select="','"/>
|