metanorma-itu 2.2.15 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/itu/base_convert.rb +18 -66
- data/lib/isodoc/itu/html_convert.rb +5 -10
- data/lib/isodoc/itu/i18n-ar.yaml +1 -0
- data/lib/isodoc/itu/i18n-de.yaml +1 -0
- data/lib/isodoc/itu/i18n-en.yaml +1 -0
- data/lib/isodoc/itu/i18n-es.yaml +1 -0
- data/lib/isodoc/itu/i18n-fr.yaml +1 -0
- data/lib/isodoc/itu/i18n-ru.yaml +1 -0
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +1 -0
- data/lib/isodoc/itu/itu.implementers-guide.xsl +102 -43
- data/lib/isodoc/itu/itu.in-force.xsl +102 -43
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +102 -43
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +102 -43
- data/lib/isodoc/itu/itu.recommendation.xsl +102 -43
- data/lib/isodoc/itu/itu.resolution.xsl +102 -43
- data/lib/isodoc/itu/itu.service-publication.xsl +102 -43
- data/lib/isodoc/itu/itu.technical-paper.xsl +102 -43
- data/lib/isodoc/itu/itu.technical-report.xsl +102 -43
- data/lib/isodoc/itu/presentation_bibdata.rb +1 -1
- data/lib/isodoc/itu/presentation_preface.rb +78 -0
- data/lib/isodoc/itu/presentation_xml_convert.rb +62 -57
- data/lib/isodoc/itu/word_convert.rb +0 -27
- data/lib/metanorma/itu/isodoc.rng +26 -4
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +1 -1
- metadata +5 -4
@@ -34,17 +34,19 @@
|
|
34
34
|
<xsl:variable name="contents_">
|
35
35
|
<contents>
|
36
36
|
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:preface/node()" mode="contents"/> -->
|
37
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" mode="contents"/>
|
37
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" mode="contents" /> -->
|
38
38
|
|
39
39
|
<!-- Normative references -->
|
40
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" mode="contents"/>
|
41
|
-
|
42
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" mode="contents"/>
|
43
|
-
|
44
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:annex" mode="contents"/>
|
40
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" mode="contents" />
|
41
|
+
|
42
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" mode="contents" />
|
43
|
+
|
44
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:annex" mode="contents"/> -->
|
45
45
|
|
46
46
|
<!-- Bibliography -->
|
47
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]" mode="contents"/>
|
47
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]" mode="contents"/> -->
|
48
|
+
|
49
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
48
50
|
|
49
51
|
<xsl:apply-templates select="//itu:table" mode="contents"/>
|
50
52
|
|
@@ -1069,16 +1071,16 @@
|
|
1069
1071
|
|
1070
1072
|
<fo:flow flow-name="xsl-region-body">
|
1071
1073
|
|
1072
|
-
<xsl:if test="$doctype != 'service-publication'">
|
1073
|
-
<fo:block-container font-size="14pt">
|
1074
|
+
<!-- <xsl:if test="$doctype != 'service-publication' and 1 = 2">
|
1075
|
+
<fo:block-container font-size="14pt" >
|
1074
1076
|
<xsl:choose>
|
1075
1077
|
<xsl:when test="$doctype = 'resolution'">
|
1076
1078
|
<fo:block text-align="center">
|
1077
1079
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type='resolution' and @language = $lang]"/>
|
1078
1080
|
</fo:block>
|
1079
1081
|
</xsl:when>
|
1080
|
-
<xsl:when
|
1081
|
-
<xsl:when
|
1082
|
+
<xsl:when test="$doctype = 'implementers-guide'"></xsl:when>
|
1083
|
+
<xsl:when test="$doctype = 'recommendation-supplement'">
|
1082
1084
|
<fo:block font-weight="bold">
|
1083
1085
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement-Internal']"/>
|
1084
1086
|
</fo:block>
|
@@ -1086,30 +1088,30 @@
|
|
1086
1088
|
<xsl:otherwise>
|
1087
1089
|
<fo:block font-weight="bold">
|
1088
1090
|
<xsl:value-of select="$doctypeTitle"/>
|
1089
|
-
<xsl:text
|
1091
|
+
<xsl:text> </xsl:text>
|
1090
1092
|
<xsl:value-of select="$docname"/>
|
1091
1093
|
</fo:block>
|
1092
1094
|
</xsl:otherwise>
|
1093
1095
|
</xsl:choose>
|
1094
|
-
|
1096
|
+
|
1095
1097
|
<fo:block font-weight="bold" text-align="center" margin-top="15pt" margin-bottom="15pt" role="H1">
|
1096
1098
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
|
1097
|
-
|
1099
|
+
|
1098
1100
|
<xsl:variable name="subtitle" select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
|
1099
1101
|
<xsl:if test="$subtitle != ''">
|
1100
1102
|
<fo:block margin-top="18pt" font-weight="normal" font-style="italic">
|
1101
|
-
<xsl:if test="$lang = 'ar'">
|
1103
|
+
<xsl:if test="$lang = 'ar'">
|
1102
1104
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1103
1105
|
</xsl:if>
|
1104
1106
|
<xsl:value-of select="$subtitle"/>
|
1105
|
-
</fo:block>
|
1107
|
+
</fo:block>
|
1106
1108
|
</xsl:if>
|
1107
|
-
|
1109
|
+
|
1108
1110
|
<xsl:variable name="resolution-placedate" select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'resolution-placedate' and @language = $lang]"/>
|
1109
1111
|
<xsl:if test="$doctype = 'resolution' and $resolution-placedate != ''">
|
1110
1112
|
<fo:block font-size="11pt" margin-top="6pt" font-weight="normal">
|
1111
1113
|
<fo:inline font-style="italic">
|
1112
|
-
<xsl:if test="$lang = 'ar'">
|
1114
|
+
<xsl:if test="$lang = 'ar'">
|
1113
1115
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1114
1116
|
</xsl:if>
|
1115
1117
|
<xsl:text>(</xsl:text><xsl:value-of select="$resolution-placedate"/><xsl:text>)</xsl:text>
|
@@ -1119,22 +1121,25 @@
|
|
1119
1121
|
</xsl:if>
|
1120
1122
|
</fo:block>
|
1121
1123
|
</fo:block-container>
|
1122
|
-
</xsl:if>
|
1124
|
+
</xsl:if> -->
|
1123
1125
|
|
1124
1126
|
<!-- Clause(s) -->
|
1125
1127
|
<fo:block>
|
1126
1128
|
<!-- Scope -->
|
1127
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']"/>
|
1129
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" /> -->
|
1128
1130
|
|
1129
1131
|
<!-- Normative references -->
|
1130
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']"/>
|
1132
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" />
|
1133
|
+
|
1134
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" />
|
1135
|
+
|
1136
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:annex"/> -->
|
1131
1137
|
|
1132
|
-
|
1138
|
+
<!-- Bibliography -->
|
1139
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]"/> -->
|
1133
1140
|
|
1134
|
-
<xsl:
|
1141
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
1135
1142
|
|
1136
|
-
<!-- Bibliography -->
|
1137
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]"/> <!-- @id = 'bibliography' -->
|
1138
1143
|
</fo:block>
|
1139
1144
|
|
1140
1145
|
</fo:flow>
|
@@ -1286,6 +1291,37 @@
|
|
1286
1291
|
</fo:block>
|
1287
1292
|
</xsl:template>
|
1288
1293
|
|
1294
|
+
<xsl:template match="itu:clause[@type = 'keyword']" priority="4"/>
|
1295
|
+
|
1296
|
+
<xsl:template match="itu:sections/itu:p[@class = 'zzSTDTitle1']" priority="4">
|
1297
|
+
<fo:block font-size="14pt">
|
1298
|
+
<xsl:choose>
|
1299
|
+
<xsl:when test="$doctype = 'resolution'">
|
1300
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1301
|
+
</xsl:when>
|
1302
|
+
<xsl:otherwise>
|
1303
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1304
|
+
</xsl:otherwise>
|
1305
|
+
</xsl:choose>
|
1306
|
+
<xsl:apply-templates/>
|
1307
|
+
</fo:block>
|
1308
|
+
</xsl:template>
|
1309
|
+
|
1310
|
+
<xsl:template match="itu:sections/itu:p[@class = 'zzSTDTitle2']" priority="4">
|
1311
|
+
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="15pt" margin-bottom="15pt" role="H1">
|
1312
|
+
<xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
|
1313
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1314
|
+
</xsl:if>
|
1315
|
+
<!-- Example: <p align="center" class="zzSTDTitle2" displayorder="4"><em>(Hammamet, 2016</em>) -->
|
1316
|
+
<xsl:if test="@align = 'center'">
|
1317
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1318
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1319
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1320
|
+
</xsl:if>
|
1321
|
+
<xsl:apply-templates/>
|
1322
|
+
</fo:block>
|
1323
|
+
</xsl:template>
|
1324
|
+
|
1289
1325
|
<xsl:template match="node()">
|
1290
1326
|
<xsl:apply-templates/>
|
1291
1327
|
</xsl:template>
|
@@ -1740,25 +1776,25 @@
|
|
1740
1776
|
</xsl:template> -->
|
1741
1777
|
|
1742
1778
|
<!-- footnotes for title -->
|
1743
|
-
<xsl:template match="itu:bibdata/itu:note[@type = 'title-footnote']" mode="title_footnote">
|
1779
|
+
<!-- <xsl:template match="itu:bibdata/itu:note[@type = 'title-footnote']" mode="title_footnote">
|
1744
1780
|
<xsl:variable name="number" select="position()"/>
|
1745
1781
|
<fo:footnote>
|
1746
1782
|
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1747
1783
|
<fo:basic-link internal-destination="title_footnote_{$number}" fox:alt-text="titlefootnote {$number}">
|
1748
1784
|
<xsl:value-of select="$number"/>
|
1749
1785
|
</fo:basic-link>
|
1750
|
-
<xsl:if test="position() != last()">,</xsl:if
|
1786
|
+
<xsl:if test="position() != last()">,</xsl:if>
|
1751
1787
|
</fo:inline>
|
1752
1788
|
<fo:footnote-body>
|
1753
1789
|
<fo:block font-size="11pt" margin-bottom="12pt" text-align="justify">
|
1754
1790
|
<fo:inline id="title_footnote_{$number}" font-size="85%" padding-right="2mm" keep-with-next.within-line="always" baseline-shift="30%">
|
1755
1791
|
<xsl:value-of select="$number"/>
|
1756
1792
|
</fo:inline>
|
1757
|
-
<xsl:apply-templates/>
|
1793
|
+
<xsl:apply-templates />
|
1758
1794
|
</fo:block>
|
1759
1795
|
</fo:footnote-body>
|
1760
1796
|
</fo:footnote>
|
1761
|
-
</xsl:template>
|
1797
|
+
</xsl:template> -->
|
1762
1798
|
|
1763
1799
|
<xsl:template match="*[local-name()='tt']" priority="2">
|
1764
1800
|
<xsl:variable name="element-name">
|
@@ -6114,6 +6150,9 @@
|
|
6114
6150
|
<!-- END Definition List -->
|
6115
6151
|
<!-- ===================== -->
|
6116
6152
|
|
6153
|
+
<!-- default: ignore title in sections/p -->
|
6154
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
6155
|
+
|
6117
6156
|
<!-- ========================= -->
|
6118
6157
|
<!-- Rich text formatting -->
|
6119
6158
|
<!-- ========================= -->
|
@@ -8204,25 +8243,45 @@
|
|
8204
8243
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
8205
8244
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
8206
8245
|
|
8207
|
-
<xsl:
|
8208
|
-
<xsl:
|
8209
|
-
<xsl:
|
8210
|
-
|
8211
|
-
|
8212
|
-
|
8246
|
+
<xsl:if test="@width != '' and @width != 'auto'">
|
8247
|
+
<xsl:attribute name="width">
|
8248
|
+
<xsl:value-of select="@width"/>
|
8249
|
+
</xsl:attribute>
|
8250
|
+
</xsl:if>
|
8251
|
+
|
8252
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
8253
|
+
<xsl:attribute name="height">
|
8254
|
+
<xsl:value-of select="@height"/>
|
8255
|
+
</xsl:attribute>
|
8256
|
+
</xsl:if>
|
8213
8257
|
|
8214
|
-
<xsl:
|
8258
|
+
<xsl:choose>
|
8259
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
8260
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
8261
|
+
</xsl:when>
|
8262
|
+
<xsl:otherwise>
|
8215
8263
|
|
8216
|
-
|
8264
|
+
<xsl:variable name="img_src">
|
8265
|
+
<xsl:choose>
|
8266
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
8267
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
8268
|
+
</xsl:choose>
|
8269
|
+
</xsl:variable>
|
8217
8270
|
|
8218
|
-
|
8271
|
+
<xsl:variable name="image_width_effective">
|
8219
8272
|
|
8220
|
-
|
8221
|
-
<xsl:if test="number($scale) < 100">
|
8273
|
+
<xsl:value-of select="$width_effective"/>
|
8222
8274
|
|
8223
|
-
|
8275
|
+
</xsl:variable>
|
8224
8276
|
|
8225
|
-
|
8277
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
8278
|
+
<xsl:if test="number($scale) < 100">
|
8279
|
+
|
8280
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
8281
|
+
|
8282
|
+
</xsl:if>
|
8283
|
+
</xsl:otherwise>
|
8284
|
+
</xsl:choose>
|
8226
8285
|
|
8227
8286
|
</xsl:if>
|
8228
8287
|
|
@@ -11911,7 +11970,7 @@
|
|
11911
11970
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
11912
11971
|
<xsl:apply-templates mode="update_xml_step1"/>
|
11913
11972
|
</xsl:template>
|
11914
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
11973
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
11915
11974
|
<xsl:copy>
|
11916
11975
|
<xsl:copy-of select="@*"/>
|
11917
11976
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -34,17 +34,19 @@
|
|
34
34
|
<xsl:variable name="contents_">
|
35
35
|
<contents>
|
36
36
|
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:preface/node()" mode="contents"/> -->
|
37
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" mode="contents"/>
|
37
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" mode="contents" /> -->
|
38
38
|
|
39
39
|
<!-- Normative references -->
|
40
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" mode="contents"/>
|
41
|
-
|
42
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" mode="contents"/>
|
43
|
-
|
44
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:annex" mode="contents"/>
|
40
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" mode="contents" />
|
41
|
+
|
42
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" mode="contents" />
|
43
|
+
|
44
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:annex" mode="contents"/> -->
|
45
45
|
|
46
46
|
<!-- Bibliography -->
|
47
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]" mode="contents"/>
|
47
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]" mode="contents"/> -->
|
48
|
+
|
49
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
48
50
|
|
49
51
|
<xsl:apply-templates select="//itu:table" mode="contents"/>
|
50
52
|
|
@@ -1069,16 +1071,16 @@
|
|
1069
1071
|
|
1070
1072
|
<fo:flow flow-name="xsl-region-body">
|
1071
1073
|
|
1072
|
-
<xsl:if test="$doctype != 'service-publication'">
|
1073
|
-
<fo:block-container font-size="14pt">
|
1074
|
+
<!-- <xsl:if test="$doctype != 'service-publication' and 1 = 2">
|
1075
|
+
<fo:block-container font-size="14pt" >
|
1074
1076
|
<xsl:choose>
|
1075
1077
|
<xsl:when test="$doctype = 'resolution'">
|
1076
1078
|
<fo:block text-align="center">
|
1077
1079
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type='resolution' and @language = $lang]"/>
|
1078
1080
|
</fo:block>
|
1079
1081
|
</xsl:when>
|
1080
|
-
<xsl:when
|
1081
|
-
<xsl:when
|
1082
|
+
<xsl:when test="$doctype = 'implementers-guide'"></xsl:when>
|
1083
|
+
<xsl:when test="$doctype = 'recommendation-supplement'">
|
1082
1084
|
<fo:block font-weight="bold">
|
1083
1085
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement-Internal']"/>
|
1084
1086
|
</fo:block>
|
@@ -1086,30 +1088,30 @@
|
|
1086
1088
|
<xsl:otherwise>
|
1087
1089
|
<fo:block font-weight="bold">
|
1088
1090
|
<xsl:value-of select="$doctypeTitle"/>
|
1089
|
-
<xsl:text
|
1091
|
+
<xsl:text> </xsl:text>
|
1090
1092
|
<xsl:value-of select="$docname"/>
|
1091
1093
|
</fo:block>
|
1092
1094
|
</xsl:otherwise>
|
1093
1095
|
</xsl:choose>
|
1094
|
-
|
1096
|
+
|
1095
1097
|
<fo:block font-weight="bold" text-align="center" margin-top="15pt" margin-bottom="15pt" role="H1">
|
1096
1098
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
|
1097
|
-
|
1099
|
+
|
1098
1100
|
<xsl:variable name="subtitle" select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
|
1099
1101
|
<xsl:if test="$subtitle != ''">
|
1100
1102
|
<fo:block margin-top="18pt" font-weight="normal" font-style="italic">
|
1101
|
-
<xsl:if test="$lang = 'ar'">
|
1103
|
+
<xsl:if test="$lang = 'ar'">
|
1102
1104
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1103
1105
|
</xsl:if>
|
1104
1106
|
<xsl:value-of select="$subtitle"/>
|
1105
|
-
</fo:block>
|
1107
|
+
</fo:block>
|
1106
1108
|
</xsl:if>
|
1107
|
-
|
1109
|
+
|
1108
1110
|
<xsl:variable name="resolution-placedate" select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'resolution-placedate' and @language = $lang]"/>
|
1109
1111
|
<xsl:if test="$doctype = 'resolution' and $resolution-placedate != ''">
|
1110
1112
|
<fo:block font-size="11pt" margin-top="6pt" font-weight="normal">
|
1111
1113
|
<fo:inline font-style="italic">
|
1112
|
-
<xsl:if test="$lang = 'ar'">
|
1114
|
+
<xsl:if test="$lang = 'ar'">
|
1113
1115
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1114
1116
|
</xsl:if>
|
1115
1117
|
<xsl:text>(</xsl:text><xsl:value-of select="$resolution-placedate"/><xsl:text>)</xsl:text>
|
@@ -1119,22 +1121,25 @@
|
|
1119
1121
|
</xsl:if>
|
1120
1122
|
</fo:block>
|
1121
1123
|
</fo:block-container>
|
1122
|
-
</xsl:if>
|
1124
|
+
</xsl:if> -->
|
1123
1125
|
|
1124
1126
|
<!-- Clause(s) -->
|
1125
1127
|
<fo:block>
|
1126
1128
|
<!-- Scope -->
|
1127
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']"/>
|
1129
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" /> -->
|
1128
1130
|
|
1129
1131
|
<!-- Normative references -->
|
1130
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']"/>
|
1132
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" />
|
1133
|
+
|
1134
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" />
|
1135
|
+
|
1136
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:annex"/> -->
|
1131
1137
|
|
1132
|
-
|
1138
|
+
<!-- Bibliography -->
|
1139
|
+
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]"/> -->
|
1133
1140
|
|
1134
|
-
<xsl:
|
1141
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
1135
1142
|
|
1136
|
-
<!-- Bibliography -->
|
1137
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]"/> <!-- @id = 'bibliography' -->
|
1138
1143
|
</fo:block>
|
1139
1144
|
|
1140
1145
|
</fo:flow>
|
@@ -1286,6 +1291,37 @@
|
|
1286
1291
|
</fo:block>
|
1287
1292
|
</xsl:template>
|
1288
1293
|
|
1294
|
+
<xsl:template match="itu:clause[@type = 'keyword']" priority="4"/>
|
1295
|
+
|
1296
|
+
<xsl:template match="itu:sections/itu:p[@class = 'zzSTDTitle1']" priority="4">
|
1297
|
+
<fo:block font-size="14pt">
|
1298
|
+
<xsl:choose>
|
1299
|
+
<xsl:when test="$doctype = 'resolution'">
|
1300
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1301
|
+
</xsl:when>
|
1302
|
+
<xsl:otherwise>
|
1303
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1304
|
+
</xsl:otherwise>
|
1305
|
+
</xsl:choose>
|
1306
|
+
<xsl:apply-templates/>
|
1307
|
+
</fo:block>
|
1308
|
+
</xsl:template>
|
1309
|
+
|
1310
|
+
<xsl:template match="itu:sections/itu:p[@class = 'zzSTDTitle2']" priority="4">
|
1311
|
+
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-top="15pt" margin-bottom="15pt" role="H1">
|
1312
|
+
<xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
|
1313
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1314
|
+
</xsl:if>
|
1315
|
+
<!-- Example: <p align="center" class="zzSTDTitle2" displayorder="4"><em>(Hammamet, 2016</em>) -->
|
1316
|
+
<xsl:if test="@align = 'center'">
|
1317
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1318
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1319
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1320
|
+
</xsl:if>
|
1321
|
+
<xsl:apply-templates/>
|
1322
|
+
</fo:block>
|
1323
|
+
</xsl:template>
|
1324
|
+
|
1289
1325
|
<xsl:template match="node()">
|
1290
1326
|
<xsl:apply-templates/>
|
1291
1327
|
</xsl:template>
|
@@ -1740,25 +1776,25 @@
|
|
1740
1776
|
</xsl:template> -->
|
1741
1777
|
|
1742
1778
|
<!-- footnotes for title -->
|
1743
|
-
<xsl:template match="itu:bibdata/itu:note[@type = 'title-footnote']" mode="title_footnote">
|
1779
|
+
<!-- <xsl:template match="itu:bibdata/itu:note[@type = 'title-footnote']" mode="title_footnote">
|
1744
1780
|
<xsl:variable name="number" select="position()"/>
|
1745
1781
|
<fo:footnote>
|
1746
1782
|
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1747
1783
|
<fo:basic-link internal-destination="title_footnote_{$number}" fox:alt-text="titlefootnote {$number}">
|
1748
1784
|
<xsl:value-of select="$number"/>
|
1749
1785
|
</fo:basic-link>
|
1750
|
-
<xsl:if test="position() != last()">,</xsl:if
|
1786
|
+
<xsl:if test="position() != last()">,</xsl:if>
|
1751
1787
|
</fo:inline>
|
1752
1788
|
<fo:footnote-body>
|
1753
1789
|
<fo:block font-size="11pt" margin-bottom="12pt" text-align="justify">
|
1754
1790
|
<fo:inline id="title_footnote_{$number}" font-size="85%" padding-right="2mm" keep-with-next.within-line="always" baseline-shift="30%">
|
1755
1791
|
<xsl:value-of select="$number"/>
|
1756
1792
|
</fo:inline>
|
1757
|
-
<xsl:apply-templates/>
|
1793
|
+
<xsl:apply-templates />
|
1758
1794
|
</fo:block>
|
1759
1795
|
</fo:footnote-body>
|
1760
1796
|
</fo:footnote>
|
1761
|
-
</xsl:template>
|
1797
|
+
</xsl:template> -->
|
1762
1798
|
|
1763
1799
|
<xsl:template match="*[local-name()='tt']" priority="2">
|
1764
1800
|
<xsl:variable name="element-name">
|
@@ -6114,6 +6150,9 @@
|
|
6114
6150
|
<!-- END Definition List -->
|
6115
6151
|
<!-- ===================== -->
|
6116
6152
|
|
6153
|
+
<!-- default: ignore title in sections/p -->
|
6154
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]" priority="3"/>
|
6155
|
+
|
6117
6156
|
<!-- ========================= -->
|
6118
6157
|
<!-- Rich text formatting -->
|
6119
6158
|
<!-- ========================= -->
|
@@ -8204,25 +8243,45 @@
|
|
8204
8243
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
8205
8244
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
8206
8245
|
|
8207
|
-
<xsl:
|
8208
|
-
<xsl:
|
8209
|
-
<xsl:
|
8210
|
-
|
8211
|
-
|
8212
|
-
|
8246
|
+
<xsl:if test="@width != '' and @width != 'auto'">
|
8247
|
+
<xsl:attribute name="width">
|
8248
|
+
<xsl:value-of select="@width"/>
|
8249
|
+
</xsl:attribute>
|
8250
|
+
</xsl:if>
|
8251
|
+
|
8252
|
+
<xsl:if test="@height != '' and @height != 'auto'">
|
8253
|
+
<xsl:attribute name="height">
|
8254
|
+
<xsl:value-of select="@height"/>
|
8255
|
+
</xsl:attribute>
|
8256
|
+
</xsl:if>
|
8213
8257
|
|
8214
|
-
<xsl:
|
8258
|
+
<xsl:choose>
|
8259
|
+
<xsl:when test="@width != '' and @width != 'auto' and @height != '' and @height != 'auto'">
|
8260
|
+
<xsl:attribute name="scaling">non-uniform</xsl:attribute>
|
8261
|
+
</xsl:when>
|
8262
|
+
<xsl:otherwise>
|
8215
8263
|
|
8216
|
-
|
8264
|
+
<xsl:variable name="img_src">
|
8265
|
+
<xsl:choose>
|
8266
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
8267
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
8268
|
+
</xsl:choose>
|
8269
|
+
</xsl:variable>
|
8217
8270
|
|
8218
|
-
|
8271
|
+
<xsl:variable name="image_width_effective">
|
8219
8272
|
|
8220
|
-
|
8221
|
-
<xsl:if test="number($scale) < 100">
|
8273
|
+
<xsl:value-of select="$width_effective"/>
|
8222
8274
|
|
8223
|
-
|
8275
|
+
</xsl:variable>
|
8224
8276
|
|
8225
|
-
|
8277
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
8278
|
+
<xsl:if test="number($scale) < 100">
|
8279
|
+
|
8280
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
8281
|
+
|
8282
|
+
</xsl:if>
|
8283
|
+
</xsl:otherwise>
|
8284
|
+
</xsl:choose>
|
8226
8285
|
|
8227
8286
|
</xsl:if>
|
8228
8287
|
|
@@ -11911,7 +11970,7 @@
|
|
11911
11970
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
11912
11971
|
<xsl:apply-templates mode="update_xml_step1"/>
|
11913
11972
|
</xsl:template>
|
11914
|
-
<xsl:template match="*[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
11973
|
+
<xsl:template match="*[local-name() = 'sections']/*[local-name() = 'p'][starts-with(@class, 'zzSTDTitle')]/*[local-name() = 'span'][@class] | *[local-name() = 'sourcecode']//*[local-name() = 'span'][@class]" mode="update_xml_step1" priority="2">
|
11915
11974
|
<xsl:copy>
|
11916
11975
|
<xsl:copy-of select="@*"/>
|
11917
11976
|
<xsl:apply-templates mode="update_xml_step1"/>
|