metanorma-iec 1.3.9 → 1.3.10
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 +23 -9
- data/lib/asciidoctor/iec/isostandard.rng +3 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +268 -134
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93a0fcf1f3f8ac074f13302be86689a14ea611ac32441e52efe4c49347d6df35
|
4
|
+
data.tar.gz: 57779957f493e1d0b790fa45e422eb2725e177fad6ed44c773afbb65fdb365af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e7928bce1b35b368e4413679eac9cfe517165596ea488333a29fcb83b833255a12fd91d5793a831b822e51bf83900c5df0437f6b6e243fe05e187b77992531d
|
7
|
+
data.tar.gz: c04ad47acbf60a500667857001fab76687b3c3fd1f6d43dd032167797d794dcad780ce5f157f9c4664d462aa9f3d17b08ea1a7dc3dd928889537445f23969480
|
@@ -32,6 +32,18 @@
|
|
32
32
|
<ref name="DocumentType"/>
|
33
33
|
</element>
|
34
34
|
</define>
|
35
|
+
<define name="section-title">
|
36
|
+
<element name="title">
|
37
|
+
<zeroOrMore>
|
38
|
+
<ref name="TextElement"/>
|
39
|
+
</zeroOrMore>
|
40
|
+
</element>
|
41
|
+
<zeroOrMore>
|
42
|
+
<element name="variant-title">
|
43
|
+
<ref name="TypedTitleString"/>
|
44
|
+
</element>
|
45
|
+
</zeroOrMore>
|
46
|
+
</define>
|
35
47
|
<define name="hyperlink">
|
36
48
|
<element name="link">
|
37
49
|
<attribute name="target">
|
@@ -158,15 +170,17 @@
|
|
158
170
|
<data type="boolean"/>
|
159
171
|
</attribute>
|
160
172
|
</optional>
|
161
|
-
<
|
162
|
-
<
|
163
|
-
<
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
173
|
+
<optional>
|
174
|
+
<attribute name="type">
|
175
|
+
<choice>
|
176
|
+
<value>roman</value>
|
177
|
+
<value>alphabet</value>
|
178
|
+
<value>arabic</value>
|
179
|
+
<value>roman_upper</value>
|
180
|
+
<value>alphabet_upper</value>
|
181
|
+
</choice>
|
182
|
+
</attribute>
|
183
|
+
</optional>
|
170
184
|
<oneOrMore>
|
171
185
|
<ref name="li"/>
|
172
186
|
</oneOrMore>
|
@@ -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,6 +2671,7 @@
|
|
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
|
|
@@ -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
|
|
@@ -2882,7 +2906,8 @@
|
|
2882
2906
|
|
2883
2907
|
|
2884
2908
|
|
2885
|
-
</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>
|
2886
2911
|
|
2887
2912
|
|
2888
2913
|
|
@@ -3091,7 +3116,9 @@
|
|
3091
3116
|
|
3092
3117
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3093
3118
|
|
3094
|
-
|
3119
|
+
|
3120
|
+
|
3121
|
+
|
3095
3122
|
|
3096
3123
|
<xsl:call-template name="fn_name_display"/>
|
3097
3124
|
|
@@ -5040,16 +5067,68 @@
|
|
5040
5067
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
5041
5068
|
</xsl:call-template>
|
5042
5069
|
|
5070
|
+
|
5071
|
+
|
5043
5072
|
<xsl:variable name="mathml">
|
5044
5073
|
<xsl:apply-templates select="." mode="mathml"/>
|
5045
5074
|
</xsl:variable>
|
5046
5075
|
<fo:instream-foreign-object fox:alt-text="Math">
|
5047
5076
|
|
5048
5077
|
|
5078
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
5079
|
+
<xsl:variable name="comment_text_">
|
5080
|
+
<xsl:choose>
|
5081
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
5082
|
+
<xsl:value-of select="$comment_text_following"/>
|
5083
|
+
</xsl:when>
|
5084
|
+
<xsl:otherwise>
|
5085
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
5086
|
+
</xsl:otherwise>
|
5087
|
+
</xsl:choose>
|
5088
|
+
</xsl:variable>
|
5089
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
5090
|
+
|
5091
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
5092
|
+
<!-- put Mathin Alternate Text -->
|
5093
|
+
<xsl:attribute name="fox:alt-text">
|
5094
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
5095
|
+
</xsl:attribute>
|
5096
|
+
</xsl:if>
|
5097
|
+
|
5098
|
+
<xsl:variable name="mathml_content">
|
5099
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
5100
|
+
</xsl:variable>
|
5101
|
+
<!-- put MathML in Actual Text -->
|
5102
|
+
<xsl:attribute name="fox:actual-text">
|
5103
|
+
<xsl:value-of select="$mathml_content"/>
|
5104
|
+
</xsl:attribute>
|
5105
|
+
|
5106
|
+
|
5049
5107
|
<!-- <xsl:copy-of select="."/> -->
|
5050
5108
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
5051
5109
|
</fo:instream-foreign-object>
|
5052
5110
|
</fo:inline>
|
5111
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
5112
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
5113
|
+
<xsl:text><</xsl:text>
|
5114
|
+
<xsl:value-of select="local-name()"/>
|
5115
|
+
<xsl:if test="local-name() = 'math'">
|
5116
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
5117
|
+
</xsl:if>
|
5118
|
+
<xsl:for-each select="@*">
|
5119
|
+
<xsl:text> </xsl:text>
|
5120
|
+
<xsl:value-of select="local-name()"/>
|
5121
|
+
<xsl:text>="</xsl:text>
|
5122
|
+
<xsl:value-of select="."/>
|
5123
|
+
<xsl:text>"</xsl:text>
|
5124
|
+
</xsl:for-each>
|
5125
|
+
<xsl:text>></xsl:text>
|
5126
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
5127
|
+
<xsl:text></</xsl:text>
|
5128
|
+
<xsl:value-of select="local-name()"/>
|
5129
|
+
<xsl:text>></xsl:text>
|
5130
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
5131
|
+
<xsl:value-of select="normalize-space()"/>
|
5053
5132
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
5054
5133
|
<xsl:copy>
|
5055
5134
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -5115,7 +5194,10 @@
|
|
5115
5194
|
</fo:block>
|
5116
5195
|
<xsl:apply-templates/>
|
5117
5196
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
5118
|
-
<
|
5197
|
+
<xsl:variable name="level">
|
5198
|
+
<xsl:call-template name="getLevel"/>
|
5199
|
+
</xsl:variable>
|
5200
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
5119
5201
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
5120
5202
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
5121
5203
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -5150,9 +5232,10 @@
|
|
5150
5232
|
|
5151
5233
|
</xsl:variable>
|
5152
5234
|
|
5235
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5153
5236
|
<xsl:choose>
|
5154
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
5155
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
5237
|
+
<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>
|
5238
|
+
<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>
|
5156
5239
|
</xsl:choose>
|
5157
5240
|
<xsl:apply-templates/>
|
5158
5241
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -5298,7 +5381,10 @@
|
|
5298
5381
|
</fo:block>
|
5299
5382
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
5300
5383
|
<xsl:if test="normalize-space() != ''">
|
5301
|
-
<
|
5384
|
+
<xsl:variable name="level">
|
5385
|
+
<xsl:call-template name="getLevelTermName"/>
|
5386
|
+
</xsl:variable>
|
5387
|
+
<fo:inline role="H{$level}">
|
5302
5388
|
<xsl:apply-templates/>
|
5303
5389
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
5304
5390
|
<xsl:text>.</xsl:text>
|
@@ -5929,6 +6015,7 @@
|
|
5929
6015
|
</xsl:when>
|
5930
6016
|
<xsl:otherwise>
|
5931
6017
|
<xsl:apply-templates/>
|
6018
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
5932
6019
|
</xsl:otherwise>
|
5933
6020
|
</xsl:choose>
|
5934
6021
|
</fo:block>
|
@@ -6069,14 +6156,6 @@
|
|
6069
6156
|
<fo:block>
|
6070
6157
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
6071
6158
|
</fo:block>
|
6072
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
6073
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
6074
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6075
|
-
</fo:block>
|
6076
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
6077
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
6078
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
6079
|
-
</fo:block>
|
6080
6159
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
6081
6160
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
6082
6161
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -6093,6 +6172,38 @@
|
|
6093
6172
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
6094
6173
|
<xsl:apply-templates/>
|
6095
6174
|
</fo:block>
|
6175
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
6176
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
6177
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6178
|
+
</fo:block>
|
6179
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
6180
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
6181
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6182
|
+
</fo:block>
|
6183
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
6184
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
6185
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
6186
|
+
</fo:block>
|
6187
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
6188
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
6189
|
+
<xsl:apply-templates/>
|
6190
|
+
</fo:block>
|
6191
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
6192
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
6193
|
+
<xsl:apply-templates/>
|
6194
|
+
</fo:block>
|
6195
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
6196
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
6197
|
+
<xsl:apply-templates/>
|
6198
|
+
</fo:block>
|
6199
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
6200
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
6201
|
+
<xsl:apply-templates/>
|
6202
|
+
</fo:block>
|
6203
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
6204
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
6205
|
+
<xsl:apply-templates/>
|
6206
|
+
</fo:block>
|
6096
6207
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
6097
6208
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
6098
6209
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -6965,6 +7076,9 @@
|
|
6965
7076
|
<fo:block-container border="1pt solid black" width="50%">
|
6966
7077
|
<fo:block> </fo:block>
|
6967
7078
|
</fo:block-container>
|
7079
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
7080
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
7081
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6968
7082
|
</xsl:template><xsl:template name="convertDate">
|
6969
7083
|
<xsl:param name="date"/>
|
6970
7084
|
<xsl:param name="format" select="'short'"/>
|
@@ -7203,6 +7317,26 @@
|
|
7203
7317
|
<xsl:value-of select="$level"/>
|
7204
7318
|
</xsl:otherwise>
|
7205
7319
|
</xsl:choose>
|
7320
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
7321
|
+
<xsl:choose>
|
7322
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
7323
|
+
<xsl:value-of select="../@depth"/>
|
7324
|
+
</xsl:when>
|
7325
|
+
<xsl:otherwise>
|
7326
|
+
<xsl:variable name="title_level_">
|
7327
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
7328
|
+
<xsl:call-template name="getLevel"/>
|
7329
|
+
</xsl:for-each>
|
7330
|
+
</xsl:variable>
|
7331
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
7332
|
+
<xsl:choose>
|
7333
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
7334
|
+
<xsl:otherwise>
|
7335
|
+
<xsl:call-template name="getLevel"/>
|
7336
|
+
</xsl:otherwise>
|
7337
|
+
</xsl:choose>
|
7338
|
+
</xsl:otherwise>
|
7339
|
+
</xsl:choose>
|
7206
7340
|
</xsl:template><xsl:template name="split">
|
7207
7341
|
<xsl:param name="pText" select="."/>
|
7208
7342
|
<xsl:param name="sep" select="','"/>
|