metanorma-un 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/asciidoctor/un/converter.rb +5 -34
- data/lib/isodoc/un/un.plenary-attachment.xsl +187 -4
- data/lib/isodoc/un/un.plenary.xsl +187 -4
- data/lib/isodoc/un/un.recommendation.xsl +181 -6
- data/lib/metanorma/un/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: b28c1aef3c3e25135a7c96ddde3a01a0eaee668dd7e8f056b34466de59fe2241
|
|
4
|
+
data.tar.gz: 0a9b7d475632ed485456f45b70d3ea1a238f35002f7f115b7abf5fc634645731
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e00312eecc133e605ff3ba9a25cbb0179442844b79ccae409f5e4836f72b470da37b9f3f4698051854424fe371a0cb856a1d1081f3b70c9c5aeed204faeb1048
|
|
7
|
+
data.tar.gz: 9146431e823c7bc83525ba3e4f925455289265ca8582ff8e0261c55e551c5c06feeae7fca34e48e1c176a4aa248c9e00b29414b95d4a2f85c01f020fee6b3fcd
|
|
@@ -11,24 +11,8 @@ module Asciidoctor
|
|
|
11
11
|
|
|
12
12
|
register_for "un"
|
|
13
13
|
|
|
14
|
-
def
|
|
15
|
-
|
|
16
|
-
c.role **{ type: "author" }
|
|
17
|
-
c.organization do |a|
|
|
18
|
-
a.name Metanorma::UN::ORGANIZATION_NAME_LONG
|
|
19
|
-
a.abbreviation Metanorma::UN::ORGANIZATION_NAME_SHORT
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def metadata_publisher(node, xml)
|
|
25
|
-
xml.contributor do |c|
|
|
26
|
-
c.role **{ type: "publisher" }
|
|
27
|
-
c.organization do |a|
|
|
28
|
-
a.name Metanorma::UN::ORGANIZATION_NAME_LONG
|
|
29
|
-
a.abbreviation Metanorma::UN::ORGANIZATION_NAME_SHORT
|
|
30
|
-
end
|
|
31
|
-
end
|
|
14
|
+
def default_publisher
|
|
15
|
+
"United Nations"
|
|
32
16
|
end
|
|
33
17
|
|
|
34
18
|
def metadata_committee(node, xml)
|
|
@@ -58,8 +42,8 @@ module Asciidoctor
|
|
|
58
42
|
node.attr("subtitle") and
|
|
59
43
|
xml.title **{ type: "subtitle", language: lang,
|
|
60
44
|
format: "text/plain" } do |t|
|
|
61
|
-
|
|
62
|
-
|
|
45
|
+
t << asciidoc_sub(node.attr("subtitle"))
|
|
46
|
+
end
|
|
63
47
|
end
|
|
64
48
|
end
|
|
65
49
|
|
|
@@ -74,19 +58,6 @@ module Asciidoctor
|
|
|
74
58
|
xml.docnumber { |i| i << node.attr("docnumber") }
|
|
75
59
|
end
|
|
76
60
|
|
|
77
|
-
def metadata_copyright(node, xml)
|
|
78
|
-
from = node.attr("copyright-year") || Date.today.year
|
|
79
|
-
xml.copyright do |c|
|
|
80
|
-
c.from from
|
|
81
|
-
c.owner do |owner|
|
|
82
|
-
owner.organization do |o|
|
|
83
|
-
o.name Metanorma::UN::ORGANIZATION_NAME_LONG
|
|
84
|
-
o.abbreviation Metanorma::UN::ORGANIZATION_NAME_SHORT
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
|
|
90
61
|
def metadata_distribution(node, xml)
|
|
91
62
|
xml.distribution node.attr("distribution") if node.attr("distribution")
|
|
92
63
|
end
|
|
@@ -237,7 +208,7 @@ module Asciidoctor
|
|
|
237
208
|
|
|
238
209
|
def admonition_attrs(node)
|
|
239
210
|
attr_code(super.merge("unnumbered": node.option?("unnumbered"),
|
|
240
|
-
|
|
211
|
+
"subsequence": node.attr("subsequence")))
|
|
241
212
|
end
|
|
242
213
|
|
|
243
214
|
def sectiontype_streamline(ret)
|
|
@@ -235,9 +235,19 @@
|
|
|
235
235
|
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
|
236
236
|
</xsl:if>
|
|
237
237
|
|
|
238
|
+
<!-- Preface Pages (except Abstract, that showed in Summary on cover page`) -->
|
|
239
|
+
<xsl:if test="/un:un-standard/un:preface/*[not(local-name() = 'abstract')]">
|
|
240
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
241
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
242
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
243
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
244
|
+
<fo:block break-after="page"/>
|
|
245
|
+
</xsl:if>
|
|
246
|
+
|
|
238
247
|
<fo:block>
|
|
239
248
|
<xsl:apply-templates select="/un:un-standard/un:sections/*"/>
|
|
240
249
|
<xsl:apply-templates select="/un:un-standard/un:annex"/>
|
|
250
|
+
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references"/>
|
|
241
251
|
</fo:block>
|
|
242
252
|
|
|
243
253
|
<fo:block-container margin-left="50mm" width="30mm" border-bottom="0.5pt solid black" margin-top="12pt" keep-with-previous="always">
|
|
@@ -1221,6 +1231,7 @@
|
|
|
1221
1231
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
|
1222
1232
|
|
|
1223
1233
|
|
|
1234
|
+
|
|
1224
1235
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
|
1225
1236
|
|
|
1226
1237
|
|
|
@@ -1240,6 +1251,8 @@
|
|
|
1240
1251
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1241
1252
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1242
1253
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1254
|
+
|
|
1255
|
+
|
|
1243
1256
|
|
|
1244
1257
|
|
|
1245
1258
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
|
@@ -1259,6 +1272,8 @@
|
|
|
1259
1272
|
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
|
1260
1273
|
|
|
1261
1274
|
|
|
1275
|
+
|
|
1276
|
+
|
|
1262
1277
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
|
1263
1278
|
|
|
1264
1279
|
|
|
@@ -1283,6 +1298,7 @@
|
|
|
1283
1298
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
|
1284
1299
|
|
|
1285
1300
|
|
|
1301
|
+
|
|
1286
1302
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
|
1287
1303
|
|
|
1288
1304
|
|
|
@@ -1398,7 +1414,7 @@
|
|
|
1398
1414
|
|
|
1399
1415
|
|
|
1400
1416
|
|
|
1401
|
-
|
|
1417
|
+
|
|
1402
1418
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
|
1403
1419
|
|
|
1404
1420
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
|
@@ -1443,7 +1459,43 @@
|
|
|
1443
1459
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
|
1444
1460
|
|
|
1445
1461
|
|
|
1446
|
-
</xsl:attribute-set><xsl:template
|
|
1462
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1463
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1464
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1465
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1466
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1467
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1468
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1469
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1470
|
+
|
|
1471
|
+
<!-- Normative references -->
|
|
1472
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
|
1473
|
+
<!-- Terms and definitions -->
|
|
1474
|
+
<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"/>
|
|
1475
|
+
<!-- Another main sections -->
|
|
1476
|
+
<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"/>
|
|
1477
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
|
1478
|
+
<!-- Bibliography -->
|
|
1479
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
|
1480
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1481
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1482
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1483
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1484
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1485
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1486
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1487
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1488
|
+
|
|
1489
|
+
<!-- Normative references -->
|
|
1490
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
|
1491
|
+
<!-- Terms and definitions -->
|
|
1492
|
+
<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']]"/>
|
|
1493
|
+
<!-- Another main sections -->
|
|
1494
|
+
<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'])]"/>
|
|
1495
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1496
|
+
<!-- Bibliography -->
|
|
1497
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1498
|
+
</xsl:template><xsl:template match="text()">
|
|
1447
1499
|
<xsl:value-of select="."/>
|
|
1448
1500
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
1449
1501
|
<xsl:value-of select="$linebreak"/>
|
|
@@ -1524,6 +1576,7 @@
|
|
|
1524
1576
|
|
|
1525
1577
|
|
|
1526
1578
|
|
|
1579
|
+
|
|
1527
1580
|
<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">
|
|
1528
1581
|
|
|
1529
1582
|
|
|
@@ -1539,6 +1592,7 @@
|
|
|
1539
1592
|
|
|
1540
1593
|
|
|
1541
1594
|
|
|
1595
|
+
|
|
1542
1596
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
|
1543
1597
|
<xsl:choose>
|
|
1544
1598
|
<xsl:when test=". = 1 or . = 0">
|
|
@@ -1793,6 +1847,14 @@
|
|
|
1793
1847
|
</fo:table-row>
|
|
1794
1848
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
|
1795
1849
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
|
1850
|
+
<xsl:attribute name="text-align">
|
|
1851
|
+
<xsl:choose>
|
|
1852
|
+
<xsl:when test="@align">
|
|
1853
|
+
<xsl:value-of select="@align"/>
|
|
1854
|
+
</xsl:when>
|
|
1855
|
+
<xsl:otherwise>center</xsl:otherwise>
|
|
1856
|
+
</xsl:choose>
|
|
1857
|
+
</xsl:attribute>
|
|
1796
1858
|
|
|
1797
1859
|
|
|
1798
1860
|
|
|
@@ -1811,6 +1873,7 @@
|
|
|
1811
1873
|
<xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
|
|
1812
1874
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
|
1813
1875
|
|
|
1876
|
+
|
|
1814
1877
|
<xsl:if test="@colspan">
|
|
1815
1878
|
<xsl:attribute name="number-columns-spanned">
|
|
1816
1879
|
<xsl:value-of select="@colspan"/>
|
|
@@ -1827,6 +1890,14 @@
|
|
|
1827
1890
|
</fo:table-cell>
|
|
1828
1891
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
|
1829
1892
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
|
1893
|
+
<xsl:attribute name="text-align">
|
|
1894
|
+
<xsl:choose>
|
|
1895
|
+
<xsl:when test="@align">
|
|
1896
|
+
<xsl:value-of select="@align"/>
|
|
1897
|
+
</xsl:when>
|
|
1898
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
1899
|
+
</xsl:choose>
|
|
1900
|
+
</xsl:attribute>
|
|
1830
1901
|
|
|
1831
1902
|
|
|
1832
1903
|
|
|
@@ -3048,6 +3119,117 @@
|
|
|
3048
3119
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
|
3049
3120
|
<xsl:apply-templates/>
|
|
3050
3121
|
</fo:block>
|
|
3122
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
3123
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
|
3124
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
|
3125
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
|
|
3126
|
+
<xsl:variable name="simple-table">
|
|
3127
|
+
<xsl:call-template name="getSimpleTable"/>
|
|
3128
|
+
</xsl:variable>
|
|
3129
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
|
3130
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
|
3131
|
+
<fo:table-column column-width="35mm"/>
|
|
3132
|
+
<fo:table-column column-width="115mm"/>
|
|
3133
|
+
</xsl:if>
|
|
3134
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3135
|
+
</fo:table>
|
|
3136
|
+
<!-- fn processing -->
|
|
3137
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
|
3138
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
|
3139
|
+
<fo:block font-size="90%" border-bottom="1.pt solid black">
|
|
3140
|
+
<xsl:call-template name="fn_display"/>
|
|
3141
|
+
</fo:block>
|
|
3142
|
+
</xsl:for-each>
|
|
3143
|
+
</xsl:if>
|
|
3144
|
+
</fo:block-container>
|
|
3145
|
+
</fo:block-container>
|
|
3146
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
|
3147
|
+
<fo:table-header>
|
|
3148
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3149
|
+
</fo:table-header>
|
|
3150
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
|
3151
|
+
<fo:table-body>
|
|
3152
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3153
|
+
</fo:table-body>
|
|
3154
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
|
3155
|
+
<fo:table-row>
|
|
3156
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3157
|
+
</fo:table-row>
|
|
3158
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
|
3159
|
+
<fo:table-cell text-align="{@align}">
|
|
3160
|
+
<xsl:attribute name="text-align">
|
|
3161
|
+
<xsl:choose>
|
|
3162
|
+
<xsl:when test="@align">
|
|
3163
|
+
<xsl:value-of select="@align"/>
|
|
3164
|
+
</xsl:when>
|
|
3165
|
+
<xsl:otherwise>center</xsl:otherwise>
|
|
3166
|
+
</xsl:choose>
|
|
3167
|
+
</xsl:attribute>
|
|
3168
|
+
<xsl:if test="@colspan">
|
|
3169
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3170
|
+
<xsl:value-of select="@colspan"/>
|
|
3171
|
+
</xsl:attribute>
|
|
3172
|
+
</xsl:if>
|
|
3173
|
+
<xsl:if test="@rowspan">
|
|
3174
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3175
|
+
<xsl:value-of select="@rowspan"/>
|
|
3176
|
+
</xsl:attribute>
|
|
3177
|
+
</xsl:if>
|
|
3178
|
+
|
|
3179
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3180
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3181
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
|
3182
|
+
</xsl:if>
|
|
3183
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
|
3184
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3185
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3186
|
+
</xsl:if>
|
|
3187
|
+
|
|
3188
|
+
<fo:block>
|
|
3189
|
+
<xsl:apply-templates/>
|
|
3190
|
+
</fo:block>
|
|
3191
|
+
</fo:table-cell>
|
|
3192
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
|
3193
|
+
<fo:table-cell text-align="{@align}">
|
|
3194
|
+
<xsl:attribute name="text-align">
|
|
3195
|
+
<xsl:choose>
|
|
3196
|
+
<xsl:when test="@align">
|
|
3197
|
+
<xsl:value-of select="@align"/>
|
|
3198
|
+
</xsl:when>
|
|
3199
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
3200
|
+
</xsl:choose>
|
|
3201
|
+
</xsl:attribute>
|
|
3202
|
+
<xsl:if test="@colspan">
|
|
3203
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3204
|
+
<xsl:value-of select="@colspan"/>
|
|
3205
|
+
</xsl:attribute>
|
|
3206
|
+
</xsl:if>
|
|
3207
|
+
<xsl:if test="@rowspan">
|
|
3208
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3209
|
+
<xsl:value-of select="@rowspan"/>
|
|
3210
|
+
</xsl:attribute>
|
|
3211
|
+
</xsl:if>
|
|
3212
|
+
|
|
3213
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3214
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
|
3215
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3216
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
|
|
3217
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3218
|
+
</xsl:if>
|
|
3219
|
+
</xsl:if>
|
|
3220
|
+
|
|
3221
|
+
<fo:block>
|
|
3222
|
+
<xsl:apply-templates/>
|
|
3223
|
+
</fo:block>
|
|
3224
|
+
</fo:table-cell>
|
|
3225
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
|
3226
|
+
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
|
|
3227
|
+
<xsl:apply-templates/>
|
|
3228
|
+
</fo:block>
|
|
3229
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
|
3230
|
+
<fo:block margin-bottom="10pt">
|
|
3231
|
+
<xsl:apply-templates/>
|
|
3232
|
+
</fo:block>
|
|
3051
3233
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
|
3052
3234
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
|
3053
3235
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
@@ -3332,7 +3514,7 @@
|
|
|
3332
3514
|
<fo:block id="{@id}">
|
|
3333
3515
|
<xsl:apply-templates/>
|
|
3334
3516
|
</fo:block>
|
|
3335
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
|
3517
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
|
3336
3518
|
|
|
3337
3519
|
<fo:block id="{@id}">
|
|
3338
3520
|
<xsl:apply-templates/>
|
|
@@ -3589,7 +3771,8 @@
|
|
|
3589
3771
|
|
|
3590
3772
|
|
|
3591
3773
|
|
|
3592
|
-
|
|
3774
|
+
|
|
3775
|
+
|
|
3593
3776
|
</xsl:variable>
|
|
3594
3777
|
<xsl:if test="$documentNS != $XSLNS">
|
|
3595
3778
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
|
@@ -235,9 +235,19 @@
|
|
|
235
235
|
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
|
236
236
|
</xsl:if>
|
|
237
237
|
|
|
238
|
+
<!-- Preface Pages (except Abstract, that showed in Summary on cover page`) -->
|
|
239
|
+
<xsl:if test="/un:un-standard/un:preface/*[not(local-name() = 'abstract')]">
|
|
240
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
241
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
242
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
243
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
244
|
+
<fo:block break-after="page"/>
|
|
245
|
+
</xsl:if>
|
|
246
|
+
|
|
238
247
|
<fo:block>
|
|
239
248
|
<xsl:apply-templates select="/un:un-standard/un:sections/*"/>
|
|
240
249
|
<xsl:apply-templates select="/un:un-standard/un:annex"/>
|
|
250
|
+
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references"/>
|
|
241
251
|
</fo:block>
|
|
242
252
|
|
|
243
253
|
<fo:block-container margin-left="50mm" width="30mm" border-bottom="0.5pt solid black" margin-top="12pt" keep-with-previous="always">
|
|
@@ -1221,6 +1231,7 @@
|
|
|
1221
1231
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
|
1222
1232
|
|
|
1223
1233
|
|
|
1234
|
+
|
|
1224
1235
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
|
1225
1236
|
|
|
1226
1237
|
|
|
@@ -1240,6 +1251,8 @@
|
|
|
1240
1251
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1241
1252
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1242
1253
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1254
|
+
|
|
1255
|
+
|
|
1243
1256
|
|
|
1244
1257
|
|
|
1245
1258
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
|
@@ -1259,6 +1272,8 @@
|
|
|
1259
1272
|
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
|
1260
1273
|
|
|
1261
1274
|
|
|
1275
|
+
|
|
1276
|
+
|
|
1262
1277
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
|
1263
1278
|
|
|
1264
1279
|
|
|
@@ -1283,6 +1298,7 @@
|
|
|
1283
1298
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
|
1284
1299
|
|
|
1285
1300
|
|
|
1301
|
+
|
|
1286
1302
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
|
1287
1303
|
|
|
1288
1304
|
|
|
@@ -1398,7 +1414,7 @@
|
|
|
1398
1414
|
|
|
1399
1415
|
|
|
1400
1416
|
|
|
1401
|
-
|
|
1417
|
+
|
|
1402
1418
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
|
1403
1419
|
|
|
1404
1420
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
|
@@ -1443,7 +1459,43 @@
|
|
|
1443
1459
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
|
1444
1460
|
|
|
1445
1461
|
|
|
1446
|
-
</xsl:attribute-set><xsl:template
|
|
1462
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1463
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1464
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1465
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1466
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1467
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1468
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1469
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1470
|
+
|
|
1471
|
+
<!-- Normative references -->
|
|
1472
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
|
1473
|
+
<!-- Terms and definitions -->
|
|
1474
|
+
<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"/>
|
|
1475
|
+
<!-- Another main sections -->
|
|
1476
|
+
<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"/>
|
|
1477
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
|
1478
|
+
<!-- Bibliography -->
|
|
1479
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
|
1480
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1481
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1482
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1483
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1484
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1485
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1486
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1487
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1488
|
+
|
|
1489
|
+
<!-- Normative references -->
|
|
1490
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
|
1491
|
+
<!-- Terms and definitions -->
|
|
1492
|
+
<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']]"/>
|
|
1493
|
+
<!-- Another main sections -->
|
|
1494
|
+
<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'])]"/>
|
|
1495
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1496
|
+
<!-- Bibliography -->
|
|
1497
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1498
|
+
</xsl:template><xsl:template match="text()">
|
|
1447
1499
|
<xsl:value-of select="."/>
|
|
1448
1500
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
1449
1501
|
<xsl:value-of select="$linebreak"/>
|
|
@@ -1524,6 +1576,7 @@
|
|
|
1524
1576
|
|
|
1525
1577
|
|
|
1526
1578
|
|
|
1579
|
+
|
|
1527
1580
|
<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">
|
|
1528
1581
|
|
|
1529
1582
|
|
|
@@ -1539,6 +1592,7 @@
|
|
|
1539
1592
|
|
|
1540
1593
|
|
|
1541
1594
|
|
|
1595
|
+
|
|
1542
1596
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
|
1543
1597
|
<xsl:choose>
|
|
1544
1598
|
<xsl:when test=". = 1 or . = 0">
|
|
@@ -1793,6 +1847,14 @@
|
|
|
1793
1847
|
</fo:table-row>
|
|
1794
1848
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
|
1795
1849
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
|
1850
|
+
<xsl:attribute name="text-align">
|
|
1851
|
+
<xsl:choose>
|
|
1852
|
+
<xsl:when test="@align">
|
|
1853
|
+
<xsl:value-of select="@align"/>
|
|
1854
|
+
</xsl:when>
|
|
1855
|
+
<xsl:otherwise>center</xsl:otherwise>
|
|
1856
|
+
</xsl:choose>
|
|
1857
|
+
</xsl:attribute>
|
|
1796
1858
|
|
|
1797
1859
|
|
|
1798
1860
|
|
|
@@ -1811,6 +1873,7 @@
|
|
|
1811
1873
|
<xsl:attribute name="border-bottom">solid black 1.5pt</xsl:attribute>
|
|
1812
1874
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
|
1813
1875
|
|
|
1876
|
+
|
|
1814
1877
|
<xsl:if test="@colspan">
|
|
1815
1878
|
<xsl:attribute name="number-columns-spanned">
|
|
1816
1879
|
<xsl:value-of select="@colspan"/>
|
|
@@ -1827,6 +1890,14 @@
|
|
|
1827
1890
|
</fo:table-cell>
|
|
1828
1891
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
|
1829
1892
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
|
1893
|
+
<xsl:attribute name="text-align">
|
|
1894
|
+
<xsl:choose>
|
|
1895
|
+
<xsl:when test="@align">
|
|
1896
|
+
<xsl:value-of select="@align"/>
|
|
1897
|
+
</xsl:when>
|
|
1898
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
1899
|
+
</xsl:choose>
|
|
1900
|
+
</xsl:attribute>
|
|
1830
1901
|
|
|
1831
1902
|
|
|
1832
1903
|
|
|
@@ -3048,6 +3119,117 @@
|
|
|
3048
3119
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
|
3049
3120
|
<xsl:apply-templates/>
|
|
3050
3121
|
</fo:block>
|
|
3122
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
3123
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
|
3124
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
|
3125
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
|
|
3126
|
+
<xsl:variable name="simple-table">
|
|
3127
|
+
<xsl:call-template name="getSimpleTable"/>
|
|
3128
|
+
</xsl:variable>
|
|
3129
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
|
3130
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
|
3131
|
+
<fo:table-column column-width="35mm"/>
|
|
3132
|
+
<fo:table-column column-width="115mm"/>
|
|
3133
|
+
</xsl:if>
|
|
3134
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3135
|
+
</fo:table>
|
|
3136
|
+
<!-- fn processing -->
|
|
3137
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
|
3138
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
|
3139
|
+
<fo:block font-size="90%" border-bottom="1.pt solid black">
|
|
3140
|
+
<xsl:call-template name="fn_display"/>
|
|
3141
|
+
</fo:block>
|
|
3142
|
+
</xsl:for-each>
|
|
3143
|
+
</xsl:if>
|
|
3144
|
+
</fo:block-container>
|
|
3145
|
+
</fo:block-container>
|
|
3146
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
|
3147
|
+
<fo:table-header>
|
|
3148
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3149
|
+
</fo:table-header>
|
|
3150
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
|
3151
|
+
<fo:table-body>
|
|
3152
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3153
|
+
</fo:table-body>
|
|
3154
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
|
3155
|
+
<fo:table-row>
|
|
3156
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3157
|
+
</fo:table-row>
|
|
3158
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
|
3159
|
+
<fo:table-cell text-align="{@align}">
|
|
3160
|
+
<xsl:attribute name="text-align">
|
|
3161
|
+
<xsl:choose>
|
|
3162
|
+
<xsl:when test="@align">
|
|
3163
|
+
<xsl:value-of select="@align"/>
|
|
3164
|
+
</xsl:when>
|
|
3165
|
+
<xsl:otherwise>center</xsl:otherwise>
|
|
3166
|
+
</xsl:choose>
|
|
3167
|
+
</xsl:attribute>
|
|
3168
|
+
<xsl:if test="@colspan">
|
|
3169
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3170
|
+
<xsl:value-of select="@colspan"/>
|
|
3171
|
+
</xsl:attribute>
|
|
3172
|
+
</xsl:if>
|
|
3173
|
+
<xsl:if test="@rowspan">
|
|
3174
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3175
|
+
<xsl:value-of select="@rowspan"/>
|
|
3176
|
+
</xsl:attribute>
|
|
3177
|
+
</xsl:if>
|
|
3178
|
+
|
|
3179
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3180
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3181
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
|
3182
|
+
</xsl:if>
|
|
3183
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
|
3184
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3185
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3186
|
+
</xsl:if>
|
|
3187
|
+
|
|
3188
|
+
<fo:block>
|
|
3189
|
+
<xsl:apply-templates/>
|
|
3190
|
+
</fo:block>
|
|
3191
|
+
</fo:table-cell>
|
|
3192
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
|
3193
|
+
<fo:table-cell text-align="{@align}">
|
|
3194
|
+
<xsl:attribute name="text-align">
|
|
3195
|
+
<xsl:choose>
|
|
3196
|
+
<xsl:when test="@align">
|
|
3197
|
+
<xsl:value-of select="@align"/>
|
|
3198
|
+
</xsl:when>
|
|
3199
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
3200
|
+
</xsl:choose>
|
|
3201
|
+
</xsl:attribute>
|
|
3202
|
+
<xsl:if test="@colspan">
|
|
3203
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3204
|
+
<xsl:value-of select="@colspan"/>
|
|
3205
|
+
</xsl:attribute>
|
|
3206
|
+
</xsl:if>
|
|
3207
|
+
<xsl:if test="@rowspan">
|
|
3208
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3209
|
+
<xsl:value-of select="@rowspan"/>
|
|
3210
|
+
</xsl:attribute>
|
|
3211
|
+
</xsl:if>
|
|
3212
|
+
|
|
3213
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3214
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
|
3215
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3216
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
|
|
3217
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3218
|
+
</xsl:if>
|
|
3219
|
+
</xsl:if>
|
|
3220
|
+
|
|
3221
|
+
<fo:block>
|
|
3222
|
+
<xsl:apply-templates/>
|
|
3223
|
+
</fo:block>
|
|
3224
|
+
</fo:table-cell>
|
|
3225
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
|
3226
|
+
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
|
|
3227
|
+
<xsl:apply-templates/>
|
|
3228
|
+
</fo:block>
|
|
3229
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
|
3230
|
+
<fo:block margin-bottom="10pt">
|
|
3231
|
+
<xsl:apply-templates/>
|
|
3232
|
+
</fo:block>
|
|
3051
3233
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
|
3052
3234
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
|
3053
3235
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
@@ -3332,7 +3514,7 @@
|
|
|
3332
3514
|
<fo:block id="{@id}">
|
|
3333
3515
|
<xsl:apply-templates/>
|
|
3334
3516
|
</fo:block>
|
|
3335
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
|
3517
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
|
3336
3518
|
|
|
3337
3519
|
<fo:block id="{@id}">
|
|
3338
3520
|
<xsl:apply-templates/>
|
|
@@ -3589,7 +3771,8 @@
|
|
|
3589
3771
|
|
|
3590
3772
|
|
|
3591
3773
|
|
|
3592
|
-
|
|
3774
|
+
|
|
3775
|
+
|
|
3593
3776
|
</xsl:variable>
|
|
3594
3777
|
<xsl:if test="$documentNS != $XSLNS">
|
|
3595
3778
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<contents>
|
|
18
18
|
<xsl:apply-templates select="/un:un-standard/un:sections/*" mode="contents"/>
|
|
19
19
|
<xsl:apply-templates select="/un:un-standard/un:annex" mode="contents"/>
|
|
20
|
+
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references" mode="contents"/>
|
|
20
21
|
</contents>
|
|
21
22
|
</xsl:variable>
|
|
22
23
|
|
|
@@ -174,8 +175,8 @@
|
|
|
174
175
|
<xsl:call-template name="insertHeaderPreface"/>
|
|
175
176
|
<xsl:call-template name="insertFooter"/>
|
|
176
177
|
<fo:flow flow-name="xsl-region-body" text-align="justify">
|
|
177
|
-
<fo:block>
|
|
178
|
-
<xsl:
|
|
178
|
+
<fo:block>
|
|
179
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
|
179
180
|
</fo:block>
|
|
180
181
|
</fo:flow>
|
|
181
182
|
</fo:page-sequence>
|
|
@@ -294,6 +295,7 @@
|
|
|
294
295
|
<fo:block>
|
|
295
296
|
<xsl:apply-templates select="/un:un-standard/un:sections/*"/>
|
|
296
297
|
<xsl:apply-templates select="/un:un-standard/un:annex"/>
|
|
298
|
+
<xsl:apply-templates select="/un:un-standard/un:bibliography/un:references"/>
|
|
297
299
|
</fo:block>
|
|
298
300
|
|
|
299
301
|
|
|
@@ -1192,6 +1194,7 @@
|
|
|
1192
1194
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
|
1193
1195
|
|
|
1194
1196
|
|
|
1197
|
+
|
|
1195
1198
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
|
1196
1199
|
|
|
1197
1200
|
|
|
@@ -1211,6 +1214,8 @@
|
|
|
1211
1214
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1212
1215
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1213
1216
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1217
|
+
|
|
1218
|
+
|
|
1214
1219
|
|
|
1215
1220
|
|
|
1216
1221
|
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
|
@@ -1230,6 +1235,8 @@
|
|
|
1230
1235
|
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
|
1231
1236
|
|
|
1232
1237
|
|
|
1238
|
+
|
|
1239
|
+
|
|
1233
1240
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
|
1234
1241
|
|
|
1235
1242
|
|
|
@@ -1254,6 +1261,7 @@
|
|
|
1254
1261
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1255
1262
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
|
1256
1263
|
|
|
1264
|
+
|
|
1257
1265
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
|
1258
1266
|
|
|
1259
1267
|
|
|
@@ -1373,7 +1381,7 @@
|
|
|
1373
1381
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1374
1382
|
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
|
1375
1383
|
|
|
1376
|
-
|
|
1384
|
+
|
|
1377
1385
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
|
1378
1386
|
|
|
1379
1387
|
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
|
@@ -1416,7 +1424,43 @@
|
|
|
1416
1424
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
|
1417
1425
|
|
|
1418
1426
|
|
|
1419
|
-
</xsl:attribute-set><xsl:template
|
|
1427
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1428
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1429
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1430
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1431
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1432
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1433
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1434
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1435
|
+
|
|
1436
|
+
<!-- Normative references -->
|
|
1437
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
|
1438
|
+
<!-- Terms and definitions -->
|
|
1439
|
+
<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"/>
|
|
1440
|
+
<!-- Another main sections -->
|
|
1441
|
+
<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"/>
|
|
1442
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
|
1443
|
+
<!-- Bibliography -->
|
|
1444
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
|
1445
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1446
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1447
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1448
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1449
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1450
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1451
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1452
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1453
|
+
|
|
1454
|
+
<!-- Normative references -->
|
|
1455
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
|
1456
|
+
<!-- Terms and definitions -->
|
|
1457
|
+
<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']]"/>
|
|
1458
|
+
<!-- Another main sections -->
|
|
1459
|
+
<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'])]"/>
|
|
1460
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1461
|
+
<!-- Bibliography -->
|
|
1462
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1463
|
+
</xsl:template><xsl:template match="text()">
|
|
1420
1464
|
<xsl:value-of select="."/>
|
|
1421
1465
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
1422
1466
|
<xsl:value-of select="$linebreak"/>
|
|
@@ -1497,6 +1541,7 @@
|
|
|
1497
1541
|
|
|
1498
1542
|
|
|
1499
1543
|
|
|
1544
|
+
|
|
1500
1545
|
<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">
|
|
1501
1546
|
|
|
1502
1547
|
|
|
@@ -1517,6 +1562,7 @@
|
|
|
1517
1562
|
|
|
1518
1563
|
|
|
1519
1564
|
|
|
1565
|
+
|
|
1520
1566
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
|
1521
1567
|
<xsl:choose>
|
|
1522
1568
|
<xsl:when test=". = 1 or . = 0">
|
|
@@ -1767,6 +1813,14 @@
|
|
|
1767
1813
|
</fo:table-row>
|
|
1768
1814
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
|
1769
1815
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
|
1816
|
+
<xsl:attribute name="text-align">
|
|
1817
|
+
<xsl:choose>
|
|
1818
|
+
<xsl:when test="@align">
|
|
1819
|
+
<xsl:value-of select="@align"/>
|
|
1820
|
+
</xsl:when>
|
|
1821
|
+
<xsl:otherwise>center</xsl:otherwise>
|
|
1822
|
+
</xsl:choose>
|
|
1823
|
+
</xsl:attribute>
|
|
1770
1824
|
|
|
1771
1825
|
|
|
1772
1826
|
|
|
@@ -1791,6 +1845,7 @@
|
|
|
1791
1845
|
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
|
1792
1846
|
|
|
1793
1847
|
|
|
1848
|
+
|
|
1794
1849
|
<xsl:if test="@colspan">
|
|
1795
1850
|
<xsl:attribute name="number-columns-spanned">
|
|
1796
1851
|
<xsl:value-of select="@colspan"/>
|
|
@@ -1807,6 +1862,14 @@
|
|
|
1807
1862
|
</fo:table-cell>
|
|
1808
1863
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
|
1809
1864
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
|
1865
|
+
<xsl:attribute name="text-align">
|
|
1866
|
+
<xsl:choose>
|
|
1867
|
+
<xsl:when test="@align">
|
|
1868
|
+
<xsl:value-of select="@align"/>
|
|
1869
|
+
</xsl:when>
|
|
1870
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
1871
|
+
</xsl:choose>
|
|
1872
|
+
</xsl:attribute>
|
|
1810
1873
|
|
|
1811
1874
|
|
|
1812
1875
|
|
|
@@ -3035,6 +3098,117 @@
|
|
|
3035
3098
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
|
3036
3099
|
<xsl:apply-templates/>
|
|
3037
3100
|
</fo:block>
|
|
3101
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
3102
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
|
3103
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
|
3104
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
|
|
3105
|
+
<xsl:variable name="simple-table">
|
|
3106
|
+
<xsl:call-template name="getSimpleTable"/>
|
|
3107
|
+
</xsl:variable>
|
|
3108
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
|
3109
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
|
3110
|
+
<fo:table-column column-width="35mm"/>
|
|
3111
|
+
<fo:table-column column-width="115mm"/>
|
|
3112
|
+
</xsl:if>
|
|
3113
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3114
|
+
</fo:table>
|
|
3115
|
+
<!-- fn processing -->
|
|
3116
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
|
3117
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
|
3118
|
+
<fo:block font-size="90%" border-bottom="1.pt solid black">
|
|
3119
|
+
<xsl:call-template name="fn_display"/>
|
|
3120
|
+
</fo:block>
|
|
3121
|
+
</xsl:for-each>
|
|
3122
|
+
</xsl:if>
|
|
3123
|
+
</fo:block-container>
|
|
3124
|
+
</fo:block-container>
|
|
3125
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
|
3126
|
+
<fo:table-header>
|
|
3127
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3128
|
+
</fo:table-header>
|
|
3129
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
|
3130
|
+
<fo:table-body>
|
|
3131
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3132
|
+
</fo:table-body>
|
|
3133
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
|
3134
|
+
<fo:table-row>
|
|
3135
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3136
|
+
</fo:table-row>
|
|
3137
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
|
3138
|
+
<fo:table-cell text-align="{@align}">
|
|
3139
|
+
<xsl:attribute name="text-align">
|
|
3140
|
+
<xsl:choose>
|
|
3141
|
+
<xsl:when test="@align">
|
|
3142
|
+
<xsl:value-of select="@align"/>
|
|
3143
|
+
</xsl:when>
|
|
3144
|
+
<xsl:otherwise>center</xsl:otherwise>
|
|
3145
|
+
</xsl:choose>
|
|
3146
|
+
</xsl:attribute>
|
|
3147
|
+
<xsl:if test="@colspan">
|
|
3148
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3149
|
+
<xsl:value-of select="@colspan"/>
|
|
3150
|
+
</xsl:attribute>
|
|
3151
|
+
</xsl:if>
|
|
3152
|
+
<xsl:if test="@rowspan">
|
|
3153
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3154
|
+
<xsl:value-of select="@rowspan"/>
|
|
3155
|
+
</xsl:attribute>
|
|
3156
|
+
</xsl:if>
|
|
3157
|
+
|
|
3158
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3159
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3160
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
|
3161
|
+
</xsl:if>
|
|
3162
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
|
3163
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3164
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3165
|
+
</xsl:if>
|
|
3166
|
+
|
|
3167
|
+
<fo:block>
|
|
3168
|
+
<xsl:apply-templates/>
|
|
3169
|
+
</fo:block>
|
|
3170
|
+
</fo:table-cell>
|
|
3171
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
|
3172
|
+
<fo:table-cell text-align="{@align}">
|
|
3173
|
+
<xsl:attribute name="text-align">
|
|
3174
|
+
<xsl:choose>
|
|
3175
|
+
<xsl:when test="@align">
|
|
3176
|
+
<xsl:value-of select="@align"/>
|
|
3177
|
+
</xsl:when>
|
|
3178
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
3179
|
+
</xsl:choose>
|
|
3180
|
+
</xsl:attribute>
|
|
3181
|
+
<xsl:if test="@colspan">
|
|
3182
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3183
|
+
<xsl:value-of select="@colspan"/>
|
|
3184
|
+
</xsl:attribute>
|
|
3185
|
+
</xsl:if>
|
|
3186
|
+
<xsl:if test="@rowspan">
|
|
3187
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3188
|
+
<xsl:value-of select="@rowspan"/>
|
|
3189
|
+
</xsl:attribute>
|
|
3190
|
+
</xsl:if>
|
|
3191
|
+
|
|
3192
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3193
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
|
3194
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3195
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
|
|
3196
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3197
|
+
</xsl:if>
|
|
3198
|
+
</xsl:if>
|
|
3199
|
+
|
|
3200
|
+
<fo:block>
|
|
3201
|
+
<xsl:apply-templates/>
|
|
3202
|
+
</fo:block>
|
|
3203
|
+
</fo:table-cell>
|
|
3204
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
|
3205
|
+
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
|
|
3206
|
+
<xsl:apply-templates/>
|
|
3207
|
+
</fo:block>
|
|
3208
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
|
3209
|
+
<fo:block margin-bottom="10pt">
|
|
3210
|
+
<xsl:apply-templates/>
|
|
3211
|
+
</fo:block>
|
|
3038
3212
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
|
3039
3213
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
|
3040
3214
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
@@ -3319,7 +3493,7 @@
|
|
|
3319
3493
|
<fo:block id="{@id}">
|
|
3320
3494
|
<xsl:apply-templates/>
|
|
3321
3495
|
</fo:block>
|
|
3322
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@
|
|
3496
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
|
3323
3497
|
|
|
3324
3498
|
<fo:block id="{@id}">
|
|
3325
3499
|
<xsl:apply-templates/>
|
|
@@ -3576,7 +3750,8 @@
|
|
|
3576
3750
|
|
|
3577
3751
|
|
|
3578
3752
|
|
|
3579
|
-
|
|
3753
|
+
|
|
3754
|
+
|
|
3580
3755
|
</xsl:variable>
|
|
3581
3756
|
<xsl:if test="$documentNS != $XSLNS">
|
|
3582
3757
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
data/lib/metanorma/un/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-un
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.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: roman-numerals
|