metanorma-itu 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/itu/cleanup.rb +4 -7
- data/lib/asciidoctor/itu/converter.rb +10 -0
- data/lib/asciidoctor/itu/front.rb +2 -31
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +181 -8
- data/lib/isodoc/itu/itu.recommendation.xsl +181 -8
- data/lib/isodoc/itu/itu.resolution.xsl +181 -8
- data/lib/metanorma/itu/version.rb +1 -1
- 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: a6028239b8ffb9cf94de7759755fe208f1fdd936cf725f8888c17f197327a01f
|
4
|
+
data.tar.gz: e32f5d0ee934edb77e41a0014d6cce1be685ed99505331808b3c4a96268e3f37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f49a564d79e27806d8d8669d8b58ac0400a560ea7cab85d5dfb00240e7d644ef70a1c31a8f873f44c10b88edf95f246a736c66ccac9c175b578ed709e08d43c
|
7
|
+
data.tar.gz: c738f41c4de7edd4e5b1ca26f5f298731002c1299d644138638c76addbb8433d2bdb9882e80d0ffd04c5f85159392c6f361c6ec214b2d8a2b99d08bbf9216334
|
@@ -33,11 +33,10 @@ module Asciidoctor
|
|
33
33
|
"<sections><sentinel/></sections>"
|
34
34
|
x.at("./*/sections/*") or x.at("./*/sections") << "<sentinel/>"
|
35
35
|
ins = x.at("//sections").elements.first
|
36
|
-
|
36
|
+
x.at("//sections/clause[@type = 'scope']") or
|
37
37
|
ins.previous =
|
38
38
|
"<clause type='scope' #{add_id}><title>#{@i18n.scope}</title><p>"\
|
39
39
|
"#{@i18n.clause_empty}</p></clause>"
|
40
|
-
end
|
41
40
|
x&.at("//sentinel")&.remove
|
42
41
|
end
|
43
42
|
|
@@ -46,18 +45,16 @@ module Asciidoctor
|
|
46
45
|
x.at("./*/annex[last()] | ./*/sections").next =
|
47
46
|
"<bibliography><sentinel/></bibliography>"
|
48
47
|
ins = x.at("//bibliography").elements.first
|
49
|
-
|
48
|
+
x.at("//bibliography/references[@normative = 'true']") or
|
50
49
|
ins.previous = "<references #{add_id} normative='true'>"\
|
51
|
-
|
52
|
-
end
|
50
|
+
"<title>#{@i18n.normref}</title></references>"
|
53
51
|
x&.at("//sentinel")&.remove
|
54
52
|
end
|
55
53
|
|
56
54
|
def insert_terms(x)
|
57
55
|
ins = x.at("//sections/clause[@type = 'scope']")
|
58
|
-
|
56
|
+
x.at("//sections//terms") or
|
59
57
|
ins.next = "<terms #{add_id}><title>#{@i18n.termsdef}</title></terms>"
|
60
|
-
end
|
61
58
|
end
|
62
59
|
|
63
60
|
def insert_symbols(x)
|
@@ -86,6 +86,16 @@ module Asciidoctor
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
def sectiontype(node, level = true)
|
90
|
+
ret = super
|
91
|
+
hdr = sectiontype_streamline(node&.attr("heading")&.downcase)
|
92
|
+
return nil if ret == "terms and definitions" &&
|
93
|
+
hdr != "terms and definitions" && node.level > 1
|
94
|
+
return nil if ret == "symbols and abbreviated terms" &&
|
95
|
+
hdr != "symbols and abbreviated terms" && node.level > 1
|
96
|
+
ret
|
97
|
+
end
|
98
|
+
|
89
99
|
def term_def_subclause_parse(attrs, xml, node)
|
90
100
|
case clausetype = sectiontype1(node)
|
91
101
|
when "terms defined in this recommendation"
|
@@ -64,24 +64,8 @@ module Asciidoctor
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
-
def
|
68
|
-
|
69
|
-
c.role **{ type: "author" }
|
70
|
-
c.organization do |a|
|
71
|
-
a.name "International Telecommunication Union"
|
72
|
-
a.abbreviation "ITU"
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
def metadata_publisher(node, xml)
|
78
|
-
xml.contributor do |c|
|
79
|
-
c.role **{ type: "publisher" }
|
80
|
-
c.organization do |a|
|
81
|
-
a.name "International Telecommunication Union"
|
82
|
-
a.abbreviation "ITU"
|
83
|
-
end
|
84
|
-
end
|
67
|
+
def default_publisher
|
68
|
+
"International Telecommunication Union"
|
85
69
|
end
|
86
70
|
|
87
71
|
def metadata_committee(node, xml)
|
@@ -149,19 +133,6 @@ module Asciidoctor
|
|
149
133
|
xml.docnumber { |i| i << node.attr("docnumber") }
|
150
134
|
end
|
151
135
|
|
152
|
-
def metadata_copyright(node, xml)
|
153
|
-
from = node.attr("copyright-year") || Date.today.year
|
154
|
-
xml.copyright do |c|
|
155
|
-
c.from from
|
156
|
-
c.owner do |owner|
|
157
|
-
owner.organization do |o|
|
158
|
-
o.name "International Telecommunication Union"
|
159
|
-
o.abbreviation "ITU"
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
136
|
def metadata_series(node, xml)
|
166
137
|
node.attr("series") and
|
167
138
|
xml.series **{ type: "main" } do |s|
|
@@ -315,7 +315,7 @@
|
|
315
315
|
</fo:block>
|
316
316
|
</fo:block-container>
|
317
317
|
<!-- Summary, History ... -->
|
318
|
-
<xsl:
|
318
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
319
319
|
|
320
320
|
<!-- Keywords -->
|
321
321
|
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:keyword">
|
@@ -758,7 +758,7 @@
|
|
758
758
|
</xsl:template>
|
759
759
|
|
760
760
|
<!-- Bibliography -->
|
761
|
-
<xsl:template match="itu:references[
|
761
|
+
<xsl:template match="itu:references[not(@normative='true')]/itu:title">
|
762
762
|
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
|
763
763
|
<xsl:apply-templates/>
|
764
764
|
</fo:block>
|
@@ -1113,13 +1113,13 @@
|
|
1113
1113
|
</xsl:template>
|
1114
1114
|
|
1115
1115
|
|
1116
|
-
<xsl:template match="itu:references[
|
1116
|
+
<xsl:template match="itu:references[@normative='true']">
|
1117
1117
|
<fo:block id="{@id}">
|
1118
1118
|
<xsl:apply-templates/>
|
1119
1119
|
</fo:block>
|
1120
1120
|
</xsl:template>
|
1121
1121
|
|
1122
|
-
<xsl:template match="itu:references[
|
1122
|
+
<xsl:template match="itu:references[not(@normative='true')]">
|
1123
1123
|
<fo:block break-after="page"/>
|
1124
1124
|
<fo:block id="{@id}">
|
1125
1125
|
<xsl:apply-templates/>
|
@@ -1383,6 +1383,7 @@
|
|
1383
1383
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1384
1384
|
|
1385
1385
|
|
1386
|
+
|
1386
1387
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1387
1388
|
|
1388
1389
|
|
@@ -1399,6 +1400,8 @@
|
|
1399
1400
|
|
1400
1401
|
|
1401
1402
|
|
1403
|
+
|
1404
|
+
|
1402
1405
|
|
1403
1406
|
|
1404
1407
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
@@ -1417,6 +1420,8 @@
|
|
1417
1420
|
|
1418
1421
|
|
1419
1422
|
|
1423
|
+
|
1424
|
+
|
1420
1425
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1421
1426
|
|
1422
1427
|
|
@@ -1438,6 +1443,7 @@
|
|
1438
1443
|
|
1439
1444
|
|
1440
1445
|
|
1446
|
+
|
1441
1447
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1442
1448
|
|
1443
1449
|
|
@@ -1565,7 +1571,7 @@
|
|
1565
1571
|
|
1566
1572
|
|
1567
1573
|
|
1568
|
-
|
1574
|
+
|
1569
1575
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1570
1576
|
|
1571
1577
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -1613,7 +1619,43 @@
|
|
1613
1619
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1614
1620
|
|
1615
1621
|
|
1616
|
-
</xsl:attribute-set><xsl:template
|
1622
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1623
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1624
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1625
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1626
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1627
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1628
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1629
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1630
|
+
|
1631
|
+
<!-- Normative references -->
|
1632
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1633
|
+
<!-- Terms and definitions -->
|
1634
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1635
|
+
<!-- Another main sections -->
|
1636
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1637
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1638
|
+
<!-- Bibliography -->
|
1639
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1640
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1641
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1642
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1643
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1644
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1645
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1646
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1647
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1648
|
+
|
1649
|
+
<!-- Normative references -->
|
1650
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1651
|
+
<!-- Terms and definitions -->
|
1652
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
1653
|
+
<!-- Another main sections -->
|
1654
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
1655
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1656
|
+
<!-- Bibliography -->
|
1657
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1658
|
+
</xsl:template><xsl:template match="text()">
|
1617
1659
|
<xsl:value-of select="."/>
|
1618
1660
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1619
1661
|
<xsl:value-of select="$linebreak"/>
|
@@ -1700,6 +1742,7 @@
|
|
1700
1742
|
|
1701
1743
|
|
1702
1744
|
|
1745
|
+
|
1703
1746
|
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
1704
1747
|
|
1705
1748
|
|
@@ -1717,6 +1760,7 @@
|
|
1717
1760
|
|
1718
1761
|
|
1719
1762
|
|
1763
|
+
|
1720
1764
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1721
1765
|
<xsl:choose>
|
1722
1766
|
<xsl:when test=". = 1 or . = 0">
|
@@ -1971,6 +2015,14 @@
|
|
1971
2015
|
</fo:table-row>
|
1972
2016
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
1973
2017
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
2018
|
+
<xsl:attribute name="text-align">
|
2019
|
+
<xsl:choose>
|
2020
|
+
<xsl:when test="@align">
|
2021
|
+
<xsl:value-of select="@align"/>
|
2022
|
+
</xsl:when>
|
2023
|
+
<xsl:otherwise>center</xsl:otherwise>
|
2024
|
+
</xsl:choose>
|
2025
|
+
</xsl:attribute>
|
1974
2026
|
|
1975
2027
|
|
1976
2028
|
|
@@ -1983,6 +2035,7 @@
|
|
1983
2035
|
|
1984
2036
|
|
1985
2037
|
|
2038
|
+
|
1986
2039
|
<xsl:if test="@colspan">
|
1987
2040
|
<xsl:attribute name="number-columns-spanned">
|
1988
2041
|
<xsl:value-of select="@colspan"/>
|
@@ -1999,6 +2052,14 @@
|
|
1999
2052
|
</fo:table-cell>
|
2000
2053
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2001
2054
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2055
|
+
<xsl:attribute name="text-align">
|
2056
|
+
<xsl:choose>
|
2057
|
+
<xsl:when test="@align">
|
2058
|
+
<xsl:value-of select="@align"/>
|
2059
|
+
</xsl:when>
|
2060
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2061
|
+
</xsl:choose>
|
2062
|
+
</xsl:attribute>
|
2002
2063
|
|
2003
2064
|
|
2004
2065
|
<xsl:if test="ancestor::*[local-name()='preface']">
|
@@ -3240,6 +3301,117 @@
|
|
3240
3301
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3241
3302
|
<xsl:apply-templates/>
|
3242
3303
|
</fo:block>
|
3304
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3305
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3306
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3307
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
|
3308
|
+
<xsl:variable name="simple-table">
|
3309
|
+
<xsl:call-template name="getSimpleTable"/>
|
3310
|
+
</xsl:variable>
|
3311
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3312
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3313
|
+
<fo:table-column column-width="35mm"/>
|
3314
|
+
<fo:table-column column-width="115mm"/>
|
3315
|
+
</xsl:if>
|
3316
|
+
<xsl:apply-templates mode="requirement"/>
|
3317
|
+
</fo:table>
|
3318
|
+
<!-- fn processing -->
|
3319
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
3320
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
3321
|
+
<fo:block font-size="90%" border-bottom="1.pt solid black">
|
3322
|
+
<xsl:call-template name="fn_display"/>
|
3323
|
+
</fo:block>
|
3324
|
+
</xsl:for-each>
|
3325
|
+
</xsl:if>
|
3326
|
+
</fo:block-container>
|
3327
|
+
</fo:block-container>
|
3328
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
3329
|
+
<fo:table-header>
|
3330
|
+
<xsl:apply-templates mode="requirement"/>
|
3331
|
+
</fo:table-header>
|
3332
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
3333
|
+
<fo:table-body>
|
3334
|
+
<xsl:apply-templates mode="requirement"/>
|
3335
|
+
</fo:table-body>
|
3336
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3337
|
+
<fo:table-row>
|
3338
|
+
<xsl:apply-templates mode="requirement"/>
|
3339
|
+
</fo:table-row>
|
3340
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3341
|
+
<fo:table-cell text-align="{@align}">
|
3342
|
+
<xsl:attribute name="text-align">
|
3343
|
+
<xsl:choose>
|
3344
|
+
<xsl:when test="@align">
|
3345
|
+
<xsl:value-of select="@align"/>
|
3346
|
+
</xsl:when>
|
3347
|
+
<xsl:otherwise>center</xsl:otherwise>
|
3348
|
+
</xsl:choose>
|
3349
|
+
</xsl:attribute>
|
3350
|
+
<xsl:if test="@colspan">
|
3351
|
+
<xsl:attribute name="number-columns-spanned">
|
3352
|
+
<xsl:value-of select="@colspan"/>
|
3353
|
+
</xsl:attribute>
|
3354
|
+
</xsl:if>
|
3355
|
+
<xsl:if test="@rowspan">
|
3356
|
+
<xsl:attribute name="number-rows-spanned">
|
3357
|
+
<xsl:value-of select="@rowspan"/>
|
3358
|
+
</xsl:attribute>
|
3359
|
+
</xsl:if>
|
3360
|
+
|
3361
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3362
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3363
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3364
|
+
</xsl:if>
|
3365
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3366
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3367
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3368
|
+
</xsl:if>
|
3369
|
+
|
3370
|
+
<fo:block>
|
3371
|
+
<xsl:apply-templates/>
|
3372
|
+
</fo:block>
|
3373
|
+
</fo:table-cell>
|
3374
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3375
|
+
<fo:table-cell text-align="{@align}">
|
3376
|
+
<xsl:attribute name="text-align">
|
3377
|
+
<xsl:choose>
|
3378
|
+
<xsl:when test="@align">
|
3379
|
+
<xsl:value-of select="@align"/>
|
3380
|
+
</xsl:when>
|
3381
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3382
|
+
</xsl:choose>
|
3383
|
+
</xsl:attribute>
|
3384
|
+
<xsl:if test="@colspan">
|
3385
|
+
<xsl:attribute name="number-columns-spanned">
|
3386
|
+
<xsl:value-of select="@colspan"/>
|
3387
|
+
</xsl:attribute>
|
3388
|
+
</xsl:if>
|
3389
|
+
<xsl:if test="@rowspan">
|
3390
|
+
<xsl:attribute name="number-rows-spanned">
|
3391
|
+
<xsl:value-of select="@rowspan"/>
|
3392
|
+
</xsl:attribute>
|
3393
|
+
</xsl:if>
|
3394
|
+
|
3395
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3396
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3397
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3398
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
|
3399
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3400
|
+
</xsl:if>
|
3401
|
+
</xsl:if>
|
3402
|
+
|
3403
|
+
<fo:block>
|
3404
|
+
<xsl:apply-templates/>
|
3405
|
+
</fo:block>
|
3406
|
+
</fo:table-cell>
|
3407
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3408
|
+
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
|
3409
|
+
<xsl:apply-templates/>
|
3410
|
+
</fo:block>
|
3411
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3412
|
+
<fo:block margin-bottom="10pt">
|
3413
|
+
<xsl:apply-templates/>
|
3414
|
+
</fo:block>
|
3243
3415
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
3244
3416
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
3245
3417
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3515,7 +3687,7 @@
|
|
3515
3687
|
<fo:block id="{@id}">
|
3516
3688
|
<xsl:apply-templates/>
|
3517
3689
|
</fo:block>
|
3518
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
3690
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3519
3691
|
|
3520
3692
|
<fo:block id="{@id}">
|
3521
3693
|
<xsl:apply-templates/>
|
@@ -3769,7 +3941,8 @@
|
|
3769
3941
|
|
3770
3942
|
|
3771
3943
|
|
3772
|
-
|
3944
|
+
|
3945
|
+
|
3773
3946
|
</xsl:variable>
|
3774
3947
|
<xsl:if test="$documentNS != $XSLNS">
|
3775
3948
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -315,7 +315,7 @@
|
|
315
315
|
</fo:block>
|
316
316
|
</fo:block-container>
|
317
317
|
<!-- Summary, History ... -->
|
318
|
-
<xsl:
|
318
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
319
319
|
|
320
320
|
<!-- Keywords -->
|
321
321
|
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:keyword">
|
@@ -758,7 +758,7 @@
|
|
758
758
|
</xsl:template>
|
759
759
|
|
760
760
|
<!-- Bibliography -->
|
761
|
-
<xsl:template match="itu:references[
|
761
|
+
<xsl:template match="itu:references[not(@normative='true')]/itu:title">
|
762
762
|
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
|
763
763
|
<xsl:apply-templates/>
|
764
764
|
</fo:block>
|
@@ -1113,13 +1113,13 @@
|
|
1113
1113
|
</xsl:template>
|
1114
1114
|
|
1115
1115
|
|
1116
|
-
<xsl:template match="itu:references[
|
1116
|
+
<xsl:template match="itu:references[@normative='true']">
|
1117
1117
|
<fo:block id="{@id}">
|
1118
1118
|
<xsl:apply-templates/>
|
1119
1119
|
</fo:block>
|
1120
1120
|
</xsl:template>
|
1121
1121
|
|
1122
|
-
<xsl:template match="itu:references[
|
1122
|
+
<xsl:template match="itu:references[not(@normative='true')]">
|
1123
1123
|
<fo:block break-after="page"/>
|
1124
1124
|
<fo:block id="{@id}">
|
1125
1125
|
<xsl:apply-templates/>
|
@@ -1383,6 +1383,7 @@
|
|
1383
1383
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1384
1384
|
|
1385
1385
|
|
1386
|
+
|
1386
1387
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1387
1388
|
|
1388
1389
|
|
@@ -1399,6 +1400,8 @@
|
|
1399
1400
|
|
1400
1401
|
|
1401
1402
|
|
1403
|
+
|
1404
|
+
|
1402
1405
|
|
1403
1406
|
|
1404
1407
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
@@ -1417,6 +1420,8 @@
|
|
1417
1420
|
|
1418
1421
|
|
1419
1422
|
|
1423
|
+
|
1424
|
+
|
1420
1425
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1421
1426
|
|
1422
1427
|
|
@@ -1438,6 +1443,7 @@
|
|
1438
1443
|
|
1439
1444
|
|
1440
1445
|
|
1446
|
+
|
1441
1447
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1442
1448
|
|
1443
1449
|
|
@@ -1565,7 +1571,7 @@
|
|
1565
1571
|
|
1566
1572
|
|
1567
1573
|
|
1568
|
-
|
1574
|
+
|
1569
1575
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1570
1576
|
|
1571
1577
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -1613,7 +1619,43 @@
|
|
1613
1619
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1614
1620
|
|
1615
1621
|
|
1616
|
-
</xsl:attribute-set><xsl:template
|
1622
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1623
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1624
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1625
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1626
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1627
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1628
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1629
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1630
|
+
|
1631
|
+
<!-- Normative references -->
|
1632
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1633
|
+
<!-- Terms and definitions -->
|
1634
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1635
|
+
<!-- Another main sections -->
|
1636
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1637
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1638
|
+
<!-- Bibliography -->
|
1639
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1640
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1641
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1642
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1643
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1644
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1645
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1646
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1647
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1648
|
+
|
1649
|
+
<!-- Normative references -->
|
1650
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1651
|
+
<!-- Terms and definitions -->
|
1652
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
1653
|
+
<!-- Another main sections -->
|
1654
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
1655
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1656
|
+
<!-- Bibliography -->
|
1657
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1658
|
+
</xsl:template><xsl:template match="text()">
|
1617
1659
|
<xsl:value-of select="."/>
|
1618
1660
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1619
1661
|
<xsl:value-of select="$linebreak"/>
|
@@ -1700,6 +1742,7 @@
|
|
1700
1742
|
|
1701
1743
|
|
1702
1744
|
|
1745
|
+
|
1703
1746
|
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
1704
1747
|
|
1705
1748
|
|
@@ -1717,6 +1760,7 @@
|
|
1717
1760
|
|
1718
1761
|
|
1719
1762
|
|
1763
|
+
|
1720
1764
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1721
1765
|
<xsl:choose>
|
1722
1766
|
<xsl:when test=". = 1 or . = 0">
|
@@ -1971,6 +2015,14 @@
|
|
1971
2015
|
</fo:table-row>
|
1972
2016
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
1973
2017
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
2018
|
+
<xsl:attribute name="text-align">
|
2019
|
+
<xsl:choose>
|
2020
|
+
<xsl:when test="@align">
|
2021
|
+
<xsl:value-of select="@align"/>
|
2022
|
+
</xsl:when>
|
2023
|
+
<xsl:otherwise>center</xsl:otherwise>
|
2024
|
+
</xsl:choose>
|
2025
|
+
</xsl:attribute>
|
1974
2026
|
|
1975
2027
|
|
1976
2028
|
|
@@ -1983,6 +2035,7 @@
|
|
1983
2035
|
|
1984
2036
|
|
1985
2037
|
|
2038
|
+
|
1986
2039
|
<xsl:if test="@colspan">
|
1987
2040
|
<xsl:attribute name="number-columns-spanned">
|
1988
2041
|
<xsl:value-of select="@colspan"/>
|
@@ -1999,6 +2052,14 @@
|
|
1999
2052
|
</fo:table-cell>
|
2000
2053
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2001
2054
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2055
|
+
<xsl:attribute name="text-align">
|
2056
|
+
<xsl:choose>
|
2057
|
+
<xsl:when test="@align">
|
2058
|
+
<xsl:value-of select="@align"/>
|
2059
|
+
</xsl:when>
|
2060
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2061
|
+
</xsl:choose>
|
2062
|
+
</xsl:attribute>
|
2002
2063
|
|
2003
2064
|
|
2004
2065
|
<xsl:if test="ancestor::*[local-name()='preface']">
|
@@ -3240,6 +3301,117 @@
|
|
3240
3301
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3241
3302
|
<xsl:apply-templates/>
|
3242
3303
|
</fo:block>
|
3304
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3305
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3306
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3307
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
|
3308
|
+
<xsl:variable name="simple-table">
|
3309
|
+
<xsl:call-template name="getSimpleTable"/>
|
3310
|
+
</xsl:variable>
|
3311
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3312
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3313
|
+
<fo:table-column column-width="35mm"/>
|
3314
|
+
<fo:table-column column-width="115mm"/>
|
3315
|
+
</xsl:if>
|
3316
|
+
<xsl:apply-templates mode="requirement"/>
|
3317
|
+
</fo:table>
|
3318
|
+
<!-- fn processing -->
|
3319
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
3320
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
3321
|
+
<fo:block font-size="90%" border-bottom="1.pt solid black">
|
3322
|
+
<xsl:call-template name="fn_display"/>
|
3323
|
+
</fo:block>
|
3324
|
+
</xsl:for-each>
|
3325
|
+
</xsl:if>
|
3326
|
+
</fo:block-container>
|
3327
|
+
</fo:block-container>
|
3328
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
3329
|
+
<fo:table-header>
|
3330
|
+
<xsl:apply-templates mode="requirement"/>
|
3331
|
+
</fo:table-header>
|
3332
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
3333
|
+
<fo:table-body>
|
3334
|
+
<xsl:apply-templates mode="requirement"/>
|
3335
|
+
</fo:table-body>
|
3336
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3337
|
+
<fo:table-row>
|
3338
|
+
<xsl:apply-templates mode="requirement"/>
|
3339
|
+
</fo:table-row>
|
3340
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3341
|
+
<fo:table-cell text-align="{@align}">
|
3342
|
+
<xsl:attribute name="text-align">
|
3343
|
+
<xsl:choose>
|
3344
|
+
<xsl:when test="@align">
|
3345
|
+
<xsl:value-of select="@align"/>
|
3346
|
+
</xsl:when>
|
3347
|
+
<xsl:otherwise>center</xsl:otherwise>
|
3348
|
+
</xsl:choose>
|
3349
|
+
</xsl:attribute>
|
3350
|
+
<xsl:if test="@colspan">
|
3351
|
+
<xsl:attribute name="number-columns-spanned">
|
3352
|
+
<xsl:value-of select="@colspan"/>
|
3353
|
+
</xsl:attribute>
|
3354
|
+
</xsl:if>
|
3355
|
+
<xsl:if test="@rowspan">
|
3356
|
+
<xsl:attribute name="number-rows-spanned">
|
3357
|
+
<xsl:value-of select="@rowspan"/>
|
3358
|
+
</xsl:attribute>
|
3359
|
+
</xsl:if>
|
3360
|
+
|
3361
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3362
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3363
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3364
|
+
</xsl:if>
|
3365
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3366
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3367
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3368
|
+
</xsl:if>
|
3369
|
+
|
3370
|
+
<fo:block>
|
3371
|
+
<xsl:apply-templates/>
|
3372
|
+
</fo:block>
|
3373
|
+
</fo:table-cell>
|
3374
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3375
|
+
<fo:table-cell text-align="{@align}">
|
3376
|
+
<xsl:attribute name="text-align">
|
3377
|
+
<xsl:choose>
|
3378
|
+
<xsl:when test="@align">
|
3379
|
+
<xsl:value-of select="@align"/>
|
3380
|
+
</xsl:when>
|
3381
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3382
|
+
</xsl:choose>
|
3383
|
+
</xsl:attribute>
|
3384
|
+
<xsl:if test="@colspan">
|
3385
|
+
<xsl:attribute name="number-columns-spanned">
|
3386
|
+
<xsl:value-of select="@colspan"/>
|
3387
|
+
</xsl:attribute>
|
3388
|
+
</xsl:if>
|
3389
|
+
<xsl:if test="@rowspan">
|
3390
|
+
<xsl:attribute name="number-rows-spanned">
|
3391
|
+
<xsl:value-of select="@rowspan"/>
|
3392
|
+
</xsl:attribute>
|
3393
|
+
</xsl:if>
|
3394
|
+
|
3395
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3396
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3397
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3398
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
|
3399
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3400
|
+
</xsl:if>
|
3401
|
+
</xsl:if>
|
3402
|
+
|
3403
|
+
<fo:block>
|
3404
|
+
<xsl:apply-templates/>
|
3405
|
+
</fo:block>
|
3406
|
+
</fo:table-cell>
|
3407
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3408
|
+
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
|
3409
|
+
<xsl:apply-templates/>
|
3410
|
+
</fo:block>
|
3411
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3412
|
+
<fo:block margin-bottom="10pt">
|
3413
|
+
<xsl:apply-templates/>
|
3414
|
+
</fo:block>
|
3243
3415
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
3244
3416
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
3245
3417
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3515,7 +3687,7 @@
|
|
3515
3687
|
<fo:block id="{@id}">
|
3516
3688
|
<xsl:apply-templates/>
|
3517
3689
|
</fo:block>
|
3518
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
3690
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3519
3691
|
|
3520
3692
|
<fo:block id="{@id}">
|
3521
3693
|
<xsl:apply-templates/>
|
@@ -3769,7 +3941,8 @@
|
|
3769
3941
|
|
3770
3942
|
|
3771
3943
|
|
3772
|
-
|
3944
|
+
|
3945
|
+
|
3773
3946
|
</xsl:variable>
|
3774
3947
|
<xsl:if test="$documentNS != $XSLNS">
|
3775
3948
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -315,7 +315,7 @@
|
|
315
315
|
</fo:block>
|
316
316
|
</fo:block-container>
|
317
317
|
<!-- Summary, History ... -->
|
318
|
-
<xsl:
|
318
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
319
319
|
|
320
320
|
<!-- Keywords -->
|
321
321
|
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:keyword">
|
@@ -758,7 +758,7 @@
|
|
758
758
|
</xsl:template>
|
759
759
|
|
760
760
|
<!-- Bibliography -->
|
761
|
-
<xsl:template match="itu:references[
|
761
|
+
<xsl:template match="itu:references[not(@normative='true')]/itu:title">
|
762
762
|
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt">
|
763
763
|
<xsl:apply-templates/>
|
764
764
|
</fo:block>
|
@@ -1113,13 +1113,13 @@
|
|
1113
1113
|
</xsl:template>
|
1114
1114
|
|
1115
1115
|
|
1116
|
-
<xsl:template match="itu:references[
|
1116
|
+
<xsl:template match="itu:references[@normative='true']">
|
1117
1117
|
<fo:block id="{@id}">
|
1118
1118
|
<xsl:apply-templates/>
|
1119
1119
|
</fo:block>
|
1120
1120
|
</xsl:template>
|
1121
1121
|
|
1122
|
-
<xsl:template match="itu:references[
|
1122
|
+
<xsl:template match="itu:references[not(@normative='true')]">
|
1123
1123
|
<fo:block break-after="page"/>
|
1124
1124
|
<fo:block id="{@id}">
|
1125
1125
|
<xsl:apply-templates/>
|
@@ -1383,6 +1383,7 @@
|
|
1383
1383
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1384
1384
|
|
1385
1385
|
|
1386
|
+
|
1386
1387
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1387
1388
|
|
1388
1389
|
|
@@ -1399,6 +1400,8 @@
|
|
1399
1400
|
|
1400
1401
|
|
1401
1402
|
|
1403
|
+
|
1404
|
+
|
1402
1405
|
|
1403
1406
|
|
1404
1407
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
@@ -1417,6 +1420,8 @@
|
|
1417
1420
|
|
1418
1421
|
|
1419
1422
|
|
1423
|
+
|
1424
|
+
|
1420
1425
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1421
1426
|
|
1422
1427
|
|
@@ -1438,6 +1443,7 @@
|
|
1438
1443
|
|
1439
1444
|
|
1440
1445
|
|
1446
|
+
|
1441
1447
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1442
1448
|
|
1443
1449
|
|
@@ -1565,7 +1571,7 @@
|
|
1565
1571
|
|
1566
1572
|
|
1567
1573
|
|
1568
|
-
|
1574
|
+
|
1569
1575
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1570
1576
|
|
1571
1577
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -1613,7 +1619,43 @@
|
|
1613
1619
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1614
1620
|
|
1615
1621
|
|
1616
|
-
</xsl:attribute-set><xsl:template
|
1622
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1623
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1624
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1625
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1626
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1627
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1628
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1629
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1630
|
+
|
1631
|
+
<!-- Normative references -->
|
1632
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1633
|
+
<!-- Terms and definitions -->
|
1634
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1635
|
+
<!-- Another main sections -->
|
1636
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1637
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1638
|
+
<!-- Bibliography -->
|
1639
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1640
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1641
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1642
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1643
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1644
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1645
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1646
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1647
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1648
|
+
|
1649
|
+
<!-- Normative references -->
|
1650
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1651
|
+
<!-- Terms and definitions -->
|
1652
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
1653
|
+
<!-- Another main sections -->
|
1654
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
1655
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1656
|
+
<!-- Bibliography -->
|
1657
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1658
|
+
</xsl:template><xsl:template match="text()">
|
1617
1659
|
<xsl:value-of select="."/>
|
1618
1660
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1619
1661
|
<xsl:value-of select="$linebreak"/>
|
@@ -1700,6 +1742,7 @@
|
|
1700
1742
|
|
1701
1743
|
|
1702
1744
|
|
1745
|
+
|
1703
1746
|
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
1704
1747
|
|
1705
1748
|
|
@@ -1717,6 +1760,7 @@
|
|
1717
1760
|
|
1718
1761
|
|
1719
1762
|
|
1763
|
+
|
1720
1764
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1721
1765
|
<xsl:choose>
|
1722
1766
|
<xsl:when test=". = 1 or . = 0">
|
@@ -1971,6 +2015,14 @@
|
|
1971
2015
|
</fo:table-row>
|
1972
2016
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
1973
2017
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
2018
|
+
<xsl:attribute name="text-align">
|
2019
|
+
<xsl:choose>
|
2020
|
+
<xsl:when test="@align">
|
2021
|
+
<xsl:value-of select="@align"/>
|
2022
|
+
</xsl:when>
|
2023
|
+
<xsl:otherwise>center</xsl:otherwise>
|
2024
|
+
</xsl:choose>
|
2025
|
+
</xsl:attribute>
|
1974
2026
|
|
1975
2027
|
|
1976
2028
|
|
@@ -1983,6 +2035,7 @@
|
|
1983
2035
|
|
1984
2036
|
|
1985
2037
|
|
2038
|
+
|
1986
2039
|
<xsl:if test="@colspan">
|
1987
2040
|
<xsl:attribute name="number-columns-spanned">
|
1988
2041
|
<xsl:value-of select="@colspan"/>
|
@@ -1999,6 +2052,14 @@
|
|
1999
2052
|
</fo:table-cell>
|
2000
2053
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2001
2054
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2055
|
+
<xsl:attribute name="text-align">
|
2056
|
+
<xsl:choose>
|
2057
|
+
<xsl:when test="@align">
|
2058
|
+
<xsl:value-of select="@align"/>
|
2059
|
+
</xsl:when>
|
2060
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2061
|
+
</xsl:choose>
|
2062
|
+
</xsl:attribute>
|
2002
2063
|
|
2003
2064
|
|
2004
2065
|
<xsl:if test="ancestor::*[local-name()='preface']">
|
@@ -3240,6 +3301,117 @@
|
|
3240
3301
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3241
3302
|
<xsl:apply-templates/>
|
3242
3303
|
</fo:block>
|
3304
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3305
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3306
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3307
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
|
3308
|
+
<xsl:variable name="simple-table">
|
3309
|
+
<xsl:call-template name="getSimpleTable"/>
|
3310
|
+
</xsl:variable>
|
3311
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3312
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3313
|
+
<fo:table-column column-width="35mm"/>
|
3314
|
+
<fo:table-column column-width="115mm"/>
|
3315
|
+
</xsl:if>
|
3316
|
+
<xsl:apply-templates mode="requirement"/>
|
3317
|
+
</fo:table>
|
3318
|
+
<!-- fn processing -->
|
3319
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
3320
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
3321
|
+
<fo:block font-size="90%" border-bottom="1.pt solid black">
|
3322
|
+
<xsl:call-template name="fn_display"/>
|
3323
|
+
</fo:block>
|
3324
|
+
</xsl:for-each>
|
3325
|
+
</xsl:if>
|
3326
|
+
</fo:block-container>
|
3327
|
+
</fo:block-container>
|
3328
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
3329
|
+
<fo:table-header>
|
3330
|
+
<xsl:apply-templates mode="requirement"/>
|
3331
|
+
</fo:table-header>
|
3332
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
3333
|
+
<fo:table-body>
|
3334
|
+
<xsl:apply-templates mode="requirement"/>
|
3335
|
+
</fo:table-body>
|
3336
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3337
|
+
<fo:table-row>
|
3338
|
+
<xsl:apply-templates mode="requirement"/>
|
3339
|
+
</fo:table-row>
|
3340
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3341
|
+
<fo:table-cell text-align="{@align}">
|
3342
|
+
<xsl:attribute name="text-align">
|
3343
|
+
<xsl:choose>
|
3344
|
+
<xsl:when test="@align">
|
3345
|
+
<xsl:value-of select="@align"/>
|
3346
|
+
</xsl:when>
|
3347
|
+
<xsl:otherwise>center</xsl:otherwise>
|
3348
|
+
</xsl:choose>
|
3349
|
+
</xsl:attribute>
|
3350
|
+
<xsl:if test="@colspan">
|
3351
|
+
<xsl:attribute name="number-columns-spanned">
|
3352
|
+
<xsl:value-of select="@colspan"/>
|
3353
|
+
</xsl:attribute>
|
3354
|
+
</xsl:if>
|
3355
|
+
<xsl:if test="@rowspan">
|
3356
|
+
<xsl:attribute name="number-rows-spanned">
|
3357
|
+
<xsl:value-of select="@rowspan"/>
|
3358
|
+
</xsl:attribute>
|
3359
|
+
</xsl:if>
|
3360
|
+
|
3361
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3362
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3363
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3364
|
+
</xsl:if>
|
3365
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3366
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3367
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3368
|
+
</xsl:if>
|
3369
|
+
|
3370
|
+
<fo:block>
|
3371
|
+
<xsl:apply-templates/>
|
3372
|
+
</fo:block>
|
3373
|
+
</fo:table-cell>
|
3374
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3375
|
+
<fo:table-cell text-align="{@align}">
|
3376
|
+
<xsl:attribute name="text-align">
|
3377
|
+
<xsl:choose>
|
3378
|
+
<xsl:when test="@align">
|
3379
|
+
<xsl:value-of select="@align"/>
|
3380
|
+
</xsl:when>
|
3381
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3382
|
+
</xsl:choose>
|
3383
|
+
</xsl:attribute>
|
3384
|
+
<xsl:if test="@colspan">
|
3385
|
+
<xsl:attribute name="number-columns-spanned">
|
3386
|
+
<xsl:value-of select="@colspan"/>
|
3387
|
+
</xsl:attribute>
|
3388
|
+
</xsl:if>
|
3389
|
+
<xsl:if test="@rowspan">
|
3390
|
+
<xsl:attribute name="number-rows-spanned">
|
3391
|
+
<xsl:value-of select="@rowspan"/>
|
3392
|
+
</xsl:attribute>
|
3393
|
+
</xsl:if>
|
3394
|
+
|
3395
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3396
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3397
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3398
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
|
3399
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3400
|
+
</xsl:if>
|
3401
|
+
</xsl:if>
|
3402
|
+
|
3403
|
+
<fo:block>
|
3404
|
+
<xsl:apply-templates/>
|
3405
|
+
</fo:block>
|
3406
|
+
</fo:table-cell>
|
3407
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3408
|
+
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
|
3409
|
+
<xsl:apply-templates/>
|
3410
|
+
</fo:block>
|
3411
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3412
|
+
<fo:block margin-bottom="10pt">
|
3413
|
+
<xsl:apply-templates/>
|
3414
|
+
</fo:block>
|
3243
3415
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
3244
3416
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
3245
3417
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -3515,7 +3687,7 @@
|
|
3515
3687
|
<fo:block id="{@id}">
|
3516
3688
|
<xsl:apply-templates/>
|
3517
3689
|
</fo:block>
|
3518
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
3690
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3519
3691
|
|
3520
3692
|
<fo:block id="{@id}">
|
3521
3693
|
<xsl:apply-templates/>
|
@@ -3769,7 +3941,8 @@
|
|
3769
3941
|
|
3770
3942
|
|
3771
3943
|
|
3772
|
-
|
3944
|
+
|
3945
|
+
|
3773
3946
|
</xsl:variable>
|
3774
3947
|
<xsl:if test="$documentNS != $XSLNS">
|
3775
3948
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|