metanorma-itu 2.8.0 → 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 +50 -56
- data/lib/isodoc/itu/itu.in-force.xsl +50 -56
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +50 -56
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +50 -56
- data/lib/isodoc/itu/itu.recommendation.xsl +50 -56
- data/lib/isodoc/itu/itu.resolution.xsl +50 -56
- data/lib/isodoc/itu/itu.service-publication.xsl +50 -56
- data/lib/isodoc/itu/itu.technical-paper.xsl +50 -56
- data/lib/isodoc/itu/itu.technical-report.xsl +50 -56
- data/lib/metanorma/itu/biblio.rng +4 -4
- data/lib/metanorma/itu/converter.rb +4 -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/version.rb +1 -1
- metadata +2 -2
|
@@ -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
|
|
|
@@ -2209,42 +2186,11 @@
|
|
|
2209
2186
|
<!-- ====== -->
|
|
2210
2187
|
<!-- title -->
|
|
2211
2188
|
<!-- ====== -->
|
|
2212
|
-
<xsl:template match="mn:annex/mn:fmt-title">
|
|
2213
|
-
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
2214
|
-
<fo:block xsl:use-attribute-sets="annex-title-style">
|
|
2215
|
-
<xsl:call-template name="refine_annex-title-style"/>
|
|
2216
|
-
<fo:block>
|
|
2217
|
-
<xsl:apply-templates/>
|
|
2218
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
2219
|
-
</fo:block>
|
|
2220
|
-
<xsl:if test="$doctype != 'resolution'">
|
|
2221
|
-
<fo:block font-size="12pt" font-weight="normal" margin-top="6pt">
|
|
2222
|
-
<!-- <xsl:choose>
|
|
2223
|
-
<xsl:when test="parent::*[@obligation = 'informative']">
|
|
2224
|
-
<xsl:text>(This appendix does not form an integral part of this Recommendation.)</xsl:text>
|
|
2225
|
-
</xsl:when>
|
|
2226
|
-
<xsl:otherwise>
|
|
2227
|
-
<xsl:text>(This annex forms an integral part of this Recommendation.)</xsl:text>
|
|
2228
|
-
</xsl:otherwise>
|
|
2229
|
-
</xsl:choose> -->
|
|
2230
|
-
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
|
|
2231
|
-
<xsl:apply-templates select="following-sibling::mn:p[not(preceding-sibling::mn:clause)][starts-with(normalize-space(), '(')]/node()"/>
|
|
2232
|
-
</fo:block>
|
|
2233
|
-
</xsl:if>
|
|
2234
|
-
</fo:block>
|
|
2235
|
-
</xsl:template>
|
|
2236
2189
|
|
|
2237
2190
|
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
|
|
2238
2191
|
<!-- renders in the annex/title template -->
|
|
2239
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"/>
|
|
2240
2193
|
|
|
2241
|
-
<!-- Bibliography -->
|
|
2242
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
|
|
2243
|
-
<fo:block xsl:use-attribute-sets="references-non-normative-title-style">
|
|
2244
|
-
<xsl:apply-templates/>
|
|
2245
|
-
</fo:block>
|
|
2246
|
-
</xsl:template>
|
|
2247
|
-
|
|
2248
2194
|
<xsl:template match="mn:fmt-title" name="title">
|
|
2249
2195
|
|
|
2250
2196
|
<xsl:variable name="element-name">
|
|
@@ -2263,6 +2209,24 @@
|
|
|
2263
2209
|
|
|
2264
2210
|
<xsl:apply-templates/>
|
|
2265
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>
|
|
2266
2230
|
</xsl:element>
|
|
2267
2231
|
|
|
2268
2232
|
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::mn:p)">
|
|
@@ -13066,15 +13030,16 @@
|
|
|
13066
13030
|
<!-- END Admonition -->
|
|
13067
13031
|
<!-- ================ -->
|
|
13068
13032
|
|
|
13069
|
-
<xsl:attribute-set name="
|
|
13033
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
13070
13034
|
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
13071
13035
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13072
13036
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
13037
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
13073
13038
|
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
|
13074
13039
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
13075
13040
|
</xsl:attribute-set>
|
|
13076
13041
|
|
|
13077
|
-
<xsl:template name="
|
|
13042
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
13078
13043
|
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
13079
13044
|
<xsl:if test="$doctype = 'implementers-guide'">
|
|
13080
13045
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
@@ -15196,9 +15161,11 @@
|
|
|
15196
15161
|
<!-- ===================================== -->
|
|
15197
15162
|
|
|
15198
15163
|
<xsl:attribute-set name="annex-title-style">
|
|
15164
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
15199
15165
|
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
15200
15166
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
15201
15167
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
15168
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
15202
15169
|
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
|
15203
15170
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
15204
15171
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
@@ -15303,6 +15270,33 @@
|
|
|
15303
15270
|
<xsl:attribute name="text-align">start</xsl:attribute>
|
|
15304
15271
|
</xsl:if>
|
|
15305
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
|
+
|
|
15306
15300
|
<xsl:if test="$element-name = 'fo:inline'">
|
|
15307
15301
|
<xsl:attribute name="padding-right">
|
|
15308
15302
|
<xsl:choose>
|
|
@@ -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
|
|
|
@@ -2209,42 +2186,11 @@
|
|
|
2209
2186
|
<!-- ====== -->
|
|
2210
2187
|
<!-- title -->
|
|
2211
2188
|
<!-- ====== -->
|
|
2212
|
-
<xsl:template match="mn:annex/mn:fmt-title">
|
|
2213
|
-
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
2214
|
-
<fo:block xsl:use-attribute-sets="annex-title-style">
|
|
2215
|
-
<xsl:call-template name="refine_annex-title-style"/>
|
|
2216
|
-
<fo:block>
|
|
2217
|
-
<xsl:apply-templates/>
|
|
2218
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
2219
|
-
</fo:block>
|
|
2220
|
-
<xsl:if test="$doctype != 'resolution'">
|
|
2221
|
-
<fo:block font-size="12pt" font-weight="normal" margin-top="6pt">
|
|
2222
|
-
<!-- <xsl:choose>
|
|
2223
|
-
<xsl:when test="parent::*[@obligation = 'informative']">
|
|
2224
|
-
<xsl:text>(This appendix does not form an integral part of this Recommendation.)</xsl:text>
|
|
2225
|
-
</xsl:when>
|
|
2226
|
-
<xsl:otherwise>
|
|
2227
|
-
<xsl:text>(This annex forms an integral part of this Recommendation.)</xsl:text>
|
|
2228
|
-
</xsl:otherwise>
|
|
2229
|
-
</xsl:choose> -->
|
|
2230
|
-
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
|
|
2231
|
-
<xsl:apply-templates select="following-sibling::mn:p[not(preceding-sibling::mn:clause)][starts-with(normalize-space(), '(')]/node()"/>
|
|
2232
|
-
</fo:block>
|
|
2233
|
-
</xsl:if>
|
|
2234
|
-
</fo:block>
|
|
2235
|
-
</xsl:template>
|
|
2236
2189
|
|
|
2237
2190
|
<!-- Added for https://github.com/metanorma/isodoc/issues/614 -->
|
|
2238
2191
|
<!-- renders in the annex/title template -->
|
|
2239
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"/>
|
|
2240
2193
|
|
|
2241
|
-
<!-- Bibliography -->
|
|
2242
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
|
|
2243
|
-
<fo:block xsl:use-attribute-sets="references-non-normative-title-style">
|
|
2244
|
-
<xsl:apply-templates/>
|
|
2245
|
-
</fo:block>
|
|
2246
|
-
</xsl:template>
|
|
2247
|
-
|
|
2248
2194
|
<xsl:template match="mn:fmt-title" name="title">
|
|
2249
2195
|
|
|
2250
2196
|
<xsl:variable name="element-name">
|
|
@@ -2263,6 +2209,24 @@
|
|
|
2263
2209
|
|
|
2264
2210
|
<xsl:apply-templates/>
|
|
2265
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>
|
|
2266
2230
|
</xsl:element>
|
|
2267
2231
|
|
|
2268
2232
|
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::mn:p)">
|
|
@@ -13066,15 +13030,16 @@
|
|
|
13066
13030
|
<!-- END Admonition -->
|
|
13067
13031
|
<!-- ================ -->
|
|
13068
13032
|
|
|
13069
|
-
<xsl:attribute-set name="
|
|
13033
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
13070
13034
|
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
13071
13035
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13072
13036
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
13037
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
13073
13038
|
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
|
13074
13039
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
13075
13040
|
</xsl:attribute-set>
|
|
13076
13041
|
|
|
13077
|
-
<xsl:template name="
|
|
13042
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
13078
13043
|
<xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
|
|
13079
13044
|
<xsl:if test="$doctype = 'implementers-guide'">
|
|
13080
13045
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
@@ -15196,9 +15161,11 @@
|
|
|
15196
15161
|
<!-- ===================================== -->
|
|
15197
15162
|
|
|
15198
15163
|
<xsl:attribute-set name="annex-title-style">
|
|
15164
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
15199
15165
|
<xsl:attribute name="font-size">14pt</xsl:attribute>
|
|
15200
15166
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
15201
15167
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
15168
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
15202
15169
|
<xsl:attribute name="margin-bottom">18pt</xsl:attribute>
|
|
15203
15170
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
15204
15171
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
@@ -15303,6 +15270,33 @@
|
|
|
15303
15270
|
<xsl:attribute name="text-align">start</xsl:attribute>
|
|
15304
15271
|
</xsl:if>
|
|
15305
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
|
+
|
|
15306
15300
|
<xsl:if test="$element-name = 'fo:inline'">
|
|
15307
15301
|
<xsl:attribute name="padding-right">
|
|
15308
15302
|
<xsl:choose>
|
|
@@ -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
|
data/lib/metanorma/itu/front.rb
CHANGED
|
@@ -9,7 +9,8 @@ module Metanorma
|
|
|
9
9
|
stage = node.attr("status") || node.attr("docstage") || "published"
|
|
10
10
|
stage = "draft" if node.attributes.has_key?("draft")
|
|
11
11
|
xml.status do |s|
|
|
12
|
-
s
|
|
12
|
+
add_noko_elem(s, "stage", stage)
|
|
13
|
+
# s.stage stage
|
|
13
14
|
end
|
|
14
15
|
end
|
|
15
16
|
|
|
@@ -65,8 +66,9 @@ module Metanorma
|
|
|
65
66
|
end
|
|
66
67
|
vals.each do |v|
|
|
67
68
|
xml.question do |q|
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
add_noko_elem(q, "identifier", v[:id])
|
|
70
|
+
# q.identifier a
|
|
71
|
+
add_noko_elem(q, "name", v[:value]) # q.name a
|
|
70
72
|
end
|
|
71
73
|
end
|
|
72
74
|
end
|
|
@@ -83,7 +85,7 @@ module Metanorma
|
|
|
83
85
|
.each do |k, v|
|
|
84
86
|
node.attr(k.to_s) and
|
|
85
87
|
xml.series **{ type: v } do |s|
|
|
86
|
-
s
|
|
88
|
+
add_noko_elem(s, "title", node.attr(k.to_s))
|
|
87
89
|
end
|
|
88
90
|
end
|
|
89
91
|
end
|
|
@@ -92,37 +94,46 @@ module Metanorma
|
|
|
92
94
|
node.attr("recommendation-from") || node.attr("approval-process") or
|
|
93
95
|
return
|
|
94
96
|
xml.recommendationstatus do |s|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
add_noko_elem(s, "from", node.attr("recommendation-from"))
|
|
98
|
+
add_noko_elem(s, "to", node.attr("recommendation-to"))
|
|
97
99
|
node.attr("approval-process") and
|
|
98
|
-
s
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
add_noko_elem(s, "approvalstage", node.attr("approval-status"),
|
|
101
|
+
process: node.attr("approval-process"))
|
|
102
|
+
# s.approvalstage **{ process: node.attr("approval-process") } do |x|
|
|
103
|
+
# x << node.attr("approval-status")
|
|
104
|
+
# end
|
|
101
105
|
end
|
|
102
106
|
end
|
|
103
107
|
|
|
104
108
|
def metadata_ip_notice(node, xml)
|
|
105
|
-
xml
|
|
109
|
+
add_noko_elem(xml, "ip-notice-received",
|
|
110
|
+
node.attr("ip-notice-received") || "false")
|
|
111
|
+
# xml.ip_notice_received (node.attr("ip-notice-received") || "false")
|
|
106
112
|
end
|
|
107
113
|
|
|
108
114
|
def metadata_techreport(node, xml)
|
|
109
115
|
a = node.attr("meeting") and
|
|
110
116
|
metadata_meeting(a, node.attr("meeting-acronym"), xml)
|
|
111
|
-
|
|
117
|
+
add_noko_elem(xml, "meeting_place", node.attr("meeting-place"))
|
|
118
|
+
# a = node.attr("meeting-place") and xml.meeting_place a
|
|
112
119
|
a = node.attr("meeting-date") and metadata_meeting_date(a, xml)
|
|
113
|
-
|
|
114
|
-
a = node.attr("
|
|
120
|
+
add_noko_elem(xml, "intended_type", node.attr("intended-type"))
|
|
121
|
+
# a = node.attr("intended-type") and xml.intended_type a
|
|
122
|
+
add_noko_elem(xml, "source", node.attr("source"))
|
|
123
|
+
# a = node.attr("source") and xml.source a
|
|
115
124
|
end
|
|
116
125
|
|
|
117
126
|
def metadata_meeting(mtg, acronym, xml)
|
|
118
|
-
xml
|
|
119
|
-
|
|
120
|
-
|
|
127
|
+
add_noko_elem(xml, "meeting", mtg, acronym: acronym)
|
|
128
|
+
# xml.meeting **attr_code(acronym: acronym) do |m|
|
|
129
|
+
# m << mtg
|
|
130
|
+
# end
|
|
121
131
|
end
|
|
122
132
|
|
|
123
133
|
def metadata_contribution(node, xml)
|
|
124
134
|
%w(timing).each do |k|
|
|
125
|
-
|
|
135
|
+
add_noko_elem(xml, k, node.attr(k))
|
|
136
|
+
# a = node.attr(k) and xml.send k, a
|
|
126
137
|
end
|
|
127
138
|
end
|
|
128
139
|
|
|
@@ -130,17 +141,21 @@ module Metanorma
|
|
|
130
141
|
xml.meeting_date do |m|
|
|
131
142
|
d = val.split("/")
|
|
132
143
|
if d.size > 1
|
|
133
|
-
m
|
|
134
|
-
m.
|
|
144
|
+
add_noko_elem(m, "from", d[0])
|
|
145
|
+
# m.from d[0]
|
|
146
|
+
add_noko_elem(m, "to", d[1])
|
|
147
|
+
# m.to d[1]
|
|
135
148
|
else
|
|
136
|
-
m
|
|
149
|
+
add_noko_elem(m, "on", d[0])
|
|
150
|
+
# m.on d[0]
|
|
137
151
|
end
|
|
138
152
|
end
|
|
139
153
|
end
|
|
140
154
|
|
|
141
155
|
def personal_role(node, contrib, suffix)
|
|
142
156
|
if node.attr("role#{suffix}")&.downcase == "rapporteur"
|
|
143
|
-
contrib
|
|
157
|
+
add_noko_elem(contrib, "role", "raporteur", type: "editor")
|
|
158
|
+
# contrib.role "raporteur", **{ type: "editor" }
|
|
144
159
|
else
|
|
145
160
|
super
|
|
146
161
|
end
|
|
@@ -149,8 +164,8 @@ module Metanorma
|
|
|
149
164
|
def metadata_studyperiod(node, xml)
|
|
150
165
|
s, e = group_period(node, "", "")
|
|
151
166
|
xml.studyperiod do |p|
|
|
152
|
-
p
|
|
153
|
-
p
|
|
167
|
+
add_noko_elem(p, "start", s.to_s)
|
|
168
|
+
add_noko_elem(p, "end", e.to_s)
|
|
154
169
|
end
|
|
155
170
|
end
|
|
156
171
|
|
|
@@ -11,21 +11,27 @@ module Metanorma
|
|
|
11
11
|
|
|
12
12
|
def provisional_id(node, xml)
|
|
13
13
|
node.attr("provisional-name") or return
|
|
14
|
-
xml
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
add_noko_elem(xml, "docidentifier",
|
|
15
|
+
node.attr("provisional-name"), type: "ITU-provisional")
|
|
16
|
+
# xml.docidentifier type: "ITU-provisional" do |i|
|
|
17
|
+
# i << node.attr("provisional-name")
|
|
18
|
+
# end
|
|
17
19
|
end
|
|
18
20
|
|
|
19
21
|
def td_id(node, xml)
|
|
20
22
|
node.attr("td-number") or return
|
|
21
|
-
xml
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
add_noko_elem(xml, "docidentifier",
|
|
24
|
+
node.attr("td-number"), type: "ITU-TemporaryDocument")
|
|
25
|
+
# xml.docidentifier type: "ITU-TemporaryDocument" do |i|
|
|
26
|
+
# i << node.attr("td-number")
|
|
27
|
+
# end
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
def iso_id(node, xml)
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
add_noko_elem(xml, "docidentifier",
|
|
32
|
+
node.attr("common-text-docnumber"), type: "ISO")
|
|
33
|
+
# a = node.attr("common-text-docnumber") and
|
|
34
|
+
# xml.docidentifier a, type: "ISO"
|
|
29
35
|
end
|
|
30
36
|
|
|
31
37
|
ITULANG = { "en" => "E", "fr" => "F", "ar" => "A", "es" => "S",
|
|
@@ -56,31 +62,42 @@ module Metanorma
|
|
|
56
62
|
|
|
57
63
|
def itu_id(node, xml)
|
|
58
64
|
node.attr("docnumber") || node.attr("docidentifier") or return
|
|
59
|
-
xml
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
add_noko_elem(xml, "docidentifier",
|
|
66
|
+
node.attr("docidentifier") || itu_id1(node, false), type: "ITU", primary: "true")
|
|
67
|
+
# xml.docidentifier type: "ITU", primary: "true" do |i|
|
|
68
|
+
# i << (node.attr("docidentifier") || itu_id1(node, false))
|
|
69
|
+
# end
|
|
70
|
+
add_noko_elem(xml, "docidentifier",
|
|
71
|
+
itu_id1(node, true), type: "ITU-lang")
|
|
72
|
+
# xml.docidentifier type: "ITU-lang" do |i|
|
|
73
|
+
# i << itu_id1(node, true)
|
|
74
|
+
# end
|
|
65
75
|
end
|
|
66
76
|
|
|
67
77
|
def recommendation_id(node, xml)
|
|
68
78
|
node.attr("recommendationnumber") or return
|
|
69
79
|
node.attr("recommendationnumber").split("/").each do |s|
|
|
70
|
-
xml
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
add_noko_elem(xml, "docidentifier", s, type: "ITU-Recommendation")
|
|
81
|
+
|
|
82
|
+
# xml.docidentifier type: "ITU-Recommendation" do |i|
|
|
83
|
+
# i << s
|
|
84
|
+
# end
|
|
73
85
|
end
|
|
74
86
|
end
|
|
75
87
|
|
|
76
88
|
def structured_id(node, xml)
|
|
77
89
|
node.attr("docnumber") or return
|
|
78
90
|
xml.structuredidentifier do |i|
|
|
79
|
-
i
|
|
80
|
-
i.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
91
|
+
add_noko_elem(i, "bureau", node.attr("bureau") || "T")
|
|
92
|
+
# i.bureau node.attr("bureau") || "T"
|
|
93
|
+
add_noko_elem(i, "docnumber", node.attr("docnumber"))
|
|
94
|
+
# i.docnumber node.attr("docnumber")
|
|
95
|
+
add_noko_elem(i, "annexid", node.attr("annexid"))
|
|
96
|
+
# a = node.attr("annexid") and i.annexid a
|
|
97
|
+
add_noko_elem(i, "amendment", node.attr("amendment-number"))
|
|
98
|
+
# a = node.attr("amendment-number") and i.amendment a
|
|
99
|
+
add_noko_elem(i, "corrigendum", node.attr("corrigendum-number"))
|
|
100
|
+
# a = node.attr("corrigendum-number") and i.corrigendum a
|
|
84
101
|
end
|
|
85
102
|
end
|
|
86
103
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
3
|
-
<!-- VERSION v2.1.
|
|
3
|
+
<!-- VERSION v2.1.4 -->
|
|
4
4
|
|
|
5
5
|
<!--
|
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
|
@@ -905,15 +905,32 @@ titlecase, or lowercase</a:documentation>
|
|
|
905
905
|
</element>
|
|
906
906
|
</define>
|
|
907
907
|
<define name="image" combine="choice">
|
|
908
|
-
<
|
|
909
|
-
<
|
|
910
|
-
|
|
911
|
-
<
|
|
912
|
-
|
|
913
|
-
<
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
908
|
+
<choice>
|
|
909
|
+
<element name="image">
|
|
910
|
+
<ref name="RequiredId"/>
|
|
911
|
+
<ref name="ImageAttributes"/>
|
|
912
|
+
<optional>
|
|
913
|
+
<element name="svg">
|
|
914
|
+
<a:documentation>Allow svg in image/svg, for consistency</a:documentation>
|
|
915
|
+
<oneOrMore>
|
|
916
|
+
<choice>
|
|
917
|
+
<text/>
|
|
918
|
+
<ref name="AnyElement"/>
|
|
919
|
+
</choice>
|
|
920
|
+
</oneOrMore>
|
|
921
|
+
</element>
|
|
922
|
+
</optional>
|
|
923
|
+
</element>
|
|
924
|
+
<element name="svg">
|
|
925
|
+
<a:documentation>Add svg mark up to image</a:documentation>
|
|
926
|
+
<oneOrMore>
|
|
927
|
+
<choice>
|
|
928
|
+
<text/>
|
|
929
|
+
<ref name="AnyElement"/>
|
|
930
|
+
</choice>
|
|
931
|
+
</oneOrMore>
|
|
932
|
+
</element>
|
|
933
|
+
</choice>
|
|
917
934
|
</define>
|
|
918
935
|
<define name="ParagraphFnBody" combine="interleave">
|
|
919
936
|
<ref name="BlockSource">
|