metanorma-csa 2.0.6 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,13 @@
27
27
 
28
28
  <xsl:template match="/">
29
29
  <xsl:call-template name="namespaceCheck"/>
30
- <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
30
+ <fo:root xml:lang="{$lang}">
31
+ <xsl:variable name="root-style">
32
+ <root-style xsl:use-attribute-sets="root-style"/>
33
+ </xsl:variable>
34
+ <xsl:call-template name="insertRootStyle">
35
+ <xsl:with-param name="root-style" select="$root-style"/>
36
+ </xsl:call-template>
31
37
  <fo:layout-master-set>
32
38
  <!-- Cover page -->
33
39
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -565,7 +571,7 @@
565
571
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAASEAAAEhCAYAAAAwHRYbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9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POmRq+Zd3bLNgyZklMFwrdjbg3RaAuK9LknaHWSCTxVKQsFhadYNHOeRjIh1D3CohHIbKSSmVOFYtyHjgwPigVezzyBiWEZR9x2ZF9TfR0koKjI6mrKJsIeJeSi3YVS5O0GIgLMnEod147ZqBtdEAjzkGf9H0mbqtFYSihGLk4lJg+k2y7r3MD1Dn4SA2jfJ5LyJhZgaMcEgfGYTblAuL5nhPWC7e3nSBpJJOq9QEiqEzmJ/MnmqN87pHqawxIQ2joyi+1P+zWOVhx4NeXlW59Y+aR3IuEAsmsP9QMf2DJnqLEN0yioJFRlY2Y8hYzJuHsg9QUqCnmlS2S+q2SJ27kdu+HdJHwJP4PJMgHiOUmkkpDtdoqxhO4ryNyuQSXmyYtKWz1iyaYic4Z91C5OyQkmoagCTPnLU9KDKo7QV9lIPUq4MIOMC8asOiZJQtQP6DwS5It3scjoc3oBt6D3cvtDhUBJSzA9E3Hcj42i3F29jFJUBXuePsMTzlg6HkpDCjpAQn7YnmZgnrXcmB5KHPcXEM1qHQ0lI4QYIP9iJCQn+Mk11SP4HKM2fJ+NNDguXBpIqCSk8A3lwOtNcx73OVUZKU8kEjQ7lBslnlk6LeLCQDkH0+KXsAyQmoA1prmMffttSMUoQwVkQicLgeDmSG0ruzNZpoCSkCAcwMb9O8ybTgn8OHP/gALge/xsOga0DfQaQCgJE4Uw5monmff5vNaErCSkiBPQkr3IrB7yRyz2V2zAxwYFwOf5dwsP9wCnwWzIhJXCEhIl8IhmPbbTPqMpKISsJKaoVP7OE8f4C+jSlud7OJc/nlvz/mlDdYRU/sjQzi+Z6WE+juR7XGoOlUBJSWG3vJnNTKJxDE90rFAolIYVCoSSkUCgUSkIKhUJJSKFQKJSEFAqFkpBCoVAoCSkUCiUhhUKhUBJSKBRKQgqFQuEF/yfAACbVBNmSyrCxAAAAAElFTkSuQmCC</xsl:text>
566
572
  </xsl:variable>
567
573
 
568
- <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">
574
+ <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">
569
575
  <xsl:call-template name="getLang"/>
570
576
  </xsl:variable><xsl:variable name="pageWidth_">
571
577
  215.9
@@ -580,20 +586,7 @@
580
586
  </xsl:variable><xsl:variable name="marginTop" select="normalize-space($marginTop_)"/><xsl:variable name="marginBottom_">
581
587
  21
582
588
  </xsl:variable><xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/><xsl:variable name="titles_">
583
-
584
- <title-edition lang="en">
585
-
586
- <xsl:text>Version</xsl:text>
587
-
588
- </title-edition>
589
589
 
590
- <title-edition lang="fr">
591
- <xsl:text>Édition </xsl:text>
592
- </title-edition>
593
-
594
- <title-edition lang="ru">
595
- <xsl:text>Издание </xsl:text>
596
- </title-edition>
597
590
 
598
591
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
599
592
  <title-toc lang="en">
@@ -674,7 +667,7 @@
674
667
  </xsl:variable><xsl:variable name="bibdata">
675
668
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
676
669
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
677
- </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">
670
+ </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">
678
671
  <xsl:param name="name"/>
679
672
  <xsl:param name="lang"/>
680
673
  <xsl:variable name="lang_">
@@ -717,7 +710,30 @@
717
710
 
718
711
 
719
712
 
720
- </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
713
+ </xsl:attribute-set><xsl:template name="insertRootStyle">
714
+ <xsl:param name="root-style"/>
715
+ <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
716
+
717
+ <xsl:variable name="additional_fonts_">
718
+ <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']">
719
+ <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
720
+ </xsl:for-each>
721
+ </xsl:variable>
722
+ <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
723
+
724
+ <xsl:for-each select="$root-style_/root-style/@*">
725
+ <xsl:choose>
726
+ <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
727
+ <xsl:attribute name="{local-name()}">
728
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
729
+ </xsl:attribute>
730
+ </xsl:when>
731
+ <xsl:otherwise>
732
+ <xsl:copy-of select="."/>
733
+ </xsl:otherwise>
734
+ </xsl:choose>
735
+ </xsl:for-each>
736
+ </xsl:template><xsl:attribute-set name="copyright-statement-style">
721
737
 
722
738
  </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
723
739
 
@@ -774,7 +790,6 @@
774
790
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
775
791
 
776
792
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
777
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
778
793
 
779
794
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
780
795
  <xsl:attribute name="white-space">pre</xsl:attribute>
@@ -863,6 +878,7 @@
863
878
 
864
879
 
865
880
 
881
+
866
882
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
867
883
 
868
884
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -1221,7 +1237,7 @@
1221
1237
 
1222
1238
 
1223
1239
 
1224
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1240
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1225
1241
 
1226
1242
 
1227
1243
 
@@ -1946,10 +1962,41 @@
1946
1962
  <xsl:sort select="@displayorder" data-type="number"/>
1947
1963
  <xsl:apply-templates select="."/>
1948
1964
  </xsl:for-each>
1949
- </xsl:template><xsl:template match="text()">
1950
- <xsl:value-of select="."/>
1965
+ </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">
1966
+
1967
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1968
+ <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))"/>
1969
+ <xsl:call-template name="replace_fo_inline_tags">
1970
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
1971
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
1972
+ <xsl:with-param name="text" select="$text"/>
1973
+ </xsl:call-template>
1974
+
1975
+ </xsl:template><xsl:template name="replace_fo_inline_tags">
1976
+ <xsl:param name="tag_open"/>
1977
+ <xsl:param name="tag_close"/>
1978
+ <xsl:param name="text"/>
1979
+ <xsl:choose>
1980
+ <xsl:when test="contains($text, $tag_open)">
1981
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
1982
+ <!-- <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text> -->
1983
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
1984
+ <fo:inline keep-together.within-line="always">
1985
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
1986
+ </fo:inline>
1987
+ <!-- <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text> -->
1988
+ <xsl:call-template name="replace_fo_inline_tags">
1989
+ <xsl:with-param name="tag_open" select="$tag_open"/>
1990
+ <xsl:with-param name="tag_close" select="$tag_close"/>
1991
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
1992
+ </xsl:call-template>
1993
+ </xsl:when>
1994
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
1995
+ </xsl:choose>
1951
1996
  </xsl:template><xsl:template match="*[local-name()='br']">
1952
1997
  <xsl:value-of select="$linebreak"/>
1998
+ </xsl:template><xsl:template match="*[local-name() = 'keep-together_within-line']">
1999
+ <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
1953
2000
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
1954
2001
  <fo:block xsl:use-attribute-sets="copyright-statement-style">
1955
2002
  <xsl:apply-templates/>
@@ -2015,8 +2062,23 @@
2015
2062
  </xsl:call-template>
2016
2063
 
2017
2064
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2018
- <!-- <xsl:call-template name="add-zero-spaces"/> -->
2019
- <xsl:call-template name="add-zero-spaces-java"/>
2065
+ <xsl:choose>
2066
+ <xsl:when test="parent::*[local-name() = 'keep-together_within-line']">
2067
+ <xsl:value-of select="."/>
2068
+ </xsl:when>
2069
+ <xsl:otherwise>
2070
+ <xsl:call-template name="addZeroWidthSpacesToTextNodes"/>
2071
+ </xsl:otherwise>
2072
+ </xsl:choose>
2073
+ </xsl:template><xsl:template name="addZeroWidthSpacesToTextNodes">
2074
+ <xsl:variable name="text"><text><xsl:call-template name="text"/></text></xsl:variable>
2075
+ <!-- <xsl:copy-of select="$text"/> -->
2076
+ <xsl:for-each select="xalan:nodeset($text)/text/node()">
2077
+ <xsl:choose>
2078
+ <xsl:when test="self::text()"><xsl:call-template name="add-zero-spaces-java"/></xsl:when>
2079
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
2080
+ </xsl:choose>
2081
+ </xsl:for-each>
2020
2082
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
2021
2083
 
2022
2084
  <xsl:variable name="table-preamble">
@@ -2138,16 +2200,9 @@
2138
2200
  </xsl:for-each>
2139
2201
  </xsl:when>
2140
2202
  <xsl:otherwise>
2141
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2142
- <xsl:choose>
2143
- <xsl:when test=". = 1 or . = 0">
2144
- <fo:table-column column-width="proportional-column-width(2)"/>
2145
- </xsl:when>
2146
- <xsl:otherwise>
2147
- <fo:table-column column-width="proportional-column-width({.})"/>
2148
- </xsl:otherwise>
2149
- </xsl:choose>
2150
- </xsl:for-each>
2203
+ <xsl:call-template name="insertTableColumnWidth">
2204
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2205
+ </xsl:call-template>
2151
2206
  </xsl:otherwise>
2152
2207
  </xsl:choose>
2153
2208
 
@@ -2311,6 +2366,7 @@
2311
2366
  <xsl:with-param name="text" select="$td_text"/>
2312
2367
  </xsl:call-template>
2313
2368
  </xsl:variable>
2369
+ <!-- <xsl:message>string_with_added_zerospaces=<xsl:value-of select="$string_with_added_zerospaces"/></xsl:message> -->
2314
2370
  <xsl:call-template name="tokenize">
2315
2371
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2316
2372
  <!-- 2009 thinspace -->
@@ -2323,6 +2379,7 @@
2323
2379
  <xsl:with-param name="words" select="xalan:nodeset($words)"/>
2324
2380
  </xsl:call-template>
2325
2381
  </xsl:variable>
2382
+ <!-- <xsl:message>max_length=<xsl:value-of select="$max_length"/></xsl:message> -->
2326
2383
  <width>
2327
2384
  <xsl:variable name="divider">
2328
2385
  <xsl:choose>
@@ -2355,6 +2412,10 @@
2355
2412
  <xsl:with-param name="table" select="$table"/>
2356
2413
  </xsl:call-template>
2357
2414
  </xsl:if>
2415
+ </xsl:template><xsl:template match="*[@keep-together.within-line]/text()" priority="2" mode="td_text">
2416
+ <!-- <xsl:message>DEBUG t1=<xsl:value-of select="."/></xsl:message>
2417
+ <xsl:message>DEBUG t2=<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/></xsl:message> -->
2418
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/>
2358
2419
  </xsl:template><xsl:template match="text()" mode="td_text">
2359
2420
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
2360
2421
  </xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
@@ -2456,16 +2517,9 @@
2456
2517
  </xsl:for-each>
2457
2518
  </xsl:when>
2458
2519
  <xsl:otherwise>
2459
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2460
- <xsl:choose>
2461
- <xsl:when test=". = 1 or . = 0">
2462
- <fo:table-column column-width="proportional-column-width(2)"/>
2463
- </xsl:when>
2464
- <xsl:otherwise>
2465
- <fo:table-column column-width="proportional-column-width({.})"/>
2466
- </xsl:otherwise>
2467
- </xsl:choose>
2468
- </xsl:for-each>
2520
+ <xsl:call-template name="insertTableColumnWidth">
2521
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2522
+ </xsl:call-template>
2469
2523
  </xsl:otherwise>
2470
2524
  </xsl:choose>
2471
2525
 
@@ -3006,8 +3060,10 @@
3006
3060
  <!-- and (not(../@class) or ../@class !='pseudocode') -->
3007
3061
  </xsl:variable>
3008
3062
 
3063
+ <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
3064
+
3009
3065
  <xsl:choose>
3010
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3066
+ <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
3011
3067
 
3012
3068
  <fo:block margin-bottom="12pt" text-align="left">
3013
3069
 
@@ -3022,7 +3078,7 @@
3022
3078
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3023
3079
  </fo:block>
3024
3080
 
3025
- </xsl:when>
3081
+ </xsl:when> <!-- END: only one component -->
3026
3082
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3027
3083
  <fo:block margin-bottom="12pt" text-align="left">
3028
3084
 
@@ -3036,8 +3092,8 @@
3036
3092
  </xsl:variable>
3037
3093
  <xsl:value-of select="$title-where"/>
3038
3094
  </fo:block>
3039
- </xsl:when>
3040
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
3095
+ </xsl:when> <!-- END: a few components -->
3096
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
3041
3097
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
3042
3098
 
3043
3099
 
@@ -3050,11 +3106,11 @@
3050
3106
  </xsl:variable>
3051
3107
  <xsl:value-of select="$title-key"/>
3052
3108
  </fo:block>
3053
- </xsl:when>
3109
+ </xsl:when> <!-- END: definition list in a figure -->
3054
3110
  </xsl:choose>
3055
3111
 
3056
3112
  <!-- a few components -->
3057
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
3113
+ <xsl:if test="$onlyOneComponent = 'false'">
3058
3114
  <fo:block>
3059
3115
 
3060
3116
 
@@ -3093,21 +3149,28 @@
3093
3149
  <xsl:apply-templates mode="dl"/>
3094
3150
  </tbody>
3095
3151
  </xsl:variable>
3096
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
3152
+ <!-- DEBUG: html-table<xsl:copy-of select="$html-table"/> -->
3097
3153
  <xsl:variable name="colwidths">
3098
3154
  <xsl:call-template name="calculate-column-widths">
3099
3155
  <xsl:with-param name="cols-count" select="2"/>
3100
3156
  <xsl:with-param name="table" select="$html-table"/>
3101
3157
  </xsl:call-template>
3102
3158
  </xsl:variable>
3103
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
3159
+ <!-- DEBUG: colwidths=<xsl:copy-of select="$colwidths"/> -->
3104
3160
  <xsl:variable name="maxlength_dt">
3105
3161
  <xsl:call-template name="getMaxLength_dt"/>
3106
3162
  </xsl:variable>
3163
+ <xsl:variable name="isContainsKeepTogetherTag_">
3164
+ false
3165
+ </xsl:variable>
3166
+ <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
3167
+ <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
3107
3168
  <xsl:call-template name="setColumnWidth_dl">
3108
3169
  <xsl:with-param name="colwidths" select="$colwidths"/>
3109
3170
  <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3171
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
3110
3172
  </xsl:call-template>
3173
+
3111
3174
  <fo:table-body>
3112
3175
  <xsl:apply-templates>
3113
3176
  <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
@@ -3116,12 +3179,13 @@
3116
3179
  </fo:table>
3117
3180
  </fo:block>
3118
3181
  </fo:block>
3119
- </xsl:if>
3182
+ </xsl:if> <!-- END: a few components -->
3120
3183
  </fo:block-container>
3121
3184
  </fo:block-container>
3122
3185
  </xsl:template><xsl:template name="setColumnWidth_dl">
3123
3186
  <xsl:param name="colwidths"/>
3124
3187
  <xsl:param name="maxlength_dt"/>
3188
+ <xsl:param name="isContainsKeepTogetherTag"/>
3125
3189
  <xsl:choose>
3126
3190
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
3127
3191
  <fo:table-column column-width="50%"/>
@@ -3129,6 +3193,11 @@
3129
3193
  </xsl:when>
3130
3194
  <xsl:otherwise>
3131
3195
  <xsl:choose>
3196
+ <xsl:when test="$isContainsKeepTogetherTag">
3197
+ <xsl:call-template name="insertTableColumnWidth">
3198
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3199
+ </xsl:call-template>
3200
+ </xsl:when>
3132
3201
  <!-- to set width check most wide chars like `W` -->
3133
3202
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
3134
3203
  <fo:table-column column-width="7%"/>
@@ -3159,20 +3228,25 @@
3159
3228
  <fo:table-column column-width="60%"/>
3160
3229
  </xsl:when>
3161
3230
  <xsl:otherwise>
3162
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
3163
- <xsl:choose>
3164
- <xsl:when test=". = 1 or . = 0">
3165
- <fo:table-column column-width="proportional-column-width(2)"/>
3166
- </xsl:when>
3167
- <xsl:otherwise>
3168
- <fo:table-column column-width="proportional-column-width({.})"/>
3169
- </xsl:otherwise>
3170
- </xsl:choose>
3171
- </xsl:for-each>
3231
+ <xsl:call-template name="insertTableColumnWidth">
3232
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3233
+ </xsl:call-template>
3172
3234
  </xsl:otherwise>
3173
3235
  </xsl:choose>
3174
3236
  </xsl:otherwise>
3175
3237
  </xsl:choose>
3238
+ </xsl:template><xsl:template name="insertTableColumnWidth">
3239
+ <xsl:param name="colwidths"/>
3240
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
3241
+ <xsl:choose>
3242
+ <xsl:when test=". = 1 or . = 0">
3243
+ <fo:table-column column-width="proportional-column-width(2)"/>
3244
+ </xsl:when>
3245
+ <xsl:otherwise>
3246
+ <fo:table-column column-width="proportional-column-width({.})"/>
3247
+ </xsl:otherwise>
3248
+ </xsl:choose>
3249
+ </xsl:for-each>
3176
3250
  </xsl:template><xsl:template name="getMaxLength_dt">
3177
3251
  <xsl:variable name="lengths">
3178
3252
  <xsl:for-each select="*[local-name()='dt']">
@@ -3196,7 +3270,6 @@
3196
3270
  <xsl:value-of select="$maxLength"/>
3197
3271
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3198
3272
  <xsl:param name="key_iso"/>
3199
-
3200
3273
  <!-- <tr>
3201
3274
  <td>NOTE</td>
3202
3275
  <td>
@@ -3204,18 +3277,30 @@
3204
3277
  </td>
3205
3278
  </tr>
3206
3279
  -->
3207
- <fo:table-row>
3280
+ <!-- OLD Variant -->
3281
+ <!-- <fo:table-row>
3208
3282
  <fo:table-cell>
3209
3283
  <fo:block margin-top="6pt">
3210
3284
  <xsl:if test="normalize-space($key_iso) = 'true'">
3211
3285
  <xsl:attribute name="margin-top">0</xsl:attribute>
3212
3286
  </xsl:if>
3213
- <xsl:apply-templates select="*[local-name() = 'name']"/>
3287
+ <xsl:apply-templates select="*[local-name() = 'name']" />
3214
3288
  </fo:block>
3215
3289
  </fo:table-cell>
3216
3290
  <fo:table-cell>
3217
3291
  <fo:block>
3218
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3292
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" />
3293
+ </fo:block>
3294
+ </fo:table-cell>
3295
+ </fo:table-row> -->
3296
+ <!-- <tr>
3297
+ <td number-columns-spanned="2">NOTE <xsl:apply-templates /> </td>
3298
+ </tr>
3299
+ -->
3300
+ <fo:table-row>
3301
+ <fo:table-cell number-columns-spanned="2">
3302
+ <fo:block>
3303
+ <xsl:call-template name="note"/>
3219
3304
  </fo:block>
3220
3305
  </fo:table-cell>
3221
3306
  </fo:table-row>
@@ -3317,13 +3402,15 @@
3317
3402
  <xsl:choose>
3318
3403
  <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3319
3404
  <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3320
- <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3405
+ <xsl:when test="ancestor::*[local-name()='note'] or ancestor::*[local-name()='example']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3321
3406
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3322
3407
  </xsl:choose>
3323
3408
  </xsl:attribute>
3324
3409
  </xsl:if>
3325
3410
  <xsl:apply-templates/>
3326
3411
  </fo:inline>
3412
+ </xsl:template><xsl:template match="*[local-name()='tt']/text()" priority="2">
3413
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
3327
3414
  </xsl:template><xsl:template match="*[local-name()='underline']">
3328
3415
  <fo:inline text-decoration="underline">
3329
3416
  <xsl:apply-templates/>
@@ -3471,41 +3558,50 @@
3471
3558
  <fo:block break-after="page"/>
3472
3559
  <fo:block> </fo:block>
3473
3560
  <fo:block break-after="page"/>
3561
+ </xsl:template><xsl:template match="*[local-name() = 'span']">
3562
+ <xsl:apply-templates/>
3474
3563
  </xsl:template><xsl:template name="tokenize">
3475
3564
  <xsl:param name="text"/>
3476
3565
  <xsl:param name="separator" select="' '"/>
3477
3566
  <xsl:choose>
3478
3567
  <xsl:when test="not(contains($text, $separator))">
3479
3568
  <word>
3480
- <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
3481
- <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
3482
3569
  <xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
3483
- <xsl:variable name="len_str">
3484
- <xsl:choose>
3485
- <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
3486
- <xsl:value-of select="$len_str_tmp * 1.5"/>
3487
- </xsl:when>
3488
- <xsl:otherwise>
3489
- <xsl:value-of select="$len_str_tmp"/>
3490
- </xsl:otherwise>
3491
- </xsl:choose>
3492
- </xsl:variable>
3493
-
3494
- <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
3495
- <xsl:message>
3496
- div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
3497
- len_str=<xsl:value-of select="$len_str"/>
3498
- len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
3499
- </xsl:message>
3500
- </xsl:if> -->
3501
- <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
3502
- <len_str><xsl:value-of select="$len_str"/></len_str> -->
3503
3570
  <xsl:choose>
3504
- <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
3505
- <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
3571
+ <xsl:when test="normalize-space(translate($text, 'X', '')) = ''"> <!-- special case for keep-together.within-line -->
3572
+ <xsl:value-of select="$len_str_tmp"/>
3506
3573
  </xsl:when>
3507
3574
  <xsl:otherwise>
3508
- <xsl:value-of select="$len_str"/>
3575
+ <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
3576
+ <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
3577
+ <xsl:variable name="len_str">
3578
+ <xsl:choose>
3579
+ <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
3580
+ <xsl:value-of select="$len_str_tmp * 1.5"/>
3581
+ </xsl:when>
3582
+ <xsl:otherwise>
3583
+ <xsl:value-of select="$len_str_tmp"/>
3584
+ </xsl:otherwise>
3585
+ </xsl:choose>
3586
+ </xsl:variable>
3587
+
3588
+ <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
3589
+ <xsl:message>
3590
+ div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
3591
+ len_str=<xsl:value-of select="$len_str"/>
3592
+ len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
3593
+ </xsl:message>
3594
+ </xsl:if> -->
3595
+ <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
3596
+ <len_str><xsl:value-of select="$len_str"/></len_str> -->
3597
+ <xsl:choose>
3598
+ <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
3599
+ <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
3600
+ </xsl:when>
3601
+ <xsl:otherwise>
3602
+ <xsl:value-of select="$len_str"/>
3603
+ </xsl:otherwise>
3604
+ </xsl:choose>
3509
3605
  </xsl:otherwise>
3510
3606
  </xsl:choose>
3511
3607
  </word>
@@ -3591,24 +3687,28 @@
3591
3687
  </xsl:template><xsl:template name="add-zero-spaces-equal">
3592
3688
  <xsl:param name="text" select="."/>
3593
3689
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
3690
+ <xsl:variable name="regex_zero-space-after-equals">(==========)</xsl:variable>
3594
3691
  <xsl:variable name="zero-space-after-equal">=</xsl:variable>
3692
+ <xsl:variable name="regex_zero-space-after-equal">(=)</xsl:variable>
3595
3693
  <xsl:variable name="zero-space">​</xsl:variable>
3596
3694
  <xsl:choose>
3597
3695
  <xsl:when test="contains($text, $zero-space-after-equals)">
3598
- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
3696
+ <!-- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
3599
3697
  <xsl:value-of select="$zero-space-after-equals"/>
3600
3698
  <xsl:value-of select="$zero-space"/>
3601
3699
  <xsl:call-template name="add-zero-spaces-equal">
3602
3700
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
3603
- </xsl:call-template>
3701
+ </xsl:call-template> -->
3702
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equals,concat('$1',$zero_width_space))"/>
3604
3703
  </xsl:when>
3605
3704
  <xsl:when test="contains($text, $zero-space-after-equal)">
3606
- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
3705
+ <!-- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
3607
3706
  <xsl:value-of select="$zero-space-after-equal"/>
3608
3707
  <xsl:value-of select="$zero-space"/>
3609
3708
  <xsl:call-template name="add-zero-spaces-equal">
3610
3709
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
3611
- </xsl:call-template>
3710
+ </xsl:call-template> -->
3711
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equal,concat('$1',$zero_width_space))"/>
3612
3712
  </xsl:when>
3613
3713
  <xsl:otherwise>
3614
3714
  <xsl:value-of select="$text"/>
@@ -3776,6 +3876,9 @@
3776
3876
  <xsl:variable name="isDeleted" select="@deleted"/>
3777
3877
 
3778
3878
  <fo:inline xsl:use-attribute-sets="mathml-style">
3879
+
3880
+
3881
+
3779
3882
 
3780
3883
 
3781
3884
  <xsl:call-template name="setTrackChangesStyles">
@@ -3783,48 +3886,80 @@
3783
3886
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
3784
3887
  </xsl:call-template>
3785
3888
 
3889
+ <xsl:if test="$add_math_as_text = 'true'">
3890
+ <!-- insert helper tag -->
3891
+ <!-- set unique font-size (fiction) -->
3892
+ <xsl:variable name="font-size_sfx"><xsl:number level="any"/></xsl:variable>
3893
+ <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 -->
3894
+ </xsl:if>
3786
3895
 
3787
-
3788
- <xsl:variable name="mathml">
3789
- <xsl:apply-templates select="." mode="mathml"/>
3896
+ <xsl:variable name="mathml_content">
3897
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
3790
3898
  </xsl:variable>
3791
- <fo:instream-foreign-object fox:alt-text="Math">
3792
3899
 
3900
+
3901
+ <xsl:call-template name="mathml_instream_object">
3902
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
3903
+ </xsl:call-template>
3793
3904
 
3794
-
3795
- <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
3796
- <xsl:variable name="comment_text_">
3797
- <xsl:choose>
3798
- <xsl:when test="normalize-space($comment_text_following) != ''">
3799
- <xsl:value-of select="$comment_text_following"/>
3800
- </xsl:when>
3801
- <xsl:otherwise>
3802
- <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
3803
- </xsl:otherwise>
3804
- </xsl:choose>
3805
- </xsl:variable>
3806
- <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
3807
-
3808
- <xsl:if test="normalize-space($comment_text) != ''">
3809
- <!-- put Mathin Alternate Text -->
3810
- <xsl:attribute name="fox:alt-text">
3811
- <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
3812
- </xsl:attribute>
3813
- </xsl:if>
3814
-
3815
- <xsl:variable name="mathml_content">
3816
- <xsl:apply-templates select="." mode="mathml_actual_text"/>
3817
- </xsl:variable>
3818
- <!-- put MathML in Actual Text -->
3819
- <xsl:attribute name="fox:actual-text">
3820
- <xsl:value-of select="$mathml_content"/>
3821
- </xsl:attribute>
3822
-
3823
-
3824
-
3825
- <xsl:copy-of select="xalan:nodeset($mathml)"/>
3826
- </fo:instream-foreign-object>
3905
+
3827
3906
  </fo:inline>
3907
+ </xsl:template><xsl:template name="getMathml_comment_text">
3908
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
3909
+ <xsl:variable name="comment_text_">
3910
+ <xsl:choose>
3911
+ <xsl:when test="normalize-space($comment_text_following) != ''">
3912
+ <xsl:value-of select="$comment_text_following"/>
3913
+ </xsl:when>
3914
+ <xsl:otherwise>
3915
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
3916
+ </xsl:otherwise>
3917
+ </xsl:choose>
3918
+ </xsl:variable>
3919
+ <xsl:variable name="comment_text_2" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
3920
+ <xsl:variable name="comment_text" select="java:trim(java:java.lang.String.new($comment_text_2))"/>
3921
+ <xsl:value-of select="$comment_text"/>
3922
+ </xsl:template><xsl:template name="mathml_instream_object">
3923
+ <xsl:param name="comment_text"/>
3924
+ <xsl:param name="mathml_content"/>
3925
+
3926
+ <xsl:variable name="comment_text_">
3927
+ <xsl:choose>
3928
+ <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
3929
+ <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
3930
+ </xsl:choose>
3931
+ </xsl:variable>
3932
+
3933
+ <xsl:variable name="mathml">
3934
+ <xsl:apply-templates select="." mode="mathml"/>
3935
+ </xsl:variable>
3936
+
3937
+ <fo:instream-foreign-object fox:alt-text="Math">
3938
+
3939
+
3940
+
3941
+
3942
+
3943
+
3944
+
3945
+ <!-- put MathML in Actual Text -->
3946
+ <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
3947
+ <xsl:attribute name="fox:actual-text">
3948
+ <xsl:value-of select="$mathml_content"/>
3949
+ </xsl:attribute>
3950
+
3951
+ <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
3952
+ <xsl:if test="normalize-space($comment_text_) != ''">
3953
+ <!-- put Mathin Alternate Text -->
3954
+ <xsl:attribute name="fox:alt-text">
3955
+ <xsl:value-of select="$comment_text_"/>
3956
+ </xsl:attribute>
3957
+ </xsl:if>
3958
+ <!-- </xsl:if> -->
3959
+
3960
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
3961
+
3962
+ </fo:instream-foreign-object>
3828
3963
  </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
3829
3964
  <!-- <xsl:text>a+b</xsl:text> -->
3830
3965
  <xsl:text>&lt;</xsl:text>
@@ -3855,7 +3990,9 @@
3855
3990
  <!-- replace start and end spaces to non-break space -->
3856
3991
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3857
3992
  </xsl:copy>
3858
- </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">
3993
+ </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">
3994
+ <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
3995
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3859
3996
  <xsl:variable name="target">
3860
3997
  <xsl:choose>
3861
3998
  <xsl:when test="@updatetype = 'true'">
@@ -4088,7 +4225,12 @@
4088
4225
 
4089
4226
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4090
4227
 
4228
+ <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
4229
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
4230
+ </xsl:if>
4231
+
4091
4232
 
4233
+
4092
4234
 
4093
4235
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
4094
4236
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
@@ -4445,18 +4587,33 @@
4445
4587
  </xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
4446
4588
  <xsl:copy>
4447
4589
  <xsl:apply-templates select="@*" mode="svg_update"/>
4448
- <xsl:variable name="viewbox">
4590
+ <xsl:variable name="viewbox_">
4449
4591
  <xsl:call-template name="split">
4450
4592
  <xsl:with-param name="pText" select="@viewBox"/>
4451
4593
  <xsl:with-param name="sep" select="' '"/>
4452
4594
  </xsl:call-template>
4453
4595
  </xsl:variable>
4596
+ <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
4597
+ <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
4598
+ <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
4599
+
4454
4600
  <xsl:attribute name="width">
4455
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
4601
+ <xsl:choose>
4602
+ <xsl:when test="$width != ''">
4603
+ <xsl:value-of select="round($width)"/>
4604
+ </xsl:when>
4605
+ <xsl:otherwise>400</xsl:otherwise> <!-- default width -->
4606
+ </xsl:choose>
4456
4607
  </xsl:attribute>
4457
4608
  <xsl:attribute name="height">
4458
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
4609
+ <xsl:choose>
4610
+ <xsl:when test="$height != ''">
4611
+ <xsl:value-of select="round($height)"/>
4612
+ </xsl:when>
4613
+ <xsl:otherwise>400</xsl:otherwise> <!-- default height -->
4614
+ </xsl:choose>
4459
4615
  </xsl:attribute>
4616
+
4460
4617
  <xsl:apply-templates mode="svg_update"/>
4461
4618
  </xsl:copy>
4462
4619
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
@@ -4651,7 +4808,11 @@
4651
4808
  <xsl:apply-templates mode="bookmarks"/>
4652
4809
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
4653
4810
  <xsl:apply-templates select="."/>
4654
- </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">
4811
+ </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">
4812
+ <xsl:apply-templates mode="contents"/>
4813
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
4814
+ <xsl:apply-templates mode="bookmarks"/>
4815
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="bookmarks">
4655
4816
  <xsl:apply-templates mode="bookmarks"/>
4656
4817
  </xsl:template><xsl:template name="addBookmarks">
4657
4818
  <xsl:param name="contents"/>
@@ -4933,7 +5094,9 @@
4933
5094
  <xsl:apply-templates/>
4934
5095
  </xsl:otherwise>
4935
5096
  </xsl:choose>
4936
- </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">
5097
+ </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">
5098
+ <xsl:value-of select="."/>
5099
+ </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
4937
5100
  <xsl:text> </xsl:text>
4938
5101
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
4939
5102
  <xsl:copy>
@@ -4964,9 +5127,22 @@
4964
5127
  </xsl:when>
4965
5128
  <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
4966
5129
  </xsl:choose>
5130
+ </xsl:template><xsl:template match="text()" mode="contents_item">
5131
+ <xsl:call-template name="keep_together_standard_number"/>
5132
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="contents_item">
5133
+ <xsl:apply-templates mode="contents_item"/>
4967
5134
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4968
5135
 
4969
5136
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
5137
+
5138
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
5139
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5140
+ </xsl:if>
5141
+
5142
+ <xsl:if test="ancestor::*[local-name() = 'example']">
5143
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5144
+ </xsl:if>
5145
+
4970
5146
  <xsl:copy-of select="@id"/>
4971
5147
 
4972
5148
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -5066,17 +5242,15 @@
5066
5242
 
5067
5243
  <!-- split text by zero-width space -->
5068
5244
  <xsl:variable name="text_step4">
5069
- <xsl:call-template name="split">
5245
+ <xsl:call-template name="split_for_interspers">
5070
5246
  <xsl:with-param name="pText" select="$text_step3"/>
5071
5247
  <xsl:with-param name="sep" select="$zero_width_space"/>
5072
- <xsl:with-param name="normalize-space">false</xsl:with-param>
5073
- <xsl:with-param name="keep_sep">true</xsl:with-param>
5074
5248
  </xsl:call-template>
5075
5249
  </xsl:variable>
5076
5250
 
5077
- <xsl:for-each select="xalan:nodeset($text_step4)/item">
5251
+ <xsl:for-each select="xalan:nodeset($text_step4)/node()">
5078
5252
  <xsl:choose>
5079
- <xsl:when test="string-length() &gt; 30"> <!-- word with length more than 30 will be interspersed with zero-width space -->
5253
+ <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
5080
5254
  <xsl:call-template name="interspers">
5081
5255
  <xsl:with-param name="str" select="."/>
5082
5256
  </xsl:call-template>
@@ -5087,6 +5261,30 @@
5087
5261
  </xsl:choose>
5088
5262
  </xsl:for-each>
5089
5263
 
5264
+ </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">
5265
+ <xsl:param name="pText" select="."/>
5266
+ <xsl:param name="sep" select="','"/>
5267
+ <!-- word with length more than 30 will be interspersed with zero-width space -->
5268
+ <xsl:variable name="regex" select="concat('([^', $zero_width_space, ']{31,})')"/> <!-- sequence of characters (more 31), that doesn't contains zero-width space -->
5269
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new($pText),$regex,concat($interspers_tag_open,'$1',$interspers_tag_close))"/>
5270
+ <xsl:call-template name="replace_tag_interspers">
5271
+ <xsl:with-param name="text" select="$text"/>
5272
+ </xsl:call-template>
5273
+ </xsl:template><xsl:template name="replace_tag_interspers">
5274
+ <xsl:param name="text"/>
5275
+ <xsl:choose>
5276
+ <xsl:when test="contains($text, $interspers_tag_open)">
5277
+ <xsl:value-of select="substring-before($text, $interspers_tag_open)"/>
5278
+ <xsl:variable name="text_after" select="substring-after($text, $interspers_tag_open)"/>
5279
+ <interspers>
5280
+ <xsl:value-of select="substring-before($text_after, $interspers_tag_close)"/>
5281
+ </interspers>
5282
+ <xsl:call-template name="replace_tag_interspers">
5283
+ <xsl:with-param name="text" select="substring-after($text_after, $interspers_tag_close)"/>
5284
+ </xsl:call-template>
5285
+ </xsl:when>
5286
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
5287
+ </xsl:choose>
5090
5288
  </xsl:template><xsl:template name="interspers">
5091
5289
  <xsl:param name="str"/>
5092
5290
  <xsl:param name="char" select="$zero_width_space"/>
@@ -5422,39 +5620,67 @@
5422
5620
  </xsl:otherwise>
5423
5621
  </xsl:choose>
5424
5622
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5425
- <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5426
-
5623
+
5624
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
5625
+
5427
5626
 
5627
+
5428
5628
  <xsl:variable name="fo_element">
5429
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
5629
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
5430
5630
  block
5431
5631
  </xsl:variable>
5432
5632
 
5433
- <!-- display 'EXAMPLE' -->
5434
- <xsl:apply-templates select="*[local-name()='name']">
5435
- <xsl:with-param name="fo_element" select="$fo_element"/>
5436
- </xsl:apply-templates>
5633
+ <fo:block-container margin-left="0mm">
5437
5634
 
5438
- <xsl:choose>
5439
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
5440
- <fo:block-container xsl:use-attribute-sets="example-body-style">
5441
- <fo:block-container margin-left="0mm" margin-right="0mm">
5442
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5635
+ <xsl:choose>
5636
+
5637
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
5638
+
5639
+ <!-- display name 'EXAMPLE' in a separate block -->
5640
+ <fo:block>
5641
+ <xsl:apply-templates select="*[local-name()='name']">
5443
5642
  <xsl:with-param name="fo_element" select="$fo_element"/>
5444
5643
  </xsl:apply-templates>
5644
+ </fo:block>
5645
+
5646
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
5647
+ <fo:block-container margin-left="0mm" margin-right="0mm">
5648
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5649
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5650
+ </xsl:apply-templates>
5651
+ </fo:block-container>
5445
5652
  </fo:block-container>
5446
- </fo:block-container>
5447
- </xsl:when>
5448
- <xsl:otherwise>
5449
- <fo:inline>
5450
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5451
- <xsl:with-param name="fo_element" select="$fo_element"/>
5452
- </xsl:apply-templates>
5453
- </fo:inline>
5454
- </xsl:otherwise>
5455
- </xsl:choose>
5456
-
5457
- </fo:block>
5653
+ </xsl:when> <!-- end block -->
5654
+
5655
+ <xsl:otherwise> <!-- inline -->
5656
+
5657
+ <!-- display 'EXAMPLE' and first element in the same line -->
5658
+ <fo:block>
5659
+ <xsl:apply-templates select="*[local-name()='name']">
5660
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5661
+ </xsl:apply-templates>
5662
+ <fo:inline>
5663
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
5664
+ <xsl:with-param name="fo_element" select="$fo_element"/>
5665
+ </xsl:apply-templates>
5666
+ </fo:inline>
5667
+ </fo:block>
5668
+
5669
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
5670
+ <!-- display further elements in blocks -->
5671
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
5672
+ <fo:block-container margin-left="0mm" margin-right="0mm">
5673
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
5674
+ <xsl:with-param name="fo_element" select="'block'"/>
5675
+ </xsl:apply-templates>
5676
+ </fo:block-container>
5677
+ </fo:block-container>
5678
+ </xsl:if>
5679
+ </xsl:otherwise> <!-- end inline -->
5680
+
5681
+ </xsl:choose>
5682
+ </fo:block-container>
5683
+ </fo:block-container>
5458
5684
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
5459
5685
  <xsl:param name="fo_element">block</xsl:param>
5460
5686
 
@@ -5486,10 +5712,16 @@
5486
5712
  </xsl:variable>
5487
5713
  <xsl:choose>
5488
5714
  <xsl:when test="starts-with(normalize-space($element), 'block')">
5489
- <fo:block xsl:use-attribute-sets="example-p-style">
5490
-
5491
- <xsl:apply-templates/>
5492
- </fo:block>
5715
+ <fo:block-container>
5716
+ <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
5717
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5718
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5719
+ </xsl:if>
5720
+ <fo:block xsl:use-attribute-sets="example-p-style">
5721
+
5722
+ <xsl:apply-templates/>
5723
+ </fo:block>
5724
+ </fo:block-container>
5493
5725
  </xsl:when>
5494
5726
  <xsl:otherwise>
5495
5727
  <fo:inline xsl:use-attribute-sets="example-p-style">
@@ -5534,7 +5766,7 @@
5534
5766
  </xsl:otherwise>
5535
5767
  </xsl:choose> -->
5536
5768
  </fo:block>
5537
- </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
5769
+ </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">
5538
5770
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5539
5771
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5540
5772
  <xsl:if test="normalize-space() != ''">
@@ -5570,7 +5802,8 @@
5570
5802
  <fo:inline><xsl:apply-templates/></fo:inline>
5571
5803
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5572
5804
  <xsl:if test="normalize-space() != ''">
5573
- <xsl:value-of select="."/>
5805
+ <!-- <xsl:value-of select="."/> -->
5806
+ <xsl:call-template name="text"/>
5574
5807
  </xsl:if>
5575
5808
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5576
5809
  <fo:block-container margin-left="0mm">
@@ -5667,7 +5900,16 @@
5667
5900
  </fo:inline>
5668
5901
  </xsl:when>
5669
5902
  <xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
5670
- <fo:inline><xsl:apply-templates/></fo:inline>
5903
+
5904
+ <!-- if in bibitem[@hidden='true'] there is url[@type='src'], then create hyperlink -->
5905
+ <xsl:variable name="uri_src" select="normalize-space($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'src'])"/>
5906
+ <xsl:choose>
5907
+ <xsl:when test="$uri_src != ''">
5908
+ <fo:basic-link external-destination="{$uri_src}" fox:alt-text="{$uri_src}"><xsl:apply-templates/></fo:basic-link>
5909
+ </xsl:when>
5910
+ <xsl:otherwise><fo:inline><xsl:apply-templates/></fo:inline></xsl:otherwise>
5911
+ </xsl:choose>
5912
+
5671
5913
  </xsl:otherwise>
5672
5914
  </xsl:choose>
5673
5915
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
@@ -5843,10 +6085,24 @@
5843
6085
 
5844
6086
  </fo:block>
5845
6087
  <xsl:apply-templates/>
5846
- </xsl:template><xsl:template match="*[local-name() = 'review']">
6088
+ </xsl:template><xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
5847
6089
  <!-- comment 2019-11-29 -->
5848
6090
  <!-- <fo:block font-weight="bold">Review:</fo:block>
5849
6091
  <xsl:apply-templates /> -->
6092
+
6093
+ <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
6094
+
6095
+ <xsl:choose>
6096
+ <!-- if there isn't the attribute '@from', then -->
6097
+ <xsl:when test="$id_from = ''">
6098
+ <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
6099
+ </xsl:when>
6100
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
6101
+ <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
6102
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
6103
+ </xsl:when>
6104
+ </xsl:choose>
6105
+
5850
6106
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
5851
6107
  <!-- 0xA0 to space replacement -->
5852
6108
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -6205,7 +6461,10 @@
6205
6461
  <!-- to split by '_' and other chars -->
6206
6462
  <xsl:call-template name="add-zero-spaces-java"/>
6207
6463
  </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
6208
- <fo:inline id="{@id}" font-size="1pt"/>
6464
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
6465
+ <fo:inline id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:inline>
6466
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
6467
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"> </xsl:if>
6209
6468
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
6210
6469
  <!-- <row>
6211
6470
  <date>05-07-2013</date>
@@ -6799,6 +7058,120 @@
6799
7058
  <xsl:apply-templates select="." mode="update_xml_step1"/>
6800
7059
  </xsl:for-each>
6801
7060
  </xsl:copy>
7061
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
7062
+ <xsl:apply-templates mode="update_xml_step1"/>
7063
+ </xsl:template><xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
7064
+ <xsl:copy>
7065
+ <xsl:apply-templates select="@*|node()" mode="update_xml_enclose_keep-together_within-line"/>
7066
+ </xsl:copy>
7067
+ </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">
7068
+
7069
+ <!-- enclose standard's number into tag 'keep-together_within-line' -->
7070
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
7071
+ <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
7072
+ <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
7073
+ <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))"/>
7074
+ <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
7075
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
7076
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
7077
+ <xsl:with-param name="text" select="$text_"/>
7078
+ </xsl:call-template></text></xsl:variable>
7079
+
7080
+ <xsl:variable name="parent" select="local-name(..)"/>
7081
+
7082
+ <xsl:variable name="text2">
7083
+ <text><xsl:for-each select="xalan:nodeset($text)/text/node()">
7084
+ <xsl:copy-of select="."/>
7085
+ </xsl:for-each></text>
7086
+ </xsl:variable>
7087
+
7088
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
7089
+ <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
7090
+ <xsl:variable name="text3">
7091
+ <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
7092
+ <xsl:choose>
7093
+ <xsl:when test="self::text()">
7094
+ <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))"/>
7095
+ <xsl:variable name="text_units"><text><xsl:call-template name="replace_text_tags">
7096
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
7097
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
7098
+ <xsl:with-param name="text" select="$text_units_"/>
7099
+ </xsl:call-template></text></xsl:variable>
7100
+ <xsl:copy-of select="xalan:nodeset($text_units)/text/node()"/>
7101
+ </xsl:when>
7102
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
7103
+ </xsl:choose>
7104
+ </xsl:for-each></text>
7105
+ </xsl:variable>
7106
+
7107
+ <xsl:choose>
7108
+ <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
7109
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
7110
+ <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
7111
+ <xsl:for-each select="xalan:nodeset($text3)/text/node()">
7112
+ <xsl:choose>
7113
+ <xsl:when test="self::text()">
7114
+ <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))"/>
7115
+ <xsl:variable name="text_dots"><text><xsl:call-template name="replace_text_tags">
7116
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
7117
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
7118
+ <xsl:with-param name="text" select="$text_dots_"/>
7119
+ </xsl:call-template></text></xsl:variable>
7120
+ <xsl:copy-of select="xalan:nodeset($text_dots)/text/node()"/>
7121
+ </xsl:when>
7122
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
7123
+ </xsl:choose>
7124
+ </xsl:for-each>
7125
+ </xsl:when>
7126
+ <xsl:otherwise><xsl:copy-of select="xalan:nodeset($text3)/text/node()"/></xsl:otherwise>
7127
+ </xsl:choose>
7128
+
7129
+ </xsl:template><xsl:template name="replace_text_tags">
7130
+ <xsl:param name="tag_open"/>
7131
+ <xsl:param name="tag_close"/>
7132
+ <xsl:param name="text"/>
7133
+ <xsl:choose>
7134
+ <xsl:when test="contains($text, $tag_open)">
7135
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
7136
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
7137
+
7138
+ <xsl:element name="{substring-before(substring-after($tag_open, '###'),'###')}">
7139
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
7140
+ </xsl:element>
7141
+
7142
+ <xsl:call-template name="replace_text_tags">
7143
+ <xsl:with-param name="tag_open" select="$tag_open"/>
7144
+ <xsl:with-param name="tag_close" select="$tag_close"/>
7145
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
7146
+ </xsl:call-template>
7147
+ </xsl:when>
7148
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
7149
+ </xsl:choose>
7150
+ </xsl:template><xsl:template name="printEdition">
7151
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
7152
+ <xsl:text> </xsl:text>
7153
+ <xsl:choose>
7154
+ <xsl:when test="$edition_i18n != ''">
7155
+ <!-- Example: <edition language="fr">deuxième édition</edition> -->
7156
+ <xsl:call-template name="capitalize">
7157
+ <xsl:with-param name="str" select="$edition_i18n"/>
7158
+ </xsl:call-template>
7159
+ </xsl:when>
7160
+ <xsl:otherwise>
7161
+ <xsl:variable name="edition" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
7162
+ <xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
7163
+ <xsl:call-template name="capitalize">
7164
+ <xsl:with-param name="str">
7165
+ <xsl:call-template name="getLocalizedString">
7166
+ <xsl:with-param name="key">edition</xsl:with-param>
7167
+ </xsl:call-template>
7168
+ </xsl:with-param>
7169
+ </xsl:call-template>
7170
+ <xsl:text> </xsl:text>
7171
+ <xsl:value-of select="$edition"/>
7172
+ </xsl:if>
7173
+ </xsl:otherwise>
7174
+ </xsl:choose>
6802
7175
  </xsl:template><xsl:template name="convertDate">
6803
7176
  <xsl:param name="date"/>
6804
7177
  <xsl:param name="format" select="'short'"/>