metanorma-un 0.8.8 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -615,6 +615,7 @@
615
615
  </xsl:template>
616
616
 
617
617
  <xsl:template match="un:p" name="paragraph">
618
+ <xsl:param name="split_keep-within-line"/>
618
619
  <fo:block>
619
620
  <xsl:if test="following-sibling::*">
620
621
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -625,7 +626,9 @@
625
626
  <xsl:otherwise>justify</xsl:otherwise>
626
627
  </xsl:choose>
627
628
  </xsl:attribute>
628
- <xsl:apply-templates/>
629
+ <xsl:apply-templates>
630
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
631
+ </xsl:apply-templates>
629
632
  </fo:block>
630
633
  </xsl:template>
631
634
 
@@ -775,85 +778,6 @@
775
778
  </fo:block-container>
776
779
  </xsl:template>
777
780
 
778
-
779
- <!-- Examples:
780
- [b-ASM] b-ASM, http://www.eecs.umich.edu/gasm/ (accessed 20 March 2018).
781
- [b-Börger & Stärk] b-Börger & Stärk, Börger, E., and Stärk, R. S. (2003), Abstract State Machines: A Method for High-Level System Design and Analysis, Springer-Verlag.
782
- -->
783
- <xsl:template match="un:annex//un:bibitem">
784
- <fo:block id="{@id}" margin-top="6pt" margin-left="12mm" text-indent="-12mm">
785
- <xsl:if test="un:formattedref">
786
- <xsl:choose>
787
- <xsl:when test="un:docidentifier[@type = 'metanorma']">
788
- <xsl:attribute name="margin-left">0</xsl:attribute>
789
- <xsl:attribute name="text-indent">0</xsl:attribute>
790
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
791
- <!-- create list -->
792
- <fo:list-block>
793
- <fo:list-item>
794
- <fo:list-item-label end-indent="label-end()">
795
- <fo:block>
796
- <xsl:apply-templates select="un:docidentifier[@type = 'metanorma']" mode="process"/>
797
- </fo:block>
798
- </fo:list-item-label>
799
- <fo:list-item-body start-indent="body-start()">
800
- <fo:block margin-left="3mm">
801
- <xsl:apply-templates select="un:formattedref"/>
802
- </fo:block>
803
- </fo:list-item-body>
804
- </fo:list-item>
805
- </fo:list-block>
806
- </xsl:when>
807
- <xsl:otherwise>
808
- <xsl:apply-templates select="un:formattedref"/>
809
- <xsl:apply-templates select="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process"/>
810
- </xsl:otherwise>
811
- </xsl:choose>
812
- </xsl:if>
813
- <xsl:if test="un:title">
814
- <xsl:for-each select="un:contributor">
815
- <xsl:value-of select="un:organization/un:name"/>
816
- <xsl:if test="position() != last()">, </xsl:if>
817
- </xsl:for-each>
818
- <xsl:text> (</xsl:text>
819
- <xsl:variable name="date">
820
- <xsl:choose>
821
- <xsl:when test="un:date[@type='issued']">
822
- <xsl:value-of select="un:date[@type='issued']/un:on"/>
823
- </xsl:when>
824
- <xsl:otherwise>
825
- <xsl:value-of select="un:date/un:on"/>
826
- </xsl:otherwise>
827
- </xsl:choose>
828
- </xsl:variable>
829
- <xsl:value-of select="$date"/>
830
- <xsl:text>) </xsl:text>
831
- <fo:inline font-style="italic"><xsl:value-of select="un:title"/></fo:inline>
832
- <xsl:if test="un:contributor[un:role/@type='publisher']/un:organization/un:name">
833
- <xsl:text> (</xsl:text><xsl:value-of select="un:contributor[un:role/@type='publisher']/un:organization/un:name"/><xsl:text>)</xsl:text>
834
- </xsl:if>
835
- <xsl:text>, </xsl:text>
836
- <xsl:value-of select="$date"/>
837
- <xsl:text>. </xsl:text>
838
- <xsl:value-of select="un:docidentifier"/>
839
- <xsl:value-of select="$linebreak"/>
840
- <xsl:value-of select="un:uri"/>
841
- </xsl:if>
842
- </fo:block>
843
- </xsl:template>
844
-
845
- <xsl:template match="un:annex//un:bibitem//un:formattedref">
846
- <xsl:apply-templates/>
847
- </xsl:template>
848
-
849
- <xsl:template match="un:docidentifier[@type = 'metanorma' or @type = 'metanorma-ordinal']" mode="process">
850
- <xsl:apply-templates/>
851
- </xsl:template>
852
- <xsl:template match="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process">
853
- <xsl:text> [</xsl:text><xsl:apply-templates/><xsl:text>]</xsl:text>
854
- </xsl:template>
855
- <xsl:template match="un:docidentifier"/>
856
-
857
781
 
858
782
 
859
783
  <!-- ============================ -->
@@ -902,12 +826,41 @@
902
826
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAUgAAAEfCAYAAAAjn198AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA8BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo4M0JCQjMxNzJBNjcxMUVBQjQ3MkM1NDNGQjcxMjlFQyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4M0JCQjMxNjJBNjcxMUVBQjQ3MkM1NDNGQjcxMjlFQyIgeG1wOkNyZ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Fg30wCpqxS77aMbqfQxzNrBdkSq2TapiRt1c7SixuBEqailG+UOSWqvpXjNcbDcKZU4Cmyln7MgNKiZ6KHDMbzmg7QHkGzDXPLjJHnv0bXeLZLbpbXdLimQmM8Xdf3ddugE6ejsvSGV9EY7svYkN/EXLAjQzsrBhEf7qzGv0R0SJ47XZnQ4QTpqkrzIsZ5c8jwSDbnNczI4p0+1jdtizByEIhGdsMkvuyPudHU4oqDAxtIYctwmdXtORud1u1TtUmlxtOb7br/0DidIRyVQTHiJHV2wFqcA3tplGZ/fw5pjaV1D7IKEwnzSt4DDCdIRB9IEaQFQWrADxwBhLKtzMk9iQifY0emPOFR+a0HKXRffDg4nSIeJDCjSQXxg9xi1GslxXc7mvFrziivldb3U8W6+NRxOkMUGUhOe3DgP7y6RyHM5nTskSaB3XKjUjLZxvwWJAA4nSEcBQaEJyltNj3kNR8ZFOVKrK5EkFXziMoAoVPGQk6QTpKN44KbHGz055jXiHKm+vagga0HRhs+Xee08J8lio1ufPsf6KhRPcnxQ6mUcviy1u0jAO0+my5iY1yh1R/rg3ZaeXHOHS5COJgCHzB0VyPFXbeMHBV0bpMj5ZV57nw4N9267BOnIMUi5u7rMaxS6mFJgKemwJGtqP/aPef1Mrc1C30YFkig81bAwoH4hFV/iwlfofEdGiafbBUHyBMvHNXDbrXVa78vkKrYjX6CH8tvaxhclLUZxpZPjG6B8GJ7tg/o3VXYIIMdh08/J0SVIRzFArUIak1Fh+ru+HEdhnAVxoivMq/04QTocDofDVWyHw+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC</xsl:text>
903
827
  </xsl:variable>
904
828
 
905
- <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">
829
+ <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:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:variable name="table_widths_from_if_calculated_">
830
+ <xsl:for-each select="$table_widths_from_if//table">
831
+ <xsl:copy>
832
+ <xsl:copy-of select="@*"/>
833
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
834
+ </xsl:copy>
835
+ </xsl:for-each>
836
+ </xsl:variable><xsl:variable name="table_widths_from_if_calculated" select="xalan:nodeset($table_widths_from_if_calculated_)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
837
+ false
838
+ </xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
906
839
  <xsl:call-template name="getLang"/>
907
- </xsl:variable><xsl:variable name="pageWidth_">
908
- 210
840
+ </xsl:variable><xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/><xsl:variable name="papersize_width_">
841
+ <xsl:choose>
842
+ <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
843
+ <xsl:when test="$papersize = 'a4'">210</xsl:when>
844
+ </xsl:choose>
845
+ </xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
846
+ <xsl:choose>
847
+ <xsl:when test="$papersize = 'letter'">279.4</xsl:when>
848
+ <xsl:when test="$papersize = 'a4'">297</xsl:when>
849
+ </xsl:choose>
850
+ </xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
851
+ <xsl:choose>
852
+ <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
853
+ <xsl:otherwise>
854
+ 210
855
+ </xsl:otherwise>
856
+ </xsl:choose>
909
857
  </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
910
- 297
858
+ <xsl:choose>
859
+ <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
860
+ <xsl:otherwise>
861
+ 297
862
+ </xsl:otherwise>
863
+ </xsl:choose>
911
864
  </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
912
865
  40
913
866
  </xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
@@ -917,20 +870,7 @@
917
870
  </xsl:variable><xsl:variable name="marginTop" select="normalize-space($marginTop_)"/><xsl:variable name="marginBottom_">
918
871
  34
919
872
  </xsl:variable><xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/><xsl:variable name="titles_">
920
-
921
- <title-edition lang="en">
922
-
923
- <xsl:text>Edition </xsl:text>
924
-
925
- </title-edition>
926
873
 
927
- <title-edition lang="fr">
928
- <xsl:text>Édition </xsl:text>
929
- </title-edition>
930
-
931
- <title-edition lang="ru">
932
- <xsl:text>Издание </xsl:text>
933
- </title-edition>
934
874
 
935
875
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
936
876
  <title-toc lang="en">
@@ -1011,7 +951,7 @@
1011
951
  </xsl:variable><xsl:variable name="bibdata">
1012
952
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1013
953
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1014
- </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">
954
+ </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">
1015
955
  <xsl:param name="name"/>
1016
956
  <xsl:param name="lang"/>
1017
957
  <xsl:variable name="lang_">
@@ -1059,7 +999,7 @@
1059
999
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
1060
1000
 
1061
1001
  <xsl:variable name="additional_fonts_">
1062
- <xsl:for-each select="//*[local-name() = 'misc-container'][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
1002
+ <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']">
1063
1003
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
1064
1004
  </xsl:for-each>
1065
1005
  </xsl:variable>
@@ -1131,7 +1071,6 @@
1131
1071
 
1132
1072
 
1133
1073
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
1134
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1135
1074
 
1136
1075
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1137
1076
  <xsl:attribute name="white-space">pre</xsl:attribute>
@@ -1211,6 +1150,7 @@
1211
1150
 
1212
1151
 
1213
1152
 
1153
+
1214
1154
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1215
1155
 
1216
1156
 
@@ -1367,6 +1307,7 @@
1367
1307
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1368
1308
  <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1369
1309
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1310
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1370
1311
  <xsl:attribute name="display-align">center</xsl:attribute>
1371
1312
 
1372
1313
 
@@ -1387,6 +1328,7 @@
1387
1328
  <xsl:attribute name="display-align">center</xsl:attribute>
1388
1329
  <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1389
1330
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1331
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1390
1332
 
1391
1333
 
1392
1334
 
@@ -1474,7 +1416,8 @@
1474
1416
  </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1475
1417
 
1476
1418
 
1477
- </xsl:attribute-set><xsl:attribute-set name="dt-style">
1419
+ </xsl:attribute-set><xsl:attribute-set name="dt-cell-style">
1420
+ </xsl:attribute-set><xsl:attribute-set name="dt-block-style">
1478
1421
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1479
1422
 
1480
1423
 
@@ -1486,6 +1429,27 @@
1486
1429
 
1487
1430
 
1488
1431
 
1432
+ </xsl:attribute-set><xsl:attribute-set name="dl-name-style">
1433
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1434
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1447
+
1448
+
1449
+
1450
+
1451
+ </xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
1452
+ <xsl:attribute name="padding-left">2mm</xsl:attribute>
1489
1453
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1490
1454
 
1491
1455
 
@@ -1782,6 +1746,24 @@
1782
1746
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
1783
1747
  <xsl:attribute name="text-indent">0mm</xsl:attribute>
1784
1748
 
1749
+ </xsl:attribute-set><xsl:attribute-set name="list-name-style">
1750
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
1763
+
1764
+
1765
+
1766
+
1785
1767
  </xsl:attribute-set><xsl:attribute-set name="list-item-style">
1786
1768
 
1787
1769
 
@@ -2184,13 +2166,13 @@
2184
2166
 
2185
2167
  </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2186
2168
  <xsl:variable name="nodes_preface_">
2187
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2169
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2188
2170
  <node id="{@id}"/>
2189
2171
  </xsl:for-each>
2190
2172
  </xsl:variable>
2191
2173
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
2192
2174
 
2193
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2175
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2194
2176
  <xsl:sort select="@displayorder" data-type="number"/>
2195
2177
 
2196
2178
  <!-- process Section's title -->
@@ -2256,7 +2238,7 @@
2256
2238
  </xsl:for-each>
2257
2239
  </figures>
2258
2240
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2259
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2241
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2260
2242
  <xsl:sort select="@displayorder" data-type="number"/>
2261
2243
  <xsl:apply-templates select="."/>
2262
2244
  </xsl:for-each>
@@ -2276,22 +2258,32 @@
2276
2258
  <xsl:sort select="@displayorder" data-type="number"/>
2277
2259
  <xsl:apply-templates select="."/>
2278
2260
  </xsl:for-each>
2279
- </xsl:template><xsl:variable name="tag_open">###fo:inline###</xsl:variable><xsl:variable name="tag_close">###/fo:inline###</xsl:variable><xsl:template match="text()" name="text">
2280
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2281
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
2282
- <xsl:call-template name="replace_fo_inline">
2283
- <xsl:with-param name="text" select="$text"/>
2284
- </xsl:call-template>
2285
- </xsl:template><xsl:template name="replace_fo_inline">
2261
+ </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">
2262
+
2263
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2264
+ <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))"/>
2265
+ <xsl:call-template name="replace_fo_inline_tags">
2266
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2267
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2268
+ <xsl:with-param name="text" select="$text"/>
2269
+ </xsl:call-template>
2270
+
2271
+ </xsl:template><xsl:template name="replace_fo_inline_tags">
2272
+ <xsl:param name="tag_open"/>
2273
+ <xsl:param name="tag_close"/>
2286
2274
  <xsl:param name="text"/>
2287
2275
  <xsl:choose>
2288
2276
  <xsl:when test="contains($text, $tag_open)">
2289
2277
  <xsl:value-of select="substring-before($text, $tag_open)"/>
2290
- <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
2278
+ <!-- <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text> -->
2291
2279
  <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
2292
- <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2293
- <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
2294
- <xsl:call-template name="replace_fo_inline">
2280
+ <fo:inline keep-together.within-line="always">
2281
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2282
+ </fo:inline>
2283
+ <!-- <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text> -->
2284
+ <xsl:call-template name="replace_fo_inline_tags">
2285
+ <xsl:with-param name="tag_open" select="$tag_open"/>
2286
+ <xsl:with-param name="tag_close" select="$tag_close"/>
2295
2287
  <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
2296
2288
  </xsl:call-template>
2297
2289
  </xsl:when>
@@ -2299,6 +2291,39 @@
2299
2291
  </xsl:choose>
2300
2292
  </xsl:template><xsl:template match="*[local-name()='br']">
2301
2293
  <xsl:value-of select="$linebreak"/>
2294
+ </xsl:template><xsl:template match="*[local-name() = 'keep-together_within-line']">
2295
+ <xsl:param name="split_keep-within-line"/>
2296
+
2297
+ <!-- <fo:inline>split_keep-within-line='<xsl:value-of select="$split_keep-within-line"/>'</fo:inline> -->
2298
+ <xsl:choose>
2299
+
2300
+ <xsl:when test="normalize-space($split_keep-within-line) = 'true'">
2301
+ <xsl:variable name="sep">_</xsl:variable>
2302
+ <xsl:variable name="items">
2303
+ <xsl:call-template name="split">
2304
+ <xsl:with-param name="pText" select="."/>
2305
+ <xsl:with-param name="sep" select="$sep"/>
2306
+ <xsl:with-param name="normalize-space">false</xsl:with-param>
2307
+ <xsl:with-param name="keep_sep">true</xsl:with-param>
2308
+ </xsl:call-template>
2309
+ </xsl:variable>
2310
+ <xsl:for-each select="xalan:nodeset($items)/item">
2311
+ <xsl:choose>
2312
+ <xsl:when test=". = $sep">
2313
+ <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
2314
+ </xsl:when>
2315
+ <xsl:otherwise>
2316
+ <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2317
+ </xsl:otherwise>
2318
+ </xsl:choose>
2319
+ </xsl:for-each>
2320
+ </xsl:when>
2321
+
2322
+ <xsl:otherwise>
2323
+ <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2324
+ </xsl:otherwise>
2325
+
2326
+ </xsl:choose>
2302
2327
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
2303
2328
  <fo:block xsl:use-attribute-sets="copyright-statement-style">
2304
2329
  <xsl:apply-templates/>
@@ -2364,8 +2389,23 @@
2364
2389
  </xsl:call-template>
2365
2390
 
2366
2391
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2367
- <!-- <xsl:call-template name="add-zero-spaces"/> -->
2368
- <xsl:call-template name="add-zero-spaces-java"/>
2392
+ <xsl:choose>
2393
+ <xsl:when test="parent::*[local-name() = 'keep-together_within-line']">
2394
+ <xsl:value-of select="."/>
2395
+ </xsl:when>
2396
+ <xsl:otherwise>
2397
+ <xsl:call-template name="addZeroWidthSpacesToTextNodes"/>
2398
+ </xsl:otherwise>
2399
+ </xsl:choose>
2400
+ </xsl:template><xsl:template name="addZeroWidthSpacesToTextNodes">
2401
+ <xsl:variable name="text"><text><xsl:call-template name="text"/></text></xsl:variable>
2402
+ <!-- <xsl:copy-of select="$text"/> -->
2403
+ <xsl:for-each select="xalan:nodeset($text)/text/node()">
2404
+ <xsl:choose>
2405
+ <xsl:when test="self::text()"><xsl:call-template name="add-zero-spaces-java"/></xsl:when>
2406
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
2407
+ </xsl:choose>
2408
+ </xsl:for-each>
2369
2409
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
2370
2410
 
2371
2411
  <xsl:variable name="table-preamble">
@@ -2375,9 +2415,14 @@
2375
2415
 
2376
2416
  <xsl:variable name="table">
2377
2417
 
2378
- <xsl:variable name="simple-table">
2379
- <xsl:call-template name="getSimpleTable"/>
2418
+ <xsl:variable name="simple-table">
2419
+ <xsl:call-template name="getSimpleTable">
2420
+ <xsl:with-param name="id" select="@id"/>
2421
+ </xsl:call-template>
2380
2422
  </xsl:variable>
2423
+ <!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
2424
+
2425
+ <!-- simple-table=<xsl:copy-of select="$simple-table"/> -->
2381
2426
 
2382
2427
 
2383
2428
  <!-- Display table's name before table as standalone block -->
@@ -2400,7 +2445,23 @@
2400
2445
  </xsl:call-template>
2401
2446
  </xsl:if>
2402
2447
  </xsl:variable>
2403
- <!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
2448
+ <!-- <xsl:variable name="colwidths" select="xalan:nodeset($colwidths_)"/> -->
2449
+
2450
+ <!-- DEBUG -->
2451
+ <xsl:if test="$table_if_debug = 'true'">
2452
+ <fo:block font-size="60%">
2453
+ <xsl:apply-templates select="xalan:nodeset($colwidths)" mode="print_as_xml"/>
2454
+ </fo:block>
2455
+ </xsl:if>
2456
+
2457
+
2458
+ <!-- <xsl:copy-of select="$colwidths"/> -->
2459
+
2460
+ <!-- <xsl:text disable-output-escaping="yes">&lt;!- -</xsl:text>
2461
+ DEBUG
2462
+ colwidths=<xsl:copy-of select="$colwidths"/>
2463
+ <xsl:text disable-output-escaping="yes">- -&gt;</xsl:text> -->
2464
+
2404
2465
 
2405
2466
 
2406
2467
  <xsl:variable name="margin-side">
@@ -2481,9 +2542,17 @@
2481
2542
  </xsl:element>
2482
2543
  </xsl:variable>
2483
2544
 
2545
+ <xsl:if test="$isGenerateTableIF = 'true'">
2546
+ <!-- to determine start of table -->
2547
+ <fo:block id="{concat('table_if_start_',@id)}" keep-with-next="always" font-size="1pt">Start table '<xsl:value-of select="@id"/>'.</fo:block>
2548
+ </xsl:if>
2484
2549
 
2485
2550
  <fo:table id="{@id}">
2486
2551
 
2552
+ <xsl:if test="$isGenerateTableIF = 'true'">
2553
+ <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
2554
+ </xsl:if>
2555
+
2487
2556
  <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2488
2557
  <xsl:attribute name="{local-name()}">
2489
2558
  <xsl:value-of select="."/>
@@ -2497,31 +2566,47 @@
2497
2566
 
2498
2567
 
2499
2568
  <xsl:choose>
2500
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2501
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2502
- <fo:table-column column-width="{@width}"/>
2503
- </xsl:for-each>
2569
+ <xsl:when test="$isGenerateTableIF = 'true'">
2570
+ <!-- generate IF for table widths -->
2571
+ <!-- example:
2572
+ <tr>
2573
+ <td valign="top" align="left" id="tab-symdu_1_1">
2574
+ <p>Symbol</p>
2575
+ <word id="tab-symdu_1_1_word_1">Symbol</word>
2576
+ </td>
2577
+ <td valign="top" align="left" id="tab-symdu_1_2">
2578
+ <p>Description</p>
2579
+ <word id="tab-symdu_1_2_word_1">Description</word>
2580
+ </td>
2581
+ </tr>
2582
+ -->
2583
+ <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
2584
+
2504
2585
  </xsl:when>
2505
2586
  <xsl:otherwise>
2506
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2507
- <xsl:choose>
2508
- <xsl:when test=". = 1 or . = 0">
2509
- <fo:table-column column-width="proportional-column-width(2)"/>
2510
- </xsl:when>
2511
- <xsl:otherwise>
2512
- <fo:table-column column-width="proportional-column-width({.})"/>
2513
- </xsl:otherwise>
2514
- </xsl:choose>
2515
- </xsl:for-each>
2516
- </xsl:otherwise>
2517
- </xsl:choose>
2518
2587
 
2519
- <xsl:choose>
2520
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
2521
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2522
- </xsl:when>
2523
- <xsl:otherwise>
2524
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
2588
+ <xsl:choose>
2589
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2590
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2591
+ <fo:table-column column-width="{@width}"/>
2592
+ </xsl:for-each>
2593
+ </xsl:when>
2594
+ <xsl:otherwise>
2595
+ <xsl:call-template name="insertTableColumnWidth">
2596
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2597
+ </xsl:call-template>
2598
+ </xsl:otherwise>
2599
+ </xsl:choose>
2600
+
2601
+ <xsl:choose>
2602
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
2603
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2604
+ </xsl:when>
2605
+ <xsl:otherwise>
2606
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
2607
+ </xsl:otherwise>
2608
+ </xsl:choose>
2609
+
2525
2610
  </xsl:otherwise>
2526
2611
  </xsl:choose>
2527
2612
 
@@ -2621,11 +2706,22 @@
2621
2706
  <xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
2622
2707
  <xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
2623
2708
  </xsl:template><xsl:template name="calculate-column-widths">
2709
+ <xsl:param name="table"/>
2710
+ <xsl:param name="cols-count"/>
2711
+
2712
+ <xsl:call-template name="calculate-column-widths-proportional">
2713
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2714
+ <xsl:with-param name="table" select="$table"/>
2715
+ </xsl:call-template>
2716
+
2717
+ </xsl:template><xsl:template name="calculate-column-widths-proportional">
2624
2718
  <xsl:param name="table"/>
2625
2719
  <xsl:param name="cols-count"/>
2626
2720
  <xsl:param name="curr-col" select="1"/>
2627
2721
  <xsl:param name="width" select="0"/>
2628
2722
 
2723
+ <!-- table=<xsl:copy-of select="$table"/> -->
2724
+
2629
2725
  <xsl:if test="$curr-col &lt;= $cols-count">
2630
2726
  <xsl:variable name="widths">
2631
2727
  <xsl:choose>
@@ -2663,16 +2759,22 @@
2663
2759
  </xsl:for-each>
2664
2760
  </xsl:when>
2665
2761
  <xsl:otherwise>
2666
- <xsl:for-each select="xalan:nodeset($table)/*/tr">
2762
+ <!-- <curr_col><xsl:value-of select="$curr-col"/></curr_col> -->
2763
+
2764
+ <!-- <table><xsl:copy-of select="$table"/></table>
2765
+ -->
2766
+ <xsl:for-each select="xalan:nodeset($table)/*/*[local-name()='tr']">
2667
2767
  <xsl:variable name="td_text">
2668
2768
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2669
2769
  </xsl:variable>
2770
+ <!-- <td_text><xsl:value-of select="$td_text"/></td_text> -->
2670
2771
  <xsl:variable name="words">
2671
2772
  <xsl:variable name="string_with_added_zerospaces">
2672
2773
  <xsl:call-template name="add-zero-spaces-java">
2673
2774
  <xsl:with-param name="text" select="$td_text"/>
2674
2775
  </xsl:call-template>
2675
2776
  </xsl:variable>
2777
+ <!-- <xsl:message>string_with_added_zerospaces=<xsl:value-of select="$string_with_added_zerospaces"/></xsl:message> -->
2676
2778
  <xsl:call-template name="tokenize">
2677
2779
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2678
2780
  <!-- 2009 thinspace -->
@@ -2680,11 +2782,13 @@
2680
2782
  <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
2681
2783
  </xsl:call-template>
2682
2784
  </xsl:variable>
2785
+ <!-- words=<xsl:copy-of select="$words"/> -->
2683
2786
  <xsl:variable name="max_length">
2684
2787
  <xsl:call-template name="max_length">
2685
2788
  <xsl:with-param name="words" select="xalan:nodeset($words)"/>
2686
2789
  </xsl:call-template>
2687
2790
  </xsl:variable>
2791
+ <!-- <xsl:message>max_length=<xsl:value-of select="$max_length"/></xsl:message> -->
2688
2792
  <width>
2689
2793
  <xsl:variable name="divider">
2690
2794
  <xsl:choose>
@@ -2703,6 +2807,8 @@
2703
2807
  </xsl:choose>
2704
2808
  </xsl:variable>
2705
2809
 
2810
+ <!-- widths=<xsl:copy-of select="$widths"/> -->
2811
+
2706
2812
  <column>
2707
2813
  <xsl:for-each select="xalan:nodeset($widths)//width">
2708
2814
  <xsl:sort select="." data-type="number" order="descending"/>
@@ -2711,85 +2817,327 @@
2711
2817
  </xsl:if>
2712
2818
  </xsl:for-each>
2713
2819
  </column>
2714
- <xsl:call-template name="calculate-column-widths">
2820
+ <xsl:call-template name="calculate-column-widths-proportional">
2715
2821
  <xsl:with-param name="cols-count" select="$cols-count"/>
2716
2822
  <xsl:with-param name="curr-col" select="$curr-col +1"/>
2717
2823
  <xsl:with-param name="table" select="$table"/>
2718
2824
  </xsl:call-template>
2719
2825
  </xsl:if>
2826
+ </xsl:template><xsl:template match="*[@keep-together.within-line or local-name() = 'keep-together_within-line']/text()" priority="2" mode="td_text">
2827
+ <!-- <xsl:message>DEBUG t1=<xsl:value-of select="."/></xsl:message>
2828
+ <xsl:message>DEBUG t2=<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/></xsl:message> -->
2829
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/>
2830
+
2831
+ <!-- if all capitals english letters or digits -->
2832
+ <xsl:if test="normalize-space(translate(., concat($upper,'0123456789'), '')) = ''">
2833
+ <xsl:call-template name="repeat">
2834
+ <xsl:with-param name="char" select="'X'"/>
2835
+ <xsl:with-param name="count" select="string-length(normalize-space(.)) * 0.5"/>
2836
+ </xsl:call-template>
2837
+ </xsl:if>
2720
2838
  </xsl:template><xsl:template match="text()" mode="td_text">
2721
2839
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
2722
2840
  </xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
2723
2841
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
2724
2842
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
2725
2843
  <xsl:value-of select="@target"/>
2726
- </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
2727
- <xsl:variable name="mathml">
2728
- <xsl:for-each select="*">
2729
- <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
2730
- <xsl:copy-of select="."/>
2731
- </xsl:if>
2844
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text" name="math_length">
2845
+ <xsl:if test="$isGenerateTableIF = 'false'">
2846
+ <xsl:variable name="mathml_">
2847
+ <xsl:for-each select="*">
2848
+ <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
2849
+ <xsl:copy-of select="."/>
2850
+ </xsl:if>
2851
+ </xsl:for-each>
2852
+ </xsl:variable>
2853
+ <xsl:variable name="mathml" select="xalan:nodeset($mathml_)"/>
2854
+
2855
+ <xsl:variable name="math_text">
2856
+ <xsl:value-of select="normalize-space($mathml)"/>
2857
+ <xsl:for-each select="$mathml//@open"><xsl:value-of select="."/></xsl:for-each>
2858
+ <xsl:for-each select="$mathml//@close"><xsl:value-of select="."/></xsl:for-each>
2859
+ </xsl:variable>
2860
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2861
+ </xsl:if>
2862
+ </xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
2863
+ <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
2864
+
2865
+ <!-- via intermediate format -->
2866
+
2867
+ <!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
2868
+
2869
+ <!-- In the first pass, line wrapping is disabled, and the user agent keeps track of the minimum and maximum width of each cell. -->
2870
+
2871
+ <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
2872
+
2873
+ <!-- get current table id -->
2874
+ <xsl:variable name="table_id" select="@id"/>
2875
+ <!-- find table by id in the file 'table_widths' -->
2876
+ <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
2877
+ <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
2878
+
2879
+ <!-- table='<xsl:copy-of select="$table"/>' -->
2880
+ <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
2881
+ <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
2882
+ <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
2883
+
2884
+ <xsl:variable name="table_with_cell_widths_">
2885
+ <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
2886
+ </xsl:variable>
2887
+ <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
2888
+
2889
+ <!-- <xsl:if test="$table_if_debug = 'true'">
2890
+ <xsl:copy-of select="$table_with_cell_widths"/>
2891
+ </xsl:if> -->
2892
+
2893
+
2894
+ <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
2895
+
2896
+ <xsl:variable name="column_widths_">
2897
+ <!-- iteration of columns -->
2898
+ <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
2899
+ <xsl:variable name="pos" select="position()"/>
2900
+ <column>
2901
+ <xsl:attribute name="width_max">
2902
+ <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
2903
+ <xsl:sort select="." data-type="number" order="descending"/>
2904
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2905
+ </xsl:for-each>
2906
+ </xsl:attribute>
2907
+ <xsl:attribute name="width_min">
2908
+ <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
2909
+ <xsl:sort select="." data-type="number" order="descending"/>
2910
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2911
+ </xsl:for-each>
2912
+ </xsl:attribute>
2913
+ </column>
2732
2914
  </xsl:for-each>
2733
2915
  </xsl:variable>
2916
+ <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
2734
2917
 
2735
- <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
2736
- <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2737
- </xsl:template><xsl:template match="*[local-name()='thead']">
2738
- <xsl:param name="cols-count"/>
2739
- <fo:table-header>
2740
-
2741
-
2742
- <xsl:apply-templates/>
2743
- </fo:table-header>
2744
- </xsl:template><xsl:template name="table-header-title">
2745
- <xsl:param name="cols-count"/>
2746
- <!-- row for title -->
2747
- <fo:table-row>
2748
- <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2749
-
2750
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
2751
- <xsl:with-param name="continued">true</xsl:with-param>
2752
- </xsl:apply-templates>
2753
-
2754
-
2755
-
2756
- </fo:table-cell>
2757
- </fo:table-row>
2758
- </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
2759
- <fo:table-body>
2760
- <xsl:apply-templates/>
2761
- </fo:table-body>
2762
- </xsl:template><xsl:template match="*[local-name()='tfoot']">
2763
- <xsl:apply-templates/>
2764
- </xsl:template><xsl:template name="insertTableFooter">
2765
- <xsl:param name="cols-count"/>
2766
- <xsl:if test="../*[local-name()='tfoot']">
2767
- <fo:table-footer>
2768
- <xsl:apply-templates select="../*[local-name()='tfoot']"/>
2769
- </fo:table-footer>
2770
- </xsl:if>
2771
- </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
2772
- <xsl:param name="table_attributes"/>
2773
- <xsl:param name="colwidths"/>
2774
- <xsl:param name="colgroup"/>
2918
+ <!-- <column_widths>
2919
+ <xsl:copy-of select="$column_widths"/>
2920
+ </column_widths> -->
2775
2921
 
2776
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
2922
+ <!-- These in turn, are used to find the minimum and maximum width for the table. -->
2923
+ <xsl:variable name="table_widths_">
2924
+ <table>
2925
+ <xsl:attribute name="width_max">
2926
+ <xsl:value-of select="sum($column_widths/column/@width_max)"/>
2927
+ </xsl:attribute>
2928
+ <xsl:attribute name="width_min">
2929
+ <xsl:value-of select="sum($column_widths/column/@width_min)"/>
2930
+ </xsl:attribute>
2931
+ </table>
2932
+ </xsl:variable>
2933
+ <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
2777
2934
 
2778
- <xsl:variable name="isNoteOrFnExistShowAfterTable">
2779
-
2935
+ <xsl:variable name="page_width">
2936
+ <xsl:choose>
2937
+ <xsl:when test="$parent_table_page-width != ''">
2938
+ <xsl:value-of select="$parent_table_page-width"/>
2939
+ </xsl:when>
2940
+ <xsl:otherwise>
2941
+ <xsl:value-of select="@page-width"/>
2942
+ </xsl:otherwise>
2943
+ </xsl:choose>
2780
2944
  </xsl:variable>
2781
2945
 
2782
- <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
2946
+ <xsl:if test="$table_if_debug = 'true'">
2947
+ <table_width>
2948
+ <xsl:copy-of select="$table_widths"/>
2949
+ </table_width>
2950
+ <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
2951
+ </xsl:if>
2783
2952
 
2784
- <xsl:variable name="cols-count">
2785
- <xsl:choose>
2786
- <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
2787
- <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
2788
- </xsl:when>
2789
- <xsl:otherwise>
2790
- <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
2791
- </xsl:otherwise>
2792
- </xsl:choose>
2953
+
2954
+ <!-- There are three cases: -->
2955
+ <xsl:choose>
2956
+ <!-- 1. The minimum table width is equal to or wider than the available space -->
2957
+ <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
2958
+ <!-- call old algorithm -->
2959
+ <case1/>
2960
+ <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
2961
+ <xsl:call-template name="calculate-column-widths-proportional">
2962
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2963
+ <xsl:with-param name="table" select="$table"/>
2964
+ </xsl:call-template> -->
2965
+ </xsl:when>
2966
+ <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
2967
+ <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
2968
+ <case2/>
2969
+ <autolayout/>
2970
+ <xsl:for-each select="$column_widths/column/@width_max">
2971
+ <column divider="100"><xsl:value-of select="."/></column>
2972
+ </xsl:for-each>
2973
+ </xsl:when>
2974
+ <!-- 3. The maximum width of the table is greater than the available space, but the minimum table width is smaller.
2975
+ In this case, find the difference between the available space and the minimum table width, lets call it W.
2976
+ Lets also call D the difference between maximum and minimum width of the table.
2977
+ For each column, let d be the difference between maximum and minimum width of that column.
2978
+ Now set the column's width to the minimum width plus d times W over D.
2979
+ This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
2980
+ <xsl:when test="($table_widths/table/@width_max &gt; $page_width and $table_widths/table/@width_min &lt; $page_width) or ($table_widths/table/@width_min &gt;= $page_width)">
2981
+ <!-- difference between the available space and the minimum table width -->
2982
+ <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
2983
+ <W><xsl:value-of select="$W"/></W>
2984
+ <!-- difference between maximum and minimum width of the table -->
2985
+ <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
2986
+ <D><xsl:value-of select="$D"/></D>
2987
+ <case3/>
2988
+ <autolayout/>
2989
+ <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
2990
+ <split_keep-within-line>true</split_keep-within-line>
2991
+ </xsl:if>
2992
+ <xsl:for-each select="$column_widths/column">
2993
+ <!-- difference between maximum and minimum width of that column. -->
2994
+ <xsl:variable name="d" select="@width_max - @width_min"/>
2995
+ <d><xsl:value-of select="$d"/></d>
2996
+ <width_min><xsl:value-of select="@width_min"/></width_min>
2997
+ <e><xsl:value-of select="$d * $W div $D"/></e>
2998
+ <!-- set the column's width to the minimum width plus d times W over D. -->
2999
+ <column divider="100">
3000
+ <xsl:value-of select="round(@width_min + $d * $W div $D)"/> <!-- * 10 -->
3001
+ </column>
3002
+ </xsl:for-each>
3003
+
3004
+ </xsl:when>
3005
+ <xsl:otherwise><unknown_case/></xsl:otherwise>
3006
+ </xsl:choose>
3007
+
3008
+ </xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
3009
+
3010
+ <!-- if nested 'dl' or 'table' -->
3011
+ <xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
3012
+ <parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
3013
+
3014
+ <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
3015
+
3016
+ <xsl:variable name="parent_table_page-width_">
3017
+ <xsl:if test="$parent_table_id != ''">
3018
+ <!-- determine column number in the parent table -->
3019
+ <xsl:variable name="parent_table_column_number">
3020
+ <xsl:choose>
3021
+ <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
3022
+ <xsl:otherwise> <!-- parent is table -->
3023
+ <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
3024
+ </xsl:otherwise>
3025
+ </xsl:choose>
3026
+ </xsl:variable>
3027
+ <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
3028
+ <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3029
+ </xsl:if>
3030
+ </xsl:variable>
3031
+ <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
3032
+
3033
+ <!-- get current table id -->
3034
+ <xsl:variable name="table_id" select="@id"/>
3035
+
3036
+ <xsl:choose>
3037
+ <xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
3038
+ <!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
3039
+ <xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
3040
+ </xsl:when>
3041
+ <xsl:otherwise>
3042
+ <!-- recalculate columns width based on parent table width -->
3043
+ <xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
3044
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm">
3045
+ <xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
3046
+ </xsl:call-template>
3047
+ </xsl:for-each>
3048
+ </xsl:otherwise>
3049
+ </xsl:choose>
3050
+
3051
+ </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
3052
+ <xsl:copy>
3053
+ <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
3054
+ </xsl:copy>
3055
+ </xsl:template><xsl:template match="td | th" mode="determine_cell_widths-if">
3056
+ <xsl:copy>
3057
+ <xsl:copy-of select="@*"/>
3058
+
3059
+ <!-- The maximum width is given by the widest line. -->
3060
+ <xsl:attribute name="width_max">
3061
+ <xsl:for-each select="p_len">
3062
+ <xsl:sort select="." data-type="number" order="descending"/>
3063
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3064
+ </xsl:for-each>
3065
+ </xsl:attribute>
3066
+
3067
+ <!-- The minimum width is given by the widest text element (word, image, etc.) -->
3068
+ <xsl:variable name="width_min">
3069
+ <xsl:for-each select="word_len">
3070
+ <xsl:sort select="." data-type="number" order="descending"/>
3071
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3072
+ </xsl:for-each>
3073
+ </xsl:variable>
3074
+ <xsl:attribute name="width_min">
3075
+ <xsl:value-of select="$width_min"/>
3076
+ </xsl:attribute>
3077
+
3078
+ <xsl:if test="$width_min = 0">
3079
+ <xsl:attribute name="width_min">1</xsl:attribute>
3080
+ </xsl:if>
3081
+
3082
+ <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
3083
+
3084
+ </xsl:copy>
3085
+ </xsl:template><xsl:template match="*[local-name()='thead']">
3086
+ <xsl:param name="cols-count"/>
3087
+ <fo:table-header>
3088
+
3089
+
3090
+ <xsl:apply-templates/>
3091
+ </fo:table-header>
3092
+ </xsl:template><xsl:template name="table-header-title">
3093
+ <xsl:param name="cols-count"/>
3094
+ <!-- row for title -->
3095
+ <fo:table-row>
3096
+ <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
3097
+
3098
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3099
+ <xsl:with-param name="continued">true</xsl:with-param>
3100
+ </xsl:apply-templates>
3101
+
3102
+
3103
+
3104
+ </fo:table-cell>
3105
+ </fo:table-row>
3106
+ </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
3107
+ <fo:table-body>
3108
+ <xsl:apply-templates/>
3109
+ </fo:table-body>
3110
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
3111
+ <xsl:apply-templates/>
3112
+ </xsl:template><xsl:template name="insertTableFooter">
3113
+ <xsl:param name="cols-count"/>
3114
+ <xsl:if test="../*[local-name()='tfoot']">
3115
+ <fo:table-footer>
3116
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
3117
+ </fo:table-footer>
3118
+ </xsl:if>
3119
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
3120
+ <xsl:param name="table_attributes"/>
3121
+ <xsl:param name="colwidths"/>
3122
+ <xsl:param name="colgroup"/>
3123
+
3124
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3125
+
3126
+ <xsl:variable name="isNoteOrFnExistShowAfterTable">
3127
+
3128
+ </xsl:variable>
3129
+
3130
+ <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
3131
+
3132
+ <xsl:variable name="cols-count">
3133
+ <xsl:choose>
3134
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
3135
+ <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
3136
+ </xsl:when>
3137
+ <xsl:otherwise>
3138
+ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
3139
+ </xsl:otherwise>
3140
+ </xsl:choose>
2793
3141
  </xsl:variable>
2794
3142
 
2795
3143
  <fo:table keep-with-previous="always">
@@ -2818,16 +3166,10 @@
2818
3166
  </xsl:for-each>
2819
3167
  </xsl:when>
2820
3168
  <xsl:otherwise>
2821
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2822
- <xsl:choose>
2823
- <xsl:when test=". = 1 or . = 0">
2824
- <fo:table-column column-width="proportional-column-width(2)"/>
2825
- </xsl:when>
2826
- <xsl:otherwise>
2827
- <fo:table-column column-width="proportional-column-width({.})"/>
2828
- </xsl:otherwise>
2829
- </xsl:choose>
2830
- </xsl:for-each>
3169
+ <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3170
+ <xsl:call-template name="insertTableColumnWidth">
3171
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3172
+ </xsl:call-template>
2831
3173
  </xsl:otherwise>
2832
3174
  </xsl:choose>
2833
3175
 
@@ -2904,6 +3246,52 @@
2904
3246
 
2905
3247
  </fo:table-body>
2906
3248
 
3249
+ </xsl:template><xsl:template match="/" mode="process_table-if">
3250
+ <xsl:param name="table_or_dl">table</xsl:param>
3251
+ <xsl:apply-templates mode="process_table-if">
3252
+ <xsl:with-param name="table_or_dl" select="$table_or_dl"/>
3253
+ </xsl:apply-templates>
3254
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="process_table-if">
3255
+ <xsl:param name="table_or_dl">table</xsl:param>
3256
+
3257
+ <fo:table-body>
3258
+ <xsl:for-each select="*[local-name() = 'tr']">
3259
+ <xsl:variable name="col_count" select="count(*)"/>
3260
+
3261
+ <!-- iteration for each tr/td -->
3262
+
3263
+ <xsl:choose>
3264
+ <xsl:when test="$table_or_dl = 'table'">
3265
+ <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
3266
+ <fo:table-row number-columns-spanned="{$col_count}">
3267
+ <!-- <test_table><xsl:copy-of select="."/></test_table> -->
3268
+ <xsl:call-template name="td"/>
3269
+ </fo:table-row>
3270
+ </xsl:for-each>
3271
+ </xsl:when>
3272
+ <xsl:otherwise> <!-- $table_or_dl = 'dl' -->
3273
+ <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']">
3274
+ <xsl:variable name="is_dt" select="position() = 1"/>
3275
+
3276
+ <xsl:for-each select="*">
3277
+ <!-- <test><xsl:copy-of select="."/></test> -->
3278
+ <fo:table-row number-columns-spanned="{$col_count}">
3279
+ <xsl:choose>
3280
+ <xsl:when test="$is_dt">
3281
+ <xsl:call-template name="insert_dt_cell"/>
3282
+ </xsl:when>
3283
+ <xsl:otherwise>
3284
+ <xsl:call-template name="insert_dd_cell"/>
3285
+ </xsl:otherwise>
3286
+ </xsl:choose>
3287
+ </fo:table-row>
3288
+ </xsl:for-each>
3289
+ </xsl:for-each>
3290
+ </xsl:otherwise>
3291
+ </xsl:choose>
3292
+
3293
+ </xsl:for-each>
3294
+ </fo:table-body>
2907
3295
  </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2908
3296
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2909
3297
 
@@ -3005,7 +3393,7 @@
3005
3393
  </xsl:choose>
3006
3394
  </xsl:attribute>
3007
3395
  </xsl:if>
3008
- </xsl:template><xsl:template match="*[local-name()='td']">
3396
+ </xsl:template><xsl:template match="*[local-name()='td']" name="td">
3009
3397
  <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
3010
3398
  <xsl:call-template name="setTextAlignment">
3011
3399
  <xsl:with-param name="default">left</xsl:with-param>
@@ -3044,11 +3432,24 @@
3044
3432
 
3045
3433
  <xsl:call-template name="setTableCellAttributes"/>
3046
3434
 
3435
+ <xsl:if test="$isGenerateTableIF = 'true'">
3436
+ <xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
3437
+ <xsl:attribute name="text-align">left</xsl:attribute>
3438
+ </xsl:if>
3439
+
3047
3440
  <fo:block>
3048
3441
 
3442
+ <xsl:if test="$isGenerateTableIF = 'true'">
3443
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
3444
+ </xsl:if>
3445
+
3446
+
3049
3447
 
3050
3448
 
3051
3449
  <xsl:apply-templates/>
3450
+
3451
+ <xsl:if test="$isGenerateTableIF = 'true'"><fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
3452
+
3052
3453
  </fo:block>
3053
3454
  </fo:table-cell>
3054
3455
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
@@ -3249,9 +3650,9 @@
3249
3650
  <!-- current hierarchy is 'figure' element -->
3250
3651
  <xsl:variable name="following_dl_colwidths">
3251
3652
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3252
- <xsl:variable name="html-table">
3253
- <xsl:variable name="doc_ns">
3254
-
3653
+ <xsl:variable name="simple-table">
3654
+ <!-- <xsl:variable name="doc_ns">
3655
+ <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
3255
3656
  </xsl:variable>
3256
3657
  <xsl:variable name="ns">
3257
3658
  <xsl:choose>
@@ -3262,7 +3663,7 @@
3262
3663
  <xsl:value-of select="substring-before(name(/*), '-')"/>
3263
3664
  </xsl:otherwise>
3264
3665
  </xsl:choose>
3265
- </xsl:variable>
3666
+ </xsl:variable> -->
3266
3667
 
3267
3668
  <xsl:for-each select="*[local-name() = 'dl'][1]">
3268
3669
  <tbody>
@@ -3273,7 +3674,7 @@
3273
3674
 
3274
3675
  <xsl:call-template name="calculate-column-widths">
3275
3676
  <xsl:with-param name="cols-count" select="2"/>
3276
- <xsl:with-param name="table" select="$html-table"/>
3677
+ <xsl:with-param name="table" select="$simple-table"/>
3277
3678
  </xsl:call-template>
3278
3679
 
3279
3680
  </xsl:if>
@@ -3392,8 +3793,10 @@
3392
3793
  <!-- and (not(../@class) or ../@class !='pseudocode') -->
3393
3794
  </xsl:variable>
3394
3795
 
3796
+ <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
3797
+
3395
3798
  <xsl:choose>
3396
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3799
+ <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
3397
3800
 
3398
3801
  <fo:block margin-bottom="12pt" text-align="left">
3399
3802
 
@@ -3408,7 +3811,7 @@
3408
3811
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3409
3812
  </fo:block>
3410
3813
 
3411
- </xsl:when>
3814
+ </xsl:when> <!-- END: only one component -->
3412
3815
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3413
3816
  <fo:block margin-bottom="12pt" text-align="left">
3414
3817
 
@@ -3422,8 +3825,8 @@
3422
3825
  </xsl:variable>
3423
3826
  <xsl:value-of select="$title-where"/>
3424
3827
  </fo:block>
3425
- </xsl:when>
3426
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
3828
+ </xsl:when> <!-- END: a few components -->
3829
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
3427
3830
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
3428
3831
 
3429
3832
 
@@ -3436,22 +3839,41 @@
3436
3839
  </xsl:variable>
3437
3840
  <xsl:value-of select="$title-key"/>
3438
3841
  </fo:block>
3439
- </xsl:when>
3842
+ </xsl:when> <!-- END: definition list in a figure -->
3440
3843
  </xsl:choose>
3441
3844
 
3442
3845
  <!-- a few components -->
3443
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
3846
+ <xsl:if test="$onlyOneComponent = 'false'">
3444
3847
  <fo:block>
3445
3848
 
3446
3849
 
3447
3850
 
3448
3851
 
3852
+
3853
+ <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
3854
+ <xsl:attribute name="margin-top">0</xsl:attribute>
3855
+ </xsl:if>
3856
+
3449
3857
  <fo:block>
3450
3858
 
3451
3859
 
3452
3860
 
3453
3861
 
3862
+ <xsl:apply-templates select="*[local-name() = 'name']">
3863
+ <xsl:with-param name="process">true</xsl:with-param>
3864
+ </xsl:apply-templates>
3865
+
3866
+ <xsl:if test="$isGenerateTableIF = 'true'">
3867
+ <!-- to determine start of table -->
3868
+ <fo:block id="{concat('table_if_start_',@id)}" keep-with-next="always" font-size="1pt">Start table '<xsl:value-of select="@id"/>'.</fo:block>
3869
+ </xsl:if>
3870
+
3454
3871
  <fo:table width="95%" table-layout="fixed">
3872
+
3873
+ <xsl:if test="$isGenerateTableIF = 'true'">
3874
+ <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
3875
+ </xsl:if>
3876
+
3455
3877
 
3456
3878
  <xsl:choose>
3457
3879
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
@@ -3460,61 +3882,178 @@
3460
3882
 
3461
3883
  </xsl:when>
3462
3884
  </xsl:choose>
3463
- <!-- create virtual html table for dl/[dt and dd] -->
3464
- <xsl:variable name="html-table">
3465
- <xsl:variable name="doc_ns">
3885
+
3886
+
3887
+
3888
+ <xsl:choose>
3889
+ <xsl:when test="$isGenerateTableIF = 'true'">
3890
+ <!-- generate IF for table widths -->
3891
+ <!-- example:
3892
+ <tr>
3893
+ <td valign="top" align="left" id="tab-symdu_1_1">
3894
+ <p>Symbol</p>
3895
+ <word id="tab-symdu_1_1_word_1">Symbol</word>
3896
+ </td>
3897
+ <td valign="top" align="left" id="tab-symdu_1_2">
3898
+ <p>Description</p>
3899
+ <word id="tab-symdu_1_2_word_1">Description</word>
3900
+ </td>
3901
+ </tr>
3902
+ -->
3466
3903
 
3467
- </xsl:variable>
3468
- <xsl:variable name="ns">
3469
- <xsl:choose>
3470
- <xsl:when test="normalize-space($doc_ns) != ''">
3471
- <xsl:value-of select="normalize-space($doc_ns)"/>
3472
- </xsl:when>
3473
- <xsl:otherwise>
3474
- <xsl:value-of select="substring-before(name(/*), '-')"/>
3475
- </xsl:otherwise>
3476
- </xsl:choose>
3477
- </xsl:variable>
3478
- <tbody>
3479
- <xsl:apply-templates mode="dl"/>
3480
- </tbody>
3481
- </xsl:variable>
3482
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
3483
- <xsl:variable name="colwidths">
3484
- <xsl:call-template name="calculate-column-widths">
3485
- <xsl:with-param name="cols-count" select="2"/>
3486
- <xsl:with-param name="table" select="$html-table"/>
3487
- </xsl:call-template>
3488
- </xsl:variable>
3489
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
3490
- <xsl:variable name="maxlength_dt">
3491
- <xsl:call-template name="getMaxLength_dt"/>
3492
- </xsl:variable>
3493
- <xsl:call-template name="setColumnWidth_dl">
3494
- <xsl:with-param name="colwidths" select="$colwidths"/>
3495
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3496
- </xsl:call-template>
3497
- <fo:table-body>
3498
- <xsl:apply-templates>
3499
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
3500
- </xsl:apply-templates>
3501
- </fo:table-body>
3904
+ <!-- create virtual html table for dl/[dt and dd] -->
3905
+ <xsl:variable name="simple-table">
3906
+
3907
+ <xsl:variable name="dl_table">
3908
+ <tbody>
3909
+ <xsl:apply-templates mode="dl_if">
3910
+ <xsl:with-param name="id" select="@id"/>
3911
+ </xsl:apply-templates>
3912
+ </tbody>
3913
+ </xsl:variable>
3914
+
3915
+ <!-- dl_table='<xsl:copy-of select="$dl_table"/>' -->
3916
+
3917
+ <!-- Step: replace <br/> to <p>...</p> -->
3918
+ <xsl:variable name="table_without_br">
3919
+ <xsl:apply-templates select="xalan:nodeset($dl_table)" mode="table-without-br"/>
3920
+ </xsl:variable>
3921
+
3922
+ <!-- table_without_br='<xsl:copy-of select="$table_without_br"/>' -->
3923
+
3924
+ <!-- Step: add id to each cell -->
3925
+ <!-- add <word>...</word> for each word, image, math -->
3926
+ <xsl:variable name="simple-table-id">
3927
+ <xsl:apply-templates select="xalan:nodeset($table_without_br)" mode="simple-table-id">
3928
+ <xsl:with-param name="id" select="@id"/>
3929
+ </xsl:apply-templates>
3930
+ </xsl:variable>
3931
+
3932
+ <!-- simple-table-id='<xsl:copy-of select="$simple-table-id"/>' -->
3933
+
3934
+ <xsl:copy-of select="xalan:nodeset($simple-table-id)"/>
3935
+
3936
+ </xsl:variable>
3937
+
3938
+ <!-- DEBUG: simple-table<xsl:copy-of select="$simple-table"/> -->
3939
+
3940
+ <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if">
3941
+ <xsl:with-param name="table_or_dl">dl</xsl:with-param>
3942
+ </xsl:apply-templates>
3943
+
3944
+ </xsl:when>
3945
+ <xsl:otherwise>
3946
+
3947
+ <xsl:variable name="simple-table">
3948
+
3949
+ <xsl:variable name="dl_table">
3950
+ <tbody>
3951
+ <xsl:apply-templates mode="dl">
3952
+ <xsl:with-param name="id" select="@id"/>
3953
+ </xsl:apply-templates>
3954
+ </tbody>
3955
+ </xsl:variable>
3956
+
3957
+ <xsl:copy-of select="$dl_table"/>
3958
+ </xsl:variable>
3959
+
3960
+ <xsl:variable name="colwidths">
3961
+ <xsl:call-template name="calculate-column-widths">
3962
+ <xsl:with-param name="cols-count" select="2"/>
3963
+ <xsl:with-param name="table" select="$simple-table"/>
3964
+ </xsl:call-template>
3965
+ </xsl:variable>
3966
+
3967
+ <!-- <xsl:text disable-output-escaping="yes">&lt;!- -</xsl:text>
3968
+ DEBUG
3969
+ colwidths=<xsl:copy-of select="$colwidths"/>
3970
+ <xsl:text disable-output-escaping="yes">- -&gt;</xsl:text> -->
3971
+
3972
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
3973
+
3974
+ <xsl:variable name="maxlength_dt">
3975
+ <xsl:call-template name="getMaxLength_dt"/>
3976
+ </xsl:variable>
3977
+
3978
+ <xsl:variable name="isContainsKeepTogetherTag_">
3979
+ false
3980
+ </xsl:variable>
3981
+ <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
3982
+ <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
3983
+
3984
+
3985
+ <xsl:call-template name="setColumnWidth_dl">
3986
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3987
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3988
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
3989
+ </xsl:call-template>
3990
+
3991
+ <fo:table-body>
3992
+
3993
+ <!-- DEBUG -->
3994
+ <xsl:if test="$table_if_debug = 'true'">
3995
+ <fo:table-row>
3996
+ <fo:table-cell number-columns-spanned="2" font-size="60%">
3997
+ <xsl:apply-templates select="xalan:nodeset($colwidths)" mode="print_as_xml"/>
3998
+ </fo:table-cell>
3999
+ </fo:table-row>
4000
+ </xsl:if>
4001
+
4002
+ <xsl:apply-templates>
4003
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
4004
+ <xsl:with-param name="split_keep-within-line" select="xalan:nodeset($colwidths)/split_keep-within-line"/>
4005
+ </xsl:apply-templates>
4006
+
4007
+ </fo:table-body>
4008
+ </xsl:otherwise>
4009
+ </xsl:choose>
3502
4010
  </fo:table>
3503
4011
  </fo:block>
3504
4012
  </fo:block>
3505
- </xsl:if>
4013
+ </xsl:if> <!-- END: a few components -->
3506
4014
  </fo:block-container>
3507
4015
  </fo:block-container>
4016
+
4017
+ <xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
4018
+ <xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
4019
+ </xsl:if>
4020
+
4021
+ </xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
4022
+ <xsl:param name="process">false</xsl:param>
4023
+ <xsl:if test="$process = 'true'">
4024
+ <fo:block xsl:use-attribute-sets="dl-name-style">
4025
+ <xsl:apply-templates/>
4026
+ </fo:block>
4027
+ </xsl:if>
3508
4028
  </xsl:template><xsl:template name="setColumnWidth_dl">
3509
4029
  <xsl:param name="colwidths"/>
3510
4030
  <xsl:param name="maxlength_dt"/>
4031
+ <xsl:param name="isContainsKeepTogetherTag"/>
4032
+
4033
+ <!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
4034
+
3511
4035
  <xsl:choose>
4036
+ <xsl:when test="xalan:nodeset($colwidths)/autolayout">
4037
+ <xsl:call-template name="insertTableColumnWidth">
4038
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4039
+ </xsl:call-template>
4040
+ </xsl:when>
3512
4041
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
3513
4042
  <fo:table-column column-width="50%"/>
3514
4043
  <fo:table-column column-width="50%"/>
3515
4044
  </xsl:when>
3516
4045
  <xsl:otherwise>
3517
4046
  <xsl:choose>
4047
+ <xsl:when test="xalan:nodeset($colwidths)/autolayout">
4048
+ <xsl:call-template name="insertTableColumnWidth">
4049
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4050
+ </xsl:call-template>
4051
+ </xsl:when>
4052
+ <xsl:when test="$isContainsKeepTogetherTag">
4053
+ <xsl:call-template name="insertTableColumnWidth">
4054
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4055
+ </xsl:call-template>
4056
+ </xsl:when>
3518
4057
  <!-- to set width check most wide chars like `W` -->
3519
4058
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
3520
4059
  <fo:table-column column-width="7%"/>
@@ -3545,20 +4084,31 @@
3545
4084
  <fo:table-column column-width="60%"/>
3546
4085
  </xsl:when>
3547
4086
  <xsl:otherwise>
3548
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
3549
- <xsl:choose>
3550
- <xsl:when test=". = 1 or . = 0">
3551
- <fo:table-column column-width="proportional-column-width(2)"/>
3552
- </xsl:when>
3553
- <xsl:otherwise>
3554
- <fo:table-column column-width="proportional-column-width({.})"/>
3555
- </xsl:otherwise>
3556
- </xsl:choose>
3557
- </xsl:for-each>
4087
+ <xsl:call-template name="insertTableColumnWidth">
4088
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4089
+ </xsl:call-template>
3558
4090
  </xsl:otherwise>
3559
4091
  </xsl:choose>
3560
4092
  </xsl:otherwise>
3561
4093
  </xsl:choose>
4094
+ </xsl:template><xsl:template name="insertTableColumnWidth">
4095
+ <xsl:param name="colwidths"/>
4096
+
4097
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
4098
+ <xsl:choose>
4099
+ <xsl:when test=". = 1 or . = 0">
4100
+ <fo:table-column column-width="proportional-column-width(2)"/>
4101
+ </xsl:when>
4102
+ <xsl:otherwise>
4103
+ <!-- <fo:table-column column-width="proportional-column-width({.})"/> -->
4104
+ <xsl:variable name="divider">
4105
+ <xsl:value-of select="@divider"/>
4106
+ <xsl:if test="not(@divider)">1</xsl:if>
4107
+ </xsl:variable>
4108
+ <fo:table-column column-width="proportional-column-width({round(. div $divider)})"/>
4109
+ </xsl:otherwise>
4110
+ </xsl:choose>
4111
+ </xsl:for-each>
3562
4112
  </xsl:template><xsl:template name="getMaxLength_dt">
3563
4113
  <xsl:variable name="lengths">
3564
4114
  <xsl:for-each select="*[local-name()='dt']">
@@ -3582,7 +4132,6 @@
3582
4132
  <xsl:value-of select="$maxLength"/>
3583
4133
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3584
4134
  <xsl:param name="key_iso"/>
3585
-
3586
4135
  <!-- <tr>
3587
4136
  <td>NOTE</td>
3588
4137
  <td>
@@ -3590,27 +4139,47 @@
3590
4139
  </td>
3591
4140
  </tr>
3592
4141
  -->
3593
- <fo:table-row>
4142
+ <!-- OLD Variant -->
4143
+ <!-- <fo:table-row>
3594
4144
  <fo:table-cell>
3595
4145
  <fo:block margin-top="6pt">
3596
4146
  <xsl:if test="normalize-space($key_iso) = 'true'">
3597
4147
  <xsl:attribute name="margin-top">0</xsl:attribute>
3598
4148
  </xsl:if>
3599
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4149
+ <xsl:apply-templates select="*[local-name() = 'name']" />
3600
4150
  </fo:block>
3601
4151
  </fo:table-cell>
3602
4152
  <fo:table-cell>
3603
4153
  <fo:block>
3604
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4154
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" />
4155
+ </fo:block>
4156
+ </fo:table-cell>
4157
+ </fo:table-row> -->
4158
+ <!-- <tr>
4159
+ <td number-columns-spanned="2">NOTE <xsl:apply-templates /> </td>
4160
+ </tr>
4161
+ -->
4162
+ <fo:table-row>
4163
+ <fo:table-cell number-columns-spanned="2">
4164
+ <fo:block>
4165
+ <xsl:call-template name="note"/>
3605
4166
  </fo:block>
3606
4167
  </fo:table-cell>
3607
4168
  </fo:table-row>
3608
4169
  </xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
4170
+ <xsl:param name="id"/>
4171
+ <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
3609
4172
  <tr>
3610
4173
  <td>
4174
+ <xsl:attribute name="id">
4175
+ <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
4176
+ </xsl:attribute>
3611
4177
  <xsl:apply-templates/>
3612
4178
  </td>
3613
4179
  <td>
4180
+ <xsl:attribute name="id">
4181
+ <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
4182
+ </xsl:attribute>
3614
4183
 
3615
4184
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3616
4185
  <xsl:with-param name="process">true</xsl:with-param>
@@ -3621,50 +4190,134 @@
3621
4190
 
3622
4191
  </xsl:template><xsl:template match="*[local-name()='dt']">
3623
4192
  <xsl:param name="key_iso"/>
4193
+ <xsl:param name="split_keep-within-line"/>
3624
4194
 
3625
4195
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
3626
- <fo:table-cell>
4196
+ <xsl:call-template name="insert_dt_cell">
4197
+ <xsl:with-param name="key_iso" select="$key_iso"/>
4198
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4199
+ </xsl:call-template>
4200
+ <xsl:for-each select="following-sibling::*[local-name()='dd'][1]">
4201
+ <xsl:call-template name="insert_dd_cell">
4202
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4203
+ </xsl:call-template>
4204
+ </xsl:for-each>
4205
+ </fo:table-row>
4206
+ </xsl:template><xsl:template name="insert_dt_cell">
4207
+ <xsl:param name="key_iso"/>
4208
+ <xsl:param name="split_keep-within-line"/>
4209
+ <fo:table-cell xsl:use-attribute-sets="dt-cell-style">
4210
+
4211
+ <xsl:if test="$isGenerateTableIF = 'true'">
4212
+ <!-- border is mandatory, to calculate real width -->
4213
+ <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
4214
+ <xsl:attribute name="text-align">left</xsl:attribute>
4215
+ </xsl:if>
4216
+
4217
+
4218
+ <fo:block xsl:use-attribute-sets="dt-block-style">
4219
+ <xsl:copy-of select="@id"/>
4220
+
4221
+ <xsl:if test="normalize-space($key_iso) = 'true'">
4222
+ <xsl:attribute name="margin-top">0</xsl:attribute>
4223
+ </xsl:if>
4224
+
4225
+
4226
+
4227
+ <xsl:apply-templates>
4228
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4229
+ </xsl:apply-templates>
4230
+
4231
+ <xsl:if test="$isGenerateTableIF = 'true'"><fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
4232
+
4233
+ </fo:block>
4234
+ </fo:table-cell>
4235
+ </xsl:template><xsl:template name="insert_dd_cell">
4236
+ <xsl:param name="split_keep-within-line"/>
4237
+ <fo:table-cell xsl:use-attribute-sets="dd-cell-style">
4238
+
4239
+ <xsl:if test="$isGenerateTableIF = 'true'">
4240
+ <!-- border is mandatory, to calculate real width -->
4241
+ <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
4242
+ </xsl:if>
4243
+
4244
+ <fo:block>
4245
+
4246
+ <xsl:if test="$isGenerateTableIF = 'true'">
4247
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4248
+ </xsl:if>
4249
+
3627
4250
 
3628
- <fo:block xsl:use-attribute-sets="dt-style">
3629
- <xsl:copy-of select="@id"/>
3630
-
3631
- <xsl:if test="normalize-space($key_iso) = 'true'">
3632
- <xsl:attribute name="margin-top">0</xsl:attribute>
3633
- </xsl:if>
3634
-
3635
-
3636
-
3637
- <xsl:apply-templates/>
3638
- </fo:block>
3639
- </fo:table-cell>
3640
- <fo:table-cell>
3641
- <fo:block>
3642
-
3643
4251
 
3644
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3645
- <xsl:with-param name="process">true</xsl:with-param>
3646
- </xsl:apply-templates>
3647
- </fo:block>
3648
- </fo:table-cell>
3649
- </fo:table-row>
4252
+ <xsl:choose>
4253
+ <xsl:when test="$isGenerateTableIF = 'true'">
4254
+ <xsl:apply-templates> <!-- following-sibling::*[local-name()='dd'][1] -->
4255
+ <xsl:with-param name="process">true</xsl:with-param>
4256
+ </xsl:apply-templates>
4257
+ </xsl:when>
4258
+ <xsl:otherwise>
4259
+ <xsl:apply-templates select="."> <!-- following-sibling::*[local-name()='dd'][1] -->
4260
+ <xsl:with-param name="process">true</xsl:with-param>
4261
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4262
+ </xsl:apply-templates>
4263
+ </xsl:otherwise>
4264
+
4265
+ </xsl:choose>
4266
+
4267
+ <xsl:if test="$isGenerateTableIF = 'true'"><fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
4268
+
4269
+ </fo:block>
4270
+ </fo:table-cell>
3650
4271
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3651
4272
  <xsl:apply-templates/>
3652
4273
  </xsl:template><xsl:template match="*[local-name()='dd']">
3653
4274
  <xsl:param name="process">false</xsl:param>
4275
+ <xsl:param name="split_keep-within-line"/>
3654
4276
  <xsl:if test="$process = 'true'">
3655
4277
  <xsl:apply-templates select="@language"/>
3656
- <xsl:apply-templates/>
4278
+ <xsl:apply-templates>
4279
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4280
+ </xsl:apply-templates>
3657
4281
  </xsl:if>
3658
4282
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3659
4283
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
3660
- </xsl:template><xsl:template match="*[local-name()='em']">
4284
+ </xsl:template><xsl:template match="*[local-name()='dt']" mode="dl_if">
4285
+ <xsl:param name="id"/>
4286
+ <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
4287
+ <tr>
4288
+ <td>
4289
+ <xsl:copy-of select="node()"/>
4290
+ </td>
4291
+ <td>
4292
+
4293
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4294
+
4295
+ <!-- get paragraphs from nested 'dl' -->
4296
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4297
+
4298
+
4299
+ </td>
4300
+ </tr>
4301
+
4302
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
4303
+ <xsl:for-each select="*[local-name() = 'dt']">
4304
+ <p>
4305
+ <xsl:copy-of select="node()"/>
4306
+ <xsl:text> </xsl:text>
4307
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
4308
+ </p>
4309
+ </xsl:for-each>
4310
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
3661
4311
  <fo:inline font-style="italic">
3662
4312
  <xsl:apply-templates/>
3663
4313
  </fo:inline>
3664
4314
  </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
4315
+ <xsl:param name="split_keep-within-line"/>
3665
4316
  <fo:inline font-weight="bold">
3666
4317
 
3667
- <xsl:apply-templates/>
4318
+ <xsl:apply-templates>
4319
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4320
+ </xsl:apply-templates>
3668
4321
  </fo:inline>
3669
4322
  </xsl:template><xsl:template match="*[local-name()='padding']">
3670
4323
  <fo:inline padding-right="{@value}"> </fo:inline>
@@ -3685,7 +4338,7 @@
3685
4338
 
3686
4339
 
3687
4340
 
3688
-
4341
+ <!-- 10 -->
3689
4342
 
3690
4343
 
3691
4344
 
@@ -3703,13 +4356,15 @@
3703
4356
  <xsl:choose>
3704
4357
  <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3705
4358
  <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3706
- <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4359
+ <xsl:when test="ancestor::*[local-name()='note'] or ancestor::*[local-name()='example']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3707
4360
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3708
4361
  </xsl:choose>
3709
4362
  </xsl:attribute>
3710
4363
  </xsl:if>
3711
4364
  <xsl:apply-templates/>
3712
4365
  </fo:inline>
4366
+ </xsl:template><xsl:template match="*[local-name()='tt']/text()" priority="2">
4367
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
3713
4368
  </xsl:template><xsl:template match="*[local-name()='underline']">
3714
4369
  <fo:inline text-decoration="underline">
3715
4370
  <xsl:apply-templates/>
@@ -3857,54 +4512,120 @@
3857
4512
  <fo:block break-after="page"/>
3858
4513
  <fo:block> </fo:block>
3859
4514
  <fo:block break-after="page"/>
4515
+ </xsl:template><xsl:template match="*[local-name() = 'span']">
4516
+ <xsl:apply-templates/>
3860
4517
  </xsl:template><xsl:template name="tokenize">
3861
4518
  <xsl:param name="text"/>
3862
4519
  <xsl:param name="separator" select="' '"/>
3863
4520
  <xsl:choose>
4521
+
4522
+ <xsl:when test="$isGenerateTableIF = 'true' and not(contains($text, $separator))">
4523
+ <word><xsl:value-of select="normalize-space($text)"/></word>
4524
+ </xsl:when>
3864
4525
  <xsl:when test="not(contains($text, $separator))">
3865
4526
  <word>
3866
- <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
3867
- <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
3868
4527
  <xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
3869
- <xsl:variable name="len_str">
3870
- <xsl:choose>
3871
- <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
3872
- <xsl:value-of select="$len_str_tmp * 1.5"/>
3873
- </xsl:when>
3874
- <xsl:otherwise>
3875
- <xsl:value-of select="$len_str_tmp"/>
3876
- </xsl:otherwise>
3877
- </xsl:choose>
3878
- </xsl:variable>
3879
-
3880
- <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
3881
- <xsl:message>
3882
- div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
3883
- len_str=<xsl:value-of select="$len_str"/>
3884
- len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
3885
- </xsl:message>
3886
- </xsl:if> -->
3887
- <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
3888
- <len_str><xsl:value-of select="$len_str"/></len_str> -->
3889
4528
  <xsl:choose>
3890
- <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
3891
- <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
4529
+ <xsl:when test="normalize-space(translate($text, 'X', '')) = ''"> <!-- special case for keep-together.within-line -->
4530
+ <xsl:value-of select="$len_str_tmp"/>
3892
4531
  </xsl:when>
3893
4532
  <xsl:otherwise>
3894
- <xsl:value-of select="$len_str"/>
4533
+ <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
4534
+ <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
4535
+ <xsl:variable name="len_str">
4536
+ <xsl:choose>
4537
+ <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
4538
+ <xsl:value-of select="$len_str_tmp * 1.5"/>
4539
+ </xsl:when>
4540
+ <xsl:otherwise>
4541
+ <xsl:value-of select="$len_str_tmp"/>
4542
+ </xsl:otherwise>
4543
+ </xsl:choose>
4544
+ </xsl:variable>
4545
+
4546
+ <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
4547
+ <xsl:message>
4548
+ div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
4549
+ len_str=<xsl:value-of select="$len_str"/>
4550
+ len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
4551
+ </xsl:message>
4552
+ </xsl:if> -->
4553
+ <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
4554
+ <len_str><xsl:value-of select="$len_str"/></len_str> -->
4555
+ <xsl:choose>
4556
+ <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
4557
+ <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
4558
+ </xsl:when>
4559
+ <xsl:otherwise>
4560
+ <xsl:value-of select="$len_str"/>
4561
+ </xsl:otherwise>
4562
+ </xsl:choose>
3895
4563
  </xsl:otherwise>
3896
4564
  </xsl:choose>
3897
4565
  </word>
3898
4566
  </xsl:when>
3899
4567
  <xsl:otherwise>
3900
4568
  <word>
3901
- <xsl:value-of select="string-length(normalize-space(substring-before($text, $separator)))"/>
4569
+ <xsl:variable name="word" select="normalize-space(substring-before($text, $separator))"/>
4570
+ <xsl:choose>
4571
+ <xsl:when test="$isGenerateTableIF = 'true'">
4572
+ <xsl:value-of select="$word"/>
4573
+ </xsl:when>
4574
+ <xsl:otherwise>
4575
+ <xsl:value-of select="string-length($word)"/>
4576
+ </xsl:otherwise>
4577
+ </xsl:choose>
3902
4578
  </word>
3903
4579
  <xsl:call-template name="tokenize">
3904
4580
  <xsl:with-param name="text" select="substring-after($text, $separator)"/>
3905
4581
  </xsl:call-template>
3906
4582
  </xsl:otherwise>
3907
4583
  </xsl:choose>
4584
+ </xsl:template><xsl:template name="tokenize_with_tags">
4585
+ <xsl:param name="tags"/>
4586
+ <xsl:param name="text"/>
4587
+ <xsl:param name="separator" select="' '"/>
4588
+ <xsl:choose>
4589
+
4590
+ <xsl:when test="not(contains($text, $separator))">
4591
+ <word>
4592
+ <xsl:call-template name="enclose_text_in_tags">
4593
+ <xsl:with-param name="text" select="normalize-space($text)"/>
4594
+ <xsl:with-param name="tags" select="$tags"/>
4595
+ </xsl:call-template>
4596
+ </word>
4597
+ </xsl:when>
4598
+ <xsl:otherwise>
4599
+ <word>
4600
+ <xsl:call-template name="enclose_text_in_tags">
4601
+ <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
4602
+ <xsl:with-param name="tags" select="$tags"/>
4603
+ </xsl:call-template>
4604
+ </word>
4605
+ <xsl:call-template name="tokenize_with_tags">
4606
+ <xsl:with-param name="text" select="substring-after($text, $separator)"/>
4607
+ </xsl:call-template>
4608
+ </xsl:otherwise>
4609
+ </xsl:choose>
4610
+ </xsl:template><xsl:template name="enclose_text_in_tags">
4611
+ <xsl:param name="text"/>
4612
+ <xsl:param name="tags"/>
4613
+ <xsl:param name="num">1</xsl:param> <!-- default (start) value -->
4614
+
4615
+ <xsl:variable name="tag_name" select="normalize-space(xalan:nodeset($tags)//tag[$num])"/>
4616
+
4617
+ <xsl:choose>
4618
+ <xsl:when test="$tag_name = ''"><xsl:value-of select="$text"/></xsl:when>
4619
+ <xsl:otherwise>
4620
+ <xsl:element name="{$tag_name}">
4621
+ <xsl:call-template name="enclose_text_in_tags">
4622
+ <xsl:with-param name="text" select="$text"/>
4623
+ <xsl:with-param name="tags" select="$tags"/>
4624
+ <xsl:with-param name="num" select="$num + 1"/>
4625
+ </xsl:call-template>
4626
+ </xsl:element>
4627
+ </xsl:otherwise>
4628
+ </xsl:choose>
3908
4629
  </xsl:template><xsl:template name="max_length">
3909
4630
  <xsl:param name="words"/>
3910
4631
  <xsl:for-each select="$words//word">
@@ -4005,12 +4726,19 @@
4005
4726
  </xsl:otherwise>
4006
4727
  </xsl:choose>
4007
4728
  </xsl:template><xsl:template name="getSimpleTable">
4729
+ <xsl:param name="id"/>
4730
+
4008
4731
  <xsl:variable name="simple-table">
4009
4732
 
4733
+ <!-- Step 0. replace <br/> to <p>...</p> -->
4734
+ <xsl:variable name="table_without_br">
4735
+ <xsl:apply-templates mode="table-without-br"/>
4736
+ </xsl:variable>
4737
+
4010
4738
  <!-- Step 1. colspan processing -->
4011
4739
  <xsl:variable name="simple-table-colspan">
4012
4740
  <tbody>
4013
- <xsl:apply-templates mode="simple-table-colspan"/>
4741
+ <xsl:apply-templates select="xalan:nodeset($table_without_br)" mode="simple-table-colspan"/>
4014
4742
  </tbody>
4015
4743
  </xsl:variable>
4016
4744
 
@@ -4019,10 +4747,67 @@
4019
4747
  <xsl:apply-templates select="xalan:nodeset($simple-table-colspan)" mode="simple-table-rowspan"/>
4020
4748
  </xsl:variable>
4021
4749
 
4022
- <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
4023
-
4750
+ <!-- Step 3: add id to each cell -->
4751
+ <!-- add <word>...</word> for each word, image, math -->
4752
+ <xsl:variable name="simple-table-id">
4753
+ <xsl:apply-templates select="xalan:nodeset($simple-table-rowspan)" mode="simple-table-id">
4754
+ <xsl:with-param name="id" select="$id"/>
4755
+ </xsl:apply-templates>
4756
+ </xsl:variable>
4757
+
4758
+ <xsl:copy-of select="xalan:nodeset($simple-table-id)"/>
4759
+
4024
4760
  </xsl:variable>
4025
4761
  <xsl:copy-of select="$simple-table"/>
4762
+ </xsl:template><xsl:template match="@*|node()" mode="table-without-br">
4763
+ <xsl:copy>
4764
+ <xsl:apply-templates select="@*|node()" mode="table-without-br"/>
4765
+ </xsl:copy>
4766
+ </xsl:template><xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
4767
+ <xsl:copy>
4768
+ <xsl:copy-of select="@*"/>
4769
+ <p>
4770
+ <xsl:copy-of select="node()"/>
4771
+ </p>
4772
+ </xsl:copy>
4773
+ </xsl:template><xsl:template match="*[local-name()='th' or local-name()='td'][*[local-name()='br']]" mode="table-without-br">
4774
+ <xsl:copy>
4775
+ <xsl:copy-of select="@*"/>
4776
+ <xsl:for-each select="*[local-name()='br']">
4777
+ <xsl:variable name="current_id" select="generate-id()"/>
4778
+ <p>
4779
+ <xsl:for-each select="preceding-sibling::node()[following-sibling::*[local-name() = 'br'][1][generate-id() = $current_id]][not(local-name() = 'br')]">
4780
+ <xsl:copy-of select="."/>
4781
+ </xsl:for-each>
4782
+ </p>
4783
+ <xsl:if test="not(following-sibling::*[local-name() = 'br'])">
4784
+ <p>
4785
+ <xsl:for-each select="following-sibling::node()">
4786
+ <xsl:copy-of select="."/>
4787
+ </xsl:for-each>
4788
+ </p>
4789
+ </xsl:if>
4790
+ </xsl:for-each>
4791
+ </xsl:copy>
4792
+ </xsl:template><xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p'][*[local-name()='br']]" mode="table-without-br">
4793
+ <xsl:for-each select="*[local-name()='br']">
4794
+ <xsl:variable name="current_id" select="generate-id()"/>
4795
+ <p>
4796
+ <xsl:for-each select="preceding-sibling::node()[following-sibling::*[local-name() = 'br'][1][generate-id() = $current_id]][not(local-name() = 'br')]">
4797
+ <xsl:copy-of select="."/>
4798
+ </xsl:for-each>
4799
+ </p>
4800
+ <xsl:if test="not(following-sibling::*[local-name() = 'br'])">
4801
+ <p>
4802
+ <xsl:for-each select="following-sibling::node()">
4803
+ <xsl:copy-of select="."/>
4804
+ </xsl:for-each>
4805
+ </p>
4806
+ </xsl:if>
4807
+ </xsl:for-each>
4808
+ </xsl:template><xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
4809
+ <xsl:variable name="text" select="translate(.,'&#9;&#10;&#13;','')"/>
4810
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),' {2,}',' ')"/>
4026
4811
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
4027
4812
  <xsl:apply-templates mode="simple-table-colspan"/>
4028
4813
  </xsl:template><xsl:template match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
@@ -4100,18 +4885,138 @@
4100
4885
  </xsl:choose>
4101
4886
  </xsl:for-each>
4102
4887
  </xsl:variable>
4103
-
4104
- <xsl:variable name="newRow">
4105
- <xsl:copy>
4106
- <xsl:copy-of select="$currentRow/@*"/>
4107
- <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
4108
- </xsl:copy>
4888
+
4889
+ <xsl:variable name="newRow">
4890
+ <xsl:copy>
4891
+ <xsl:copy-of select="$currentRow/@*"/>
4892
+ <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
4893
+ </xsl:copy>
4894
+ </xsl:variable>
4895
+ <xsl:copy-of select="$newRow"/>
4896
+
4897
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
4898
+ <xsl:with-param name="previousRow" select="$newRow"/>
4899
+ </xsl:apply-templates>
4900
+ </xsl:template><xsl:template match="/" mode="simple-table-id">
4901
+ <xsl:param name="id"/>
4902
+ <xsl:variable name="id_prefixed" select="concat('table_if_',$id)"/> <!-- table id prefixed by 'table_if_' to simple search in IF -->
4903
+ <xsl:apply-templates select="@*|node()" mode="simple-table-id">
4904
+ <xsl:with-param name="id" select="$id_prefixed"/>
4905
+ </xsl:apply-templates>
4906
+ </xsl:template><xsl:template match="@*|node()" mode="simple-table-id">
4907
+ <xsl:param name="id"/>
4908
+ <xsl:copy>
4909
+ <xsl:apply-templates select="@*|node()" mode="simple-table-id">
4910
+ <xsl:with-param name="id" select="$id"/>
4911
+ </xsl:apply-templates>
4912
+ </xsl:copy>
4913
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="simple-table-id">
4914
+ <xsl:param name="id"/>
4915
+ <xsl:copy>
4916
+ <xsl:copy-of select="@*"/>
4917
+ <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
4918
+ <xsl:apply-templates select="node()" mode="simple-table-id">
4919
+ <xsl:with-param name="id" select="$id"/>
4920
+ </xsl:apply-templates>
4921
+ </xsl:copy>
4922
+ </xsl:template><xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
4923
+ <xsl:param name="id"/>
4924
+ <xsl:copy>
4925
+ <xsl:copy-of select="@*"/>
4926
+ <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
4927
+ <xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
4928
+ <xsl:attribute name="id">
4929
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
4930
+ </xsl:attribute>
4931
+
4932
+ <xsl:for-each select="*[local-name() = 'p']">
4933
+ <xsl:copy>
4934
+ <xsl:copy-of select="@*"/>
4935
+ <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
4936
+ <xsl:attribute name="id">
4937
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
4938
+ </xsl:attribute>
4939
+
4940
+ <xsl:copy-of select="node()"/>
4941
+ </xsl:copy>
4942
+ </xsl:for-each>
4943
+
4944
+
4945
+ <xsl:if test="$isGenerateTableIF = 'true'"> <!-- split each paragraph to words, image, math -->
4946
+
4947
+ <xsl:variable name="td_text">
4948
+ <xsl:apply-templates select="." mode="td_text_with_formatting"/>
4949
+ </xsl:variable>
4950
+
4951
+ <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
4952
+
4953
+ <xsl:variable name="words">
4954
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
4955
+ <word>
4956
+ <xsl:copy-of select="."/>
4957
+ </word>
4958
+ </xsl:for-each>
4959
+
4960
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
4961
+ <xsl:copy-of select="."/>
4962
+ </xsl:for-each>
4963
+
4964
+ </xsl:variable>
4965
+
4966
+ <xsl:for-each select="xalan:nodeset($words)/word">
4967
+ <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
4968
+ <xsl:copy>
4969
+ <xsl:attribute name="id">
4970
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
4971
+ </xsl:attribute>
4972
+ <xsl:copy-of select="node()"/>
4973
+ </xsl:copy>
4974
+ </xsl:for-each>
4975
+ </xsl:if>
4976
+ </xsl:copy>
4977
+
4978
+ </xsl:template><xsl:template match="@*|node()" mode="td_text_with_formatting">
4979
+ <xsl:copy>
4980
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
4981
+ </xsl:copy>
4982
+ </xsl:template><xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/><xsl:template match="*[local-name() = 'keep-together_within-line']/text()" mode="td_text_with_formatting">
4983
+ <xsl:variable name="formatting_tags">
4984
+ <xsl:call-template name="getFormattingTags"/>
4985
+ </xsl:variable>
4986
+ <word>
4987
+ <xsl:call-template name="enclose_text_in_tags">
4988
+ <xsl:with-param name="text" select="normalize-space(.)"/>
4989
+ <xsl:with-param name="tags" select="$formatting_tags"/>
4990
+ </xsl:call-template>
4991
+ </word>
4992
+ </xsl:template><xsl:template match="*[local-name() != 'keep-together_within-line']/text()" mode="td_text_with_formatting">
4993
+
4994
+ <xsl:variable name="td_text" select="."/>
4995
+
4996
+ <xsl:variable name="string_with_added_zerospaces">
4997
+ <xsl:call-template name="add-zero-spaces-java">
4998
+ <xsl:with-param name="text" select="$td_text"/>
4999
+ </xsl:call-template>
4109
5000
  </xsl:variable>
4110
- <xsl:copy-of select="$newRow"/>
4111
-
4112
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
4113
- <xsl:with-param name="previousRow" select="$newRow"/>
4114
- </xsl:apply-templates>
5001
+
5002
+ <xsl:variable name="formatting_tags">
5003
+ <xsl:call-template name="getFormattingTags"/>
5004
+ </xsl:variable>
5005
+
5006
+ <!-- <word>text</word> -->
5007
+ <xsl:call-template name="tokenize_with_tags">
5008
+ <xsl:with-param name="tags" select="$formatting_tags"/>
5009
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
5010
+ </xsl:call-template>
5011
+ </xsl:template><xsl:template name="getFormattingTags">
5012
+ <tags>
5013
+ <xsl:if test="ancestor::*[local-name() = 'strong']"><tag>strong</tag></xsl:if>
5014
+ <xsl:if test="ancestor::*[local-name() = 'em']"><tag>em</tag></xsl:if>
5015
+ <xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
5016
+ <xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
5017
+ <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
5018
+ <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
5019
+ </tags>
4115
5020
  </xsl:template><xsl:template name="getLang">
4116
5021
  <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
4117
5022
  <xsl:variable name="language">
@@ -4166,6 +5071,9 @@
4166
5071
  <xsl:variable name="isDeleted" select="@deleted"/>
4167
5072
 
4168
5073
  <fo:inline xsl:use-attribute-sets="mathml-style">
5074
+
5075
+
5076
+
4169
5077
 
4170
5078
 
4171
5079
  <xsl:call-template name="setTrackChangesStyles">
@@ -4173,48 +5081,80 @@
4173
5081
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4174
5082
  </xsl:call-template>
4175
5083
 
5084
+ <xsl:if test="$add_math_as_text = 'true'">
5085
+ <!-- insert helper tag -->
5086
+ <!-- set unique font-size (fiction) -->
5087
+ <xsl:variable name="font-size_sfx"><xsl:number level="any"/></xsl:variable>
5088
+ <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 -->
5089
+ </xsl:if>
4176
5090
 
4177
-
4178
- <xsl:variable name="mathml">
4179
- <xsl:apply-templates select="." mode="mathml"/>
5091
+ <xsl:variable name="mathml_content">
5092
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
4180
5093
  </xsl:variable>
4181
- <fo:instream-foreign-object fox:alt-text="Math">
4182
5094
 
5095
+
5096
+ <xsl:call-template name="mathml_instream_object">
5097
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
5098
+ </xsl:call-template>
4183
5099
 
4184
-
4185
- <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
4186
- <xsl:variable name="comment_text_">
4187
- <xsl:choose>
4188
- <xsl:when test="normalize-space($comment_text_following) != ''">
4189
- <xsl:value-of select="$comment_text_following"/>
4190
- </xsl:when>
4191
- <xsl:otherwise>
4192
- <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
4193
- </xsl:otherwise>
4194
- </xsl:choose>
4195
- </xsl:variable>
4196
- <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
4197
-
4198
- <xsl:if test="normalize-space($comment_text) != ''">
4199
- <!-- put Mathin Alternate Text -->
4200
- <xsl:attribute name="fox:alt-text">
4201
- <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
4202
- </xsl:attribute>
4203
- </xsl:if>
4204
-
4205
- <xsl:variable name="mathml_content">
4206
- <xsl:apply-templates select="." mode="mathml_actual_text"/>
4207
- </xsl:variable>
4208
- <!-- put MathML in Actual Text -->
4209
- <xsl:attribute name="fox:actual-text">
4210
- <xsl:value-of select="$mathml_content"/>
4211
- </xsl:attribute>
4212
-
4213
-
4214
-
4215
- <xsl:copy-of select="xalan:nodeset($mathml)"/>
4216
- </fo:instream-foreign-object>
5100
+
4217
5101
  </fo:inline>
5102
+ </xsl:template><xsl:template name="getMathml_comment_text">
5103
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
5104
+ <xsl:variable name="comment_text_">
5105
+ <xsl:choose>
5106
+ <xsl:when test="normalize-space($comment_text_following) != ''">
5107
+ <xsl:value-of select="$comment_text_following"/>
5108
+ </xsl:when>
5109
+ <xsl:otherwise>
5110
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
5111
+ </xsl:otherwise>
5112
+ </xsl:choose>
5113
+ </xsl:variable>
5114
+ <xsl:variable name="comment_text_2" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
5115
+ <xsl:variable name="comment_text" select="java:trim(java:java.lang.String.new($comment_text_2))"/>
5116
+ <xsl:value-of select="$comment_text"/>
5117
+ </xsl:template><xsl:template name="mathml_instream_object">
5118
+ <xsl:param name="comment_text"/>
5119
+ <xsl:param name="mathml_content"/>
5120
+
5121
+ <xsl:variable name="comment_text_">
5122
+ <xsl:choose>
5123
+ <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
5124
+ <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
5125
+ </xsl:choose>
5126
+ </xsl:variable>
5127
+
5128
+ <xsl:variable name="mathml">
5129
+ <xsl:apply-templates select="." mode="mathml"/>
5130
+ </xsl:variable>
5131
+
5132
+ <fo:instream-foreign-object fox:alt-text="Math">
5133
+
5134
+
5135
+
5136
+
5137
+
5138
+
5139
+
5140
+ <!-- put MathML in Actual Text -->
5141
+ <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
5142
+ <xsl:attribute name="fox:actual-text">
5143
+ <xsl:value-of select="$mathml_content"/>
5144
+ </xsl:attribute>
5145
+
5146
+ <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
5147
+ <xsl:if test="normalize-space($comment_text_) != ''">
5148
+ <!-- put Mathin Alternate Text -->
5149
+ <xsl:attribute name="fox:alt-text">
5150
+ <xsl:value-of select="$comment_text_"/>
5151
+ </xsl:attribute>
5152
+ </xsl:if>
5153
+ <!-- </xsl:if> -->
5154
+
5155
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
5156
+
5157
+ </fo:instream-foreign-object>
4218
5158
  </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
4219
5159
  <!-- <xsl:text>a+b</xsl:text> -->
4220
5160
  <xsl:text>&lt;</xsl:text>
@@ -4245,7 +5185,9 @@
4245
5185
  <!-- replace start and end spaces to non-break space -->
4246
5186
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
4247
5187
  </xsl:copy>
4248
- </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">
5188
+ </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">
5189
+ <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
5190
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4249
5191
  <xsl:variable name="target">
4250
5192
  <xsl:choose>
4251
5193
  <xsl:when test="@updatetype = 'true'">
@@ -4863,18 +5805,33 @@
4863
5805
  </xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
4864
5806
  <xsl:copy>
4865
5807
  <xsl:apply-templates select="@*" mode="svg_update"/>
4866
- <xsl:variable name="viewbox">
5808
+ <xsl:variable name="viewbox_">
4867
5809
  <xsl:call-template name="split">
4868
5810
  <xsl:with-param name="pText" select="@viewBox"/>
4869
5811
  <xsl:with-param name="sep" select="' '"/>
4870
5812
  </xsl:call-template>
4871
5813
  </xsl:variable>
5814
+ <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
5815
+ <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
5816
+ <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
5817
+
4872
5818
  <xsl:attribute name="width">
4873
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
5819
+ <xsl:choose>
5820
+ <xsl:when test="$width != ''">
5821
+ <xsl:value-of select="round($width)"/>
5822
+ </xsl:when>
5823
+ <xsl:otherwise>400</xsl:otherwise> <!-- default width -->
5824
+ </xsl:choose>
4874
5825
  </xsl:attribute>
4875
5826
  <xsl:attribute name="height">
4876
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
5827
+ <xsl:choose>
5828
+ <xsl:when test="$height != ''">
5829
+ <xsl:value-of select="round($height)"/>
5830
+ </xsl:when>
5831
+ <xsl:otherwise>400</xsl:otherwise> <!-- default height -->
5832
+ </xsl:choose>
4877
5833
  </xsl:attribute>
5834
+
4878
5835
  <xsl:apply-templates mode="svg_update"/>
4879
5836
  </xsl:copy>
4880
5837
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
@@ -5069,7 +6026,11 @@
5069
6026
  <xsl:apply-templates mode="bookmarks"/>
5070
6027
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
5071
6028
  <xsl:apply-templates select="."/>
5072
- </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">
6029
+ </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">
6030
+ <xsl:apply-templates mode="contents"/>
6031
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
6032
+ <xsl:apply-templates mode="bookmarks"/>
6033
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="bookmarks">
5073
6034
  <xsl:apply-templates mode="bookmarks"/>
5074
6035
  </xsl:template><xsl:template name="addBookmarks">
5075
6036
  <xsl:param name="contents"/>
@@ -5351,7 +6312,9 @@
5351
6312
  <xsl:apply-templates/>
5352
6313
  </xsl:otherwise>
5353
6314
  </xsl:choose>
5354
- </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">
6315
+ </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">
6316
+ <xsl:value-of select="."/>
6317
+ </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
5355
6318
  <xsl:text> </xsl:text>
5356
6319
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
5357
6320
  <xsl:copy>
@@ -5382,9 +6345,22 @@
5382
6345
  </xsl:when>
5383
6346
  <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
5384
6347
  </xsl:choose>
6348
+ </xsl:template><xsl:template match="text()" mode="contents_item">
6349
+ <xsl:call-template name="keep_together_standard_number"/>
6350
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="contents_item">
6351
+ <xsl:apply-templates mode="contents_item"/>
5385
6352
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
5386
6353
 
5387
6354
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
6355
+
6356
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
6357
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6358
+ </xsl:if>
6359
+
6360
+ <xsl:if test="ancestor::*[local-name() = 'example']">
6361
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6362
+ </xsl:if>
6363
+
5388
6364
  <xsl:copy-of select="@id"/>
5389
6365
 
5390
6366
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -5409,7 +6385,7 @@
5409
6385
 
5410
6386
 
5411
6387
 
5412
-
6388
+ <!-- 9 -->
5413
6389
 
5414
6390
 
5415
6391
 
@@ -5493,7 +6469,7 @@
5493
6469
  <xsl:for-each select="xalan:nodeset($text_step4)/node()">
5494
6470
  <xsl:choose>
5495
6471
  <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
5496
- <xsl:call-template name="interspers">
6472
+ <xsl:call-template name="interspers-java">
5497
6473
  <xsl:with-param name="str" select="."/>
5498
6474
  </xsl:call-template>
5499
6475
  </xsl:when>
@@ -5543,6 +6519,10 @@
5543
6519
  <xsl:with-param name="char" select="$char"/>
5544
6520
  </xsl:call-template>
5545
6521
  </xsl:if>
6522
+ </xsl:template><xsl:template name="interspers-java">
6523
+ <xsl:param name="str"/>
6524
+ <xsl:param name="char" select="$zero_width_space"/>
6525
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
5546
6526
  </xsl:template><xsl:template match="*" mode="syntax_highlight">
5547
6527
  <xsl:apply-templates mode="syntax_highlight"/>
5548
6528
  </xsl:template><xsl:variable name="syntax_highlight_styles_">
@@ -5755,7 +6735,9 @@
5755
6735
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
5756
6736
  </xsl:if>
5757
6737
  <xsl:variable name="simple-table">
5758
- <xsl:call-template name="getSimpleTable"/>
6738
+ <xsl:call-template name="getSimpleTable">
6739
+ <xsl:with-param name="id" select="@id"/>
6740
+ </xsl:call-template>
5759
6741
  </xsl:variable>
5760
6742
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
5761
6743
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
@@ -5862,39 +6844,67 @@
5862
6844
  </xsl:otherwise>
5863
6845
  </xsl:choose>
5864
6846
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5865
- <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5866
-
6847
+
6848
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
6849
+
5867
6850
 
6851
+
5868
6852
  <xsl:variable name="fo_element">
5869
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
6853
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
5870
6854
  block
5871
6855
  </xsl:variable>
5872
6856
 
5873
- <!-- display 'EXAMPLE' -->
5874
- <xsl:apply-templates select="*[local-name()='name']">
5875
- <xsl:with-param name="fo_element" select="$fo_element"/>
5876
- </xsl:apply-templates>
6857
+ <fo:block-container margin-left="0mm">
5877
6858
 
5878
- <xsl:choose>
5879
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
5880
- <fo:block-container xsl:use-attribute-sets="example-body-style">
5881
- <fo:block-container margin-left="0mm" margin-right="0mm">
5882
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
6859
+ <xsl:choose>
6860
+
6861
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
6862
+
6863
+ <!-- display name 'EXAMPLE' in a separate block -->
6864
+ <fo:block>
6865
+ <xsl:apply-templates select="*[local-name()='name']">
5883
6866
  <xsl:with-param name="fo_element" select="$fo_element"/>
5884
6867
  </xsl:apply-templates>
6868
+ </fo:block>
6869
+
6870
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
6871
+ <fo:block-container margin-left="0mm" margin-right="0mm">
6872
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
6873
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6874
+ </xsl:apply-templates>
6875
+ </fo:block-container>
5885
6876
  </fo:block-container>
5886
- </fo:block-container>
5887
- </xsl:when>
5888
- <xsl:otherwise>
5889
- <fo:inline>
5890
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5891
- <xsl:with-param name="fo_element" select="$fo_element"/>
5892
- </xsl:apply-templates>
5893
- </fo:inline>
5894
- </xsl:otherwise>
5895
- </xsl:choose>
5896
-
5897
- </fo:block>
6877
+ </xsl:when> <!-- end block -->
6878
+
6879
+ <xsl:otherwise> <!-- inline -->
6880
+
6881
+ <!-- display 'EXAMPLE' and first element in the same line -->
6882
+ <fo:block>
6883
+ <xsl:apply-templates select="*[local-name()='name']">
6884
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6885
+ </xsl:apply-templates>
6886
+ <fo:inline>
6887
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
6888
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6889
+ </xsl:apply-templates>
6890
+ </fo:inline>
6891
+ </fo:block>
6892
+
6893
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
6894
+ <!-- display further elements in blocks -->
6895
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
6896
+ <fo:block-container margin-left="0mm" margin-right="0mm">
6897
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
6898
+ <xsl:with-param name="fo_element" select="'block'"/>
6899
+ </xsl:apply-templates>
6900
+ </fo:block-container>
6901
+ </fo:block-container>
6902
+ </xsl:if>
6903
+ </xsl:otherwise> <!-- end inline -->
6904
+
6905
+ </xsl:choose>
6906
+ </fo:block-container>
6907
+ </fo:block-container>
5898
6908
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
5899
6909
  <xsl:param name="fo_element">block</xsl:param>
5900
6910
 
@@ -5926,14 +6936,20 @@
5926
6936
  </xsl:variable>
5927
6937
  <xsl:choose>
5928
6938
  <xsl:when test="starts-with(normalize-space($element), 'block')">
5929
- <fo:block xsl:use-attribute-sets="example-p-style">
5930
-
5931
- <xsl:if test="$num = 1">
5932
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
5933
- </xsl:if>
5934
-
5935
- <xsl:apply-templates/>
5936
- </fo:block>
6939
+ <fo:block-container>
6940
+ <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
6941
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6942
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6943
+ </xsl:if>
6944
+ <fo:block xsl:use-attribute-sets="example-p-style">
6945
+
6946
+ <xsl:if test="$num = 1">
6947
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
6948
+ </xsl:if>
6949
+
6950
+ <xsl:apply-templates/>
6951
+ </fo:block>
6952
+ </fo:block-container>
5937
6953
  </xsl:when>
5938
6954
  <xsl:otherwise>
5939
6955
  <fo:inline xsl:use-attribute-sets="example-p-style">
@@ -6112,7 +7128,16 @@
6112
7128
  </fo:inline>
6113
7129
  </xsl:when>
6114
7130
  <xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
6115
- <fo:inline><xsl:apply-templates/></fo:inline>
7131
+
7132
+ <!-- if in bibitem[@hidden='true'] there is url[@type='src'], then create hyperlink -->
7133
+ <xsl:variable name="uri_src" select="normalize-space($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'src'])"/>
7134
+ <xsl:choose>
7135
+ <xsl:when test="$uri_src != ''">
7136
+ <fo:basic-link external-destination="{$uri_src}" fox:alt-text="{$uri_src}"><xsl:apply-templates/></fo:basic-link>
7137
+ </xsl:when>
7138
+ <xsl:otherwise><fo:inline><xsl:apply-templates/></fo:inline></xsl:otherwise>
7139
+ </xsl:choose>
7140
+
6116
7141
  </xsl:otherwise>
6117
7142
  </xsl:choose>
6118
7143
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
@@ -6295,10 +7320,24 @@
6295
7320
 
6296
7321
  </fo:block>
6297
7322
  <xsl:apply-templates/>
6298
- </xsl:template><xsl:template match="*[local-name() = 'review']">
7323
+ </xsl:template><xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
6299
7324
  <!-- comment 2019-11-29 -->
6300
7325
  <!-- <fo:block font-weight="bold">Review:</fo:block>
6301
7326
  <xsl:apply-templates /> -->
7327
+
7328
+ <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
7329
+
7330
+ <xsl:choose>
7331
+ <!-- if there isn't the attribute '@from', then -->
7332
+ <xsl:when test="$id_from = ''">
7333
+ <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
7334
+ </xsl:when>
7335
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
7336
+ <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
7337
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
7338
+ </xsl:when>
7339
+ </xsl:choose>
7340
+
6302
7341
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
6303
7342
  <!-- 0xA0 to space replacement -->
6304
7343
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -6443,6 +7482,11 @@
6443
7482
  </xsl:otherwise>
6444
7483
  </xsl:choose>
6445
7484
  </xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
7485
+
7486
+ <xsl:apply-templates select="*[local-name() = 'name']">
7487
+ <xsl:with-param name="process">true</xsl:with-param>
7488
+ </xsl:apply-templates>
7489
+
6446
7490
  <fo:list-block xsl:use-attribute-sets="list-style">
6447
7491
 
6448
7492
 
@@ -6453,12 +7497,23 @@
6453
7497
 
6454
7498
 
6455
7499
 
7500
+ <xsl:if test="*[local-name() = 'name']">
7501
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7502
+ </xsl:if>
7503
+
6456
7504
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
6457
7505
  </fo:list-block>
6458
7506
  <!-- <xsl:for-each select="./iho:note">
6459
7507
  <xsl:call-template name="note"/>
6460
7508
  </xsl:for-each> -->
6461
7509
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
7510
+ </xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
7511
+ <xsl:param name="process">false</xsl:param>
7512
+ <xsl:if test="$process = 'true'">
7513
+ <fo:block xsl:use-attribute-sets="list-name-style">
7514
+ <xsl:apply-templates/>
7515
+ </fo:block>
7516
+ </xsl:if>
6462
7517
  </xsl:template><xsl:template match="*[local-name()='li']">
6463
7518
  <fo:list-item xsl:use-attribute-sets="list-item-style">
6464
7519
  <xsl:copy-of select="@id"/>
@@ -6655,7 +7710,10 @@
6655
7710
  <!-- to split by '_' and other chars -->
6656
7711
  <xsl:call-template name="add-zero-spaces-java"/>
6657
7712
  </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
6658
- <fo:inline id="{@id}" font-size="1pt"/>
7713
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
7714
+ <fo:inline id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:inline>
7715
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
7716
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
6659
7717
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
6660
7718
  <!-- <row>
6661
7719
  <date>05-07-2013</date>
@@ -6733,22 +7791,11 @@
6733
7791
  </xsl:template><xsl:template name="processBibitem">
6734
7792
 
6735
7793
 
7794
+ <!-- start UNECE bibitem processing -->
6736
7795
  <fo:inline padding-right="5mm">[<xsl:value-of select="un:docidentifier"/>]</fo:inline><xsl:value-of select="un:docidentifier"/>
6737
- <xsl:if test="un:title">
6738
- <fo:inline font-style="italic">
6739
- <xsl:text>, </xsl:text>
6740
- <xsl:choose>
6741
- <xsl:when test="un:title[@type = 'main' and @language = 'en']">
6742
- <xsl:apply-templates select="un:title[@type = 'main' and @language = 'en']"/>
6743
- </xsl:when>
6744
- <xsl:otherwise>
6745
- <xsl:apply-templates select="un:title"/>
6746
- </xsl:otherwise>
6747
- </xsl:choose>
6748
- </fo:inline>
6749
- </xsl:if>
7796
+ <xsl:text> </xsl:text>
6750
7797
  <xsl:apply-templates select="un:formattedref"/>
6751
-
7798
+ <!-- END UNECE bibitem processing -->
6752
7799
 
6753
7800
  </xsl:template><xsl:template name="processBibitemDocId">
6754
7801
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
@@ -7075,25 +8122,32 @@
7075
8122
  </fo:block-container>
7076
8123
 
7077
8124
  </xsl:template><xsl:template name="displayAdmonitionName">
7078
-
8125
+ <xsl:param name="sep"/> <!-- Example: ' - ' -->
8126
+ <!-- <xsl:choose>
8127
+ <xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8128
+ <xsl:choose>
8129
+ <xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
8130
+ <xsl:otherwise>
8131
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8132
+ </xsl:otherwise>
8133
+ </xsl:choose>
8134
+ </xsl:when>
8135
+ <xsl:otherwise>
7079
8136
  <xsl:apply-templates select="*[local-name() = 'name']"/>
7080
8137
  <xsl:if test="not(*[local-name() = 'name'])">
7081
8138
  <xsl:apply-templates select="@type"/>
7082
8139
  </xsl:if>
7083
-
7084
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
7085
- <xsl:apply-templates/>
7086
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
7087
- <xsl:variable name="admonition_type_">
7088
- <xsl:call-template name="getLocalizedString">
7089
- <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
7090
- </xsl:call-template>
8140
+ </xsl:otherwise>
8141
+ </xsl:choose> -->
8142
+ <xsl:variable name="name">
8143
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7091
8144
  </xsl:variable>
7092
- <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
7093
- <xsl:value-of select="$admonition_type"/>
7094
- <xsl:if test="$admonition_type = ''">
7095
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
8145
+ <xsl:copy-of select="$name"/>
8146
+ <xsl:if test="normalize-space($name) != ''">
8147
+ <xsl:value-of select="$sep"/>
7096
8148
  </xsl:if>
8149
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
8150
+ <xsl:apply-templates/>
7097
8151
  </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
7098
8152
 
7099
8153
  <fo:block xsl:use-attribute-sets="admonition-p-style">
@@ -7175,6 +8229,120 @@
7175
8229
  <xsl:apply-templates select="." mode="update_xml_step1"/>
7176
8230
  </xsl:for-each>
7177
8231
  </xsl:copy>
8232
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
8233
+ <xsl:apply-templates mode="update_xml_step1"/>
8234
+ </xsl:template><xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
8235
+ <xsl:copy>
8236
+ <xsl:apply-templates select="@*|node()" mode="update_xml_enclose_keep-together_within-line"/>
8237
+ </xsl:copy>
8238
+ </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">
8239
+
8240
+ <!-- enclose standard's number into tag 'keep-together_within-line' -->
8241
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
8242
+ <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
8243
+ <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
8244
+ <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))"/>
8245
+ <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
8246
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
8247
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
8248
+ <xsl:with-param name="text" select="$text_"/>
8249
+ </xsl:call-template></text></xsl:variable>
8250
+
8251
+ <xsl:variable name="parent" select="local-name(..)"/>
8252
+
8253
+ <xsl:variable name="text2">
8254
+ <text><xsl:for-each select="xalan:nodeset($text)/text/node()">
8255
+ <xsl:copy-of select="."/>
8256
+ </xsl:for-each></text>
8257
+ </xsl:variable>
8258
+
8259
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
8260
+ <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
8261
+ <xsl:variable name="text3">
8262
+ <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
8263
+ <xsl:choose>
8264
+ <xsl:when test="self::text()">
8265
+ <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))"/>
8266
+ <xsl:variable name="text_units"><text><xsl:call-template name="replace_text_tags">
8267
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
8268
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
8269
+ <xsl:with-param name="text" select="$text_units_"/>
8270
+ </xsl:call-template></text></xsl:variable>
8271
+ <xsl:copy-of select="xalan:nodeset($text_units)/text/node()"/>
8272
+ </xsl:when>
8273
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
8274
+ </xsl:choose>
8275
+ </xsl:for-each></text>
8276
+ </xsl:variable>
8277
+
8278
+ <xsl:choose>
8279
+ <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
8280
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
8281
+ <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
8282
+ <xsl:for-each select="xalan:nodeset($text3)/text/node()">
8283
+ <xsl:choose>
8284
+ <xsl:when test="self::text()">
8285
+ <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))"/>
8286
+ <xsl:variable name="text_dots"><text><xsl:call-template name="replace_text_tags">
8287
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
8288
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
8289
+ <xsl:with-param name="text" select="$text_dots_"/>
8290
+ </xsl:call-template></text></xsl:variable>
8291
+ <xsl:copy-of select="xalan:nodeset($text_dots)/text/node()"/>
8292
+ </xsl:when>
8293
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
8294
+ </xsl:choose>
8295
+ </xsl:for-each>
8296
+ </xsl:when>
8297
+ <xsl:otherwise><xsl:copy-of select="xalan:nodeset($text3)/text/node()"/></xsl:otherwise>
8298
+ </xsl:choose>
8299
+
8300
+ </xsl:template><xsl:template name="replace_text_tags">
8301
+ <xsl:param name="tag_open"/>
8302
+ <xsl:param name="tag_close"/>
8303
+ <xsl:param name="text"/>
8304
+ <xsl:choose>
8305
+ <xsl:when test="contains($text, $tag_open)">
8306
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
8307
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
8308
+
8309
+ <xsl:element name="{substring-before(substring-after($tag_open, '###'),'###')}">
8310
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
8311
+ </xsl:element>
8312
+
8313
+ <xsl:call-template name="replace_text_tags">
8314
+ <xsl:with-param name="tag_open" select="$tag_open"/>
8315
+ <xsl:with-param name="tag_close" select="$tag_close"/>
8316
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
8317
+ </xsl:call-template>
8318
+ </xsl:when>
8319
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
8320
+ </xsl:choose>
8321
+ </xsl:template><xsl:template name="printEdition">
8322
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
8323
+ <xsl:text> </xsl:text>
8324
+ <xsl:choose>
8325
+ <xsl:when test="$edition_i18n != ''">
8326
+ <!-- Example: <edition language="fr">deuxième édition</edition> -->
8327
+ <xsl:call-template name="capitalize">
8328
+ <xsl:with-param name="str" select="$edition_i18n"/>
8329
+ </xsl:call-template>
8330
+ </xsl:when>
8331
+ <xsl:otherwise>
8332
+ <xsl:variable name="edition" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
8333
+ <xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
8334
+ <xsl:call-template name="capitalize">
8335
+ <xsl:with-param name="str">
8336
+ <xsl:call-template name="getLocalizedString">
8337
+ <xsl:with-param name="key">edition</xsl:with-param>
8338
+ </xsl:call-template>
8339
+ </xsl:with-param>
8340
+ </xsl:call-template>
8341
+ <xsl:text> </xsl:text>
8342
+ <xsl:value-of select="$edition"/>
8343
+ </xsl:if>
8344
+ </xsl:otherwise>
8345
+ </xsl:choose>
7178
8346
  </xsl:template><xsl:template name="convertDate">
7179
8347
  <xsl:param name="date"/>
7180
8348
  <xsl:param name="format" select="'short'"/>
@@ -7862,4 +9030,40 @@
7862
9030
  <xsl:value-of select="$value"/>
7863
9031
  </xsl:otherwise>
7864
9032
  </xsl:choose>
9033
+ </xsl:template><xsl:template match="*" mode="print_as_xml">
9034
+ <xsl:param name="level">0</xsl:param>
9035
+
9036
+ <fo:block margin-left="{2*$level}mm">
9037
+ <xsl:text>
9038
+ &lt;</xsl:text>
9039
+ <xsl:value-of select="local-name()"/>
9040
+ <xsl:for-each select="@*">
9041
+ <xsl:text> </xsl:text>
9042
+ <xsl:value-of select="local-name()"/>
9043
+ <xsl:text>="</xsl:text>
9044
+ <xsl:value-of select="."/>
9045
+ <xsl:text>"</xsl:text>
9046
+ </xsl:for-each>
9047
+ <xsl:text>&gt;</xsl:text>
9048
+
9049
+ <xsl:if test="not(*)">
9050
+ <fo:inline font-weight="bold"><xsl:value-of select="."/></fo:inline>
9051
+ <xsl:text>&lt;/</xsl:text>
9052
+ <xsl:value-of select="local-name()"/>
9053
+ <xsl:text>&gt;</xsl:text>
9054
+ </xsl:if>
9055
+ </fo:block>
9056
+
9057
+ <xsl:if test="*">
9058
+ <fo:block>
9059
+ <xsl:apply-templates mode="print_as_xml">
9060
+ <xsl:with-param name="level" select="$level + 1"/>
9061
+ </xsl:apply-templates>
9062
+ </fo:block>
9063
+ <fo:block margin-left="{2*$level}mm">
9064
+ <xsl:text>&lt;/</xsl:text>
9065
+ <xsl:value-of select="local-name()"/>
9066
+ <xsl:text>&gt;</xsl:text>
9067
+ </fo:block>
9068
+ </xsl:if>
7865
9069
  </xsl:template></xsl:stylesheet>