metanorma-iho 0.5.6 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,13 @@
33
33
  <xsl:template match="/">
34
34
 
35
35
  <xsl:variable name="xslfo">
36
- <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
36
+ <fo:root xml:lang="{$lang}">
37
+ <xsl:variable name="root-style">
38
+ <root-style xsl:use-attribute-sets="root-style"/>
39
+ </xsl:variable>
40
+ <xsl:call-template name="insertRootStyle">
41
+ <xsl:with-param name="root-style" select="$root-style"/>
42
+ </xsl:call-template>
37
43
  <fo:layout-master-set>
38
44
  <!-- cover page -->
39
45
  <fo:simple-page-master master-name="cover" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -129,7 +135,7 @@
129
135
  <fo:block>
130
136
  <xsl:value-of select="$docidentifier"/>
131
137
  <xsl:text> </xsl:text>
132
- <xsl:apply-templates select="/iho:iho-standard/iho:bibdata/iho:edition"/>
138
+ <xsl:apply-templates select="/iho:iho-standard/iho:bibdata/iho:edition[normalize-space(@language) = '']"/>
133
139
  </fo:block>
134
140
  </fo:block-container>
135
141
  </fo:table-cell>
@@ -457,12 +463,14 @@
457
463
 
458
464
 
459
465
  <xsl:template match="/iho:iho-standard/iho:bibdata/iho:edition">
460
- <xsl:variable name="title-edition">
461
- <xsl:call-template name="getTitle">
462
- <xsl:with-param name="name" select="'title-edition'"/>
463
- </xsl:call-template>
464
- </xsl:variable>
465
- <xsl:value-of select="$title-edition"/>
466
+ <xsl:call-template name="capitalize">
467
+ <xsl:with-param name="str">
468
+ <xsl:call-template name="getLocalizedString">
469
+ <xsl:with-param name="key">edition</xsl:with-param>
470
+ </xsl:call-template>
471
+ </xsl:with-param>
472
+ </xsl:call-template>
473
+ <xsl:text> </xsl:text>
466
474
  <xsl:apply-templates/>
467
475
  </xsl:template>
468
476
 
@@ -769,7 +777,7 @@
769
777
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAN8AAADfCAIAAAD5m5F7AAAAAXNS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e+PDbV4o0qulpKmmrKGDrAcxDo1j+v7Ai1ppbA/wM6aRlR7jxGJdIYB1BbeQkumxo6QqDfbKOiz143yp3HULz2/PdnL4UQFKYERGLSVZgVJmWJkQQIOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWOVoFPiVC5GFSboFCNlSRyrBJ0Sp3IxqjBBpxgpS+JYJeiUOJWLUYUJOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWOVoFPiVC5GFSboFCNlSRyrBJ0Sp3IxqjBBpxgpS+JYJeiUOJWLUYUJOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWOVoFPiVC5GFSboFCNlSRyrBJ0Sp3IxqjBBpxgpS+JYJeiUOJWLUYUJOsVIWRLHKkGnxKlcjCpM0ClGypI4Vgk6JU7lYlRhgk4xUpbEsUrQKXEqF6MKE3SKkbIkjlWCTolTuRhVmKBTjJQlcawSdEqcysWowgSdYqQsiWP1f5V8zYCHJlYcAAAAAElFTkSuQmCC</xsl:text>
770
778
  </xsl:variable>
771
779
 
772
- <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">
780
+ <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:param name="add_math_as_text">true</xsl:param><xsl:variable name="lang">
773
781
  <xsl:call-template name="getLang"/>
774
782
  </xsl:variable><xsl:variable name="pageWidth_">
775
783
  210
@@ -784,20 +792,7 @@
784
792
  </xsl:variable><xsl:variable name="marginTop" select="normalize-space($marginTop_)"/><xsl:variable name="marginBottom_">
785
793
  25.4
786
794
  </xsl:variable><xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/><xsl:variable name="titles_">
787
-
788
- <title-edition lang="en">
789
-
790
- <xsl:text>Edition </xsl:text>
791
-
792
- </title-edition>
793
-
794
- <title-edition lang="fr">
795
- <xsl:text>Édition </xsl:text>
796
- </title-edition>
797
795
 
798
- <title-edition lang="ru">
799
- <xsl:text>Издание </xsl:text>
800
- </title-edition>
801
796
 
802
797
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
803
798
  <title-toc lang="en">
@@ -878,7 +873,7 @@
878
873
  </xsl:variable><xsl:variable name="bibdata">
879
874
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
880
875
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
881
- </xsl:variable><xsl:variable name="linebreak">&#8232;</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:variable name="non_breaking_hyphen">‑</xsl:variable><xsl:variable name="thin_space"> </xsl:variable><xsl:variable name="zero_width_space">​</xsl:variable><xsl:variable name="en_dash">–</xsl:variable><xsl:template name="getTitle">
876
+ </xsl:variable><xsl:variable name="linebreak">&#8232;</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:variable name="non_breaking_hyphen">‑</xsl:variable><xsl:variable name="thin_space"> </xsl:variable><xsl:variable name="zero_width_space">​</xsl:variable><xsl:variable name="hair_space"> </xsl:variable><xsl:variable name="en_dash">–</xsl:variable><xsl:template name="getTitle">
882
877
  <xsl:param name="name"/>
883
878
  <xsl:param name="lang"/>
884
879
  <xsl:variable name="lang_">
@@ -921,7 +916,30 @@
921
916
 
922
917
 
923
918
 
924
- </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
919
+ </xsl:attribute-set><xsl:template name="insertRootStyle">
920
+ <xsl:param name="root-style"/>
921
+ <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
922
+
923
+ <xsl:variable name="additional_fonts_">
924
+ <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
925
+ <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
926
+ </xsl:for-each>
927
+ </xsl:variable>
928
+ <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
929
+
930
+ <xsl:for-each select="$root-style_/root-style/@*">
931
+ <xsl:choose>
932
+ <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
933
+ <xsl:attribute name="{local-name()}">
934
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
935
+ </xsl:attribute>
936
+ </xsl:when>
937
+ <xsl:otherwise>
938
+ <xsl:copy-of select="."/>
939
+ </xsl:otherwise>
940
+ </xsl:choose>
941
+ </xsl:for-each>
942
+ </xsl:template><xsl:attribute-set name="copyright-statement-style">
925
943
 
926
944
  </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
927
945
 
@@ -978,7 +996,6 @@
978
996
 
979
997
 
980
998
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
981
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
982
999
 
983
1000
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
984
1001
  <xsl:attribute name="white-space">pre</xsl:attribute>
@@ -1068,6 +1085,7 @@
1068
1085
 
1069
1086
 
1070
1087
 
1088
+
1071
1089
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1072
1090
 
1073
1091
 
@@ -1443,7 +1461,7 @@
1443
1461
 
1444
1462
 
1445
1463
 
1446
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1464
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1447
1465
 
1448
1466
 
1449
1467
 
@@ -2157,10 +2175,41 @@
2157
2175
  <xsl:sort select="@displayorder" data-type="number"/>
2158
2176
  <xsl:apply-templates select="."/>
2159
2177
  </xsl:for-each>
2160
- </xsl:template><xsl:template match="text()">
2161
- <xsl:value-of select="."/>
2178
+ </xsl:template><xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable><xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable><xsl:template match="text()" name="text">
2179
+
2180
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2181
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
2182
+ <xsl:call-template name="replace_fo_inline_tags">
2183
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2184
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2185
+ <xsl:with-param name="text" select="$text"/>
2186
+ </xsl:call-template>
2187
+
2188
+ </xsl:template><xsl:template name="replace_fo_inline_tags">
2189
+ <xsl:param name="tag_open"/>
2190
+ <xsl:param name="tag_close"/>
2191
+ <xsl:param name="text"/>
2192
+ <xsl:choose>
2193
+ <xsl:when test="contains($text, $tag_open)">
2194
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
2195
+ <!-- <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text> -->
2196
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
2197
+ <fo:inline keep-together.within-line="always">
2198
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2199
+ </fo:inline>
2200
+ <!-- <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text> -->
2201
+ <xsl:call-template name="replace_fo_inline_tags">
2202
+ <xsl:with-param name="tag_open" select="$tag_open"/>
2203
+ <xsl:with-param name="tag_close" select="$tag_close"/>
2204
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
2205
+ </xsl:call-template>
2206
+ </xsl:when>
2207
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
2208
+ </xsl:choose>
2162
2209
  </xsl:template><xsl:template match="*[local-name()='br']">
2163
2210
  <xsl:value-of select="$linebreak"/>
2211
+ </xsl:template><xsl:template match="*[local-name() = 'keep-together_within-line']">
2212
+ <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2164
2213
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
2165
2214
  <fo:block xsl:use-attribute-sets="copyright-statement-style">
2166
2215
  <xsl:apply-templates/>
@@ -2226,8 +2275,23 @@
2226
2275
  </xsl:call-template>
2227
2276
 
2228
2277
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2229
- <!-- <xsl:call-template name="add-zero-spaces"/> -->
2230
- <xsl:call-template name="add-zero-spaces-java"/>
2278
+ <xsl:choose>
2279
+ <xsl:when test="parent::*[local-name() = 'keep-together_within-line']">
2280
+ <xsl:value-of select="."/>
2281
+ </xsl:when>
2282
+ <xsl:otherwise>
2283
+ <xsl:call-template name="addZeroWidthSpacesToTextNodes"/>
2284
+ </xsl:otherwise>
2285
+ </xsl:choose>
2286
+ </xsl:template><xsl:template name="addZeroWidthSpacesToTextNodes">
2287
+ <xsl:variable name="text"><text><xsl:call-template name="text"/></text></xsl:variable>
2288
+ <!-- <xsl:copy-of select="$text"/> -->
2289
+ <xsl:for-each select="xalan:nodeset($text)/text/node()">
2290
+ <xsl:choose>
2291
+ <xsl:when test="self::text()"><xsl:call-template name="add-zero-spaces-java"/></xsl:when>
2292
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
2293
+ </xsl:choose>
2294
+ </xsl:for-each>
2231
2295
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
2232
2296
 
2233
2297
  <xsl:variable name="table-preamble">
@@ -2345,16 +2409,9 @@
2345
2409
  </xsl:for-each>
2346
2410
  </xsl:when>
2347
2411
  <xsl:otherwise>
2348
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2349
- <xsl:choose>
2350
- <xsl:when test=". = 1 or . = 0">
2351
- <fo:table-column column-width="proportional-column-width(2)"/>
2352
- </xsl:when>
2353
- <xsl:otherwise>
2354
- <fo:table-column column-width="proportional-column-width({.})"/>
2355
- </xsl:otherwise>
2356
- </xsl:choose>
2357
- </xsl:for-each>
2412
+ <xsl:call-template name="insertTableColumnWidth">
2413
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2414
+ </xsl:call-template>
2358
2415
  </xsl:otherwise>
2359
2416
  </xsl:choose>
2360
2417
 
@@ -2518,6 +2575,7 @@
2518
2575
  <xsl:with-param name="text" select="$td_text"/>
2519
2576
  </xsl:call-template>
2520
2577
  </xsl:variable>
2578
+ <!-- <xsl:message>string_with_added_zerospaces=<xsl:value-of select="$string_with_added_zerospaces"/></xsl:message> -->
2521
2579
  <xsl:call-template name="tokenize">
2522
2580
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2523
2581
  <!-- 2009 thinspace -->
@@ -2530,6 +2588,7 @@
2530
2588
  <xsl:with-param name="words" select="xalan:nodeset($words)"/>
2531
2589
  </xsl:call-template>
2532
2590
  </xsl:variable>
2591
+ <!-- <xsl:message>max_length=<xsl:value-of select="$max_length"/></xsl:message> -->
2533
2592
  <width>
2534
2593
  <xsl:variable name="divider">
2535
2594
  <xsl:choose>
@@ -2562,6 +2621,10 @@
2562
2621
  <xsl:with-param name="table" select="$table"/>
2563
2622
  </xsl:call-template>
2564
2623
  </xsl:if>
2624
+ </xsl:template><xsl:template match="*[@keep-together.within-line]/text()" priority="2" mode="td_text">
2625
+ <!-- <xsl:message>DEBUG t1=<xsl:value-of select="."/></xsl:message>
2626
+ <xsl:message>DEBUG t2=<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/></xsl:message> -->
2627
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/>
2565
2628
  </xsl:template><xsl:template match="text()" mode="td_text">
2566
2629
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
2567
2630
  </xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
@@ -2663,16 +2726,9 @@
2663
2726
  </xsl:for-each>
2664
2727
  </xsl:when>
2665
2728
  <xsl:otherwise>
2666
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2667
- <xsl:choose>
2668
- <xsl:when test=". = 1 or . = 0">
2669
- <fo:table-column column-width="proportional-column-width(2)"/>
2670
- </xsl:when>
2671
- <xsl:otherwise>
2672
- <fo:table-column column-width="proportional-column-width({.})"/>
2673
- </xsl:otherwise>
2674
- </xsl:choose>
2675
- </xsl:for-each>
2729
+ <xsl:call-template name="insertTableColumnWidth">
2730
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2731
+ </xsl:call-template>
2676
2732
  </xsl:otherwise>
2677
2733
  </xsl:choose>
2678
2734
 
@@ -3213,8 +3269,10 @@
3213
3269
  <!-- and (not(../@class) or ../@class !='pseudocode') -->
3214
3270
  </xsl:variable>
3215
3271
 
3272
+ <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
3273
+
3216
3274
  <xsl:choose>
3217
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3275
+ <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
3218
3276
 
3219
3277
  <fo:block margin-bottom="12pt" text-align="left">
3220
3278
 
@@ -3229,7 +3287,7 @@
3229
3287
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3230
3288
  </fo:block>
3231
3289
 
3232
- </xsl:when>
3290
+ </xsl:when> <!-- END: only one component -->
3233
3291
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3234
3292
  <fo:block margin-bottom="12pt" text-align="left">
3235
3293
 
@@ -3243,8 +3301,8 @@
3243
3301
  </xsl:variable>
3244
3302
  <xsl:value-of select="$title-where"/>
3245
3303
  </fo:block>
3246
- </xsl:when>
3247
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
3304
+ </xsl:when> <!-- END: a few components -->
3305
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
3248
3306
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
3249
3307
 
3250
3308
 
@@ -3257,11 +3315,11 @@
3257
3315
  </xsl:variable>
3258
3316
  <xsl:value-of select="$title-key"/>
3259
3317
  </fo:block>
3260
- </xsl:when>
3318
+ </xsl:when> <!-- END: definition list in a figure -->
3261
3319
  </xsl:choose>
3262
3320
 
3263
3321
  <!-- a few components -->
3264
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
3322
+ <xsl:if test="$onlyOneComponent = 'false'">
3265
3323
  <fo:block>
3266
3324
 
3267
3325
 
@@ -3304,21 +3362,28 @@
3304
3362
  <xsl:apply-templates mode="dl"/>
3305
3363
  </tbody>
3306
3364
  </xsl:variable>
3307
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
3365
+ <!-- DEBUG: html-table<xsl:copy-of select="$html-table"/> -->
3308
3366
  <xsl:variable name="colwidths">
3309
3367
  <xsl:call-template name="calculate-column-widths">
3310
3368
  <xsl:with-param name="cols-count" select="2"/>
3311
3369
  <xsl:with-param name="table" select="$html-table"/>
3312
3370
  </xsl:call-template>
3313
3371
  </xsl:variable>
3314
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
3372
+ <!-- DEBUG: colwidths=<xsl:copy-of select="$colwidths"/> -->
3315
3373
  <xsl:variable name="maxlength_dt">
3316
3374
  <xsl:call-template name="getMaxLength_dt"/>
3317
3375
  </xsl:variable>
3376
+ <xsl:variable name="isContainsKeepTogetherTag_">
3377
+ false
3378
+ </xsl:variable>
3379
+ <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
3380
+ <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
3318
3381
  <xsl:call-template name="setColumnWidth_dl">
3319
3382
  <xsl:with-param name="colwidths" select="$colwidths"/>
3320
3383
  <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3384
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
3321
3385
  </xsl:call-template>
3386
+
3322
3387
  <fo:table-body>
3323
3388
  <xsl:apply-templates>
3324
3389
  <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
@@ -3327,12 +3392,13 @@
3327
3392
  </fo:table>
3328
3393
  </fo:block>
3329
3394
  </fo:block>
3330
- </xsl:if>
3395
+ </xsl:if> <!-- END: a few components -->
3331
3396
  </fo:block-container>
3332
3397
  </fo:block-container>
3333
3398
  </xsl:template><xsl:template name="setColumnWidth_dl">
3334
3399
  <xsl:param name="colwidths"/>
3335
3400
  <xsl:param name="maxlength_dt"/>
3401
+ <xsl:param name="isContainsKeepTogetherTag"/>
3336
3402
  <xsl:choose>
3337
3403
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
3338
3404
  <fo:table-column column-width="50%"/>
@@ -3340,6 +3406,11 @@
3340
3406
  </xsl:when>
3341
3407
  <xsl:otherwise>
3342
3408
  <xsl:choose>
3409
+ <xsl:when test="$isContainsKeepTogetherTag">
3410
+ <xsl:call-template name="insertTableColumnWidth">
3411
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3412
+ </xsl:call-template>
3413
+ </xsl:when>
3343
3414
  <!-- to set width check most wide chars like `W` -->
3344
3415
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
3345
3416
  <fo:table-column column-width="7%"/>
@@ -3370,20 +3441,25 @@
3370
3441
  <fo:table-column column-width="60%"/>
3371
3442
  </xsl:when>
3372
3443
  <xsl:otherwise>
3373
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
3374
- <xsl:choose>
3375
- <xsl:when test=". = 1 or . = 0">
3376
- <fo:table-column column-width="proportional-column-width(2)"/>
3377
- </xsl:when>
3378
- <xsl:otherwise>
3379
- <fo:table-column column-width="proportional-column-width({.})"/>
3380
- </xsl:otherwise>
3381
- </xsl:choose>
3382
- </xsl:for-each>
3444
+ <xsl:call-template name="insertTableColumnWidth">
3445
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3446
+ </xsl:call-template>
3383
3447
  </xsl:otherwise>
3384
3448
  </xsl:choose>
3385
3449
  </xsl:otherwise>
3386
3450
  </xsl:choose>
3451
+ </xsl:template><xsl:template name="insertTableColumnWidth">
3452
+ <xsl:param name="colwidths"/>
3453
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
3454
+ <xsl:choose>
3455
+ <xsl:when test=". = 1 or . = 0">
3456
+ <fo:table-column column-width="proportional-column-width(2)"/>
3457
+ </xsl:when>
3458
+ <xsl:otherwise>
3459
+ <fo:table-column column-width="proportional-column-width({.})"/>
3460
+ </xsl:otherwise>
3461
+ </xsl:choose>
3462
+ </xsl:for-each>
3387
3463
  </xsl:template><xsl:template name="getMaxLength_dt">
3388
3464
  <xsl:variable name="lengths">
3389
3465
  <xsl:for-each select="*[local-name()='dt']">
@@ -3407,7 +3483,6 @@
3407
3483
  <xsl:value-of select="$maxLength"/>
3408
3484
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3409
3485
  <xsl:param name="key_iso"/>
3410
-
3411
3486
  <!-- <tr>
3412
3487
  <td>NOTE</td>
3413
3488
  <td>
@@ -3415,18 +3490,30 @@
3415
3490
  </td>
3416
3491
  </tr>
3417
3492
  -->
3418
- <fo:table-row>
3493
+ <!-- OLD Variant -->
3494
+ <!-- <fo:table-row>
3419
3495
  <fo:table-cell>
3420
3496
  <fo:block margin-top="6pt">
3421
3497
  <xsl:if test="normalize-space($key_iso) = 'true'">
3422
3498
  <xsl:attribute name="margin-top">0</xsl:attribute>
3423
3499
  </xsl:if>
3424
- <xsl:apply-templates select="*[local-name() = 'name']"/>
3500
+ <xsl:apply-templates select="*[local-name() = 'name']" />
3425
3501
  </fo:block>
3426
3502
  </fo:table-cell>
3427
3503
  <fo:table-cell>
3428
3504
  <fo:block>
3429
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3505
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" />
3506
+ </fo:block>
3507
+ </fo:table-cell>
3508
+ </fo:table-row> -->
3509
+ <!-- <tr>
3510
+ <td number-columns-spanned="2">NOTE <xsl:apply-templates /> </td>
3511
+ </tr>
3512
+ -->
3513
+ <fo:table-row>
3514
+ <fo:table-cell number-columns-spanned="2">
3515
+ <fo:block>
3516
+ <xsl:call-template name="note"/>
3430
3517
  </fo:block>
3431
3518
  </fo:table-cell>
3432
3519
  </fo:table-row>
@@ -3528,13 +3615,15 @@
3528
3615
  <xsl:choose>
3529
3616
  <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3530
3617
  <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3531
- <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3618
+ <xsl:when test="ancestor::*[local-name()='note'] or ancestor::*[local-name()='example']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3532
3619
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3533
3620
  </xsl:choose>
3534
3621
  </xsl:attribute>
3535
3622
  </xsl:if>
3536
3623
  <xsl:apply-templates/>
3537
3624
  </fo:inline>
3625
+ </xsl:template><xsl:template match="*[local-name()='tt']/text()" priority="2">
3626
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
3538
3627
  </xsl:template><xsl:template match="*[local-name()='underline']">
3539
3628
  <fo:inline text-decoration="underline">
3540
3629
  <xsl:apply-templates/>
@@ -3682,41 +3771,50 @@
3682
3771
  <fo:block break-after="page"/>
3683
3772
  <fo:block> </fo:block>
3684
3773
  <fo:block break-after="page"/>
3774
+ </xsl:template><xsl:template match="*[local-name() = 'span']">
3775
+ <xsl:apply-templates/>
3685
3776
  </xsl:template><xsl:template name="tokenize">
3686
3777
  <xsl:param name="text"/>
3687
3778
  <xsl:param name="separator" select="' '"/>
3688
3779
  <xsl:choose>
3689
3780
  <xsl:when test="not(contains($text, $separator))">
3690
3781
  <word>
3691
- <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
3692
- <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
3693
3782
  <xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
3694
- <xsl:variable name="len_str">
3695
- <xsl:choose>
3696
- <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
3697
- <xsl:value-of select="$len_str_tmp * 1.5"/>
3698
- </xsl:when>
3699
- <xsl:otherwise>
3700
- <xsl:value-of select="$len_str_tmp"/>
3701
- </xsl:otherwise>
3702
- </xsl:choose>
3703
- </xsl:variable>
3704
-
3705
- <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
3706
- <xsl:message>
3707
- div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
3708
- len_str=<xsl:value-of select="$len_str"/>
3709
- len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
3710
- </xsl:message>
3711
- </xsl:if> -->
3712
- <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
3713
- <len_str><xsl:value-of select="$len_str"/></len_str> -->
3714
3783
  <xsl:choose>
3715
- <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
3716
- <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
3784
+ <xsl:when test="normalize-space(translate($text, 'X', '')) = ''"> <!-- special case for keep-together.within-line -->
3785
+ <xsl:value-of select="$len_str_tmp"/>
3717
3786
  </xsl:when>
3718
3787
  <xsl:otherwise>
3719
- <xsl:value-of select="$len_str"/>
3788
+ <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
3789
+ <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
3790
+ <xsl:variable name="len_str">
3791
+ <xsl:choose>
3792
+ <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
3793
+ <xsl:value-of select="$len_str_tmp * 1.5"/>
3794
+ </xsl:when>
3795
+ <xsl:otherwise>
3796
+ <xsl:value-of select="$len_str_tmp"/>
3797
+ </xsl:otherwise>
3798
+ </xsl:choose>
3799
+ </xsl:variable>
3800
+
3801
+ <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
3802
+ <xsl:message>
3803
+ div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
3804
+ len_str=<xsl:value-of select="$len_str"/>
3805
+ len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
3806
+ </xsl:message>
3807
+ </xsl:if> -->
3808
+ <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
3809
+ <len_str><xsl:value-of select="$len_str"/></len_str> -->
3810
+ <xsl:choose>
3811
+ <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
3812
+ <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
3813
+ </xsl:when>
3814
+ <xsl:otherwise>
3815
+ <xsl:value-of select="$len_str"/>
3816
+ </xsl:otherwise>
3817
+ </xsl:choose>
3720
3818
  </xsl:otherwise>
3721
3819
  </xsl:choose>
3722
3820
  </word>
@@ -3802,24 +3900,28 @@
3802
3900
  </xsl:template><xsl:template name="add-zero-spaces-equal">
3803
3901
  <xsl:param name="text" select="."/>
3804
3902
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
3903
+ <xsl:variable name="regex_zero-space-after-equals">(==========)</xsl:variable>
3805
3904
  <xsl:variable name="zero-space-after-equal">=</xsl:variable>
3905
+ <xsl:variable name="regex_zero-space-after-equal">(=)</xsl:variable>
3806
3906
  <xsl:variable name="zero-space">​</xsl:variable>
3807
3907
  <xsl:choose>
3808
3908
  <xsl:when test="contains($text, $zero-space-after-equals)">
3809
- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
3909
+ <!-- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
3810
3910
  <xsl:value-of select="$zero-space-after-equals"/>
3811
3911
  <xsl:value-of select="$zero-space"/>
3812
3912
  <xsl:call-template name="add-zero-spaces-equal">
3813
3913
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
3814
- </xsl:call-template>
3914
+ </xsl:call-template> -->
3915
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equals,concat('$1',$zero_width_space))"/>
3815
3916
  </xsl:when>
3816
3917
  <xsl:when test="contains($text, $zero-space-after-equal)">
3817
- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
3918
+ <!-- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
3818
3919
  <xsl:value-of select="$zero-space-after-equal"/>
3819
3920
  <xsl:value-of select="$zero-space"/>
3820
3921
  <xsl:call-template name="add-zero-spaces-equal">
3821
3922
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
3822
- </xsl:call-template>
3923
+ </xsl:call-template> -->
3924
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equal,concat('$1',$zero_width_space))"/>
3823
3925
  </xsl:when>
3824
3926
  <xsl:otherwise>
3825
3927
  <xsl:value-of select="$text"/>
@@ -3987,6 +4089,9 @@
3987
4089
  <xsl:variable name="isDeleted" select="@deleted"/>
3988
4090
 
3989
4091
  <fo:inline xsl:use-attribute-sets="mathml-style">
4092
+
4093
+
4094
+
3990
4095
 
3991
4096
 
3992
4097
  <xsl:call-template name="setTrackChangesStyles">
@@ -3994,48 +4099,80 @@
3994
4099
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3995
4100
  </xsl:call-template>
3996
4101
 
4102
+ <xsl:if test="$add_math_as_text = 'true'">
4103
+ <!-- insert helper tag -->
4104
+ <!-- set unique font-size (fiction) -->
4105
+ <xsl:variable name="font-size_sfx"><xsl:number level="any"/></xsl:variable>
4106
+ <fo:inline color="white" font-size="1.{$font-size_sfx}pt" font-style="normal" font-weight="normal"><xsl:value-of select="$zero_width_space"/></fo:inline> <!-- zero width space -->
4107
+ </xsl:if>
3997
4108
 
3998
-
3999
- <xsl:variable name="mathml">
4000
- <xsl:apply-templates select="." mode="mathml"/>
4109
+ <xsl:variable name="mathml_content">
4110
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
4001
4111
  </xsl:variable>
4002
- <fo:instream-foreign-object fox:alt-text="Math">
4003
4112
 
4113
+
4114
+ <xsl:call-template name="mathml_instream_object">
4115
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
4116
+ </xsl:call-template>
4004
4117
 
4005
-
4006
- <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
4007
- <xsl:variable name="comment_text_">
4008
- <xsl:choose>
4009
- <xsl:when test="normalize-space($comment_text_following) != ''">
4010
- <xsl:value-of select="$comment_text_following"/>
4011
- </xsl:when>
4012
- <xsl:otherwise>
4013
- <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
4014
- </xsl:otherwise>
4015
- </xsl:choose>
4016
- </xsl:variable>
4017
- <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
4018
-
4019
- <xsl:if test="normalize-space($comment_text) != ''">
4020
- <!-- put Mathin Alternate Text -->
4021
- <xsl:attribute name="fox:alt-text">
4022
- <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
4023
- </xsl:attribute>
4024
- </xsl:if>
4025
-
4026
- <xsl:variable name="mathml_content">
4027
- <xsl:apply-templates select="." mode="mathml_actual_text"/>
4028
- </xsl:variable>
4029
- <!-- put MathML in Actual Text -->
4030
- <xsl:attribute name="fox:actual-text">
4031
- <xsl:value-of select="$mathml_content"/>
4032
- </xsl:attribute>
4033
-
4034
-
4035
-
4036
- <xsl:copy-of select="xalan:nodeset($mathml)"/>
4037
- </fo:instream-foreign-object>
4118
+
4038
4119
  </fo:inline>
4120
+ </xsl:template><xsl:template name="getMathml_comment_text">
4121
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
4122
+ <xsl:variable name="comment_text_">
4123
+ <xsl:choose>
4124
+ <xsl:when test="normalize-space($comment_text_following) != ''">
4125
+ <xsl:value-of select="$comment_text_following"/>
4126
+ </xsl:when>
4127
+ <xsl:otherwise>
4128
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
4129
+ </xsl:otherwise>
4130
+ </xsl:choose>
4131
+ </xsl:variable>
4132
+ <xsl:variable name="comment_text_2" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
4133
+ <xsl:variable name="comment_text" select="java:trim(java:java.lang.String.new($comment_text_2))"/>
4134
+ <xsl:value-of select="$comment_text"/>
4135
+ </xsl:template><xsl:template name="mathml_instream_object">
4136
+ <xsl:param name="comment_text"/>
4137
+ <xsl:param name="mathml_content"/>
4138
+
4139
+ <xsl:variable name="comment_text_">
4140
+ <xsl:choose>
4141
+ <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
4142
+ <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
4143
+ </xsl:choose>
4144
+ </xsl:variable>
4145
+
4146
+ <xsl:variable name="mathml">
4147
+ <xsl:apply-templates select="." mode="mathml"/>
4148
+ </xsl:variable>
4149
+
4150
+ <fo:instream-foreign-object fox:alt-text="Math">
4151
+
4152
+
4153
+
4154
+
4155
+
4156
+
4157
+
4158
+ <!-- put MathML in Actual Text -->
4159
+ <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
4160
+ <xsl:attribute name="fox:actual-text">
4161
+ <xsl:value-of select="$mathml_content"/>
4162
+ </xsl:attribute>
4163
+
4164
+ <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
4165
+ <xsl:if test="normalize-space($comment_text_) != ''">
4166
+ <!-- put Mathin Alternate Text -->
4167
+ <xsl:attribute name="fox:alt-text">
4168
+ <xsl:value-of select="$comment_text_"/>
4169
+ </xsl:attribute>
4170
+ </xsl:if>
4171
+ <!-- </xsl:if> -->
4172
+
4173
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
4174
+
4175
+ </fo:instream-foreign-object>
4039
4176
  </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
4040
4177
  <!-- <xsl:text>a+b</xsl:text> -->
4041
4178
  <xsl:text>&lt;</xsl:text>
@@ -4066,7 +4203,9 @@
4066
4203
  <!-- replace start and end spaces to non-break space -->
4067
4204
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
4068
4205
  </xsl:copy>
4069
- </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4206
+ </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="mathml:mtd/mathml:mo/text()[. = '/']" mode="mathml">
4207
+ <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
4208
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4070
4209
  <xsl:variable name="target">
4071
4210
  <xsl:choose>
4072
4211
  <xsl:when test="@updatetype = 'true'">
@@ -4299,7 +4438,12 @@
4299
4438
 
4300
4439
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4301
4440
 
4441
+ <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
4442
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
4443
+ </xsl:if>
4444
+
4302
4445
 
4446
+
4303
4447
 
4304
4448
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
4305
4449
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
@@ -4656,18 +4800,33 @@
4656
4800
  </xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
4657
4801
  <xsl:copy>
4658
4802
  <xsl:apply-templates select="@*" mode="svg_update"/>
4659
- <xsl:variable name="viewbox">
4803
+ <xsl:variable name="viewbox_">
4660
4804
  <xsl:call-template name="split">
4661
4805
  <xsl:with-param name="pText" select="@viewBox"/>
4662
4806
  <xsl:with-param name="sep" select="' '"/>
4663
4807
  </xsl:call-template>
4664
4808
  </xsl:variable>
4809
+ <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
4810
+ <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
4811
+ <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
4812
+
4665
4813
  <xsl:attribute name="width">
4666
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
4814
+ <xsl:choose>
4815
+ <xsl:when test="$width != ''">
4816
+ <xsl:value-of select="round($width)"/>
4817
+ </xsl:when>
4818
+ <xsl:otherwise>400</xsl:otherwise> <!-- default width -->
4819
+ </xsl:choose>
4667
4820
  </xsl:attribute>
4668
4821
  <xsl:attribute name="height">
4669
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
4822
+ <xsl:choose>
4823
+ <xsl:when test="$height != ''">
4824
+ <xsl:value-of select="round($height)"/>
4825
+ </xsl:when>
4826
+ <xsl:otherwise>400</xsl:otherwise> <!-- default height -->
4827
+ </xsl:choose>
4670
4828
  </xsl:attribute>
4829
+
4671
4830
  <xsl:apply-templates mode="svg_update"/>
4672
4831
  </xsl:copy>
4673
4832
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
@@ -4862,7 +5021,11 @@
4862
5021
  <xsl:apply-templates mode="bookmarks"/>
4863
5022
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4864
5023
  <xsl:apply-templates select="."/>
4865
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
5024
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'span']" mode="contents">
5025
+ <xsl:apply-templates mode="contents"/>
5026
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
5027
+ <xsl:apply-templates mode="bookmarks"/>
5028
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="bookmarks">
4866
5029
  <xsl:apply-templates mode="bookmarks"/>
4867
5030
  </xsl:template><xsl:template name="addBookmarks">
4868
5031
  <xsl:param name="contents"/>
@@ -5144,7 +5307,9 @@
5144
5307
  <xsl:apply-templates/>
5145
5308
  </xsl:otherwise>
5146
5309
  </xsl:choose>
5147
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
5310
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref']" mode="contents">
5311
+ <xsl:value-of select="."/>
5312
+ </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
5148
5313
  <xsl:text> </xsl:text>
5149
5314
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
5150
5315
  <xsl:copy>
@@ -5175,9 +5340,22 @@
5175
5340
  </xsl:when>
5176
5341
  <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
5177
5342
  </xsl:choose>
5343
+ </xsl:template><xsl:template match="text()" mode="contents_item">
5344
+ <xsl:call-template name="keep_together_standard_number"/>
5345
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="contents_item">
5346
+ <xsl:apply-templates mode="contents_item"/>
5178
5347
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
5179
5348
 
5180
5349
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
5350
+
5351
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
5352
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5353
+ </xsl:if>
5354
+
5355
+ <xsl:if test="ancestor::*[local-name() = 'example']">
5356
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5357
+ </xsl:if>
5358
+
5181
5359
  <xsl:copy-of select="@id"/>
5182
5360
 
5183
5361
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -5277,17 +5455,15 @@
5277
5455
 
5278
5456
  <!-- split text by zero-width space -->
5279
5457
  <xsl:variable name="text_step4">
5280
- <xsl:call-template name="split">
5458
+ <xsl:call-template name="split_for_interspers">
5281
5459
  <xsl:with-param name="pText" select="$text_step3"/>
5282
5460
  <xsl:with-param name="sep" select="$zero_width_space"/>
5283
- <xsl:with-param name="normalize-space">false</xsl:with-param>
5284
- <xsl:with-param name="keep_sep">true</xsl:with-param>
5285
5461
  </xsl:call-template>
5286
5462
  </xsl:variable>
5287
5463
 
5288
- <xsl:for-each select="xalan:nodeset($text_step4)/item">
5464
+ <xsl:for-each select="xalan:nodeset($text_step4)/node()">
5289
5465
  <xsl:choose>
5290
- <xsl:when test="string-length() &gt; 30"> <!-- word with length more than 30 will be interspersed with zero-width space -->
5466
+ <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
5291
5467
  <xsl:call-template name="interspers">
5292
5468
  <xsl:with-param name="str" select="."/>
5293
5469
  </xsl:call-template>
@@ -5298,6 +5474,30 @@
5298
5474
  </xsl:choose>
5299
5475
  </xsl:for-each>
5300
5476
 
5477
+ </xsl:template><xsl:variable name="interspers_tag_open">###interspers123###</xsl:variable><xsl:variable name="interspers_tag_close">###/interspers123###</xsl:variable><xsl:template name="split_for_interspers">
5478
+ <xsl:param name="pText" select="."/>
5479
+ <xsl:param name="sep" select="','"/>
5480
+ <!-- word with length more than 30 will be interspersed with zero-width space -->
5481
+ <xsl:variable name="regex" select="concat('([^', $zero_width_space, ']{31,})')"/> <!-- sequence of characters (more 31), that doesn't contains zero-width space -->
5482
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new($pText),$regex,concat($interspers_tag_open,'$1',$interspers_tag_close))"/>
5483
+ <xsl:call-template name="replace_tag_interspers">
5484
+ <xsl:with-param name="text" select="$text"/>
5485
+ </xsl:call-template>
5486
+ </xsl:template><xsl:template name="replace_tag_interspers">
5487
+ <xsl:param name="text"/>
5488
+ <xsl:choose>
5489
+ <xsl:when test="contains($text, $interspers_tag_open)">
5490
+ <xsl:value-of select="substring-before($text, $interspers_tag_open)"/>
5491
+ <xsl:variable name="text_after" select="substring-after($text, $interspers_tag_open)"/>
5492
+ <interspers>
5493
+ <xsl:value-of select="substring-before($text_after, $interspers_tag_close)"/>
5494
+ </interspers>
5495
+ <xsl:call-template name="replace_tag_interspers">
5496
+ <xsl:with-param name="text" select="substring-after($text_after, $interspers_tag_close)"/>
5497
+ </xsl:call-template>
5498
+ </xsl:when>
5499
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
5500
+ </xsl:choose>
5301
5501
  </xsl:template><xsl:template name="interspers">
5302
5502
  <xsl:param name="str"/>
5303
5503
  <xsl:param name="char" select="$zero_width_space"/>
@@ -5633,39 +5833,67 @@
5633
5833
  </xsl:otherwise>
5634
5834
  </xsl:choose>
5635
5835
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5636
- <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5637
-
5836
+
5837
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
5838
+
5638
5839
 
5840
+
5639
5841
  <xsl:variable name="fo_element">
5640
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5842
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
5641
5843
  block
5642
5844
  </xsl:variable>
5643
5845
 
5644
- <!-- display 'EXAMPLE' -->
5645
- <xsl:apply-templates select="*[local-name()='name']">
5646
- <xsl:with-param name="fo_element" select="$fo_element"/>
5647
- </xsl:apply-templates>
5846
+ <fo:block-container margin-left="0mm">
5648
5847
 
5649
- <xsl:choose>
5650
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
5651
- <fo:block-container xsl:use-attribute-sets="example-body-style">
5652
- <fo:block-container margin-left="0mm" margin-right="0mm">
5653
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5848
+ <xsl:choose>
5849
+
5850
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
5851
+
5852
+ <!-- display name 'EXAMPLE' in a separate block -->
5853
+ <fo:block>
5854
+ <xsl:apply-templates select="*[local-name()='name']">
5654
5855
  <xsl:with-param name="fo_element" select="$fo_element"/>
5655
5856
  </xsl:apply-templates>
5857
+ </fo:block>
5858
+
5859
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
5860
+ <fo:block-container margin-left="0mm" margin-right="0mm">
5861
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5862
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5863
+ </xsl:apply-templates>
5864
+ </fo:block-container>
5656
5865
  </fo:block-container>
5657
- </fo:block-container>
5658
- </xsl:when>
5659
- <xsl:otherwise>
5660
- <fo:inline>
5661
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5662
- <xsl:with-param name="fo_element" select="$fo_element"/>
5663
- </xsl:apply-templates>
5664
- </fo:inline>
5665
- </xsl:otherwise>
5666
- </xsl:choose>
5667
-
5668
- </fo:block>
5866
+ </xsl:when> <!-- end block -->
5867
+
5868
+ <xsl:otherwise> <!-- inline -->
5869
+
5870
+ <!-- display 'EXAMPLE' and first element in the same line -->
5871
+ <fo:block>
5872
+ <xsl:apply-templates select="*[local-name()='name']">
5873
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5874
+ </xsl:apply-templates>
5875
+ <fo:inline>
5876
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
5877
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5878
+ </xsl:apply-templates>
5879
+ </fo:inline>
5880
+ </fo:block>
5881
+
5882
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
5883
+ <!-- display further elements in blocks -->
5884
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
5885
+ <fo:block-container margin-left="0mm" margin-right="0mm">
5886
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
5887
+ <xsl:with-param name="fo_element" select="'block'"/>
5888
+ </xsl:apply-templates>
5889
+ </fo:block-container>
5890
+ </fo:block-container>
5891
+ </xsl:if>
5892
+ </xsl:otherwise> <!-- end inline -->
5893
+
5894
+ </xsl:choose>
5895
+ </fo:block-container>
5896
+ </fo:block-container>
5669
5897
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
5670
5898
  <xsl:param name="fo_element">block</xsl:param>
5671
5899
 
@@ -5697,10 +5925,16 @@
5697
5925
  </xsl:variable>
5698
5926
  <xsl:choose>
5699
5927
  <xsl:when test="starts-with(normalize-space($element), 'block')">
5700
- <fo:block xsl:use-attribute-sets="example-p-style">
5701
-
5702
- <xsl:apply-templates/>
5703
- </fo:block>
5928
+ <fo:block-container>
5929
+ <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
5930
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5931
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5932
+ </xsl:if>
5933
+ <fo:block xsl:use-attribute-sets="example-p-style">
5934
+
5935
+ <xsl:apply-templates/>
5936
+ </fo:block>
5937
+ </fo:block-container>
5704
5938
  </xsl:when>
5705
5939
  <xsl:otherwise>
5706
5940
  <fo:inline xsl:use-attribute-sets="example-p-style">
@@ -5745,7 +5979,7 @@
5745
5979
  </xsl:otherwise>
5746
5980
  </xsl:choose> -->
5747
5981
  </fo:block>
5748
- </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
5982
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
5749
5983
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5750
5984
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5751
5985
  <xsl:if test="normalize-space() != ''">
@@ -5781,7 +6015,8 @@
5781
6015
  <fo:inline><xsl:apply-templates/></fo:inline>
5782
6016
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5783
6017
  <xsl:if test="normalize-space() != ''">
5784
- <xsl:value-of select="."/>
6018
+ <!-- <xsl:value-of select="."/> -->
6019
+ <xsl:call-template name="text"/>
5785
6020
  </xsl:if>
5786
6021
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5787
6022
  <fo:block-container margin-left="0mm">
@@ -5881,7 +6116,16 @@
5881
6116
  </fo:inline>
5882
6117
  </xsl:when>
5883
6118
  <xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
5884
- <fo:inline><xsl:apply-templates/></fo:inline>
6119
+
6120
+ <!-- if in bibitem[@hidden='true'] there is url[@type='src'], then create hyperlink -->
6121
+ <xsl:variable name="uri_src" select="normalize-space($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'src'])"/>
6122
+ <xsl:choose>
6123
+ <xsl:when test="$uri_src != ''">
6124
+ <fo:basic-link external-destination="{$uri_src}" fox:alt-text="{$uri_src}"><xsl:apply-templates/></fo:basic-link>
6125
+ </xsl:when>
6126
+ <xsl:otherwise><fo:inline><xsl:apply-templates/></fo:inline></xsl:otherwise>
6127
+ </xsl:choose>
6128
+
5885
6129
  </xsl:otherwise>
5886
6130
  </xsl:choose>
5887
6131
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
@@ -6053,10 +6297,24 @@
6053
6297
 
6054
6298
  </fo:block>
6055
6299
  <xsl:apply-templates/>
6056
- </xsl:template><xsl:template match="*[local-name() = 'review']">
6300
+ </xsl:template><xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
6057
6301
  <!-- comment 2019-11-29 -->
6058
6302
  <!-- <fo:block font-weight="bold">Review:</fo:block>
6059
6303
  <xsl:apply-templates /> -->
6304
+
6305
+ <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
6306
+
6307
+ <xsl:choose>
6308
+ <!-- if there isn't the attribute '@from', then -->
6309
+ <xsl:when test="$id_from = ''">
6310
+ <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
6311
+ </xsl:when>
6312
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
6313
+ <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
6314
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
6315
+ </xsl:when>
6316
+ </xsl:choose>
6317
+
6060
6318
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
6061
6319
  <!-- 0xA0 to space replacement -->
6062
6320
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -6413,7 +6671,10 @@
6413
6671
  <!-- to split by '_' and other chars -->
6414
6672
  <xsl:call-template name="add-zero-spaces-java"/>
6415
6673
  </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
6416
- <fo:inline id="{@id}" font-size="1pt"/>
6674
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
6675
+ <fo:inline id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:inline>
6676
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
6677
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"> </xsl:if>
6417
6678
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
6418
6679
  <!-- <row>
6419
6680
  <date>05-07-2013</date>
@@ -7026,6 +7287,120 @@
7026
7287
  <xsl:apply-templates select="." mode="update_xml_step1"/>
7027
7288
  </xsl:for-each>
7028
7289
  </xsl:copy>
7290
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
7291
+ <xsl:apply-templates mode="update_xml_step1"/>
7292
+ </xsl:template><xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
7293
+ <xsl:copy>
7294
+ <xsl:apply-templates select="@*|node()" mode="update_xml_enclose_keep-together_within-line"/>
7295
+ </xsl:copy>
7296
+ </xsl:template><xsl:variable name="express_reference_separators">_.\</xsl:variable><xsl:variable name="express_reference_characters" select="concat($upper,$lower,'1234567890',$express_reference_separators)"/><xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable><xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'])]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
7297
+
7298
+ <!-- enclose standard's number into tag 'keep-together_within-line' -->
7299
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
7300
+ <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
7301
+ <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
7302
+ <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
7303
+ <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
7304
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
7305
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
7306
+ <xsl:with-param name="text" select="$text_"/>
7307
+ </xsl:call-template></text></xsl:variable>
7308
+
7309
+ <xsl:variable name="parent" select="local-name(..)"/>
7310
+
7311
+ <xsl:variable name="text2">
7312
+ <text><xsl:for-each select="xalan:nodeset($text)/text/node()">
7313
+ <xsl:copy-of select="."/>
7314
+ </xsl:for-each></text>
7315
+ </xsl:variable>
7316
+
7317
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
7318
+ <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
7319
+ <xsl:variable name="text3">
7320
+ <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
7321
+ <xsl:choose>
7322
+ <xsl:when test="self::text()">
7323
+ <xsl:variable name="text_units_" select="java:replaceAll(java:java.lang.String.new(.),$regex_solidus_units,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
7324
+ <xsl:variable name="text_units"><text><xsl:call-template name="replace_text_tags">
7325
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
7326
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
7327
+ <xsl:with-param name="text" select="$text_units_"/>
7328
+ </xsl:call-template></text></xsl:variable>
7329
+ <xsl:copy-of select="xalan:nodeset($text_units)/text/node()"/>
7330
+ </xsl:when>
7331
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
7332
+ </xsl:choose>
7333
+ </xsl:for-each></text>
7334
+ </xsl:variable>
7335
+
7336
+ <xsl:choose>
7337
+ <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
7338
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
7339
+ <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
7340
+ <xsl:for-each select="xalan:nodeset($text3)/text/node()">
7341
+ <xsl:choose>
7342
+ <xsl:when test="self::text()">
7343
+ <xsl:variable name="text_dots_" select="java:replaceAll(java:java.lang.String.new(.),$regex_dots_units,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
7344
+ <xsl:variable name="text_dots"><text><xsl:call-template name="replace_text_tags">
7345
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
7346
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
7347
+ <xsl:with-param name="text" select="$text_dots_"/>
7348
+ </xsl:call-template></text></xsl:variable>
7349
+ <xsl:copy-of select="xalan:nodeset($text_dots)/text/node()"/>
7350
+ </xsl:when>
7351
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
7352
+ </xsl:choose>
7353
+ </xsl:for-each>
7354
+ </xsl:when>
7355
+ <xsl:otherwise><xsl:copy-of select="xalan:nodeset($text3)/text/node()"/></xsl:otherwise>
7356
+ </xsl:choose>
7357
+
7358
+ </xsl:template><xsl:template name="replace_text_tags">
7359
+ <xsl:param name="tag_open"/>
7360
+ <xsl:param name="tag_close"/>
7361
+ <xsl:param name="text"/>
7362
+ <xsl:choose>
7363
+ <xsl:when test="contains($text, $tag_open)">
7364
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
7365
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
7366
+
7367
+ <xsl:element name="{substring-before(substring-after($tag_open, '###'),'###')}">
7368
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
7369
+ </xsl:element>
7370
+
7371
+ <xsl:call-template name="replace_text_tags">
7372
+ <xsl:with-param name="tag_open" select="$tag_open"/>
7373
+ <xsl:with-param name="tag_close" select="$tag_close"/>
7374
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
7375
+ </xsl:call-template>
7376
+ </xsl:when>
7377
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
7378
+ </xsl:choose>
7379
+ </xsl:template><xsl:template name="printEdition">
7380
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
7381
+ <xsl:text> </xsl:text>
7382
+ <xsl:choose>
7383
+ <xsl:when test="$edition_i18n != ''">
7384
+ <!-- Example: <edition language="fr">deuxième édition</edition> -->
7385
+ <xsl:call-template name="capitalize">
7386
+ <xsl:with-param name="str" select="$edition_i18n"/>
7387
+ </xsl:call-template>
7388
+ </xsl:when>
7389
+ <xsl:otherwise>
7390
+ <xsl:variable name="edition" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
7391
+ <xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
7392
+ <xsl:call-template name="capitalize">
7393
+ <xsl:with-param name="str">
7394
+ <xsl:call-template name="getLocalizedString">
7395
+ <xsl:with-param name="key">edition</xsl:with-param>
7396
+ </xsl:call-template>
7397
+ </xsl:with-param>
7398
+ </xsl:call-template>
7399
+ <xsl:text> </xsl:text>
7400
+ <xsl:value-of select="$edition"/>
7401
+ </xsl:if>
7402
+ </xsl:otherwise>
7403
+ </xsl:choose>
7029
7404
  </xsl:template><xsl:template name="convertDate">
7030
7405
  <xsl:param name="date"/>
7031
7406
  <xsl:param name="format" select="'short'"/>