metanorma-itu 2.4.4 → 2.4.5
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/html/header.html +68 -0
- data/lib/isodoc/itu/html/itu.css +4 -1
- data/lib/isodoc/itu/html/itu.scss +4 -1
- data/lib/isodoc/itu/html/logo-small.png +0 -0
- data/lib/isodoc/itu/html/word_itu_intro.html +2 -0
- data/lib/isodoc/itu/html/wordstyle.css +2 -0
- data/lib/isodoc/itu/html/wordstyle.scss +2 -0
- data/lib/isodoc/itu/html_convert.rb +10 -0
- data/lib/isodoc/itu/i18n-ar.yaml +10 -0
- data/lib/isodoc/itu/i18n-de.yaml +10 -0
- data/lib/isodoc/itu/i18n-en.yaml +10 -0
- data/lib/isodoc/itu/i18n-es.yaml +10 -0
- data/lib/isodoc/itu/i18n-fr.yaml +10 -0
- data/lib/isodoc/itu/i18n-ru.yaml +10 -0
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +10 -0
- data/lib/isodoc/itu/itu.implementers-guide.xsl +109 -110
- data/lib/isodoc/itu/itu.in-force.xsl +109 -110
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +109 -110
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +109 -110
- data/lib/isodoc/itu/itu.recommendation.xsl +109 -110
- data/lib/isodoc/itu/itu.resolution.xsl +109 -110
- data/lib/isodoc/itu/itu.service-publication.xsl +109 -110
- data/lib/isodoc/itu/itu.technical-paper.xsl +109 -110
- data/lib/isodoc/itu/itu.technical-report.xsl +109 -110
- data/lib/isodoc/itu/metadata.rb +50 -18
- data/lib/isodoc/itu/presentation_preface.rb +110 -9
- data/lib/isodoc/itu/presentation_xml_convert.rb +13 -15
- data/lib/isodoc/itu/word_cleanup.rb +4 -4
- data/lib/isodoc/itu/word_convert.rb +21 -2
- data/lib/metanorma/itu/biblio.rng +24 -8
- data/lib/metanorma/itu/cleanup_section.rb +1 -1
- data/lib/metanorma/itu/front.rb +39 -13
- data/lib/metanorma/itu/front_id.rb +17 -6
- data/lib/metanorma/itu/isodoc.rng +67 -55
- data/lib/metanorma/itu/relaton-itu.rng +43 -7
- data/lib/metanorma/itu/validate.rb +4 -4
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +3 -2
@@ -143,7 +143,7 @@
|
|
143
143
|
<xsl:variable name="document_scheme" select="normalize-space(/itu:itu-standard/itu:metanorma-extension/itu:presentation-metadata[itu:name = 'document-scheme']/itu:value)"/>
|
144
144
|
<xsl:variable name="layoutVersion_">
|
145
145
|
<xsl:choose>
|
146
|
-
<xsl:when test="$document_scheme = ''">2023</xsl:when>
|
146
|
+
<xsl:when test="$document_scheme = '' or $document_scheme = 'current'">2023</xsl:when>
|
147
147
|
<xsl:otherwise>default</xsl:otherwise>
|
148
148
|
</xsl:choose>
|
149
149
|
</xsl:variable>
|
@@ -170,6 +170,20 @@
|
|
170
170
|
</xsl:variable>
|
171
171
|
<xsl:variable name="color_cover_itu_logo" select="normalize-space($color_cover_itu_logo_)"/>
|
172
172
|
|
173
|
+
<xsl:variable name="i18n_international_telecommunication_union"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">international_telecommunication_union</xsl:with-param></xsl:call-template></xsl:variable>
|
174
|
+
<xsl:variable name="i18n_edition"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">edition</xsl:with-param></xsl:call-template></xsl:variable>
|
175
|
+
<xsl:variable name="i18n_edition_Capitalized"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$i18n_edition"/></xsl:call-template></xsl:variable>
|
176
|
+
<xsl:variable name="i18n_annex"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">annex</xsl:with-param></xsl:call-template></xsl:variable>
|
177
|
+
<xsl:variable name="i18n_annex_to_itu_ob"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">annex_to_itu_ob</xsl:with-param></xsl:call-template></xsl:variable>
|
178
|
+
<xsl:variable name="i18n_number_abbrev"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">number_abbrev</xsl:with-param></xsl:call-template></xsl:variable>
|
179
|
+
<xsl:variable name="i18n_tsb"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">tsb</xsl:with-param></xsl:call-template></xsl:variable>
|
180
|
+
<xsl:variable name="i18n_tsb_full"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">tsb_full</xsl:with-param><xsl:with-param name="formatted">true</xsl:with-param></xsl:call-template></xsl:variable>
|
181
|
+
<xsl:variable name="i18n_placedate"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">placedate</xsl:with-param></xsl:call-template></xsl:variable>
|
182
|
+
<xsl:variable name="i18n_series"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">series</xsl:with-param></xsl:call-template></xsl:variable>
|
183
|
+
<xsl:variable name="i18n_series_Capitalized"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$i18n_series"/></xsl:call-template></xsl:variable>
|
184
|
+
<xsl:variable name="i18n_keywords"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">keywords</xsl:with-param></xsl:call-template></xsl:variable>
|
185
|
+
<xsl:variable name="i18n_page"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">Page.sg</xsl:with-param></xsl:call-template></xsl:variable>
|
186
|
+
|
173
187
|
<xsl:template match="/">
|
174
188
|
<xsl:call-template name="namespaceCheck"/>
|
175
189
|
<fo:root xml:lang="{$lang}">
|
@@ -340,9 +354,7 @@
|
|
340
354
|
</fo:table-cell>
|
341
355
|
<fo:table-cell text-align="end" display-align="center">
|
342
356
|
<fo:block>
|
343
|
-
<xsl:
|
344
|
-
<xsl:with-param name="key">international_telecommunication_union</xsl:with-param>
|
345
|
-
</xsl:call-template>
|
357
|
+
<xsl:value-of select="$i18n_international_telecommunication_union"/>
|
346
358
|
</fo:block>
|
347
359
|
</fo:table-cell>
|
348
360
|
</fo:table-row>
|
@@ -350,16 +362,13 @@
|
|
350
362
|
<!-- collection/series (optional) -->
|
351
363
|
<fo:table-cell text-align="start">
|
352
364
|
<fo:block>
|
353
|
-
<xsl:
|
354
|
-
<xsl:if test="$collection != ''">
|
355
|
-
<xsl:value-of select="$collection"/>
|
356
|
-
</xsl:if>
|
365
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'collection']"/>
|
357
366
|
</fo:block>
|
358
367
|
</fo:table-cell>
|
359
368
|
<!-- Sector or Bureau name -->
|
360
369
|
<fo:table-cell text-align="end">
|
361
370
|
<fo:block>
|
362
|
-
<xsl:variable name="sector" select="normalize-space(/itu:itu-standard/itu:
|
371
|
+
<xsl:variable name="sector" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:sector)"/>
|
363
372
|
<xsl:value-of select="$sector"/>
|
364
373
|
<xsl:if test="$sector = ''">
|
365
374
|
<xsl:variable name="bureau_key">
|
@@ -408,13 +417,25 @@
|
|
408
417
|
|
409
418
|
<xsl:choose>
|
410
419
|
|
411
|
-
<xsl:when test="$doctype = 'service-publication'">
|
412
|
-
<fo:block margin-top="11.5mm" font-size="
|
420
|
+
<xsl:when test="$doctype = 'service-publication'"> <!-- Flagship -->
|
421
|
+
<fo:block margin-top="11.5mm" font-size="34pt">
|
413
422
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
|
414
423
|
</fo:block>
|
415
|
-
<fo:block margin-top="2mm">
|
424
|
+
<fo:block margin-top="2mm" font-size="26pt">
|
416
425
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
|
417
426
|
</fo:block>
|
427
|
+
<!-- https://github.com/metanorma/metanorma-itu/issues/474#issuecomment-1966298384 -->
|
428
|
+
<xsl:variable name="title_slogan" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:title[@type = 'slogan'])"/>
|
429
|
+
<xsl:if test="$title_slogan != ''">
|
430
|
+
<fo:block margin-top="2mm" font-family="Adelle Devanagari" font-size="26pt">
|
431
|
+
<xsl:choose>
|
432
|
+
<xsl:when test="$lang = 'ar'"><xsl:attribute name="font-family">Traditional Arabic</xsl:attribute></xsl:when>
|
433
|
+
<xsl:when test="$lang = 'zh'"><xsl:attribute name="font-family">STKaiti</xsl:attribute></xsl:when>
|
434
|
+
<!-- <xsl:otherwise><xsl:attribute name="font-style">italic</xsl:attribute></xsl:otherwise> -->
|
435
|
+
</xsl:choose>
|
436
|
+
<xsl:value-of select="$title_slogan"/>
|
437
|
+
</fo:block>
|
438
|
+
</xsl:if>
|
418
439
|
<xsl:variable name="year_published" select="substring($date_published,1,4)"/>
|
419
440
|
<xsl:if test="$year_published != ''">
|
420
441
|
<!-- Examples:
|
@@ -424,27 +445,13 @@
|
|
424
445
|
طبعة 2020
|
425
446
|
2020 年版
|
426
447
|
Издание 2020 года -->
|
427
|
-
<fo:block margin-top="3mm" font-size="
|
428
|
-
<xsl:variable name="editionTitle">
|
429
|
-
<xsl:call-template name="getLocalizedString">
|
430
|
-
<xsl:with-param name="key">edition</xsl:with-param>
|
431
|
-
</xsl:call-template>
|
432
|
-
</xsl:variable>
|
433
|
-
<xsl:variable name="editionTitleCapitalized">
|
434
|
-
<xsl:call-template name="capitalize">
|
435
|
-
<xsl:with-param name="str" select="$editionTitle"/>
|
436
|
-
</xsl:call-template>
|
437
|
-
</xsl:variable>
|
448
|
+
<fo:block margin-top="3mm" font-size="22pt">
|
438
449
|
<xsl:choose>
|
439
450
|
<xsl:when test="$lang = 'en' or $lang = 'ar' or $lang = 'zh'">
|
440
|
-
<xsl:value-of select="$year_published"/>
|
441
|
-
<xsl:text> </xsl:text>
|
442
|
-
<xsl:value-of select="$editionTitle"/>
|
451
|
+
<xsl:value-of select="concat($year_published, ' ', $i18n_edition)"/>
|
443
452
|
</xsl:when>
|
444
453
|
<xsl:otherwise>
|
445
|
-
<xsl:value-of select="$
|
446
|
-
<xsl:text> </xsl:text>
|
447
|
-
<xsl:value-of select="$year_published"/>
|
454
|
+
<xsl:value-of select="concat($i18n_edition_Capitalized, ' ', $year_published)"/>
|
448
455
|
<xsl:if test="$lang = 'ru'"> года</xsl:if>
|
449
456
|
</xsl:otherwise>
|
450
457
|
</xsl:choose>
|
@@ -508,9 +515,7 @@
|
|
508
515
|
<fo:block-container>
|
509
516
|
<xsl:call-template name="setWritingMode"/>
|
510
517
|
<fo:block>
|
511
|
-
<xsl:
|
512
|
-
<xsl:with-param name="key">annex</xsl:with-param>
|
513
|
-
</xsl:call-template>
|
518
|
+
<xsl:value-of select="$i18n_annex"/>
|
514
519
|
<xsl:text> </xsl:text>
|
515
520
|
<xsl:value-of select="$annexid"/>
|
516
521
|
</fo:block>
|
@@ -611,9 +616,7 @@
|
|
611
616
|
<!-- Example: Annex F1 - ... -->
|
612
617
|
<xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = $lang]">
|
613
618
|
<fo:block font-size="18pt" margin-top="3mm" role="H1">
|
614
|
-
<xsl:
|
615
|
-
<xsl:with-param name="key">annex</xsl:with-param>
|
616
|
-
</xsl:call-template>
|
619
|
+
<xsl:value-of select="$i18n_annex"/>
|
617
620
|
<xsl:text> </xsl:text>
|
618
621
|
<xsl:value-of select="$annexid"/>
|
619
622
|
<xsl:value-of select="$en_dash_separator"/>
|
@@ -824,14 +827,10 @@
|
|
824
827
|
<xsl:attribute name="font-style">normal</xsl:attribute>
|
825
828
|
</xsl:if>
|
826
829
|
<fo:block>
|
827
|
-
<xsl:
|
828
|
-
<xsl:with-param name="key">annex_to_itu_ob</xsl:with-param>
|
829
|
-
</xsl:call-template>
|
830
|
+
<xsl:value-of select="$i18n_annex_to_itu_ob"/>
|
830
831
|
</fo:block>
|
831
832
|
<fo:block>
|
832
|
-
<xsl:
|
833
|
-
<xsl:with-param name="key">number_abbrev</xsl:with-param>
|
834
|
-
</xsl:call-template>
|
833
|
+
<xsl:value-of select="$i18n_number_abbrev"/>
|
835
834
|
<xsl:value-of select="/*/itu:bibdata/itu:docnumber"/>
|
836
835
|
<xsl:text> – </xsl:text>
|
837
836
|
<xsl:value-of select="translate(normalize-space(/*/itu:bibdata/itu:date[@type='published' and @format]),' ','')"/>
|
@@ -849,30 +848,17 @@
|
|
849
848
|
<xsl:copy-of select="$Image-ITU-Globe-Logo"/>
|
850
849
|
</fo:instream-foreign-object>
|
851
850
|
</fo:inline>
|
852
|
-
<xsl:
|
853
|
-
<xsl:call-template name="getLocalizedString">
|
854
|
-
<xsl:with-param name="key">international_telecommunication_union</xsl:with-param>
|
855
|
-
</xsl:call-template>
|
856
|
-
</xsl:variable>
|
857
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($itu_name))"/>
|
851
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($i18n_international_telecommunication_union))"/>
|
858
852
|
</fo:block>
|
859
853
|
</fo:block>
|
860
854
|
<fo:block-container margin-left="10mm">
|
861
855
|
<fo:block-container margin-left="0mm">
|
862
856
|
|
863
857
|
<fo:block font-size="20pt" font-weight="bold" space-before="30mm">
|
864
|
-
<xsl:
|
865
|
-
<xsl:with-param name="key">tsb</xsl:with-param>
|
866
|
-
</xsl:call-template>
|
858
|
+
<xsl:value-of select="$i18n_tsb"/>
|
867
859
|
</fo:block>
|
868
860
|
<fo:block font-size="14pt" font-weight="bold">
|
869
|
-
<xsl:
|
870
|
-
<xsl:call-template name="getLocalizedString">
|
871
|
-
<xsl:with-param name="key">tsb_full</xsl:with-param>
|
872
|
-
<xsl:with-param name="formatted">true</xsl:with-param>
|
873
|
-
</xsl:call-template>
|
874
|
-
</xsl:variable>
|
875
|
-
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($tsb_full))"/>
|
861
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($i18n_tsb_full))"/>
|
876
862
|
</fo:block>
|
877
863
|
<fo:block-container height="20mm" display-align="center" width="90%">
|
878
864
|
<fo:block font-weight="bold">
|
@@ -968,14 +954,9 @@
|
|
968
954
|
</fo:block-container>
|
969
955
|
|
970
956
|
<fo:block space-before="25mm" font-weight="bold">
|
971
|
-
<xsl:variable name="placedate">
|
972
|
-
<xsl:call-template name="getLocalizedString">
|
973
|
-
<xsl:with-param name="key">placedate</xsl:with-param>
|
974
|
-
</xsl:call-template>
|
975
|
-
</xsl:variable>
|
976
957
|
<xsl:variable name="year" select="substring(/*/itu:bibdata/itu:date[@type = 'published']/itu:on,1,4)"/>
|
977
958
|
<xsl:if test="normalize-space($year) != ''">
|
978
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
959
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($i18n_placedate),'%',$year)"/>
|
979
960
|
</xsl:if>
|
980
961
|
</fo:block>
|
981
962
|
</fo:flow>
|
@@ -1038,7 +1019,7 @@
|
|
1038
1019
|
</fo:block-container>
|
1039
1020
|
</fo:table-cell>
|
1040
1021
|
</fo:table-row>
|
1041
|
-
<fo:table-row
|
1022
|
+
<fo:table-row>
|
1042
1023
|
<fo:table-cell>
|
1043
1024
|
<fo:block> </fo:block>
|
1044
1025
|
</fo:table-cell>
|
@@ -1068,14 +1049,7 @@
|
|
1068
1049
|
<xsl:when test="$doctype = 'resolution'"/>
|
1069
1050
|
<xsl:when test="$doctype = 'recommendation-supplement'">
|
1070
1051
|
<!-- Series L -->
|
1071
|
-
<xsl:
|
1072
|
-
<xsl:call-template name="getLocalizedString">
|
1073
|
-
<xsl:with-param name="key">series</xsl:with-param>
|
1074
|
-
</xsl:call-template>
|
1075
|
-
</xsl:variable>
|
1076
|
-
<xsl:call-template name="capitalize">
|
1077
|
-
<xsl:with-param name="str" select="$title-series"/>
|
1078
|
-
</xsl:call-template>
|
1052
|
+
<xsl:value-of select="$i18n_series_Capitalized"/>
|
1079
1053
|
<xsl:text> </xsl:text>
|
1080
1054
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:series[@type='main']/itu:title[@type='abbrev']"/>
|
1081
1055
|
<!-- Ex. Supplement 37 -->
|
@@ -1112,11 +1086,7 @@
|
|
1112
1086
|
<fo:block-container>
|
1113
1087
|
<xsl:call-template name="setWritingMode"/>
|
1114
1088
|
<fo:block font-size="18pt" font-weight="bold">
|
1115
|
-
<xsl:
|
1116
|
-
<xsl:with-param name="key">annex</xsl:with-param>
|
1117
|
-
</xsl:call-template>
|
1118
|
-
<xsl:text> </xsl:text>
|
1119
|
-
<xsl:value-of select="$annexid"/>
|
1089
|
+
<xsl:value-of select="concat($i18n_annex, ' ', $annexid)"/>
|
1120
1090
|
</fo:block>
|
1121
1091
|
</fo:block-container>
|
1122
1092
|
</xsl:if>
|
@@ -1137,7 +1107,7 @@
|
|
1137
1107
|
</fo:block-container>
|
1138
1108
|
</xsl:if>
|
1139
1109
|
</xsl:variable>
|
1140
|
-
<fo:table-row height="17.2mm"
|
1110
|
+
<fo:table-row height="17.2mm">
|
1141
1111
|
<fo:table-cell>
|
1142
1112
|
<fo:block> </fo:block>
|
1143
1113
|
</fo:table-cell>
|
@@ -1175,7 +1145,7 @@
|
|
1175
1145
|
</fo:table-cell>
|
1176
1146
|
</fo:table-row>
|
1177
1147
|
<xsl:variable name="countAdditionalNumbers" select="count(xalan:nodeset($additionalNumbers)/*)"/>
|
1178
|
-
<fo:table-row height="64mm"
|
1148
|
+
<fo:table-row height="64mm"> <!-- 59mm -->
|
1179
1149
|
<xsl:if test="$countAdditionalNumbers != 0">
|
1180
1150
|
<xsl:attribute name="height"><xsl:value-of select="64 - $countAdditionalNumbers * 5"/>mm</xsl:attribute>
|
1181
1151
|
</xsl:if>
|
@@ -1210,7 +1180,7 @@
|
|
1210
1180
|
</fo:block-container>
|
1211
1181
|
</fo:table-cell>
|
1212
1182
|
</fo:table-row>
|
1213
|
-
<fo:table-row height="40mm"
|
1183
|
+
<fo:table-row height="40mm">
|
1214
1184
|
<fo:table-cell>
|
1215
1185
|
<fo:block> </fo:block>
|
1216
1186
|
</fo:table-cell>
|
@@ -1263,7 +1233,7 @@
|
|
1263
1233
|
</fo:block-container>
|
1264
1234
|
</fo:table-cell>
|
1265
1235
|
</fo:table-row>
|
1266
|
-
<fo:table-row height="40mm"
|
1236
|
+
<fo:table-row height="40mm">
|
1267
1237
|
<fo:table-cell>
|
1268
1238
|
<fo:block> </fo:block>
|
1269
1239
|
</fo:table-cell>
|
@@ -1284,7 +1254,7 @@
|
|
1284
1254
|
</fo:block-container>
|
1285
1255
|
</fo:table-cell>
|
1286
1256
|
</fo:table-row>
|
1287
|
-
<fo:table-row height="25mm"
|
1257
|
+
<fo:table-row height="25mm">
|
1288
1258
|
<fo:table-cell>
|
1289
1259
|
<fo:block> </fo:block>
|
1290
1260
|
</fo:table-cell>
|
@@ -1343,12 +1313,7 @@
|
|
1343
1313
|
</xsl:choose>
|
1344
1314
|
|
1345
1315
|
<xsl:if test="$annexid != ''">
|
1346
|
-
<xsl:
|
1347
|
-
<xsl:call-template name="getLocalizedString">
|
1348
|
-
<xsl:with-param name="key">annex</xsl:with-param>
|
1349
|
-
</xsl:call-template>
|
1350
|
-
<xsl:text> </xsl:text>
|
1351
|
-
<xsl:value-of select="$annexid"/>
|
1316
|
+
<xsl:value-of select="concat(' — ', $i18n_annex, ' ', $annexid)"/>
|
1352
1317
|
</xsl:if>
|
1353
1318
|
</fo:block>
|
1354
1319
|
</fo:block-container>
|
@@ -1418,9 +1383,7 @@
|
|
1418
1383
|
<xsl:value-of select="$linebreak"/>
|
1419
1384
|
</fo:block>
|
1420
1385
|
<fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt">
|
1421
|
-
<xsl:
|
1422
|
-
<xsl:with-param name="key">keywords</xsl:with-param>
|
1423
|
-
</xsl:call-template>
|
1386
|
+
<xsl:value-of select="$i18n_keywords"/>
|
1424
1387
|
</fo:block>
|
1425
1388
|
<fo:block>
|
1426
1389
|
<xsl:call-template name="insertKeywords"/>
|
@@ -1603,9 +1566,7 @@
|
|
1603
1566
|
<xsl:if test="$series_title != ''">
|
1604
1567
|
<!-- Series -->
|
1605
1568
|
<fo:inline text-transform="uppercase">
|
1606
|
-
<xsl:
|
1607
|
-
<xsl:with-param name="key">series</xsl:with-param>
|
1608
|
-
</xsl:call-template>
|
1569
|
+
<xsl:value-of select="$i18n_series"/>
|
1609
1570
|
</fo:inline>
|
1610
1571
|
<xsl:text> </xsl:text>
|
1611
1572
|
<xsl:value-of select="$series_title"/>
|
@@ -1714,9 +1675,7 @@
|
|
1714
1675
|
<xsl:with-param name="title" select="$title-list-tables"/>
|
1715
1676
|
</xsl:call-template>
|
1716
1677
|
<fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
|
1717
|
-
<xsl:
|
1718
|
-
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
1719
|
-
</xsl:call-template>
|
1678
|
+
<xsl:value-of select="$i18n_page"/>
|
1720
1679
|
</fo:block>
|
1721
1680
|
<fo:block-container>
|
1722
1681
|
<xsl:for-each select="$contents//tables/table">
|
@@ -1731,9 +1690,7 @@
|
|
1731
1690
|
<xsl:with-param name="title" select="$title-list-figures"/>
|
1732
1691
|
</xsl:call-template>
|
1733
1692
|
<fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
|
1734
|
-
<xsl:
|
1735
|
-
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
1736
|
-
</xsl:call-template>
|
1693
|
+
<xsl:value-of select="$i18n_page"/>
|
1737
1694
|
</fo:block>
|
1738
1695
|
<fo:block-container>
|
1739
1696
|
<xsl:for-each select="$contents//figures/figure">
|
@@ -1757,9 +1714,7 @@
|
|
1757
1714
|
<xsl:apply-templates/>
|
1758
1715
|
</fo:block>
|
1759
1716
|
<fo:block margin-top="6pt" text-align="end" font-weight="bold">
|
1760
|
-
<xsl:
|
1761
|
-
<xsl:with-param name="key">Page.sg</xsl:with-param>
|
1762
|
-
</xsl:call-template>
|
1717
|
+
<xsl:value-of select="$i18n_page"/>
|
1763
1718
|
</fo:block>
|
1764
1719
|
</xsl:template>
|
1765
1720
|
|
@@ -3021,6 +2976,7 @@
|
|
3021
2976
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
3022
2977
|
<xsl:variable name="hair_space"> </xsl:variable>
|
3023
2978
|
<xsl:variable name="en_dash">–</xsl:variable>
|
2979
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
3024
2980
|
|
3025
2981
|
<xsl:template name="getTitle">
|
3026
2982
|
<xsl:param name="name"/>
|
@@ -3335,6 +3291,10 @@
|
|
3335
3291
|
|
3336
3292
|
</xsl:attribute-set> <!-- example-name-style -->
|
3337
3293
|
|
3294
|
+
<xsl:template name="refine_example-name-style">
|
3295
|
+
|
3296
|
+
</xsl:template>
|
3297
|
+
|
3338
3298
|
<xsl:attribute-set name="example-p-style">
|
3339
3299
|
|
3340
3300
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -3351,6 +3311,10 @@
|
|
3351
3311
|
|
3352
3312
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
3353
3313
|
|
3314
|
+
<xsl:template name="refine_termexample-name-style">
|
3315
|
+
|
3316
|
+
</xsl:template>
|
3317
|
+
|
3354
3318
|
<!-- ========================== -->
|
3355
3319
|
<!-- Table styles -->
|
3356
3320
|
<!-- ========================== -->
|
@@ -3554,6 +3518,10 @@
|
|
3554
3518
|
|
3555
3519
|
</xsl:attribute-set> <!-- table-fn-style -->
|
3556
3520
|
|
3521
|
+
<xsl:template name="refine_table-fn-style">
|
3522
|
+
|
3523
|
+
</xsl:template>
|
3524
|
+
|
3557
3525
|
<xsl:attribute-set name="table-fn-number-style">
|
3558
3526
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3559
3527
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -3564,6 +3532,10 @@
|
|
3564
3532
|
|
3565
3533
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
3566
3534
|
|
3535
|
+
<xsl:template name="refine_table-fn-number-style">
|
3536
|
+
|
3537
|
+
</xsl:template>
|
3538
|
+
|
3567
3539
|
<xsl:attribute-set name="fn-container-body-style">
|
3568
3540
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
3569
3541
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -4896,6 +4868,7 @@
|
|
4896
4868
|
<!-- centered table when table name is centered (see table-name-style) -->
|
4897
4869
|
|
4898
4870
|
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
|
4871
|
+
|
4899
4872
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
4900
4873
|
<fo:table-column column-width="{@width}"/>
|
4901
4874
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
@@ -5951,8 +5924,9 @@
|
|
5951
5924
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
5952
5925
|
|
5953
5926
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
5954
|
-
|
5927
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
5955
5928
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
5929
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
5956
5930
|
|
5957
5931
|
<xsl:value-of select="@reference"/>
|
5958
5932
|
|
@@ -7142,11 +7116,16 @@
|
|
7142
7116
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
7143
7117
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
7144
7118
|
<xsl:variable name="text" select="."/>
|
7145
|
-
<
|
7119
|
+
<xsl:variable name="ratio_">
|
7120
|
+
0.75
|
7121
|
+
</xsl:variable>
|
7122
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
7123
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
7146
7124
|
<xsl:if test="string-length($text) > 0">
|
7147
7125
|
<xsl:variable name="smallCapsText">
|
7148
7126
|
<xsl:call-template name="recursiveSmallCaps">
|
7149
7127
|
<xsl:with-param name="text" select="$text"/>
|
7128
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
7150
7129
|
</xsl:call-template>
|
7151
7130
|
</xsl:variable>
|
7152
7131
|
<!-- merge neighboring fo:inline -->
|
@@ -7183,12 +7162,13 @@
|
|
7183
7162
|
|
7184
7163
|
<xsl:template name="recursiveSmallCaps">
|
7185
7164
|
<xsl:param name="text"/>
|
7165
|
+
<xsl:param name="ratio"/>
|
7186
7166
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
7187
7167
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
7188
7168
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
7189
7169
|
<xsl:choose>
|
7190
7170
|
<xsl:when test="$char=$upperCase">
|
7191
|
-
<fo:inline font-size="{100 div
|
7171
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
7192
7172
|
<xsl:value-of select="$upperCase"/>
|
7193
7173
|
</fo:inline>
|
7194
7174
|
</xsl:when>
|
@@ -7199,6 +7179,7 @@
|
|
7199
7179
|
<xsl:if test="string-length($text) > 1">
|
7200
7180
|
<xsl:call-template name="recursiveSmallCaps">
|
7201
7181
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
7182
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
7202
7183
|
</xsl:call-template>
|
7203
7184
|
</xsl:if>
|
7204
7185
|
</xsl:template>
|
@@ -7235,6 +7216,9 @@
|
|
7235
7216
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
7236
7217
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
7237
7218
|
</xsl:if>
|
7219
|
+
<xsl:if test="$key = 'text-indent'">
|
7220
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
7221
|
+
</xsl:if>
|
7238
7222
|
</xsl:for-each>
|
7239
7223
|
</xsl:variable>
|
7240
7224
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -8637,6 +8621,11 @@
|
|
8637
8621
|
</xsl:call-template>
|
8638
8622
|
</xsl:template>
|
8639
8623
|
|
8624
|
+
<!-- command between two xref points to non-standard bibitem -->
|
8625
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
|
8626
|
+
<xsl:value-of select="."/>
|
8627
|
+
</xsl:template>
|
8628
|
+
|
8640
8629
|
<!-- ====== -->
|
8641
8630
|
<!-- formula -->
|
8642
8631
|
<!-- ====== -->
|
@@ -9346,6 +9335,8 @@
|
|
9346
9335
|
</xsl:attribute>
|
9347
9336
|
</xsl:template>
|
9348
9337
|
|
9338
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
9339
|
+
|
9349
9340
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
9350
9341
|
<xsl:copy>
|
9351
9342
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -9364,7 +9355,8 @@
|
|
9364
9355
|
|
9365
9356
|
<xsl:attribute name="width">
|
9366
9357
|
<xsl:choose>
|
9367
|
-
|
9358
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
9359
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
9368
9360
|
<xsl:when test="$width != ''">
|
9369
9361
|
<xsl:value-of select="round($width)"/>
|
9370
9362
|
</xsl:when>
|
@@ -9373,7 +9365,8 @@
|
|
9373
9365
|
</xsl:attribute>
|
9374
9366
|
<xsl:attribute name="height">
|
9375
9367
|
<xsl:choose>
|
9376
|
-
|
9368
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
9369
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
9377
9370
|
<xsl:when test="$height != ''">
|
9378
9371
|
<xsl:value-of select="round($height)"/>
|
9379
9372
|
</xsl:when>
|
@@ -9390,7 +9383,7 @@
|
|
9390
9383
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
9391
9384
|
<xsl:attribute name="width">
|
9392
9385
|
<xsl:choose>
|
9393
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
9386
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
9394
9387
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
9395
9388
|
</xsl:choose>
|
9396
9389
|
</xsl:attribute>
|
@@ -9401,7 +9394,7 @@
|
|
9401
9394
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
9402
9395
|
<xsl:attribute name="height">
|
9403
9396
|
<xsl:choose>
|
9404
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
9397
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
9405
9398
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
9406
9399
|
</xsl:choose>
|
9407
9400
|
</xsl:attribute>
|
@@ -10864,6 +10857,7 @@
|
|
10864
10857
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
10865
10858
|
<xsl:if test="normalize-space() != ''">
|
10866
10859
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
10860
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
10867
10861
|
<xsl:apply-templates/>
|
10868
10862
|
</fo:inline>
|
10869
10863
|
</xsl:if>
|
@@ -11014,6 +11008,7 @@
|
|
11014
11008
|
</xsl:when>
|
11015
11009
|
<xsl:otherwise>
|
11016
11010
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
11011
|
+
<xsl:call-template name="refine_example-name-style"/>
|
11017
11012
|
<xsl:apply-templates/>
|
11018
11013
|
</fo:inline>
|
11019
11014
|
</xsl:otherwise>
|
@@ -12227,6 +12222,7 @@
|
|
12227
12222
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
12228
12223
|
|
12229
12224
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
12225
|
+
|
12230
12226
|
<xsl:call-template name="processBibitem"/>
|
12231
12227
|
</fo:block>
|
12232
12228
|
|
@@ -12247,6 +12243,7 @@
|
|
12247
12243
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
12248
12244
|
<xsl:otherwise>
|
12249
12245
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
12246
|
+
|
12250
12247
|
<fo:list-item-label end-indent="label-end()">
|
12251
12248
|
<fo:block role="SKIP">
|
12252
12249
|
<fo:inline role="SKIP">
|
@@ -14061,4 +14058,6 @@
|
|
14061
14058
|
</xsl:if>
|
14062
14059
|
</xsl:template>
|
14063
14060
|
|
14061
|
+
<!-- update -->
|
14062
|
+
|
14064
14063
|
</xsl:stylesheet>
|