metanorma-itu 2.2.14 → 2.3.0
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/base_convert.rb +18 -66
- data/lib/isodoc/itu/html/_coverpage.css +7 -3
- data/lib/isodoc/itu/html/htmlstyle.css +16 -8
- data/lib/isodoc/itu/html/htmlstyle.scss +2 -2
- data/lib/isodoc/itu/html_convert.rb +5 -10
- data/lib/isodoc/itu/i18n-ar.yaml +2 -1
- data/lib/isodoc/itu/i18n-de.yaml +2 -1
- data/lib/isodoc/itu/i18n-en.yaml +4 -1
- data/lib/isodoc/itu/i18n-es.yaml +4 -1
- data/lib/isodoc/itu/i18n-fr.yaml +4 -1
- data/lib/isodoc/itu/i18n-ru.yaml +4 -1
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +2 -1
- data/lib/isodoc/itu/itu.implementers-guide.xsl +146 -81
- data/lib/isodoc/itu/itu.in-force.xsl +146 -81
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +146 -81
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +146 -81
- data/lib/isodoc/itu/itu.recommendation.xsl +146 -81
- data/lib/isodoc/itu/itu.resolution.xsl +146 -81
- data/lib/isodoc/itu/itu.service-publication.xsl +146 -81
- data/lib/isodoc/itu/itu.technical-paper.xsl +146 -81
- data/lib/isodoc/itu/itu.technical-report.xsl +146 -81
- 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/cleanup.rb +7 -0
- 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">
|
|
@@ -2280,19 +2316,32 @@
|
|
|
2280
2316
|
<xsl:variable name="titles_">
|
|
2281
2317
|
|
|
2282
2318
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
|
2283
|
-
<title-toc lang="en">
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2319
|
+
<!-- <title-toc lang="en">
|
|
2320
|
+
<xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
|
|
2321
|
+
<xsl:text>Contents</xsl:text>
|
|
2322
|
+
</xsl:if>
|
|
2323
|
+
<xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
|
|
2324
|
+
<xsl:text>Table of Contents</xsl:text>
|
|
2325
|
+
</xsl:if>
|
|
2326
|
+
<xsl:if test="$namespace = 'gb'">
|
|
2327
|
+
<xsl:text>Table of contents</xsl:text>
|
|
2328
|
+
</xsl:if>
|
|
2329
|
+
</title-toc> -->
|
|
2330
|
+
<title-toc lang="en">Table of contents</title-toc>
|
|
2331
|
+
<!-- <title-toc lang="fr">
|
|
2287
2332
|
<xsl:text>Sommaire</xsl:text>
|
|
2288
|
-
</title-toc>
|
|
2289
|
-
<title-toc lang="zh">
|
|
2290
|
-
|
|
2333
|
+
</title-toc> -->
|
|
2334
|
+
<!-- <title-toc lang="zh">
|
|
2335
|
+
<xsl:choose>
|
|
2336
|
+
<xsl:when test="$namespace = 'gb'">
|
|
2337
|
+
<xsl:text>目次</xsl:text>
|
|
2338
|
+
</xsl:when>
|
|
2339
|
+
<xsl:otherwise>
|
|
2291
2340
|
<xsl:text>Contents</xsl:text>
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
<title-
|
|
2341
|
+
</xsl:otherwise>
|
|
2342
|
+
</xsl:choose>
|
|
2343
|
+
</title-toc> -->
|
|
2344
|
+
<title-toc lang="zh">目次</title-toc>
|
|
2296
2345
|
|
|
2297
2346
|
<title-part lang="en">
|
|
2298
2347
|
|
|
@@ -2308,20 +2357,6 @@
|
|
|
2308
2357
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
|
2309
2358
|
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
|
2310
2359
|
|
|
2311
|
-
<title-list-tables lang="en">List of Tables</title-list-tables>
|
|
2312
|
-
|
|
2313
|
-
<title-list-figures lang="en">List of Figures</title-list-figures>
|
|
2314
|
-
|
|
2315
|
-
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
|
2316
|
-
|
|
2317
|
-
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
|
2318
|
-
|
|
2319
|
-
<title-summary lang="en">Summary</title-summary>
|
|
2320
|
-
|
|
2321
|
-
<title-continued lang="ru">(продолжение)</title-continued>
|
|
2322
|
-
<title-continued lang="en">(continued)</title-continued>
|
|
2323
|
-
<title-continued lang="fr">(continué)</title-continued>
|
|
2324
|
-
|
|
2325
2360
|
</xsl:variable>
|
|
2326
2361
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
|
2327
2362
|
|
|
@@ -2329,8 +2364,8 @@
|
|
|
2329
2364
|
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
|
2330
2365
|
<xsl:value-of select="$toc_table_title"/>
|
|
2331
2366
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
2332
|
-
<xsl:call-template name="
|
|
2333
|
-
<xsl:with-param name="
|
|
2367
|
+
<xsl:call-template name="getLocalizedString">
|
|
2368
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
2334
2369
|
</xsl:call-template>
|
|
2335
2370
|
</xsl:if>
|
|
2336
2371
|
</xsl:variable>
|
|
@@ -2339,8 +2374,8 @@
|
|
|
2339
2374
|
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
|
2340
2375
|
<xsl:value-of select="$toc_figure_title"/>
|
|
2341
2376
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
2342
|
-
<xsl:call-template name="
|
|
2343
|
-
<xsl:with-param name="
|
|
2377
|
+
<xsl:call-template name="getLocalizedString">
|
|
2378
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
2344
2379
|
</xsl:call-template>
|
|
2345
2380
|
</xsl:if>
|
|
2346
2381
|
</xsl:variable>
|
|
@@ -2349,8 +2384,8 @@
|
|
|
2349
2384
|
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
|
2350
2385
|
<xsl:value-of select="$toc_requirement_title"/>
|
|
2351
2386
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
2352
|
-
<xsl:call-template name="
|
|
2353
|
-
<xsl:with-param name="
|
|
2387
|
+
<xsl:call-template name="getLocalizedString">
|
|
2388
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
2354
2389
|
</xsl:call-template>
|
|
2355
2390
|
</xsl:if>
|
|
2356
2391
|
</xsl:variable>
|
|
@@ -6115,6 +6150,9 @@
|
|
|
6115
6150
|
<!-- END Definition List -->
|
|
6116
6151
|
<!-- ===================== -->
|
|
6117
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
|
+
|
|
6118
6156
|
<!-- ========================= -->
|
|
6119
6157
|
<!-- Rich text formatting -->
|
|
6120
6158
|
<!-- ========================= -->
|
|
@@ -6194,7 +6232,7 @@
|
|
|
6194
6232
|
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
|
6195
6233
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
|
6196
6234
|
<xsl:choose>
|
|
6197
|
-
<xsl:when test="java:replaceAll(java:java.lang.String.new(.),
|
|
6235
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
|
|
6198
6236
|
<!-- url -->
|
|
6199
6237
|
<xsl:call-template name="add-zero-spaces-link-java"/>
|
|
6200
6238
|
</xsl:when>
|
|
@@ -6656,10 +6694,13 @@
|
|
|
6656
6694
|
</xsl:choose>
|
|
6657
6695
|
</xsl:variable>
|
|
6658
6696
|
|
|
6697
|
+
<!-- replace sequence #x200B to one ​ -->
|
|
6698
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '')"/>
|
|
6699
|
+
|
|
6659
6700
|
<!-- replace sequence #x200B and space TO space -->
|
|
6660
|
-
<xsl:variable name="
|
|
6701
|
+
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
|
|
6661
6702
|
|
|
6662
|
-
<xsl:value-of select="$
|
|
6703
|
+
<xsl:value-of select="$text11"/>
|
|
6663
6704
|
</xsl:template>
|
|
6664
6705
|
|
|
6665
6706
|
<xsl:template name="add-zero-spaces-link-java">
|
|
@@ -6669,8 +6710,12 @@
|
|
|
6669
6710
|
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
|
6670
6711
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
|
|
6671
6712
|
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1')"/>
|
|
6713
|
+
|
|
6714
|
+
<!-- replace sequence #x200B to one ​ -->
|
|
6715
|
+
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '')"/>
|
|
6716
|
+
|
|
6672
6717
|
<!-- remove zero-width space at the end -->
|
|
6673
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
|
6718
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '$', '')"/>
|
|
6674
6719
|
</xsl:template>
|
|
6675
6720
|
|
|
6676
6721
|
<!-- add zero space after dash character (for table's entries) -->
|
|
@@ -7933,7 +7978,7 @@
|
|
|
7933
7978
|
|
|
7934
7979
|
<xsl:call-template name="refine_note_block_style"/>
|
|
7935
7980
|
|
|
7936
|
-
<fo:inline xsl:use-attribute-sets="note-name-style">
|
|
7981
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
|
7937
7982
|
|
|
7938
7983
|
<xsl:call-template name="refine_note-name-style"/>
|
|
7939
7984
|
|
|
@@ -7974,12 +8019,12 @@
|
|
|
7974
8019
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
|
7975
8020
|
<xsl:choose>
|
|
7976
8021
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
|
7977
|
-
<fo:inline xsl:use-attribute-sets="note-p-style">
|
|
8022
|
+
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
|
7978
8023
|
<xsl:apply-templates/>
|
|
7979
8024
|
</fo:inline>
|
|
7980
8025
|
</xsl:when>
|
|
7981
8026
|
<xsl:otherwise>
|
|
7982
|
-
<fo:block xsl:use-attribute-sets="note-p-style">
|
|
8027
|
+
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
|
7983
8028
|
<xsl:apply-templates/>
|
|
7984
8029
|
</fo:block>
|
|
7985
8030
|
</xsl:otherwise>
|
|
@@ -8198,25 +8243,45 @@
|
|
|
8198
8243
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
|
8199
8244
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
|
8200
8245
|
|
|
8201
|
-
<xsl:
|
|
8202
|
-
<xsl:
|
|
8203
|
-
<xsl:
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
</xsl:variable>
|
|
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>
|
|
8207
8251
|
|
|
8208
|
-
<xsl:
|
|
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>
|
|
8209
8257
|
|
|
8210
|
-
|
|
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>
|
|
8211
8263
|
|
|
8212
|
-
|
|
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>
|
|
8213
8270
|
|
|
8214
|
-
|
|
8215
|
-
<xsl:if test="number($scale) < 100">
|
|
8271
|
+
<xsl:variable name="image_width_effective">
|
|
8216
8272
|
|
|
8217
|
-
|
|
8273
|
+
<xsl:value-of select="$width_effective"/>
|
|
8218
8274
|
|
|
8219
|
-
|
|
8275
|
+
</xsl:variable>
|
|
8276
|
+
|
|
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>
|
|
8220
8285
|
|
|
8221
8286
|
</xsl:if>
|
|
8222
8287
|
|
|
@@ -11905,7 +11970,7 @@
|
|
|
11905
11970
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
|
11906
11971
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
11907
11972
|
</xsl:template>
|
|
11908
|
-
<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">
|
|
11909
11974
|
<xsl:copy>
|
|
11910
11975
|
<xsl:copy-of select="@*"/>
|
|
11911
11976
|
<xsl:apply-templates mode="update_xml_step1"/>
|