metanorma-itu 2.7.7 → 2.8.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/isodoc/itu/itu.implementers-guide.xsl +238 -158
- data/lib/isodoc/itu/itu.in-force.xsl +238 -158
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +238 -158
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +238 -158
- data/lib/isodoc/itu/itu.recommendation.xsl +238 -158
- data/lib/isodoc/itu/itu.resolution.xsl +238 -158
- data/lib/isodoc/itu/itu.service-publication.xsl +238 -158
- data/lib/isodoc/itu/itu.technical-paper.xsl +238 -158
- data/lib/isodoc/itu/itu.technical-report.xsl +238 -158
- data/lib/isodoc/itu/presentation_ref.rb +5 -3
- data/lib/metanorma/itu/biblio.rng +4 -4
- data/lib/metanorma/itu/converter.rb +6 -2
- data/lib/metanorma/itu/front.rb +38 -23
- data/lib/metanorma/itu/front_id.rb +39 -22
- data/lib/metanorma/itu/isodoc.rng +27 -10
- data/lib/metanorma/itu/log.rb +47 -0
- data/lib/metanorma/itu/validate.rb +22 -28
- data/lib/metanorma/itu/version.rb +1 -1
- data/lib/relaton/render/config.yml +1 -1
- data/metanorma-itu.gemspec +2 -1
- metadata +19 -4
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
<xsl:when test="$cover_header_hide = 'false'">
|
|
704
704
|
<fo:block-container margin-left="13mm">
|
|
705
705
|
<xsl:call-template name="setWritingMode"/>
|
|
706
|
-
<fo:block-container
|
|
706
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
707
707
|
|
|
708
708
|
<fo:table width="185.5mm" table-layout="fixed" margin-top="11.5mm">
|
|
709
709
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
|
@@ -1244,7 +1244,7 @@
|
|
|
1244
1244
|
</fo:block>
|
|
1245
1245
|
</fo:block>
|
|
1246
1246
|
<fo:block-container margin-left="10mm">
|
|
1247
|
-
<fo:block-container
|
|
1247
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
1248
1248
|
|
|
1249
1249
|
<fo:block font-size="20pt" font-weight="bold" space-before="30mm">
|
|
1250
1250
|
<xsl:value-of select="$i18n_tsb"/>
|
|
@@ -2116,29 +2116,6 @@
|
|
|
2116
2116
|
</xsl:if>
|
|
2117
2117
|
<xsl:apply-templates/>
|
|
2118
2118
|
</xsl:template>
|
|
2119
|
-
|
|
2120
|
-
<xsl:template match="mn:preface//mn:fmt-title" priority="3">
|
|
2121
|
-
<!-- <xsl:if test="$doctype = 'service-publication'">
|
|
2122
|
-
<fo:block> </fo:block>
|
|
2123
|
-
<fo:block> </fo:block>
|
|
2124
|
-
</xsl:if> -->
|
|
2125
|
-
<xsl:variable name="level">
|
|
2126
|
-
<xsl:call-template name="getLevel"/>
|
|
2127
|
-
</xsl:variable>
|
|
2128
|
-
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
2129
|
-
<fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt" keep-with-next="always" role="H{$level}">
|
|
2130
|
-
<xsl:if test="$doctype = 'service-publication'">
|
|
2131
|
-
<xsl:attribute name="margin-top">24pt</xsl:attribute>
|
|
2132
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
2133
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
2134
|
-
</xsl:if>
|
|
2135
|
-
<xsl:apply-templates/>
|
|
2136
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
2137
|
-
</fo:block>
|
|
2138
|
-
<!-- <xsl:if test="$doctype = 'service-publication'">
|
|
2139
|
-
<fo:block keep-with-next="always"> </fo:block>
|
|
2140
|
-
</xsl:if> -->
|
|
2141
|
-
</xsl:template>
|
|
2142
2119
|
<!-- ============================= -->
|
|
2143
2120
|
<!-- ============================= -->
|
|
2144
2121
|
|
|
@@ -2155,38 +2132,15 @@
|
|
|
2155
2132
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
|
2156
2133
|
</xsl:choose>
|
|
2157
2134
|
</xsl:variable>
|
|
2158
|
-
<xsl:element name="{$element-name}">
|
|
2159
|
-
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
2160
2135
|
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
|
2167
|
-
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
2136
|
+
<xsl:variable name="p_styles">
|
|
2137
|
+
<styles xsl:use-attribute-sets="p-style">
|
|
2138
|
+
<xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
|
|
2139
|
+
</styles>
|
|
2140
|
+
</xsl:variable>
|
|
2168
2141
|
|
|
2169
|
-
|
|
2170
|
-
<xsl:
|
|
2171
|
-
<xsl:choose>
|
|
2172
|
-
<xsl:when test="@class='supertitle'">center</xsl:when>
|
|
2173
|
-
<!-- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when> -->
|
|
2174
|
-
<xsl:when test="@align"><xsl:call-template name="setAlignment"/></xsl:when>
|
|
2175
|
-
<xsl:when test="ancestor::*[1][self::mn:td]/@align">
|
|
2176
|
-
<!-- <xsl:value-of select="ancestor::*[1][local-name() = 'td']/@align"/> -->
|
|
2177
|
-
<xsl:call-template name="setAlignment">
|
|
2178
|
-
<xsl:with-param name="align" select="ancestor::*[1][self::mn:td]/@align"/>
|
|
2179
|
-
</xsl:call-template>
|
|
2180
|
-
</xsl:when>
|
|
2181
|
-
<xsl:when test="ancestor::*[1][self::mn:th]/@align">
|
|
2182
|
-
<!-- <xsl:value-of select="ancestor::*[1][local-name() = 'th']/@align"/> -->
|
|
2183
|
-
<xsl:call-template name="setAlignment">
|
|
2184
|
-
<xsl:with-param name="align" select="ancestor::*[1][self::mn:th]/@align"/>
|
|
2185
|
-
</xsl:call-template>
|
|
2186
|
-
</xsl:when>
|
|
2187
|
-
<xsl:otherwise>justify</xsl:otherwise>
|
|
2188
|
-
</xsl:choose>
|
|
2189
|
-
</xsl:attribute>
|
|
2142
|
+
<xsl:element name="{$element-name}">
|
|
2143
|
+
<xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
|
|
2190
2144
|
|
|
2191
2145
|
<xsl:if test="not(preceding-sibling::*) and parent::mn:li and $doctype = 'service-publication'">
|
|
2192
2146
|
<fo:inline padding-right="9mm">
|
|
@@ -2232,66 +2186,13 @@
|
|
|
2232
2186
|
<!-- ====== -->
|
|
2233
2187
|
<!-- title -->
|
|
2234
2188
|
<!-- ====== -->
|
|
2235
|
-
<xsl:template match="mn:annex/mn:fmt-title">
|
|
2236
|
-
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
2237
|
-
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
|
|
2238
|
-
<fo:block>
|
|
2239
|
-
<xsl:apply-templates/>
|
|
2240
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
2241
|
-
</fo:block>
|
|
2242
|
-
<xsl:if test="$doctype != 'resolution'">
|
|
2243
|
-
<fo:block font-size="12pt" font-weight="normal" margin-top="6pt">
|
|
2244
|
-
<!-- <xsl:choose>
|
|
2245
|
-
<xsl:when test="parent::*[@obligation = 'informative']">
|
|
2246
|
-
<xsl:text>(This appendix does not form an integral part of this Recommendation.)</xsl:text>
|
|
2247
|
-
</xsl:when>
|
|
2248
|
-
<xsl:otherwise>
|
|
2249
|
-
<xsl:text>(This annex forms an integral part of this Recommendation.)</xsl:text>
|
|
2250
|
-
</xsl:otherwise>
|
|
2251
|
-
</xsl:choose> -->
|
|
2252
|
-
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
|
|
2253
|
-
<xsl:apply-templates select="following-sibling::mn:p[not(preceding-sibling::mn:clause)][starts-with(normalize-space(), '(')]/node()"/>
|
|
2254
|
-
</fo:block>
|
|
2255
|
-
</xsl:if>
|
|
2256
|
-
</fo:block>
|
|
2257
|
-
</xsl:template>
|
|
2258
2189
|
|
|
2259
2190
|
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
|
|
2260
2191
|
<!-- renders in the annex/title template -->
|
|
2261
2192
|
<xsl:template match="mn:annex/mn:p[preceding-sibling::*[1][self::mn:fmt-title or self::mn:variant-title]][starts-with(normalize-space(), '(')]" priority="3"/>
|
|
2262
2193
|
|
|
2263
|
-
<!-- Bibliography -->
|
|
2264
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
|
|
2265
|
-
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
2266
|
-
<fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
|
|
2267
|
-
<xsl:if test="$doctype = 'implementers-guide'">
|
|
2268
|
-
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
2269
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
2270
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
2271
|
-
</xsl:if>
|
|
2272
|
-
<xsl:apply-templates/>
|
|
2273
|
-
</fo:block>
|
|
2274
|
-
</xsl:template>
|
|
2275
|
-
|
|
2276
2194
|
<xsl:template match="mn:fmt-title" name="title">
|
|
2277
2195
|
|
|
2278
|
-
<xsl:variable name="level">
|
|
2279
|
-
<xsl:call-template name="getLevel"/>
|
|
2280
|
-
</xsl:variable>
|
|
2281
|
-
|
|
2282
|
-
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
2283
|
-
|
|
2284
|
-
<xsl:variable name="font-size">
|
|
2285
|
-
<xsl:choose>
|
|
2286
|
-
<xsl:when test="$level = 1 and $doctype = 'resolution'">14pt</xsl:when>
|
|
2287
|
-
<xsl:when test="$doctype = 'service-publication'">11pt</xsl:when>
|
|
2288
|
-
<xsl:when test="$level >= 2 and $doctype = 'resolution' and ../@inline-header = 'true'">11pt</xsl:when>
|
|
2289
|
-
<xsl:when test="$level = 2">12pt</xsl:when>
|
|
2290
|
-
<xsl:when test="$level >= 3">12pt</xsl:when>
|
|
2291
|
-
<xsl:otherwise>12pt</xsl:otherwise>
|
|
2292
|
-
</xsl:choose>
|
|
2293
|
-
</xsl:variable>
|
|
2294
|
-
|
|
2295
2196
|
<xsl:variable name="element-name">
|
|
2296
2197
|
<xsl:choose>
|
|
2297
2198
|
<xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
|
|
@@ -2299,51 +2200,33 @@
|
|
|
2299
2200
|
</xsl:choose>
|
|
2300
2201
|
</xsl:variable>
|
|
2301
2202
|
|
|
2302
|
-
<xsl:variable name="
|
|
2303
|
-
<xsl:
|
|
2304
|
-
<xsl:when test="$level = 1 and $doctype = 'service-publication'">12pt</xsl:when>
|
|
2305
|
-
<xsl:when test="$level = '' or $level = 1">18pt</xsl:when>
|
|
2306
|
-
<xsl:when test="$level = 2">12pt</xsl:when>
|
|
2307
|
-
<xsl:otherwise>6pt</xsl:otherwise>
|
|
2308
|
-
</xsl:choose>
|
|
2309
|
-
</xsl:variable>
|
|
2310
|
-
|
|
2311
|
-
<xsl:variable name="space-after">
|
|
2312
|
-
<xsl:choose>
|
|
2313
|
-
<xsl:when test="$level = 1 and $doctype = 'resolution'">24pt</xsl:when>
|
|
2314
|
-
<xsl:when test="$level = 1 and $doctype = 'service-publication'">12pt</xsl:when>
|
|
2315
|
-
<xsl:when test="$level = 2">6pt</xsl:when>
|
|
2316
|
-
<xsl:otherwise>6pt</xsl:otherwise>
|
|
2317
|
-
</xsl:choose>
|
|
2318
|
-
</xsl:variable>
|
|
2319
|
-
|
|
2320
|
-
<xsl:variable name="text-align">
|
|
2321
|
-
<xsl:choose>
|
|
2322
|
-
<xsl:when test="$level = 1 and $doctype = 'resolution'">center</xsl:when>
|
|
2323
|
-
<xsl:when test="$lang = 'ar'">start</xsl:when>
|
|
2324
|
-
<xsl:otherwise>left</xsl:otherwise>
|
|
2325
|
-
</xsl:choose>
|
|
2203
|
+
<xsl:variable name="title_styles">
|
|
2204
|
+
<styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template></styles>
|
|
2326
2205
|
</xsl:variable>
|
|
2327
2206
|
|
|
2328
2207
|
<xsl:element name="{$element-name}">
|
|
2329
|
-
<xsl:
|
|
2330
|
-
|
|
2331
|
-
<xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
|
|
2332
|
-
<xsl:attribute name="space-before"><xsl:value-of select="$space-before"/></xsl:attribute>
|
|
2333
|
-
<xsl:attribute name="space-after"><xsl:value-of select="$space-after"/></xsl:attribute>
|
|
2334
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
2335
|
-
<xsl:if test="$element-name = 'fo:inline'">
|
|
2336
|
-
<xsl:attribute name="padding-right">
|
|
2337
|
-
<xsl:choose>
|
|
2338
|
-
<xsl:when test="$level = 2">9mm</xsl:when>
|
|
2339
|
-
<xsl:when test="$level = 3">6.5mm</xsl:when>
|
|
2340
|
-
<xsl:otherwise>4mm</xsl:otherwise>
|
|
2341
|
-
</xsl:choose>
|
|
2342
|
-
</xsl:attribute>
|
|
2343
|
-
</xsl:if>
|
|
2344
|
-
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
2208
|
+
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
2209
|
+
|
|
2345
2210
|
<xsl:apply-templates/>
|
|
2346
2211
|
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
2212
|
+
|
|
2213
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
2214
|
+
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
2215
|
+
<xsl:if test="$doctype != 'resolution'">
|
|
2216
|
+
<fo:block font-size="12pt" font-weight="normal" margin-top="6pt">
|
|
2217
|
+
<!-- <xsl:choose>
|
|
2218
|
+
<xsl:when test="parent::*[@obligation = 'informative']">
|
|
2219
|
+
<xsl:text>(This appendix does not form an integral part of this Recommendation.)</xsl:text>
|
|
2220
|
+
</xsl:when>
|
|
2221
|
+
<xsl:otherwise>
|
|
2222
|
+
<xsl:text>(This annex forms an integral part of this Recommendation.)</xsl:text>
|
|
2223
|
+
</xsl:otherwise>
|
|
2224
|
+
</xsl:choose> -->
|
|
2225
|
+
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
|
|
2226
|
+
<xsl:apply-templates select="following-sibling::mn:p[not(preceding-sibling::mn:clause)][starts-with(normalize-space(), '(')]/node()"/>
|
|
2227
|
+
</fo:block>
|
|
2228
|
+
</xsl:if>
|
|
2229
|
+
</xsl:if>
|
|
2347
2230
|
</xsl:element>
|
|
2348
2231
|
|
|
2349
2232
|
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::mn:p)">
|
|
@@ -2601,7 +2484,7 @@
|
|
|
2601
2484
|
</xsl:if>
|
|
2602
2485
|
</xsl:if>
|
|
2603
2486
|
|
|
2604
|
-
<fo:block-container
|
|
2487
|
+
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
2605
2488
|
<fo:block>
|
|
2606
2489
|
|
|
2607
2490
|
<xsl:apply-templates select="node()[not(self::mn:note)]"/>
|
|
@@ -5069,6 +4952,10 @@
|
|
|
5069
4952
|
</xsl:element>
|
|
5070
4953
|
</xsl:template>
|
|
5071
4954
|
|
|
4955
|
+
<!-- show sourcecode's name 'before' or 'after' source code -->
|
|
4956
|
+
<xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
|
|
4957
|
+
</xsl:variable>
|
|
4958
|
+
|
|
5072
4959
|
<xsl:template match="mn:sourcecode" name="sourcecode">
|
|
5073
4960
|
|
|
5074
4961
|
<xsl:variable name="sourcecode_attributes">
|
|
@@ -5092,7 +4979,12 @@
|
|
|
5092
4979
|
|
|
5093
4980
|
<xsl:call-template name="refine_sourcecode-container-style"/>
|
|
5094
4981
|
|
|
5095
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
4982
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
4983
|
+
|
|
4984
|
+
<!-- <xsl:if test="$namespace = 'rsd'"> -->
|
|
4985
|
+
<xsl:if test="$sourcecode-name-position = 'before'">
|
|
4986
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
|
|
4987
|
+
</xsl:if>
|
|
5096
4988
|
|
|
5097
4989
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
5098
4990
|
|
|
@@ -5114,7 +5006,16 @@
|
|
|
5114
5006
|
</fo:block>
|
|
5115
5007
|
|
|
5116
5008
|
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
|
5117
|
-
|
|
5009
|
+
|
|
5010
|
+
<!-- <xsl:choose>
|
|
5011
|
+
<xsl:when test="$namespace = 'rsd'"></xsl:when>
|
|
5012
|
+
<xsl:otherwise>
|
|
5013
|
+
<xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
|
|
5014
|
+
<!-- </xsl:otherwise>
|
|
5015
|
+
</xsl:choose> -->
|
|
5016
|
+
<xsl:if test="$sourcecode-name-position = 'after'">
|
|
5017
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
|
|
5018
|
+
</xsl:if>
|
|
5118
5019
|
|
|
5119
5020
|
</fo:block-container>
|
|
5120
5021
|
</fo:block-container>
|
|
@@ -10995,6 +10896,10 @@
|
|
|
10995
10896
|
<!-- image -->
|
|
10996
10897
|
<!-- ====== -->
|
|
10997
10898
|
|
|
10899
|
+
<!-- show figure's name 'before' or 'after' image -->
|
|
10900
|
+
<xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
|
|
10901
|
+
</xsl:variable>
|
|
10902
|
+
|
|
10998
10903
|
<xsl:template match="mn:figure" name="figure">
|
|
10999
10904
|
<xsl:variable name="isAdded" select="@added"/>
|
|
11000
10905
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
|
@@ -11007,6 +10912,10 @@
|
|
|
11007
10912
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
|
11008
10913
|
</xsl:call-template>
|
|
11009
10914
|
|
|
10915
|
+
<xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
|
|
10916
|
+
<xsl:apply-templates select="mn:fmt-name"/>
|
|
10917
|
+
</xsl:if>
|
|
10918
|
+
|
|
11010
10919
|
<!-- Example: Dimensions in millimeters -->
|
|
11011
10920
|
<xsl:apply-templates select="mn:note[@type = 'units']"/>
|
|
11012
10921
|
|
|
@@ -11027,7 +10936,16 @@
|
|
|
11027
10936
|
<xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
|
|
11028
10937
|
<xsl:call-template name="showFigureKey"/>
|
|
11029
10938
|
</xsl:if>
|
|
11030
|
-
|
|
10939
|
+
|
|
10940
|
+
<!-- <xsl:choose>
|
|
10941
|
+
<xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
|
|
10942
|
+
<xsl:otherwise>
|
|
10943
|
+
<xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
|
|
10944
|
+
<!-- </xsl:otherwise>
|
|
10945
|
+
</xsl:choose> -->
|
|
10946
|
+
<xsl:if test="$figure-name-position = 'after'">
|
|
10947
|
+
<xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
|
|
10948
|
+
</xsl:if>
|
|
11031
10949
|
|
|
11032
10950
|
</fo:block-container>
|
|
11033
10951
|
</xsl:template>
|
|
@@ -13112,11 +13030,22 @@
|
|
|
13112
13030
|
<!-- END Admonition -->
|
|
13113
13031
|
<!-- ================ -->
|
|
13114
13032
|
|
|
13115
|
-
<xsl:attribute-set name="
|
|
13033
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
13034
|
+
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
13035
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13036
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
13037
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
13038
|
+
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
|
13039
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
|
13116
13040
|
</xsl:attribute-set>
|
|
13117
13041
|
|
|
13118
|
-
<xsl:template name="
|
|
13119
|
-
|
|
13042
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
13043
|
+
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
13044
|
+
<xsl:if test="$doctype = 'implementers-guide'">
|
|
13045
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
13046
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
13047
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
13048
|
+
</xsl:if>
|
|
13120
13049
|
</xsl:template>
|
|
13121
13050
|
|
|
13122
13051
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -15232,7 +15161,14 @@
|
|
|
15232
15161
|
<!-- ===================================== -->
|
|
15233
15162
|
|
|
15234
15163
|
<xsl:attribute-set name="annex-title-style">
|
|
15235
|
-
|
|
15164
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
15165
|
+
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
15166
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
15167
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
15168
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
15169
|
+
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
|
15170
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
|
15171
|
+
</xsl:attribute-set> <!-- annex-title-style -->
|
|
15236
15172
|
|
|
15237
15173
|
<xsl:template name="refine_annex-title-style">
|
|
15238
15174
|
</xsl:template>
|
|
@@ -15243,6 +15179,137 @@
|
|
|
15243
15179
|
<xsl:template name="refine_p-zzSTDTitle1-style">
|
|
15244
15180
|
</xsl:template>
|
|
15245
15181
|
|
|
15182
|
+
<xsl:attribute-set name="p-style">
|
|
15183
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
15184
|
+
</xsl:attribute-set> <!-- p-style -->
|
|
15185
|
+
|
|
15186
|
+
<xsl:template name="refine_p-style">
|
|
15187
|
+
<xsl:param name="element-name"/>
|
|
15188
|
+
<xsl:param name="margin"/>
|
|
15189
|
+
<xsl:call-template name="setKeepAttributes"/>
|
|
15190
|
+
|
|
15191
|
+
<xsl:if test="@class='supertitle'">
|
|
15192
|
+
<xsl:attribute name="space-before">36pt</xsl:attribute>
|
|
15193
|
+
<xsl:attribute name="margin-bottom">24pt</xsl:attribute>
|
|
15194
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
|
15195
|
+
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
15196
|
+
</xsl:if>
|
|
15197
|
+
<xsl:attribute name="text-align">
|
|
15198
|
+
<xsl:choose>
|
|
15199
|
+
<xsl:when test="@class='supertitle'">center</xsl:when>
|
|
15200
|
+
<!-- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when> -->
|
|
15201
|
+
<xsl:when test="@align"><xsl:call-template name="setAlignment"/></xsl:when>
|
|
15202
|
+
<xsl:when test="ancestor::*[1][self::mn:td]/@align">
|
|
15203
|
+
<!-- <xsl:value-of select="ancestor::*[1][local-name() = 'td']/@align"/> -->
|
|
15204
|
+
<xsl:call-template name="setAlignment">
|
|
15205
|
+
<xsl:with-param name="align" select="ancestor::*[1][self::mn:td]/@align"/>
|
|
15206
|
+
</xsl:call-template>
|
|
15207
|
+
</xsl:when>
|
|
15208
|
+
<xsl:when test="ancestor::*[1][self::mn:th]/@align">
|
|
15209
|
+
<!-- <xsl:value-of select="ancestor::*[1][local-name() = 'th']/@align"/> -->
|
|
15210
|
+
<xsl:call-template name="setAlignment">
|
|
15211
|
+
<xsl:with-param name="align" select="ancestor::*[1][self::mn:th]/@align"/>
|
|
15212
|
+
</xsl:call-template>
|
|
15213
|
+
</xsl:when>
|
|
15214
|
+
<xsl:otherwise>justify</xsl:otherwise>
|
|
15215
|
+
</xsl:choose>
|
|
15216
|
+
</xsl:attribute>
|
|
15217
|
+
<!-- $namespace = 'itu' -->
|
|
15218
|
+
|
|
15219
|
+
</xsl:template> <!-- refine_p-style -->
|
|
15220
|
+
|
|
15221
|
+
<xsl:attribute-set name="title-style">
|
|
15222
|
+
<!-- Note: font-size for level 1 title -->
|
|
15223
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
15224
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
15225
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
15226
|
+
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
|
15227
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
15228
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
15229
|
+
</xsl:attribute-set> <!-- title-style -->
|
|
15230
|
+
|
|
15231
|
+
<xsl:template name="refine_title-style">
|
|
15232
|
+
<xsl:param name="element-name"/>
|
|
15233
|
+
<xsl:variable name="level">
|
|
15234
|
+
<xsl:call-template name="getLevel"/>
|
|
15235
|
+
</xsl:variable>
|
|
15236
|
+
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
15237
|
+
|
|
15238
|
+
<xsl:if test="$level = 1">
|
|
15239
|
+
<xsl:if test="$doctype = 'resolution'">
|
|
15240
|
+
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
15241
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
15242
|
+
<xsl:attribute name="space-after">24pt</xsl:attribute>
|
|
15243
|
+
</xsl:if>
|
|
15244
|
+
<xsl:if test="$doctype = 'service-publication'">
|
|
15245
|
+
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
|
15246
|
+
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
|
15247
|
+
</xsl:if>
|
|
15248
|
+
</xsl:if>
|
|
15249
|
+
|
|
15250
|
+
<xsl:if test="$level = 2">
|
|
15251
|
+
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
|
15252
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
15253
|
+
</xsl:if>
|
|
15254
|
+
|
|
15255
|
+
<xsl:if test="$level >= 2">
|
|
15256
|
+
<xsl:if test="$doctype = 'resolution' and ../@inline-header = 'true'">
|
|
15257
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
15258
|
+
</xsl:if>
|
|
15259
|
+
</xsl:if>
|
|
15260
|
+
|
|
15261
|
+
<xsl:if test="$level >= 3">
|
|
15262
|
+
<xsl:attribute name="space-before">6pt</xsl:attribute>
|
|
15263
|
+
</xsl:if>
|
|
15264
|
+
|
|
15265
|
+
<xsl:if test="$doctype = 'service-publication'">
|
|
15266
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
15267
|
+
</xsl:if>
|
|
15268
|
+
|
|
15269
|
+
<xsl:if test="$lang = 'ar'">
|
|
15270
|
+
<xsl:attribute name="text-align">start</xsl:attribute>
|
|
15271
|
+
</xsl:if>
|
|
15272
|
+
|
|
15273
|
+
<xsl:if test="ancestor::mn:preface">
|
|
15274
|
+
<xsl:attribute name="font-size">inherit</xsl:attribute>
|
|
15275
|
+
<xsl:attribute name="margin-top">18pt</xsl:attribute>
|
|
15276
|
+
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
|
15277
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
15278
|
+
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
|
15279
|
+
<xsl:if test="$doctype = 'service-publication'">
|
|
15280
|
+
<xsl:attribute name="margin-top">24pt</xsl:attribute>
|
|
15281
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
15282
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
15283
|
+
</xsl:if>
|
|
15284
|
+
</xsl:if>
|
|
15285
|
+
|
|
15286
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
15287
|
+
<xsl:variable name="annex_title_styles">
|
|
15288
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
15289
|
+
</xsl:variable>
|
|
15290
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
15291
|
+
</xsl:if>
|
|
15292
|
+
|
|
15293
|
+
<xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
|
|
15294
|
+
<xsl:variable name="bibliography_title_styles">
|
|
15295
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
15296
|
+
</xsl:variable>
|
|
15297
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
15298
|
+
</xsl:if>
|
|
15299
|
+
|
|
15300
|
+
<xsl:if test="$element-name = 'fo:inline'">
|
|
15301
|
+
<xsl:attribute name="padding-right">
|
|
15302
|
+
<xsl:choose>
|
|
15303
|
+
<xsl:when test="$level = 2">9mm</xsl:when>
|
|
15304
|
+
<xsl:when test="$level = 3">6.5mm</xsl:when>
|
|
15305
|
+
<xsl:otherwise>4mm</xsl:otherwise>
|
|
15306
|
+
</xsl:choose>
|
|
15307
|
+
</xsl:attribute>
|
|
15308
|
+
</xsl:if>
|
|
15309
|
+
<!-- $namespace = 'itu' -->
|
|
15310
|
+
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
15311
|
+
</xsl:template> <!-- refine_title-style -->
|
|
15312
|
+
|
|
15246
15313
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
15247
15314
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
15248
15315
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
@@ -15581,6 +15648,12 @@
|
|
|
15581
15648
|
</xsl:choose>
|
|
15582
15649
|
</xsl:template>
|
|
15583
15650
|
|
|
15651
|
+
<xsl:attribute-set name="reset-margins-style">
|
|
15652
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
15653
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
15654
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
15655
|
+
</xsl:attribute-set>
|
|
15656
|
+
|
|
15584
15657
|
<xsl:attribute-set name="clause-style">
|
|
15585
15658
|
|
|
15586
15659
|
</xsl:attribute-set>
|
|
@@ -16601,8 +16674,9 @@
|
|
|
16601
16674
|
|
|
16602
16675
|
<xsl:template name="setTextAlignment">
|
|
16603
16676
|
<xsl:param name="default">left</xsl:param>
|
|
16677
|
+
<xsl:param name="skip_default">false</xsl:param>
|
|
16604
16678
|
<xsl:variable name="align" select="normalize-space(@align)"/>
|
|
16605
|
-
<xsl:
|
|
16679
|
+
<xsl:variable name="text_align">
|
|
16606
16680
|
<xsl:choose>
|
|
16607
16681
|
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
|
16608
16682
|
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
|
@@ -16610,9 +16684,13 @@
|
|
|
16610
16684
|
<xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
|
|
16611
16685
|
<xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
|
|
16612
16686
|
<xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
|
|
16687
|
+
<xsl:when test="$skip_default = 'true'"/>
|
|
16613
16688
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
|
16614
16689
|
</xsl:choose>
|
|
16615
|
-
</xsl:
|
|
16690
|
+
</xsl:variable>
|
|
16691
|
+
<xsl:if test="normalize-space($text_align) != ''">
|
|
16692
|
+
<xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
|
|
16693
|
+
</xsl:if>
|
|
16616
16694
|
<xsl:if test="$align = 'indent'">
|
|
16617
16695
|
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
|
16618
16696
|
</xsl:if>
|
|
@@ -16620,8 +16698,10 @@
|
|
|
16620
16698
|
|
|
16621
16699
|
<xsl:template name="setBlockAttributes">
|
|
16622
16700
|
<xsl:param name="text_align_default">left</xsl:param>
|
|
16701
|
+
<xsl:param name="skip_text_align_default">false</xsl:param>
|
|
16623
16702
|
<xsl:call-template name="setTextAlignment">
|
|
16624
16703
|
<xsl:with-param name="default" select="$text_align_default"/>
|
|
16704
|
+
<xsl:with-param name="skip_default" select="$skip_text_align_default"/>
|
|
16625
16705
|
</xsl:call-template>
|
|
16626
16706
|
<xsl:call-template name="setKeepAttributes"/>
|
|
16627
16707
|
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
|
@@ -84,15 +84,17 @@ module IsoDoc
|
|
|
84
84
|
|
|
85
85
|
def norm_ref_entry_code(_ordinal, idents, _ids, _standard, datefn, _bib)
|
|
86
86
|
ret = (idents[:metanorma] || idents[:ordinal] || idents[:sdo]).to_s
|
|
87
|
-
ret.empty? and return
|
|
88
|
-
|
|
87
|
+
ret.empty? and return ""
|
|
88
|
+
ret = ret.sub(/^\[(.+)\]$/, "\\1")
|
|
89
|
+
ret = "[#{esc ret}]"
|
|
89
90
|
ret += datefn
|
|
90
91
|
ret.gsub("-", "‑").gsub(/ /, " ")
|
|
91
92
|
end
|
|
92
93
|
|
|
93
94
|
def biblio_ref_entry_code(_ordinal, idents, _id, _standard, datefn, _bib)
|
|
94
95
|
ret = (idents[:metanorma] || idents[:ordinal] || idents[:sdo]).to_s
|
|
95
|
-
|
|
96
|
+
ret = ret.sub(/^\[(.+)\]$/, "\\1")
|
|
97
|
+
ret = "[#{esc ret}]"
|
|
96
98
|
ret += datefn
|
|
97
99
|
ret.empty? and return ret
|
|
98
100
|
ret.gsub("-", "‑").gsub(/ /, " ")
|
|
@@ -690,7 +690,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
|
|
|
690
690
|
<define name="CitationType">
|
|
691
691
|
<attribute name="bibitemid">
|
|
692
692
|
<a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
|
|
693
|
-
<
|
|
693
|
+
<ref name="IdRefType"/>
|
|
694
694
|
</attribute>
|
|
695
695
|
<choice>
|
|
696
696
|
<zeroOrMore>
|
|
@@ -1296,17 +1296,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
|
1296
1296
|
</define>
|
|
1297
1297
|
<define name="validityBegins">
|
|
1298
1298
|
<element name="validityBegins">
|
|
1299
|
-
<ref name="
|
|
1299
|
+
<ref name="ISO8601DateTime"/>
|
|
1300
1300
|
</element>
|
|
1301
1301
|
</define>
|
|
1302
1302
|
<define name="validityEnds">
|
|
1303
1303
|
<element name="validityEnds">
|
|
1304
|
-
<ref name="
|
|
1304
|
+
<ref name="ISO8601DateTime"/>
|
|
1305
1305
|
</element>
|
|
1306
1306
|
</define>
|
|
1307
1307
|
<define name="validityRevision">
|
|
1308
1308
|
<element name="revision">
|
|
1309
|
-
<ref name="
|
|
1309
|
+
<ref name="ISO8601DateTime"/>
|
|
1310
1310
|
</element>
|
|
1311
1311
|
</define>
|
|
1312
1312
|
<define name="TypedTitleString">
|
|
@@ -96,7 +96,8 @@ module Metanorma
|
|
|
96
96
|
node.attr("keywords") or return
|
|
97
97
|
node.attr("keywords").split(/, */).sort.each_with_index do |kw, i|
|
|
98
98
|
kw_out = i.zero? ? Metanorma::Utils.strict_capitalize_first(kw) : kw
|
|
99
|
-
xml
|
|
99
|
+
add_noko_elem(xml, "keyword", kw_out)
|
|
100
|
+
# xml.keyword kw_out
|
|
100
101
|
end
|
|
101
102
|
end
|
|
102
103
|
|
|
@@ -112,7 +113,8 @@ module Metanorma
|
|
|
112
113
|
|
|
113
114
|
def abstract_parse(attrs, xml, node)
|
|
114
115
|
xml.abstract **attr_code(attrs) do |xml_section|
|
|
115
|
-
xml_section.title { |name| name << node.title }
|
|
116
|
+
# xml_section.title { |name| name << node.title }
|
|
117
|
+
add_noko_elem(xml_section, "title", node.title)
|
|
116
118
|
xml_section << node.content
|
|
117
119
|
end
|
|
118
120
|
end
|
|
@@ -152,3 +154,5 @@ module Metanorma
|
|
|
152
154
|
end
|
|
153
155
|
end
|
|
154
156
|
end
|
|
157
|
+
|
|
158
|
+
require_relative "log"
|