metanorma-iso 2.0.5 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/iso/base_convert.rb +3 -3
  3. data/lib/isodoc/iso/html/header-dis.html +391 -0
  4. data/lib/isodoc/iso/html/header.html +42 -33
  5. data/lib/isodoc/iso/html/isodoc-dis.css +4524 -0
  6. data/lib/isodoc/iso/html/isodoc-dis.scss +4289 -0
  7. data/lib/isodoc/iso/html/isodoc.css +9 -7
  8. data/lib/isodoc/iso/html/isodoc.scss +7 -5
  9. data/lib/isodoc/iso/html/style-human.css +0 -1
  10. data/lib/isodoc/iso/html/style-human.scss +0 -1
  11. data/lib/isodoc/iso/html/style-iso.css +0 -1
  12. data/lib/isodoc/iso/html/style-iso.scss +0 -1
  13. data/lib/isodoc/iso/html/word_iso_intro-dis.html +7 -0
  14. data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +51 -0
  15. data/lib/isodoc/iso/html/word_iso_titlepage.html +12 -11
  16. data/lib/isodoc/iso/html/wordstyle-dis.css +2160 -0
  17. data/lib/isodoc/iso/html/wordstyle-dis.scss +2011 -0
  18. data/lib/isodoc/iso/html/wordstyle.css +26 -19
  19. data/lib/isodoc/iso/html/wordstyle.scss +32 -25
  20. data/lib/isodoc/iso/i18n-en.yaml +2 -2
  21. data/lib/isodoc/iso/i18n-fr.yaml +2 -2
  22. data/lib/isodoc/iso/i18n-ru.yaml +2 -2
  23. data/lib/isodoc/iso/i18n-zh-Hans.yaml +2 -2
  24. data/lib/isodoc/iso/index.rb +7 -4
  25. data/lib/isodoc/iso/iso.amendment.xsl +111 -28
  26. data/lib/isodoc/iso/iso.international-standard.xsl +111 -28
  27. data/lib/isodoc/iso/metadata.rb +5 -12
  28. data/lib/isodoc/iso/sts_convert.rb +8 -3
  29. data/lib/isodoc/iso/word_convert.rb +12 -0
  30. data/lib/metanorma/iso/boilerplate-fr.xml +5 -6
  31. data/lib/metanorma/iso/boilerplate-ru.xml +4 -6
  32. data/lib/metanorma/iso/boilerplate.xml +5 -6
  33. data/lib/metanorma/iso/cleanup.rb +8 -2
  34. data/lib/metanorma/iso/front_id.rb +1 -0
  35. data/lib/metanorma/iso/validate_list.rb +20 -5
  36. data/lib/metanorma/iso/version.rb +1 -1
  37. data/metanorma-iso.gemspec +1 -1
  38. data/spec/isodoc/ref_spec.rb +11 -7
  39. data/spec/metanorma/amd_spec.rb +6 -7
  40. data/spec/metanorma/base_spec.rb +0 -1
  41. data/spec/metanorma/cleanup_spec.rb +10 -10
  42. data/spec/metanorma/refs_spec.rb +85 -144
  43. data/spec/metanorma/section_spec.rb +15 -18
  44. data/spec/metanorma/validate_spec.rb +46 -25
  45. data/spec/spec_helper.rb +2 -2
  46. data/spec/vcr_cassettes/docrels.yml +37 -45
  47. data/spec/vcr_cassettes/withdrawn_iso.yml +31 -37
  48. metadata +12 -5
@@ -383,7 +383,7 @@ h1.Annex {
383
383
  font-size: {{normalfontsize}};
384
384
  font-weight: normal;
385
385
  {% else %}
386
- font-size: 13.0pt;
386
+ font-size: 11.0pt;
387
387
  font-weight: bold;
388
388
  {% endif %}
389
389
  mso-bidi-font-size: {{normalfontsize}};
@@ -421,7 +421,7 @@ h2 {
421
421
  font-size: {{normalfontsize}};
422
422
  font-weight: normal;
423
423
  {% else %}
424
- font-size: 13.0pt;
424
+ font-size: 11.0pt;
425
425
  font-weight: bold;
426
426
  {% endif %}
427
427
  font-family: {{headerfont}};
@@ -1199,13 +1199,14 @@ p.TOCTitle, li.TOCTitle, div.TOCTitle {
1199
1199
  mso-facing-pages: yes; }
1200
1200
 
1201
1201
  @page WordSection1 {
1202
- size: 595.0pt 842.0pt;
1203
- margin: 72.0pt 90.0pt 72.0pt 90.0pt;
1204
- mso-header-margin: 35.4pt;
1205
- mso-footer-margin: 35.4pt;
1202
+ size: 595.3pt 841.9pt;
1203
+ margin: 39.7pt 36.85pt 14.2pt 42.55pt;
1204
+ mso-header-margin: 35.45pt;
1205
+ mso-footer-margin: 0cm;
1206
+ mso-gutter-margin: 1.0cm;
1206
1207
  mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eha;
1207
- mso-header: url("file:///C:/Doc/FILENAME_files/header.html") ha;
1208
1208
  mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html") efa;
1209
+ mso-footer: url("file:///C:/Doc/FILENAME_files/header.html") fa;
1209
1210
  mso-paper-source: 0; }
1210
1211
 
1211
1212
  div.WordSection1 {
@@ -1213,9 +1214,10 @@ div.WordSection1 {
1213
1214
 
1214
1215
  @page WordSection2 {
1215
1216
  size: 595.3pt 841.9pt;
1216
- margin: 39.7pt 53.85pt 1.0cm 53.85pt;
1217
+ margin: 39.7pt 36.85pt 14.2pt 42.55pt;
1217
1218
  mso-header-margin: 35.45pt;
1218
- mso-footer-margin: 14.2pt;
1219
+ mso-footer-margin: 0cm;
1220
+ mso-gutter-margin: 1.0cm;
1219
1221
  mso-page-numbers: roman-lower;
1220
1222
  mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1221
1223
  mso-header: url("file:///C:/Doc/FILENAME_files/header.html") h2;
@@ -1225,9 +1227,10 @@ div.WordSection1 {
1225
1227
 
1226
1228
  @page WordSection2L {
1227
1229
  size: 841.9pt 595.3pt;
1228
- margin: 39.7pt 53.85pt 1.0cm 53.85pt;
1230
+ margin: 39.7pt 36.85pt 14.2pt 42.55pt;
1229
1231
  mso-header-margin: 35.45pt;
1230
- mso-footer-margin: 14.2pt;
1232
+ mso-footer-margin: 0cm;
1233
+ mso-gutter-margin: 1.0cm;
1231
1234
  mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eh2l;
1232
1235
  mso-header: url("file:///C:/Doc/FILENAME_files/header.html") h2l;
1233
1236
  mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html") ef2l;
@@ -1236,9 +1239,10 @@ div.WordSection1 {
1236
1239
 
1237
1240
  @page WordSection2P {
1238
1241
  size: 595.3pt 841.9pt;
1239
- margin: 39.7pt 53.85pt 1.0cm 53.85pt;
1242
+ margin: 39.7pt 36.85pt 14.2pt 42.55pt;
1240
1243
  mso-header-margin: 35.45pt;
1241
- mso-footer-margin: 14.2pt;
1244
+ mso-footer-margin: 0cm;
1245
+ mso-gutter-margin: 1.0cm;
1242
1246
  mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1243
1247
  mso-header: url("file:///C:/Doc/FILENAME_files/header.html") h2;
1244
1248
  mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html") ef2;
@@ -1250,9 +1254,10 @@ div.WordSection2 {
1250
1254
 
1251
1255
  @page WordSection3 {
1252
1256
  size: 595.3pt 841.9pt;
1253
- margin: 39.7pt 53.85pt 1.0cm 53.85pt;
1257
+ margin: 39.7pt 36.85pt 14.2pt 42.55pt;
1254
1258
  mso-header-margin: 35.45pt;
1255
- mso-footer-margin: 14.2pt;
1259
+ mso-footer-margin: 0cm;
1260
+ mso-gutter-margin: 1.0cm;
1256
1261
  mso-page-numbers: 1;
1257
1262
  mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1258
1263
  mso-header: url("file:///C:/Doc/FILENAME_files/header.html") h2;
@@ -1262,9 +1267,10 @@ div.WordSection2 {
1262
1267
 
1263
1268
  @page WordSection3L {
1264
1269
  size: 841.9pt 595.3pt;
1265
- margin: 39.7pt 53.85pt 1.0cm 53.85pt;
1270
+ margin: 39.7pt 36.85pt 14.2pt 42.55pt;
1266
1271
  mso-header-margin: 35.45pt;
1267
- mso-footer-margin: 14.2pt;
1272
+ mso-footer-margin: 0cm;
1273
+ mso-gutter-margin: 1.0cm;
1268
1274
  mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eh2l;
1269
1275
  mso-header: url("file:///C:/Doc/FILENAME_files/header.html") h2l;
1270
1276
  mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html") ef3l;
@@ -1273,9 +1279,10 @@ div.WordSection2 {
1273
1279
 
1274
1280
  @page WordSection3P {
1275
1281
  size: 595.3pt 841.9pt;
1276
- margin: 39.7pt 53.85pt 1.0cm 53.85pt;
1282
+ margin: 39.7pt 36.85pt 14.2pt 42.55pt;
1277
1283
  mso-header-margin: 35.45pt;
1278
- mso-footer-margin: 14.2pt;
1284
+ mso-footer-margin: 0cm;
1285
+ mso-gutter-margin: 1.0cm;
1279
1286
  mso-even-header: url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1280
1287
  mso-header: url("file:///C:/Doc/FILENAME_files/header.html") h2;
1281
1288
  mso-even-footer: url("file:///C:/Doc/FILENAME_files/header.html") ef3;
@@ -361,7 +361,7 @@ h1.Annex
361
361
  font-size:$normalfontsize;
362
362
  font-weight: normal ;
363
363
  {% else %}
364
- font-size:13.0pt;
364
+ font-size:11.0pt;
365
365
  font-weight:bold;
366
366
  {% endif %}
367
367
  mso-bidi-font-size:$normalfontsize;
@@ -398,7 +398,7 @@ h2
398
398
  font-size:$normalfontsize;
399
399
  font-weight: normal ;
400
400
  {% else %}
401
- font-size:13.0pt;
401
+ font-size:11.0pt;
402
402
  font-weight:bold;
403
403
  {% endif %}
404
404
  font-family:$headerfont;
@@ -1132,21 +1132,23 @@ p.TOCTitle, li.TOCTitle, div.TOCTitle
1132
1132
  mso-facing-pages:yes;
1133
1133
  }
1134
1134
  @page WordSection1
1135
- {size:595.0pt 842.0pt;
1136
- margin:72.0pt 90.0pt 72.0pt 90.0pt;
1137
- mso-header-margin:35.4pt;
1138
- mso-footer-margin:35.4pt;
1135
+ {size:595.3pt 841.9pt;
1136
+ margin:39.7pt 36.85pt 14.2pt 42.55pt;
1137
+ mso-header-margin:35.45pt;
1138
+ mso-footer-margin:0cm;
1139
+ mso-gutter-margin:1.0cm;
1139
1140
  mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eha;
1140
- mso-header:url("file:///C:/Doc/FILENAME_files/header.html") ha;
1141
1141
  mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") efa;
1142
+ mso-footer:url("file:///C:/Doc/FILENAME_files/header.html") fa;
1142
1143
  mso-paper-source:0;}
1143
1144
  div.WordSection1
1144
1145
  {page:WordSection1;}
1145
1146
  @page WordSection2
1146
1147
  {size:595.3pt 841.9pt;
1147
- margin:39.7pt 53.85pt 1.0cm 53.85pt;
1148
- mso-header-margin:35.45pt;
1149
- mso-footer-margin:14.2pt;
1148
+ margin:39.7pt 36.85pt 14.2pt 42.55pt;
1149
+ mso-header-margin:35.45pt;
1150
+ mso-footer-margin:0cm;
1151
+ mso-gutter-margin:1.0cm;
1150
1152
  mso-page-numbers:roman-lower;
1151
1153
  mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1152
1154
  mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
@@ -1155,9 +1157,10 @@ div.WordSection1
1155
1157
  mso-paper-source:0;}
1156
1158
  @page WordSection2L
1157
1159
  {size:841.9pt 595.3pt;
1158
- margin:39.7pt 53.85pt 1.0cm 53.85pt;
1159
- mso-header-margin:35.45pt;
1160
- mso-footer-margin:14.2pt;
1160
+ margin:39.7pt 36.85pt 14.2pt 42.55pt;
1161
+ mso-header-margin:35.45pt;
1162
+ mso-footer-margin:0cm;
1163
+ mso-gutter-margin:1.0cm;
1161
1164
  mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2l;
1162
1165
  mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2l;
1163
1166
  mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef2l;
@@ -1165,9 +1168,10 @@ div.WordSection1
1165
1168
  mso-paper-source:0;}
1166
1169
  @page WordSection2P
1167
1170
  {size:595.3pt 841.9pt;
1168
- margin:39.7pt 53.85pt 1.0cm 53.85pt;
1169
- mso-header-margin:35.45pt;
1170
- mso-footer-margin:14.2pt;
1171
+ margin:39.7pt 36.85pt 14.2pt 42.55pt;
1172
+ mso-header-margin:35.45pt;
1173
+ mso-footer-margin:0cm;
1174
+ mso-gutter-margin:1.0cm;
1171
1175
  mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1172
1176
  mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
1173
1177
  mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef2;
@@ -1177,9 +1181,10 @@ div.WordSection2
1177
1181
  {page:WordSection2;}
1178
1182
  @page WordSection3
1179
1183
  {size:595.3pt 841.9pt;
1180
- margin:39.7pt 53.85pt 1.0cm 53.85pt;
1181
- mso-header-margin:35.45pt;
1182
- mso-footer-margin:14.2pt;
1184
+ margin:39.7pt 36.85pt 14.2pt 42.55pt;
1185
+ mso-header-margin:35.45pt;
1186
+ mso-footer-margin:0cm;
1187
+ mso-gutter-margin:1.0cm;
1183
1188
  mso-page-numbers:1;
1184
1189
  mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1185
1190
  mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
@@ -1188,9 +1193,10 @@ div.WordSection2
1188
1193
  mso-paper-source:0;}
1189
1194
  @page WordSection3L
1190
1195
  {size:841.9pt 595.3pt;
1191
- margin:39.7pt 53.85pt 1.0cm 53.85pt;
1192
- mso-header-margin:35.45pt;
1193
- mso-footer-margin:14.2pt;
1196
+ margin:39.7pt 36.85pt 14.2pt 42.55pt;
1197
+ mso-header-margin:35.45pt;
1198
+ mso-footer-margin:0cm;
1199
+ mso-gutter-margin:1.0cm;
1194
1200
  mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2l;
1195
1201
  mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2l;
1196
1202
  mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef3l;
@@ -1198,9 +1204,10 @@ div.WordSection2
1198
1204
  mso-paper-source:0;}
1199
1205
  @page WordSection3P
1200
1206
  {size:595.3pt 841.9pt;
1201
- margin:39.7pt 53.85pt 1.0cm 53.85pt;
1202
- mso-header-margin:35.45pt;
1203
- mso-footer-margin:14.2pt;
1207
+ margin:39.7pt 36.85pt 14.2pt 42.55pt;
1208
+ mso-header-margin:35.45pt;
1209
+ mso-footer-margin:0cm;
1210
+ mso-gutter-margin:1.0cm;
1204
1211
  mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
1205
1212
  mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
1206
1213
  mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef3;
@@ -4,9 +4,9 @@ term_def_boilerplate: |
4
4
 
5
5
  <ul>
6
6
  <li> <p>ISO Online browsing platform: available at
7
- <link target="http://www.iso.org/obp"/>.</p></li>
7
+ <link target="https://www.iso.org/obp"/></p></li>
8
8
  <li> <p>IEC Electropedia: available at
9
- <link target="http://www.electropedia.org"/>.
9
+ <link target="https://www.electropedia.org"/>
10
10
  </p> </li> </ul>
11
11
  all_rights_reserved: All rights reserved
12
12
  reference_number: Reference Number
@@ -4,9 +4,9 @@ term_def_boilerplate: |
4
4
  suivantes:</p>
5
5
  <ul>
6
6
  <li> <p>ISO Online browsing platform: disponible à l'adresse
7
- <link target="http://www.iso.org/obp"/>.</p></li>
7
+ <link target="https://www.iso.org/obp"/></p></li>
8
8
  <li> <p>IEC Electropedia: disponible à l'adresse
9
- <link target="http://www.electropedia.org"/>.
9
+ <link target="https://www.electropedia.org"/>
10
10
  </p> </li> </ul>
11
11
  all_rights_reserved: Tous droits réservés
12
12
  reference_number: Numéro de référence
@@ -3,9 +3,9 @@ term_def_boilerplate: |
3
3
 
4
4
  <ul>
5
5
  <li> <p>ИСО, Интернет-онлайн-платформа: доступна на
6
- <link target="http://www.iso.org/obp"/>.</p></li>
6
+ <link target="https://www.iso.org/obp"/></p></li>
7
7
  <li> <p>МЭК Electropedia: доступна на
8
- <link target="http://www.electropedia.org"/>.
8
+ <link target="https://www.electropedia.org"/>
9
9
  </p> </li> </ul>
10
10
  all_rights_reserved: Все права защищены
11
11
  reference_number: Ссылочный номер
@@ -2,9 +2,9 @@ term_def_boilerplate: |
2
2
  <p>ISO和IEC用于标准化的术语数据库地址如下:</p>
3
3
  <ul>
4
4
  <li> <p>ISO在线浏览平台:
5
- 位于<link target="http://www.iso.org/obp"/>。</p></li>
5
+ 位于<link target="https://www.iso.org/obp"/></p></li>
6
6
  <li> <p>IEC Electropedia:
7
- 位于<link target="http://www.electropedia.org"/>。
7
+ 位于<link target="https://www.electropedia.org"/>
8
8
  </p> </li> </ul>
9
9
  all_rights_reserved: 版权所有
10
10
  reference_number: 参考编号
@@ -94,12 +94,15 @@ module IsoDoc
94
94
  end
95
95
 
96
96
  def index_entries_see(entries, label)
97
- see_sort = entries&.dig(label)&.each_with_object({}) do |w, v|
97
+ see_sort = entries&.dig(label) or return nil
98
+
99
+ x = see_sort.each_with_object({}) do |w, v|
98
100
  v[sortable(w).downcase] = w
99
101
  end
100
- see_sort&.keys&.localize(@lang.to_sym)&.sort&.to_a&.map do |k|
101
- see_sort[k]
102
- end&.join(", ")
102
+ x.keys.localize(@lang.to_sym).sort.to_a.map do |k|
103
+ #see_sort[k]
104
+ x[k]
105
+ end.join(", ")
103
106
  end
104
107
 
105
108
  def see_lbl
@@ -1396,8 +1396,9 @@
1396
1396
  </fo:block>
1397
1397
  </xsl:when>
1398
1398
  <xsl:otherwise>
1399
+ <xsl:value-of select="$linebreak"/>
1399
1400
  <xsl:value-of select="$part-text"/>
1400
- <xsl:text> </xsl:text>
1401
+ <xsl:text> </xsl:text>
1401
1402
  </xsl:otherwise>
1402
1403
  </xsl:choose>
1403
1404
  </xsl:if>
@@ -1729,7 +1730,8 @@
1729
1730
  </xsl:when>
1730
1731
  <xsl:otherwise>
1731
1732
  <!-- <xsl:value-of select="translate(., $thin_space, ' ')"/> -->
1732
- <xsl:value-of select="."/>
1733
+ <!-- <xsl:value-of select="."/> -->
1734
+ <xsl:call-template name="text"/>
1733
1735
  </xsl:otherwise>
1734
1736
  </xsl:choose>
1735
1737
 
@@ -1939,7 +1941,7 @@
1939
1941
  </xsl:template>
1940
1942
 
1941
1943
 
1942
- <xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:key name="bibitems" match="*[local-name() = 'bibitem']" use="@id"/><xsl:key name="bibitems_hidden" match="*[local-name() = 'bibitem'][@hidden='true'] | *[local-name() = 'references'][@hidden='true']//*[local-name() = 'bibitem']" use="@id"/><xsl:variable name="lang">
1944
+ <xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:variable name="lang">
1943
1945
  <xsl:call-template name="getLang"/>
1944
1946
  </xsl:variable><xsl:variable name="pageWidth_">
1945
1947
  210
@@ -3347,8 +3349,27 @@
3347
3349
  <xsl:sort select="@displayorder" data-type="number"/>
3348
3350
  <xsl:apply-templates select="."/>
3349
3351
  </xsl:for-each>
3350
- </xsl:template><xsl:template match="text()">
3351
- <xsl:value-of select="."/>
3352
+ </xsl:template><xsl:variable name="tag_open">###fo:inline###</xsl:variable><xsl:variable name="tag_close">###/fo:inline###</xsl:variable><xsl:template match="text()" name="text">
3353
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
3354
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
3355
+ <xsl:call-template name="replace_fo_inline">
3356
+ <xsl:with-param name="text" select="$text"/>
3357
+ </xsl:call-template>
3358
+ </xsl:template><xsl:template name="replace_fo_inline">
3359
+ <xsl:param name="text"/>
3360
+ <xsl:choose>
3361
+ <xsl:when test="contains($text, $tag_open)">
3362
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
3363
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
3364
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
3365
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
3366
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
3367
+ <xsl:call-template name="replace_fo_inline">
3368
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
3369
+ </xsl:call-template>
3370
+ </xsl:when>
3371
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
3372
+ </xsl:choose>
3352
3373
  </xsl:template><xsl:template match="*[local-name()='br']">
3353
3374
  <xsl:value-of select="$linebreak"/>
3354
3375
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -6577,7 +6598,51 @@
6577
6598
  <xsl:with-param name="text" select="$text_step1"/>
6578
6599
  </xsl:call-template>
6579
6600
  </xsl:variable>
6580
- <xsl:value-of select="$text_step2"/>
6601
+
6602
+ <!-- <xsl:value-of select="$text_step2"/> -->
6603
+
6604
+ <!-- add zero-width space after space -->
6605
+ <xsl:variable name="text_step3" select="java:replaceAll(java:java.lang.String.new($text_step2),' ',' ​')"/>
6606
+
6607
+ <!-- split text by zero-width space -->
6608
+ <xsl:variable name="text_step4">
6609
+ <xsl:call-template name="split">
6610
+ <xsl:with-param name="pText" select="$text_step3"/>
6611
+ <xsl:with-param name="sep" select="$zero_width_space"/>
6612
+ <xsl:with-param name="normalize-space">false</xsl:with-param>
6613
+ <xsl:with-param name="keep_sep">true</xsl:with-param>
6614
+ </xsl:call-template>
6615
+ </xsl:variable>
6616
+
6617
+ <xsl:for-each select="xalan:nodeset($text_step4)/item">
6618
+ <xsl:choose>
6619
+ <xsl:when test="string-length() &gt; 30"> <!-- word with length more than 30 will be interspersed with zero-width space -->
6620
+ <xsl:call-template name="interspers">
6621
+ <xsl:with-param name="str" select="."/>
6622
+ </xsl:call-template>
6623
+ </xsl:when>
6624
+ <xsl:otherwise>
6625
+ <xsl:value-of select="."/>
6626
+ </xsl:otherwise>
6627
+ </xsl:choose>
6628
+ </xsl:for-each>
6629
+
6630
+ </xsl:template><xsl:template name="interspers">
6631
+ <xsl:param name="str"/>
6632
+ <xsl:param name="char" select="$zero_width_space"/>
6633
+ <xsl:if test="$str != ''">
6634
+ <xsl:value-of select="substring($str, 1, 1)"/>
6635
+
6636
+ <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
6637
+ <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
6638
+ <xsl:value-of select="$char"/>
6639
+ </xsl:if>
6640
+
6641
+ <xsl:call-template name="interspers">
6642
+ <xsl:with-param name="str" select="substring($str, 2)"/>
6643
+ <xsl:with-param name="char" select="$char"/>
6644
+ </xsl:call-template>
6645
+ </xsl:if>
6581
6646
  </xsl:template><xsl:template match="*" mode="syntax_highlight">
6582
6647
  <xsl:apply-templates mode="syntax_highlight"/>
6583
6648
  </xsl:template><xsl:variable name="syntax_highlight_styles_">
@@ -6958,7 +7023,7 @@
6958
7023
  <xsl:variable name="element">
6959
7024
 
6960
7025
  <xsl:choose>
6961
- <xsl:when test="$num = 1">inline</xsl:when>
7026
+ <xsl:when test="$num = 1 and not(contains($fo_element, 'block'))">inline</xsl:when>
6962
7027
  <xsl:otherwise>block</xsl:otherwise>
6963
7028
  </xsl:choose>
6964
7029
 
@@ -7050,7 +7115,8 @@
7050
7115
  <fo:inline><xsl:apply-templates/></fo:inline>
7051
7116
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
7052
7117
  <xsl:if test="normalize-space() != ''">
7053
- <xsl:value-of select="."/>
7118
+ <!-- <xsl:value-of select="."/> -->
7119
+ <xsl:call-template name="text"/>
7054
7120
  </xsl:if>
7055
7121
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
7056
7122
  <fo:block-container margin-left="0mm">
@@ -7090,11 +7156,24 @@
7090
7156
  </xsl:template><xsl:template match="*[local-name() = 'author']">
7091
7157
  <xsl:text>— </xsl:text>
7092
7158
  <xsl:apply-templates/>
7093
- </xsl:template><xsl:template match="*[local-name() = 'eref']">
7159
+ </xsl:template><xsl:variable name="bibitems_">
7160
+ <xsl:for-each select="//*[local-name() = 'bibitem']">
7161
+ <xsl:copy-of select="."/>
7162
+ </xsl:for-each>
7163
+ </xsl:variable><xsl:variable name="bibitems" select="xalan:nodeset($bibitems_)"/><xsl:variable name="bibitems_hidden_">
7164
+ <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
7165
+ <xsl:copy-of select="."/>
7166
+ </xsl:for-each>
7167
+ <xsl:for-each select="//*[local-name() = 'references'][@hidden='true']//*[local-name() = 'bibitem']">
7168
+ <xsl:copy-of select="."/>
7169
+ </xsl:for-each>
7170
+ </xsl:variable><xsl:variable name="bibitems_hidden" select="xalan:nodeset($bibitems_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
7094
7171
  <xsl:variable name="current_bibitemid" select="@bibitemid"/>
7095
- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/>
7172
+ <!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
7173
+ <xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
7096
7174
  <xsl:choose>
7097
- <xsl:when test="$external-destination != '' or not(key('bibitems_hidden', $current_bibitemid))"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
7175
+ <!-- <xsl:when test="$external-destination != '' or not(key('bibitems_hidden', $current_bibitemid))"> --> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
7176
+ <xsl:when test="$external-destination != '' or not($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid])"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
7098
7177
  <fo:inline xsl:use-attribute-sets="eref-style">
7099
7178
  <xsl:if test="@type = 'footnote'">
7100
7179
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
@@ -8201,7 +8280,7 @@
8201
8280
  <xsl:copy>
8202
8281
  <xsl:copy-of select="@*"/>
8203
8282
  <!-- copy all elements from bibliography except 'Normative references' (moved to 'sections') -->
8204
- <xsl:for-each select="*[not(@normative='true') and not(*[*[@normative='true']])]">
8283
+ <xsl:for-each select="*[not(@normative='true') and not(*[@normative='true'])]">
8205
8284
  <xsl:sort select="@displayorder" data-type="number"/>
8206
8285
  <xsl:apply-templates select="." mode="update_xml_step1"/>
8207
8286
  </xsl:for-each>
@@ -8240,7 +8319,8 @@
8240
8319
  <xsl:variable name="position"><xsl:number count="*[local-name() = $local_name][@bibitemid = $bibitemid]" level="any"/></xsl:variable>
8241
8320
  <xsl:if test="normalize-space($position) = '1'">
8242
8321
  <xsl:variable name="fn_text">
8243
- <xsl:copy-of select="key('bibitems', $bibitemid)[1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()"/>
8322
+ <!-- <xsl:copy-of select="key('bibitems', $bibitemid)[1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()" /> -->
8323
+ <xsl:copy-of select="$bibitems/*[local-name() ='bibitem'][@id = $bibitemid][1]/*[local-name() = 'note'][not(@type='Unpublished-Status')][normalize-space() = $localized_string_withdrawn or starts-with(normalize-space(), $localized_string_cancelled_and_replaced)]/node()"/>
8244
8324
  </xsl:variable>
8245
8325
  <xsl:if test="normalize-space($fn_text) != ''">
8246
8326
  <xsl:element name="fn" namespace="{$namespace_full}">
@@ -8511,22 +8591,25 @@
8511
8591
  <xsl:param name="pText" select="."/>
8512
8592
  <xsl:param name="sep" select="','"/>
8513
8593
  <xsl:param name="normalize-space" select="'true'"/>
8594
+ <xsl:param name="keep_sep" select="'false'"/>
8514
8595
  <xsl:if test="string-length($pText) &gt;0">
8515
- <item>
8516
- <xsl:choose>
8517
- <xsl:when test="$normalize-space = 'true'">
8518
- <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
8519
- </xsl:when>
8520
- <xsl:otherwise>
8521
- <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
8522
- </xsl:otherwise>
8523
- </xsl:choose>
8524
- </item>
8525
- <xsl:call-template name="split">
8526
- <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
8527
- <xsl:with-param name="sep" select="$sep"/>
8528
- <xsl:with-param name="normalize-space" select="$normalize-space"/>
8529
- </xsl:call-template>
8596
+ <item>
8597
+ <xsl:choose>
8598
+ <xsl:when test="$normalize-space = 'true'">
8599
+ <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
8600
+ </xsl:when>
8601
+ <xsl:otherwise>
8602
+ <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
8603
+ </xsl:otherwise>
8604
+ </xsl:choose>
8605
+ </item>
8606
+ <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
8607
+ <xsl:call-template name="split">
8608
+ <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
8609
+ <xsl:with-param name="sep" select="$sep"/>
8610
+ <xsl:with-param name="normalize-space" select="$normalize-space"/>
8611
+ <xsl:with-param name="keep_sep" select="$keep_sep"/>
8612
+ </xsl:call-template>
8530
8613
  </xsl:if>
8531
8614
  </xsl:template><xsl:template name="getDocumentId">
8532
8615
  <xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>