metanorma-un 0.8.7 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,7 +36,13 @@
36
36
 
37
37
  <xsl:template match="/">
38
38
  <xsl:call-template name="namespaceCheck"/>
39
- <fo:root xsl:use-attribute-sets="root-style" xml:lang="{$lang}">
39
+ <fo:root xml:lang="{$lang}">
40
+ <xsl:variable name="root-style">
41
+ <root-style xsl:use-attribute-sets="root-style"/>
42
+ </xsl:variable>
43
+ <xsl:call-template name="insertRootStyle">
44
+ <xsl:with-param name="root-style" select="$root-style"/>
45
+ </xsl:call-template>
40
46
  <fo:layout-master-set>
41
47
  <!-- Cover page -->
42
48
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
@@ -609,6 +615,7 @@
609
615
  </xsl:template>
610
616
 
611
617
  <xsl:template match="un:p" name="paragraph">
618
+ <xsl:param name="split_keep-within-line"/>
612
619
  <fo:block>
613
620
  <xsl:if test="following-sibling::*">
614
621
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -619,7 +626,9 @@
619
626
  <xsl:otherwise>justify</xsl:otherwise>
620
627
  </xsl:choose>
621
628
  </xsl:attribute>
622
- <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>
623
632
  </fo:block>
624
633
  </xsl:template>
625
634
 
@@ -896,7 +905,9 @@
896
905
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAUgAAAEfCAYAAAAjn198AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA8BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3J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UjLZxvwWJAA4nSEcBQaEJyltNj3kNR8ZFOVKrK5EkFXziMoAoVPGQk6QTpKN44KbHGz055jXiHKm+vagga0HRhs+Xee08J8lio1ufPsf6KhRPcnxQ6mUcviy1u0jAO0+my5iY1yh1R/rg3ZaeXHOHS5COJgCHzB0VyPFXbeMHBV0bpMj5ZV57nw4N9267BOnIMUi5u7rMaxS6mFJgKemwJGtqP/aPef1Mrc1C30YFkig81bAwoH4hFV/iwlfofEdGiafbBUHyBMvHNXDbrXVa78vkKrYjX6CH8tvaxhclLUZxpZPjG6B8GJ7tg/o3VXYIIMdh08/J0SVIRzFArUIak1Fh+ru+HEdhnAVxoivMq/04QTocDofDVWyHw+FwgnQ4HA4nSIfD4XCCdDgcDidIh8Ph6HT8T4ABAB91/nepRFURAAAAAElFTkSuQmCC</xsl:text>
897
906
  </xsl:variable>
898
907
 
899
- <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">
908
+ <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:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
909
+ false
910
+ </xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
900
911
  <xsl:call-template name="getLang"/>
901
912
  </xsl:variable><xsl:variable name="pageWidth_">
902
913
  210
@@ -911,20 +922,7 @@
911
922
  </xsl:variable><xsl:variable name="marginTop" select="normalize-space($marginTop_)"/><xsl:variable name="marginBottom_">
912
923
  34
913
924
  </xsl:variable><xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/><xsl:variable name="titles_">
914
-
915
- <title-edition lang="en">
916
-
917
- <xsl:text>Edition </xsl:text>
918
-
919
- </title-edition>
920
-
921
- <title-edition lang="fr">
922
- <xsl:text>Édition </xsl:text>
923
- </title-edition>
924
925
 
925
- <title-edition lang="ru">
926
- <xsl:text>Издание </xsl:text>
927
- </title-edition>
928
926
 
929
927
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
930
928
  <title-toc lang="en">
@@ -1005,7 +1003,7 @@
1005
1003
  </xsl:variable><xsl:variable name="bibdata">
1006
1004
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1007
1005
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1008
- </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">
1006
+ </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">
1009
1007
  <xsl:param name="name"/>
1010
1008
  <xsl:param name="lang"/>
1011
1009
  <xsl:variable name="lang_">
@@ -1048,7 +1046,30 @@
1048
1046
  <xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
1049
1047
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1050
1048
 
1051
- </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
1049
+ </xsl:attribute-set><xsl:template name="insertRootStyle">
1050
+ <xsl:param name="root-style"/>
1051
+ <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
1052
+
1053
+ <xsl:variable name="additional_fonts_">
1054
+ <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']">
1055
+ <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
1056
+ </xsl:for-each>
1057
+ </xsl:variable>
1058
+ <xsl:variable name="additional_fonts" select="normalize-space($additional_fonts_)"/>
1059
+
1060
+ <xsl:for-each select="$root-style_/root-style/@*">
1061
+ <xsl:choose>
1062
+ <xsl:when test="local-name() = 'font-family' and $additional_fonts != ''">
1063
+ <xsl:attribute name="{local-name()}">
1064
+ <xsl:value-of select="."/>, <xsl:value-of select="$additional_fonts"/>
1065
+ </xsl:attribute>
1066
+ </xsl:when>
1067
+ <xsl:otherwise>
1068
+ <xsl:copy-of select="."/>
1069
+ </xsl:otherwise>
1070
+ </xsl:choose>
1071
+ </xsl:for-each>
1072
+ </xsl:template><xsl:attribute-set name="copyright-statement-style">
1052
1073
 
1053
1074
  </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
1054
1075
 
@@ -1102,7 +1123,6 @@
1102
1123
 
1103
1124
 
1104
1125
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
1105
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1106
1126
 
1107
1127
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1108
1128
  <xsl:attribute name="white-space">pre</xsl:attribute>
@@ -1182,6 +1202,7 @@
1182
1202
 
1183
1203
 
1184
1204
 
1205
+
1185
1206
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1186
1207
 
1187
1208
 
@@ -1338,6 +1359,7 @@
1338
1359
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1339
1360
  <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1340
1361
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1362
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1341
1363
  <xsl:attribute name="display-align">center</xsl:attribute>
1342
1364
 
1343
1365
 
@@ -1358,6 +1380,7 @@
1358
1380
  <xsl:attribute name="display-align">center</xsl:attribute>
1359
1381
  <xsl:attribute name="border">solid black 1pt</xsl:attribute>
1360
1382
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
1383
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
1361
1384
 
1362
1385
 
1363
1386
 
@@ -1445,7 +1468,8 @@
1445
1468
  </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
1446
1469
 
1447
1470
 
1448
- </xsl:attribute-set><xsl:attribute-set name="dt-style">
1471
+ </xsl:attribute-set><xsl:attribute-set name="dt-cell-style">
1472
+ </xsl:attribute-set><xsl:attribute-set name="dt-block-style">
1449
1473
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1450
1474
 
1451
1475
 
@@ -1457,6 +1481,8 @@
1457
1481
 
1458
1482
 
1459
1483
 
1484
+ </xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
1485
+ <xsl:attribute name="padding-left">2mm</xsl:attribute>
1460
1486
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1461
1487
 
1462
1488
 
@@ -1549,7 +1575,7 @@
1549
1575
 
1550
1576
 
1551
1577
 
1552
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1578
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1553
1579
 
1554
1580
 
1555
1581
 
@@ -2247,22 +2273,32 @@
2247
2273
  <xsl:sort select="@displayorder" data-type="number"/>
2248
2274
  <xsl:apply-templates select="."/>
2249
2275
  </xsl:for-each>
2250
- </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">
2251
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2252
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
2253
- <xsl:call-template name="replace_fo_inline">
2254
- <xsl:with-param name="text" select="$text"/>
2255
- </xsl:call-template>
2256
- </xsl:template><xsl:template name="replace_fo_inline">
2276
+ </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">
2277
+
2278
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2279
+ <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))"/>
2280
+ <xsl:call-template name="replace_fo_inline_tags">
2281
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2282
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2283
+ <xsl:with-param name="text" select="$text"/>
2284
+ </xsl:call-template>
2285
+
2286
+ </xsl:template><xsl:template name="replace_fo_inline_tags">
2287
+ <xsl:param name="tag_open"/>
2288
+ <xsl:param name="tag_close"/>
2257
2289
  <xsl:param name="text"/>
2258
2290
  <xsl:choose>
2259
2291
  <xsl:when test="contains($text, $tag_open)">
2260
2292
  <xsl:value-of select="substring-before($text, $tag_open)"/>
2261
- <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
2293
+ <!-- <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text> -->
2262
2294
  <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
2263
- <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2264
- <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
2265
- <xsl:call-template name="replace_fo_inline">
2295
+ <fo:inline keep-together.within-line="always">
2296
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2297
+ </fo:inline>
2298
+ <!-- <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text> -->
2299
+ <xsl:call-template name="replace_fo_inline_tags">
2300
+ <xsl:with-param name="tag_open" select="$tag_open"/>
2301
+ <xsl:with-param name="tag_close" select="$tag_close"/>
2266
2302
  <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
2267
2303
  </xsl:call-template>
2268
2304
  </xsl:when>
@@ -2270,6 +2306,39 @@
2270
2306
  </xsl:choose>
2271
2307
  </xsl:template><xsl:template match="*[local-name()='br']">
2272
2308
  <xsl:value-of select="$linebreak"/>
2309
+ </xsl:template><xsl:template match="*[local-name() = 'keep-together_within-line']">
2310
+ <xsl:param name="split_keep-within-line"/>
2311
+
2312
+ <!-- <fo:inline>split_keep-within-line='<xsl:value-of select="$split_keep-within-line"/>'</fo:inline> -->
2313
+ <xsl:choose>
2314
+
2315
+ <xsl:when test="normalize-space($split_keep-within-line) = 'true'">
2316
+ <xsl:variable name="sep">_</xsl:variable>
2317
+ <xsl:variable name="items">
2318
+ <xsl:call-template name="split">
2319
+ <xsl:with-param name="pText" select="."/>
2320
+ <xsl:with-param name="sep" select="$sep"/>
2321
+ <xsl:with-param name="normalize-space">false</xsl:with-param>
2322
+ <xsl:with-param name="keep_sep">true</xsl:with-param>
2323
+ </xsl:call-template>
2324
+ </xsl:variable>
2325
+ <xsl:for-each select="xalan:nodeset($items)/item">
2326
+ <xsl:choose>
2327
+ <xsl:when test=". = $sep">
2328
+ <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
2329
+ </xsl:when>
2330
+ <xsl:otherwise>
2331
+ <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2332
+ </xsl:otherwise>
2333
+ </xsl:choose>
2334
+ </xsl:for-each>
2335
+ </xsl:when>
2336
+
2337
+ <xsl:otherwise>
2338
+ <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
2339
+ </xsl:otherwise>
2340
+
2341
+ </xsl:choose>
2273
2342
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
2274
2343
  <fo:block xsl:use-attribute-sets="copyright-statement-style">
2275
2344
  <xsl:apply-templates/>
@@ -2335,8 +2404,23 @@
2335
2404
  </xsl:call-template>
2336
2405
 
2337
2406
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2338
- <!-- <xsl:call-template name="add-zero-spaces"/> -->
2339
- <xsl:call-template name="add-zero-spaces-java"/>
2407
+ <xsl:choose>
2408
+ <xsl:when test="parent::*[local-name() = 'keep-together_within-line']">
2409
+ <xsl:value-of select="."/>
2410
+ </xsl:when>
2411
+ <xsl:otherwise>
2412
+ <xsl:call-template name="addZeroWidthSpacesToTextNodes"/>
2413
+ </xsl:otherwise>
2414
+ </xsl:choose>
2415
+ </xsl:template><xsl:template name="addZeroWidthSpacesToTextNodes">
2416
+ <xsl:variable name="text"><text><xsl:call-template name="text"/></text></xsl:variable>
2417
+ <!-- <xsl:copy-of select="$text"/> -->
2418
+ <xsl:for-each select="xalan:nodeset($text)/text/node()">
2419
+ <xsl:choose>
2420
+ <xsl:when test="self::text()"><xsl:call-template name="add-zero-spaces-java"/></xsl:when>
2421
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
2422
+ </xsl:choose>
2423
+ </xsl:for-each>
2340
2424
  </xsl:template><xsl:template match="*[local-name()='table']" name="table">
2341
2425
 
2342
2426
  <xsl:variable name="table-preamble">
@@ -2346,9 +2430,14 @@
2346
2430
 
2347
2431
  <xsl:variable name="table">
2348
2432
 
2349
- <xsl:variable name="simple-table">
2350
- <xsl:call-template name="getSimpleTable"/>
2433
+ <xsl:variable name="simple-table">
2434
+ <xsl:call-template name="getSimpleTable">
2435
+ <xsl:with-param name="id" select="@id"/>
2436
+ </xsl:call-template>
2351
2437
  </xsl:variable>
2438
+ <!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
2439
+
2440
+ <!-- simple-table=<xsl:copy-of select="$simple-table"/> -->
2352
2441
 
2353
2442
 
2354
2443
  <!-- Display table's name before table as standalone block -->
@@ -2371,7 +2460,23 @@
2371
2460
  </xsl:call-template>
2372
2461
  </xsl:if>
2373
2462
  </xsl:variable>
2374
- <!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
2463
+ <!-- <xsl:variable name="colwidths" select="xalan:nodeset($colwidths_)"/> -->
2464
+
2465
+ <!-- DEBUG -->
2466
+ <xsl:if test="$table_if_debug = 'true'">
2467
+ <fo:block font-size="60%">
2468
+ <xsl:apply-templates select="xalan:nodeset($colwidths)" mode="print_as_xml"/>
2469
+ </fo:block>
2470
+ </xsl:if>
2471
+
2472
+
2473
+ <!-- <xsl:copy-of select="$colwidths"/> -->
2474
+
2475
+ <!-- <xsl:text disable-output-escaping="yes">&lt;!- -</xsl:text>
2476
+ DEBUG
2477
+ colwidths=<xsl:copy-of select="$colwidths"/>
2478
+ <xsl:text disable-output-escaping="yes">- -&gt;</xsl:text> -->
2479
+
2375
2480
 
2376
2481
 
2377
2482
  <xsl:variable name="margin-side">
@@ -2452,9 +2557,17 @@
2452
2557
  </xsl:element>
2453
2558
  </xsl:variable>
2454
2559
 
2560
+ <xsl:if test="$isGenerateTableIF = 'true'">
2561
+ <!-- to determine start of table -->
2562
+ <fo:block id="{concat('table_if_start_',@id)}" keep-with-next="always" font-size="1pt">Start table '<xsl:value-of select="@id"/>'.</fo:block>
2563
+ </xsl:if>
2455
2564
 
2456
2565
  <fo:table id="{@id}">
2457
2566
 
2567
+ <xsl:if test="$isGenerateTableIF = 'true'">
2568
+ <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
2569
+ </xsl:if>
2570
+
2458
2571
  <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
2459
2572
  <xsl:attribute name="{local-name()}">
2460
2573
  <xsl:value-of select="."/>
@@ -2468,31 +2581,47 @@
2468
2581
 
2469
2582
 
2470
2583
  <xsl:choose>
2471
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2472
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2473
- <fo:table-column column-width="{@width}"/>
2474
- </xsl:for-each>
2584
+ <xsl:when test="$isGenerateTableIF = 'true'">
2585
+ <!-- generate IF for table widths -->
2586
+ <!-- example:
2587
+ <tr>
2588
+ <td valign="top" align="left" id="tab-symdu_1_1">
2589
+ <p>Symbol</p>
2590
+ <word id="tab-symdu_1_1_word_1">Symbol</word>
2591
+ </td>
2592
+ <td valign="top" align="left" id="tab-symdu_1_2">
2593
+ <p>Description</p>
2594
+ <word id="tab-symdu_1_2_word_1">Description</word>
2595
+ </td>
2596
+ </tr>
2597
+ -->
2598
+ <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
2599
+
2475
2600
  </xsl:when>
2476
2601
  <xsl:otherwise>
2477
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2478
- <xsl:choose>
2479
- <xsl:when test=". = 1 or . = 0">
2480
- <fo:table-column column-width="proportional-column-width(2)"/>
2481
- </xsl:when>
2482
- <xsl:otherwise>
2483
- <fo:table-column column-width="proportional-column-width({.})"/>
2484
- </xsl:otherwise>
2485
- </xsl:choose>
2486
- </xsl:for-each>
2487
- </xsl:otherwise>
2488
- </xsl:choose>
2489
2602
 
2490
- <xsl:choose>
2491
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
2492
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2493
- </xsl:when>
2494
- <xsl:otherwise>
2495
- <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 -->
2603
+ <xsl:choose>
2604
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
2605
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
2606
+ <fo:table-column column-width="{@width}"/>
2607
+ </xsl:for-each>
2608
+ </xsl:when>
2609
+ <xsl:otherwise>
2610
+ <xsl:call-template name="insertTableColumnWidth">
2611
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2612
+ </xsl:call-template>
2613
+ </xsl:otherwise>
2614
+ </xsl:choose>
2615
+
2616
+ <xsl:choose>
2617
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
2618
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2619
+ </xsl:when>
2620
+ <xsl:otherwise>
2621
+ <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 -->
2622
+ </xsl:otherwise>
2623
+ </xsl:choose>
2624
+
2496
2625
  </xsl:otherwise>
2497
2626
  </xsl:choose>
2498
2627
 
@@ -2592,11 +2721,22 @@
2592
2721
  <xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
2593
2722
  <xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
2594
2723
  </xsl:template><xsl:template name="calculate-column-widths">
2724
+ <xsl:param name="table"/>
2725
+ <xsl:param name="cols-count"/>
2726
+
2727
+ <xsl:call-template name="calculate-column-widths-proportional">
2728
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2729
+ <xsl:with-param name="table" select="$table"/>
2730
+ </xsl:call-template>
2731
+
2732
+ </xsl:template><xsl:template name="calculate-column-widths-proportional">
2595
2733
  <xsl:param name="table"/>
2596
2734
  <xsl:param name="cols-count"/>
2597
2735
  <xsl:param name="curr-col" select="1"/>
2598
2736
  <xsl:param name="width" select="0"/>
2599
2737
 
2738
+ <!-- table=<xsl:copy-of select="$table"/> -->
2739
+
2600
2740
  <xsl:if test="$curr-col &lt;= $cols-count">
2601
2741
  <xsl:variable name="widths">
2602
2742
  <xsl:choose>
@@ -2634,16 +2774,22 @@
2634
2774
  </xsl:for-each>
2635
2775
  </xsl:when>
2636
2776
  <xsl:otherwise>
2637
- <xsl:for-each select="xalan:nodeset($table)/*/tr">
2777
+ <!-- <curr_col><xsl:value-of select="$curr-col"/></curr_col> -->
2778
+
2779
+ <!-- <table><xsl:copy-of select="$table"/></table>
2780
+ -->
2781
+ <xsl:for-each select="xalan:nodeset($table)/*/*[local-name()='tr']">
2638
2782
  <xsl:variable name="td_text">
2639
2783
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
2640
2784
  </xsl:variable>
2785
+ <!-- <td_text><xsl:value-of select="$td_text"/></td_text> -->
2641
2786
  <xsl:variable name="words">
2642
2787
  <xsl:variable name="string_with_added_zerospaces">
2643
2788
  <xsl:call-template name="add-zero-spaces-java">
2644
2789
  <xsl:with-param name="text" select="$td_text"/>
2645
2790
  </xsl:call-template>
2646
2791
  </xsl:variable>
2792
+ <!-- <xsl:message>string_with_added_zerospaces=<xsl:value-of select="$string_with_added_zerospaces"/></xsl:message> -->
2647
2793
  <xsl:call-template name="tokenize">
2648
2794
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2649
2795
  <!-- 2009 thinspace -->
@@ -2651,11 +2797,13 @@
2651
2797
  <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
2652
2798
  </xsl:call-template>
2653
2799
  </xsl:variable>
2800
+ <!-- words=<xsl:copy-of select="$words"/> -->
2654
2801
  <xsl:variable name="max_length">
2655
2802
  <xsl:call-template name="max_length">
2656
2803
  <xsl:with-param name="words" select="xalan:nodeset($words)"/>
2657
2804
  </xsl:call-template>
2658
2805
  </xsl:variable>
2806
+ <!-- <xsl:message>max_length=<xsl:value-of select="$max_length"/></xsl:message> -->
2659
2807
  <width>
2660
2808
  <xsl:variable name="divider">
2661
2809
  <xsl:choose>
@@ -2674,6 +2822,8 @@
2674
2822
  </xsl:choose>
2675
2823
  </xsl:variable>
2676
2824
 
2825
+ <!-- widths=<xsl:copy-of select="$widths"/> -->
2826
+
2677
2827
  <column>
2678
2828
  <xsl:for-each select="xalan:nodeset($widths)//width">
2679
2829
  <xsl:sort select="." data-type="number" order="descending"/>
@@ -2682,29 +2832,327 @@
2682
2832
  </xsl:if>
2683
2833
  </xsl:for-each>
2684
2834
  </column>
2685
- <xsl:call-template name="calculate-column-widths">
2835
+ <xsl:call-template name="calculate-column-widths-proportional">
2686
2836
  <xsl:with-param name="cols-count" select="$cols-count"/>
2687
2837
  <xsl:with-param name="curr-col" select="$curr-col +1"/>
2688
2838
  <xsl:with-param name="table" select="$table"/>
2689
2839
  </xsl:call-template>
2690
2840
  </xsl:if>
2841
+ </xsl:template><xsl:template match="*[@keep-together.within-line or local-name() = 'keep-together_within-line']/text()" priority="2" mode="td_text">
2842
+ <!-- <xsl:message>DEBUG t1=<xsl:value-of select="."/></xsl:message>
2843
+ <xsl:message>DEBUG t2=<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/></xsl:message> -->
2844
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'.','X')"/>
2845
+
2846
+ <!-- if all capitals english letters or digits -->
2847
+ <xsl:if test="normalize-space(translate(., concat($upper,'0123456789'), '')) = ''">
2848
+ <xsl:call-template name="repeat">
2849
+ <xsl:with-param name="char" select="'X'"/>
2850
+ <xsl:with-param name="count" select="string-length(normalize-space(.)) * 0.5"/>
2851
+ </xsl:call-template>
2852
+ </xsl:if>
2691
2853
  </xsl:template><xsl:template match="text()" mode="td_text">
2692
2854
  <xsl:value-of select="translate(., $zero_width_space, ' ')"/><xsl:text> </xsl:text>
2693
2855
  </xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
2694
2856
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
2695
2857
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
2696
2858
  <xsl:value-of select="@target"/>
2697
- </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
2698
- <xsl:variable name="mathml">
2699
- <xsl:for-each select="*">
2700
- <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
2701
- <xsl:copy-of select="."/>
2859
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text" name="math_length">
2860
+ <xsl:if test="$isGenerateTableIF = 'false'">
2861
+ <xsl:variable name="mathml_">
2862
+ <xsl:for-each select="*">
2863
+ <xsl:if test="local-name() != 'unit' and local-name() != 'prefix' and local-name() != 'dimension' and local-name() != 'quantity'">
2864
+ <xsl:copy-of select="."/>
2865
+ </xsl:if>
2866
+ </xsl:for-each>
2867
+ </xsl:variable>
2868
+ <xsl:variable name="mathml" select="xalan:nodeset($mathml_)"/>
2869
+
2870
+ <xsl:variable name="math_text">
2871
+ <xsl:value-of select="normalize-space($mathml)"/>
2872
+ <xsl:for-each select="$mathml//@open"><xsl:value-of select="."/></xsl:for-each>
2873
+ <xsl:for-each select="$mathml//@close"><xsl:value-of select="."/></xsl:for-each>
2874
+ </xsl:variable>
2875
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2876
+ </xsl:if>
2877
+ </xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
2878
+ <xsl:param name="table"/>
2879
+ <xsl:param name="if">false</xsl:param> <!-- via intermediate format -->
2880
+
2881
+ <!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
2882
+
2883
+ <!-- In the first pass, line wrapping is disabled, and the user agent keeps track of the minimum and maximum width of each cell. -->
2884
+
2885
+ <!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
2886
+
2887
+ <!-- get current table id -->
2888
+ <xsl:variable name="table_id" select="@id"/>
2889
+ <!-- find table by id in the file 'table_widths' -->
2890
+ <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
2891
+ <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/>
2892
+
2893
+
2894
+ <!-- table='<xsl:copy-of select="$table"/>' -->
2895
+ <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
2896
+ <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
2897
+ <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
2898
+
2899
+ <xsl:variable name="table_with_cell_widths_">
2900
+ <xsl:choose>
2901
+ <xsl:when test="$if = 'true' and normalize-space($table-if) != ''"> <!-- if we read column's width from IF and there is table in IF -->
2902
+
2903
+ <!-- Example: <column>10</column>
2904
+ <column>11</column>
2905
+ -->
2906
+ <xsl:apply-templates select="$table-if" mode="determine_cell_widths-if"/>
2907
+ </xsl:when>
2908
+ <xsl:otherwise>
2909
+ <xsl:apply-templates select="xalan:nodeset($table)" mode="determine_cell_widths"/>
2910
+ </xsl:otherwise>
2911
+ </xsl:choose>
2912
+ </xsl:variable>
2913
+ <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
2914
+
2915
+ <xsl:if test="$table_if_debug = 'true'">
2916
+ <xsl:copy-of select="$table_with_cell_widths"/>
2917
+ </xsl:if>
2918
+
2919
+
2920
+ <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
2921
+
2922
+ <xsl:variable name="column_widths_">
2923
+ <!-- iteration of columns -->
2924
+ <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
2925
+ <xsl:variable name="pos" select="position()"/>
2926
+ <column>
2927
+ <xsl:attribute name="width_max">
2928
+ <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
2929
+ <xsl:sort select="." data-type="number" order="descending"/>
2930
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2931
+ </xsl:for-each>
2932
+ </xsl:attribute>
2933
+ <xsl:attribute name="width_min">
2934
+ <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
2935
+ <xsl:sort select="." data-type="number" order="descending"/>
2936
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2937
+ </xsl:for-each>
2938
+ </xsl:attribute>
2939
+ </column>
2940
+ </xsl:for-each>
2941
+ </xsl:variable>
2942
+ <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
2943
+
2944
+ <!-- <column_widths>
2945
+ <xsl:copy-of select="$column_widths"/>
2946
+ </column_widths> -->
2947
+
2948
+ <!-- These in turn, are used to find the minimum and maximum width for the table. -->
2949
+ <xsl:variable name="table_widths_">
2950
+ <table>
2951
+ <xsl:attribute name="width_max">
2952
+ <xsl:value-of select="sum($column_widths/column/@width_max)"/>
2953
+ </xsl:attribute>
2954
+ <xsl:attribute name="width_min">
2955
+ <xsl:value-of select="sum($column_widths/column/@width_min)"/>
2956
+ </xsl:attribute>
2957
+ </table>
2958
+ </xsl:variable>
2959
+ <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
2960
+
2961
+ <xsl:variable name="page_width">
2962
+ <xsl:choose>
2963
+ <xsl:when test="$if = 'true'"><xsl:value-of select="$table-if/@page-width"/></xsl:when>
2964
+ <xsl:otherwise>75</xsl:otherwise>
2965
+ </xsl:choose>
2966
+ </xsl:variable>
2967
+
2968
+ <xsl:if test="$table_if_debug = 'true'">
2969
+ <table_width>
2970
+ <xsl:copy-of select="$table_widths"/>
2971
+ </table_width>
2972
+ <!-- <debug>$table_widths/@width_min=<xsl:value-of select="$table_widths/table/@width_min"/></debug>
2973
+ <debug>$table_widths/@width_max=<xsl:value-of select="$table_widths/table/@width_max"/></debug>
2974
+ -->
2975
+ <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
2976
+ </xsl:if>
2977
+
2978
+
2979
+ <!-- There are three cases: -->
2980
+ <xsl:choose>
2981
+ <!-- 1. The minimum table width is equal to or wider than the available space -->
2982
+ <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
2983
+ <!-- call old algorithm -->
2984
+ <case1/>
2985
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
2986
+ <xsl:call-template name="calculate-column-widths-proportional">
2987
+ <xsl:with-param name="cols-count" select="$cols-count"/>
2988
+ <xsl:with-param name="table" select="$table"/>
2989
+ </xsl:call-template>
2990
+ </xsl:when>
2991
+ <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
2992
+ <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
2993
+ <case2/>
2994
+ <autolayout/>
2995
+ <xsl:for-each select="$column_widths/column/@width_max">
2996
+ <column divider="100"><xsl:value-of select="."/></column>
2997
+ </xsl:for-each>
2998
+ </xsl:when>
2999
+ <!-- 3. The maximum width of the table is greater than the available space, but the minimum table width is smaller.
3000
+ In this case, find the difference between the available space and the minimum table width, lets call it W.
3001
+ Lets also call D the difference between maximum and minimum width of the table.
3002
+ For each column, let d be the difference between maximum and minimum width of that column.
3003
+ Now set the column's width to the minimum width plus d times W over D.
3004
+ This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
3005
+ <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)">
3006
+ <!-- difference between the available space and the minimum table width -->
3007
+ <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
3008
+ <W><xsl:value-of select="$W"/></W>
3009
+ <!-- difference between maximum and minimum width of the table -->
3010
+ <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
3011
+ <D><xsl:value-of select="$D"/></D>
3012
+ <case3/>
3013
+ <autolayout/>
3014
+ <xsl:if test="$table_widths/table/@width_min &gt;= $page_width">
3015
+ <split_keep-within-line>true</split_keep-within-line>
3016
+ </xsl:if>
3017
+ <xsl:for-each select="$column_widths/column">
3018
+ <!-- difference between maximum and minimum width of that column. -->
3019
+ <xsl:variable name="d" select="@width_max - @width_min"/>
3020
+ <d><xsl:value-of select="$d"/></d>
3021
+ <width_min><xsl:value-of select="@width_min"/></width_min>
3022
+ <e><xsl:value-of select="$d * $W div $D"/></e>
3023
+ <!-- set the column's width to the minimum width plus d times W over D. -->
3024
+ <column divider="100">
3025
+ <xsl:value-of select="round(@width_min + $d * $W div $D)"/> <!-- * 10 -->
3026
+ </column>
3027
+ </xsl:for-each>
3028
+
3029
+ </xsl:when>
3030
+ <xsl:otherwise><unknown_case/></xsl:otherwise>
3031
+ </xsl:choose>
3032
+
3033
+
3034
+ </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths">
3035
+ <xsl:copy>
3036
+ <xsl:apply-templates select="@*|node()" mode="determine_cell_widths"/>
3037
+ </xsl:copy>
3038
+ </xsl:template><xsl:template match="td | th" mode="determine_cell_widths">
3039
+ <xsl:copy>
3040
+ <xsl:copy-of select="@*"/>
3041
+
3042
+ <!-- The maximum width is given by the widest line. -->
3043
+ <xsl:variable name="widths_max">
3044
+ <xsl:for-each select=".//*[local-name() = 'p']">
3045
+ <xsl:call-template name="add_width"/>
3046
+ </xsl:for-each>
3047
+ <xsl:if test="not(*[local-name() = 'p'])">
3048
+ <xsl:call-template name="add_width"/>
2702
3049
  </xsl:if>
3050
+ </xsl:variable>
3051
+ <xsl:variable name="width_max">
3052
+ <xsl:for-each select="xalan:nodeset($widths_max)//width">
3053
+ <xsl:sort select="." data-type="number" order="descending"/>
3054
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3055
+ </xsl:for-each>
3056
+ </xsl:variable>
3057
+ <xsl:attribute name="width_max">
3058
+ <xsl:value-of select="$width_max"/>
3059
+ </xsl:attribute>
3060
+
3061
+ <!-- The minimum width is given by the widest text element (word, image, etc.) -->
3062
+ <!-- To do: image width -->
3063
+ <xsl:variable name="td_text">
3064
+ <xsl:apply-templates select="." mode="td_text"/>
3065
+ </xsl:variable>
3066
+ <xsl:variable name="words">
3067
+ <xsl:variable name="string_with_added_zerospaces">
3068
+ <xsl:call-template name="add-zero-spaces-java">
3069
+ <xsl:with-param name="text" select="$td_text"/>
3070
+ </xsl:call-template>
3071
+ </xsl:variable>
3072
+ <xsl:call-template name="tokenize">
3073
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
3074
+ </xsl:call-template>
3075
+ </xsl:variable>
3076
+
3077
+ <xsl:variable name="max_word_length">
3078
+ <xsl:call-template name="max_length">
3079
+ <xsl:with-param name="words" select="xalan:nodeset($words)"/>
3080
+ </xsl:call-template>
3081
+ </xsl:variable>
3082
+ <xsl:variable name="width_min">
3083
+ <xsl:value-of select="$max_word_length"/>
3084
+ </xsl:variable>
3085
+ <xsl:attribute name="width_min">
3086
+ <xsl:value-of select="$width_min"/>
3087
+ </xsl:attribute>
3088
+ <!-- width_max="1" width_min="1.5"> --> <!-- see 'tokenize' template, multiply 1.5 for all latin capitals -->
3089
+ <xsl:if test="$width_min &gt; $width_max">
3090
+ <xsl:attribute name="width_max">
3091
+ <xsl:value-of select="$width_min"/>
3092
+ </xsl:attribute>
3093
+ </xsl:if>
3094
+ <xsl:if test="$width_min = 0">
3095
+ <xsl:attribute name="width_min">1</xsl:attribute>
3096
+ </xsl:if>
3097
+
3098
+ <xsl:apply-templates select="node()" mode="determine_cell_widths"/>
3099
+
3100
+ </xsl:copy>
3101
+ </xsl:template><xsl:template name="add_width">
3102
+ <xsl:variable name="p_text"><xsl:apply-templates select="." mode="td_text"/></xsl:variable>
3103
+ <xsl:variable name="p_text_len_" select="string-length(normalize-space($p_text))"/>
3104
+
3105
+ <xsl:variable name="p_text_len">
3106
+ <xsl:choose>
3107
+ <xsl:when test="normalize-space(translate($p_text, concat($upper,'0123456789'), '')) = ''"> <!-- english word in CAPITAL letters -->
3108
+ <xsl:value-of select="$p_text_len_ * 1.5"/>
3109
+ </xsl:when>
3110
+ <xsl:otherwise><xsl:value-of select="$p_text_len_"/></xsl:otherwise>
3111
+ </xsl:choose>
3112
+ </xsl:variable>
3113
+
3114
+ <xsl:variable name="math_addon_text">
3115
+ <xsl:for-each select=".//*[local-name() = 'math']">
3116
+ <xsl:apply-templates mode="td_text"/>
2703
3117
  </xsl:for-each>
2704
3118
  </xsl:variable>
3119
+ <xsl:variable name="math_addon_length" select="string-length(normalize-space($math_addon_text)) * 0.2"/> <!-- plus 20% -->
2705
3120
 
2706
- <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
2707
- <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
3121
+ <width><xsl:value-of select="$p_text_len + $math_addon_length"/></width>
3122
+ </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
3123
+ <xsl:copy>
3124
+ <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
3125
+ </xsl:copy>
3126
+ </xsl:template><xsl:template match="td | th" mode="determine_cell_widths-if">
3127
+ <xsl:copy>
3128
+ <xsl:copy-of select="@*"/>
3129
+
3130
+ <!-- The maximum width is given by the widest line. -->
3131
+ <xsl:attribute name="width_max">
3132
+ <xsl:for-each select="p_len">
3133
+ <xsl:sort select="." data-type="number" order="descending"/>
3134
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3135
+ </xsl:for-each>
3136
+ </xsl:attribute>
3137
+
3138
+ <!-- The minimum width is given by the widest text element (word, image, etc.) -->
3139
+ <xsl:variable name="width_min">
3140
+ <xsl:for-each select="word_len">
3141
+ <xsl:sort select="." data-type="number" order="descending"/>
3142
+ <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
3143
+ </xsl:for-each>
3144
+ </xsl:variable>
3145
+ <xsl:attribute name="width_min">
3146
+ <xsl:value-of select="$width_min"/>
3147
+ </xsl:attribute>
3148
+
3149
+ <xsl:if test="$width_min = 0">
3150
+ <xsl:attribute name="width_min">1</xsl:attribute>
3151
+ </xsl:if>
3152
+
3153
+ <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
3154
+
3155
+ </xsl:copy>
2708
3156
  </xsl:template><xsl:template match="*[local-name()='thead']">
2709
3157
  <xsl:param name="cols-count"/>
2710
3158
  <fo:table-header>
@@ -2789,16 +3237,10 @@
2789
3237
  </xsl:for-each>
2790
3238
  </xsl:when>
2791
3239
  <xsl:otherwise>
2792
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2793
- <xsl:choose>
2794
- <xsl:when test=". = 1 or . = 0">
2795
- <fo:table-column column-width="proportional-column-width(2)"/>
2796
- </xsl:when>
2797
- <xsl:otherwise>
2798
- <fo:table-column column-width="proportional-column-width({.})"/>
2799
- </xsl:otherwise>
2800
- </xsl:choose>
2801
- </xsl:for-each>
3240
+ <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
3241
+ <xsl:call-template name="insertTableColumnWidth">
3242
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3243
+ </xsl:call-template>
2802
3244
  </xsl:otherwise>
2803
3245
  </xsl:choose>
2804
3246
 
@@ -2875,6 +3317,52 @@
2875
3317
 
2876
3318
  </fo:table-body>
2877
3319
 
3320
+ </xsl:template><xsl:template match="/" mode="process_table-if">
3321
+ <xsl:param name="table_or_dl">table</xsl:param>
3322
+ <xsl:apply-templates mode="process_table-if">
3323
+ <xsl:with-param name="table_or_dl" select="$table_or_dl"/>
3324
+ </xsl:apply-templates>
3325
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="process_table-if">
3326
+ <xsl:param name="table_or_dl">table</xsl:param>
3327
+
3328
+ <fo:table-body>
3329
+ <xsl:for-each select="*[local-name() = 'tr']">
3330
+ <xsl:variable name="col_count" select="count(*)"/>
3331
+
3332
+ <!-- iteration for each tr/td -->
3333
+
3334
+ <xsl:choose>
3335
+ <xsl:when test="$table_or_dl = 'table'">
3336
+ <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
3337
+ <fo:table-row number-columns-spanned="{$col_count}">
3338
+ <!-- <test_table><xsl:copy-of select="."/></test_table> -->
3339
+ <xsl:call-template name="td"/>
3340
+ </fo:table-row>
3341
+ </xsl:for-each>
3342
+ </xsl:when>
3343
+ <xsl:otherwise> <!-- $table_or_dl = 'dl' -->
3344
+ <xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']">
3345
+ <xsl:variable name="is_dt" select="position() = 1"/>
3346
+
3347
+ <xsl:for-each select="*">
3348
+ <!-- <test><xsl:copy-of select="."/></test> -->
3349
+ <fo:table-row number-columns-spanned="{$col_count}">
3350
+ <xsl:choose>
3351
+ <xsl:when test="$is_dt">
3352
+ <xsl:call-template name="insert_dt_cell"/>
3353
+ </xsl:when>
3354
+ <xsl:otherwise>
3355
+ <xsl:call-template name="insert_dd_cell"/>
3356
+ </xsl:otherwise>
3357
+ </xsl:choose>
3358
+ </fo:table-row>
3359
+ </xsl:for-each>
3360
+ </xsl:for-each>
3361
+ </xsl:otherwise>
3362
+ </xsl:choose>
3363
+
3364
+ </xsl:for-each>
3365
+ </fo:table-body>
2878
3366
  </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
2879
3367
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
2880
3368
 
@@ -2976,7 +3464,7 @@
2976
3464
  </xsl:choose>
2977
3465
  </xsl:attribute>
2978
3466
  </xsl:if>
2979
- </xsl:template><xsl:template match="*[local-name()='td']">
3467
+ </xsl:template><xsl:template match="*[local-name()='td']" name="td">
2980
3468
  <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
2981
3469
  <xsl:call-template name="setTextAlignment">
2982
3470
  <xsl:with-param name="default">left</xsl:with-param>
@@ -3015,11 +3503,24 @@
3015
3503
 
3016
3504
  <xsl:call-template name="setTableCellAttributes"/>
3017
3505
 
3506
+ <xsl:if test="$isGenerateTableIF = 'true'">
3507
+ <xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
3508
+ <xsl:attribute name="text-align">left</xsl:attribute>
3509
+ </xsl:if>
3510
+
3018
3511
  <fo:block>
3019
3512
 
3513
+ <xsl:if test="$isGenerateTableIF = 'true'">
3514
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
3515
+ </xsl:if>
3516
+
3517
+
3020
3518
 
3021
3519
 
3022
3520
  <xsl:apply-templates/>
3521
+
3522
+ <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"/> -->
3523
+
3023
3524
  </fo:block>
3024
3525
  </fo:table-cell>
3025
3526
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
@@ -3220,9 +3721,9 @@
3220
3721
  <!-- current hierarchy is 'figure' element -->
3221
3722
  <xsl:variable name="following_dl_colwidths">
3222
3723
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
3223
- <xsl:variable name="html-table">
3224
- <xsl:variable name="doc_ns">
3225
-
3724
+ <xsl:variable name="simple-table">
3725
+ <!-- <xsl:variable name="doc_ns">
3726
+ <xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
3226
3727
  </xsl:variable>
3227
3728
  <xsl:variable name="ns">
3228
3729
  <xsl:choose>
@@ -3233,7 +3734,7 @@
3233
3734
  <xsl:value-of select="substring-before(name(/*), '-')"/>
3234
3735
  </xsl:otherwise>
3235
3736
  </xsl:choose>
3236
- </xsl:variable>
3737
+ </xsl:variable> -->
3237
3738
 
3238
3739
  <xsl:for-each select="*[local-name() = 'dl'][1]">
3239
3740
  <tbody>
@@ -3244,7 +3745,7 @@
3244
3745
 
3245
3746
  <xsl:call-template name="calculate-column-widths">
3246
3747
  <xsl:with-param name="cols-count" select="2"/>
3247
- <xsl:with-param name="table" select="$html-table"/>
3748
+ <xsl:with-param name="table" select="$simple-table"/>
3248
3749
  </xsl:call-template>
3249
3750
 
3250
3751
  </xsl:if>
@@ -3363,8 +3864,10 @@
3363
3864
  <!-- and (not(../@class) or ../@class !='pseudocode') -->
3364
3865
  </xsl:variable>
3365
3866
 
3867
+ <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
3868
+
3366
3869
  <xsl:choose>
3367
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
3870
+ <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
3368
3871
 
3369
3872
  <fo:block margin-bottom="12pt" text-align="left">
3370
3873
 
@@ -3379,7 +3882,7 @@
3379
3882
  <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
3380
3883
  </fo:block>
3381
3884
 
3382
- </xsl:when>
3885
+ </xsl:when> <!-- END: only one component -->
3383
3886
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
3384
3887
  <fo:block margin-bottom="12pt" text-align="left">
3385
3888
 
@@ -3393,8 +3896,8 @@
3393
3896
  </xsl:variable>
3394
3897
  <xsl:value-of select="$title-where"/>
3395
3898
  </fo:block>
3396
- </xsl:when>
3397
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
3899
+ </xsl:when> <!-- END: a few components -->
3900
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
3398
3901
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
3399
3902
 
3400
3903
 
@@ -3407,11 +3910,11 @@
3407
3910
  </xsl:variable>
3408
3911
  <xsl:value-of select="$title-key"/>
3409
3912
  </fo:block>
3410
- </xsl:when>
3913
+ </xsl:when> <!-- END: definition list in a figure -->
3411
3914
  </xsl:choose>
3412
3915
 
3413
3916
  <!-- a few components -->
3414
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
3917
+ <xsl:if test="$onlyOneComponent = 'false'">
3415
3918
  <fo:block>
3416
3919
 
3417
3920
 
@@ -3422,7 +3925,18 @@
3422
3925
 
3423
3926
 
3424
3927
 
3928
+
3929
+ <xsl:if test="$isGenerateTableIF = 'true'">
3930
+ <!-- to determine start of table -->
3931
+ <fo:block id="{concat('table_if_start_',@id)}" keep-with-next="always" font-size="1pt">Start table '<xsl:value-of select="@id"/>'.</fo:block>
3932
+ </xsl:if>
3933
+
3425
3934
  <fo:table width="95%" table-layout="fixed">
3935
+
3936
+ <xsl:if test="$isGenerateTableIF = 'true'">
3937
+ <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
3938
+ </xsl:if>
3939
+
3426
3940
 
3427
3941
  <xsl:choose>
3428
3942
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
@@ -3431,54 +3945,143 @@
3431
3945
 
3432
3946
  </xsl:when>
3433
3947
  </xsl:choose>
3434
- <!-- create virtual html table for dl/[dt and dd] -->
3435
- <xsl:variable name="html-table">
3436
- <xsl:variable name="doc_ns">
3948
+
3949
+
3950
+ <xsl:choose>
3951
+ <xsl:when test="$isGenerateTableIF = 'true'">
3952
+ <!-- generate IF for table widths -->
3953
+ <!-- example:
3954
+ <tr>
3955
+ <td valign="top" align="left" id="tab-symdu_1_1">
3956
+ <p>Symbol</p>
3957
+ <word id="tab-symdu_1_1_word_1">Symbol</word>
3958
+ </td>
3959
+ <td valign="top" align="left" id="tab-symdu_1_2">
3960
+ <p>Description</p>
3961
+ <word id="tab-symdu_1_2_word_1">Description</word>
3962
+ </td>
3963
+ </tr>
3964
+ -->
3437
3965
 
3438
- </xsl:variable>
3439
- <xsl:variable name="ns">
3440
- <xsl:choose>
3441
- <xsl:when test="normalize-space($doc_ns) != ''">
3442
- <xsl:value-of select="normalize-space($doc_ns)"/>
3443
- </xsl:when>
3444
- <xsl:otherwise>
3445
- <xsl:value-of select="substring-before(name(/*), '-')"/>
3446
- </xsl:otherwise>
3447
- </xsl:choose>
3448
- </xsl:variable>
3449
- <tbody>
3450
- <xsl:apply-templates mode="dl"/>
3451
- </tbody>
3452
- </xsl:variable>
3453
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
3454
- <xsl:variable name="colwidths">
3455
- <xsl:call-template name="calculate-column-widths">
3456
- <xsl:with-param name="cols-count" select="2"/>
3457
- <xsl:with-param name="table" select="$html-table"/>
3458
- </xsl:call-template>
3459
- </xsl:variable>
3460
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
3461
- <xsl:variable name="maxlength_dt">
3462
- <xsl:call-template name="getMaxLength_dt"/>
3463
- </xsl:variable>
3464
- <xsl:call-template name="setColumnWidth_dl">
3465
- <xsl:with-param name="colwidths" select="$colwidths"/>
3466
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
3467
- </xsl:call-template>
3468
- <fo:table-body>
3469
- <xsl:apply-templates>
3470
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
3471
- </xsl:apply-templates>
3472
- </fo:table-body>
3966
+ <!-- create virtual html table for dl/[dt and dd] -->
3967
+ <xsl:variable name="simple-table">
3968
+
3969
+ <xsl:variable name="dl_table">
3970
+ <tbody>
3971
+ <xsl:apply-templates mode="dl_if">
3972
+ <xsl:with-param name="id" select="@id"/>
3973
+ </xsl:apply-templates>
3974
+ </tbody>
3975
+ </xsl:variable>
3976
+
3977
+ <!-- dl_table='<xsl:copy-of select="$dl_table"/>' -->
3978
+
3979
+ <!-- Step: replace <br/> to <p>...</p> -->
3980
+ <xsl:variable name="table_without_br">
3981
+ <xsl:apply-templates select="xalan:nodeset($dl_table)" mode="table-without-br"/>
3982
+ </xsl:variable>
3983
+
3984
+ <!-- table_without_br='<xsl:copy-of select="$table_without_br"/>' -->
3985
+
3986
+ <!-- Step: add id to each cell -->
3987
+ <!-- add <word>...</word> for each word, image, math -->
3988
+ <xsl:variable name="simple-table-id">
3989
+ <xsl:apply-templates select="xalan:nodeset($table_without_br)" mode="simple-table-id">
3990
+ <xsl:with-param name="id" select="@id"/>
3991
+ </xsl:apply-templates>
3992
+ </xsl:variable>
3993
+
3994
+ <!-- simple-table-id='<xsl:copy-of select="$simple-table-id"/>' -->
3995
+
3996
+ <xsl:copy-of select="xalan:nodeset($simple-table-id)"/>
3997
+
3998
+ </xsl:variable>
3999
+
4000
+ <!-- DEBUG: simple-table<xsl:copy-of select="$simple-table"/> -->
4001
+
4002
+ <xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if">
4003
+ <xsl:with-param name="table_or_dl">dl</xsl:with-param>
4004
+ </xsl:apply-templates>
4005
+
4006
+ </xsl:when>
4007
+ <xsl:otherwise>
4008
+
4009
+ <xsl:variable name="simple-table">
4010
+
4011
+ <xsl:variable name="dl_table">
4012
+ <tbody>
4013
+ <xsl:apply-templates mode="dl">
4014
+ <xsl:with-param name="id" select="@id"/>
4015
+ </xsl:apply-templates>
4016
+ </tbody>
4017
+ </xsl:variable>
4018
+
4019
+ <xsl:copy-of select="$dl_table"/>
4020
+ </xsl:variable>
4021
+
4022
+ <xsl:variable name="colwidths">
4023
+ <xsl:call-template name="calculate-column-widths">
4024
+ <xsl:with-param name="cols-count" select="2"/>
4025
+ <xsl:with-param name="table" select="$simple-table"/>
4026
+ </xsl:call-template>
4027
+ </xsl:variable>
4028
+
4029
+ <!-- <xsl:text disable-output-escaping="yes">&lt;!- -</xsl:text>
4030
+ DEBUG
4031
+ colwidths=<xsl:copy-of select="$colwidths"/>
4032
+ <xsl:text disable-output-escaping="yes">- -&gt;</xsl:text> -->
4033
+
4034
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
4035
+
4036
+ <xsl:variable name="maxlength_dt">
4037
+ <xsl:call-template name="getMaxLength_dt"/>
4038
+ </xsl:variable>
4039
+
4040
+ <xsl:variable name="isContainsKeepTogetherTag_">
4041
+ false
4042
+ </xsl:variable>
4043
+ <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
4044
+ <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
4045
+
4046
+
4047
+ <xsl:call-template name="setColumnWidth_dl">
4048
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4049
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
4050
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
4051
+ </xsl:call-template>
4052
+
4053
+ <fo:table-body>
4054
+
4055
+ <!-- DEBUG -->
4056
+ <xsl:if test="$table_if_debug = 'true'">
4057
+ <fo:table-row>
4058
+ <fo:table-cell number-columns-spanned="2" font-size="60%">
4059
+ <xsl:apply-templates select="xalan:nodeset($colwidths)" mode="print_as_xml"/>
4060
+ </fo:table-cell>
4061
+ </fo:table-row>
4062
+ </xsl:if>
4063
+
4064
+ <xsl:apply-templates>
4065
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
4066
+ <xsl:with-param name="split_keep-within-line" select="xalan:nodeset($colwidths)/split_keep-within-line"/>
4067
+ </xsl:apply-templates>
4068
+
4069
+ </fo:table-body>
4070
+ </xsl:otherwise>
4071
+ </xsl:choose>
3473
4072
  </fo:table>
3474
4073
  </fo:block>
3475
4074
  </fo:block>
3476
- </xsl:if>
4075
+ </xsl:if> <!-- END: a few components -->
3477
4076
  </fo:block-container>
3478
4077
  </fo:block-container>
3479
4078
  </xsl:template><xsl:template name="setColumnWidth_dl">
3480
4079
  <xsl:param name="colwidths"/>
3481
4080
  <xsl:param name="maxlength_dt"/>
4081
+ <xsl:param name="isContainsKeepTogetherTag"/>
4082
+
4083
+ <!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
4084
+
3482
4085
  <xsl:choose>
3483
4086
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
3484
4087
  <fo:table-column column-width="50%"/>
@@ -3486,6 +4089,16 @@
3486
4089
  </xsl:when>
3487
4090
  <xsl:otherwise>
3488
4091
  <xsl:choose>
4092
+ <xsl:when test="xalan:nodeset($colwidths)/autolayout">
4093
+ <xsl:call-template name="insertTableColumnWidth">
4094
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4095
+ </xsl:call-template>
4096
+ </xsl:when>
4097
+ <xsl:when test="$isContainsKeepTogetherTag">
4098
+ <xsl:call-template name="insertTableColumnWidth">
4099
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4100
+ </xsl:call-template>
4101
+ </xsl:when>
3489
4102
  <!-- to set width check most wide chars like `W` -->
3490
4103
  <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
3491
4104
  <fo:table-column column-width="7%"/>
@@ -3516,20 +4129,31 @@
3516
4129
  <fo:table-column column-width="60%"/>
3517
4130
  </xsl:when>
3518
4131
  <xsl:otherwise>
3519
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
3520
- <xsl:choose>
3521
- <xsl:when test=". = 1 or . = 0">
3522
- <fo:table-column column-width="proportional-column-width(2)"/>
3523
- </xsl:when>
3524
- <xsl:otherwise>
3525
- <fo:table-column column-width="proportional-column-width({.})"/>
3526
- </xsl:otherwise>
3527
- </xsl:choose>
3528
- </xsl:for-each>
4132
+ <xsl:call-template name="insertTableColumnWidth">
4133
+ <xsl:with-param name="colwidths" select="$colwidths"/>
4134
+ </xsl:call-template>
3529
4135
  </xsl:otherwise>
3530
4136
  </xsl:choose>
3531
4137
  </xsl:otherwise>
3532
4138
  </xsl:choose>
4139
+ </xsl:template><xsl:template name="insertTableColumnWidth">
4140
+ <xsl:param name="colwidths"/>
4141
+
4142
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
4143
+ <xsl:choose>
4144
+ <xsl:when test=". = 1 or . = 0">
4145
+ <fo:table-column column-width="proportional-column-width(2)"/>
4146
+ </xsl:when>
4147
+ <xsl:otherwise>
4148
+ <!-- <fo:table-column column-width="proportional-column-width({.})"/> -->
4149
+ <xsl:variable name="divider">
4150
+ <xsl:value-of select="@divider"/>
4151
+ <xsl:if test="not(@divider)">1</xsl:if>
4152
+ </xsl:variable>
4153
+ <fo:table-column column-width="proportional-column-width({round(. div $divider)})"/>
4154
+ </xsl:otherwise>
4155
+ </xsl:choose>
4156
+ </xsl:for-each>
3533
4157
  </xsl:template><xsl:template name="getMaxLength_dt">
3534
4158
  <xsl:variable name="lengths">
3535
4159
  <xsl:for-each select="*[local-name()='dt']">
@@ -3553,7 +4177,6 @@
3553
4177
  <xsl:value-of select="$maxLength"/>
3554
4178
  </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
3555
4179
  <xsl:param name="key_iso"/>
3556
-
3557
4180
  <!-- <tr>
3558
4181
  <td>NOTE</td>
3559
4182
  <td>
@@ -3561,27 +4184,47 @@
3561
4184
  </td>
3562
4185
  </tr>
3563
4186
  -->
3564
- <fo:table-row>
4187
+ <!-- OLD Variant -->
4188
+ <!-- <fo:table-row>
3565
4189
  <fo:table-cell>
3566
4190
  <fo:block margin-top="6pt">
3567
4191
  <xsl:if test="normalize-space($key_iso) = 'true'">
3568
4192
  <xsl:attribute name="margin-top">0</xsl:attribute>
3569
4193
  </xsl:if>
3570
- <xsl:apply-templates select="*[local-name() = 'name']"/>
4194
+ <xsl:apply-templates select="*[local-name() = 'name']" />
3571
4195
  </fo:block>
3572
4196
  </fo:table-cell>
3573
4197
  <fo:table-cell>
3574
4198
  <fo:block>
3575
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4199
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" />
4200
+ </fo:block>
4201
+ </fo:table-cell>
4202
+ </fo:table-row> -->
4203
+ <!-- <tr>
4204
+ <td number-columns-spanned="2">NOTE <xsl:apply-templates /> </td>
4205
+ </tr>
4206
+ -->
4207
+ <fo:table-row>
4208
+ <fo:table-cell number-columns-spanned="2">
4209
+ <fo:block>
4210
+ <xsl:call-template name="note"/>
3576
4211
  </fo:block>
3577
4212
  </fo:table-cell>
3578
4213
  </fo:table-row>
3579
4214
  </xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
4215
+ <xsl:param name="id"/>
4216
+ <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
3580
4217
  <tr>
3581
4218
  <td>
4219
+ <xsl:attribute name="id">
4220
+ <xsl:value-of select="concat($id,'_',$row_number,'_1')"/>
4221
+ </xsl:attribute>
3582
4222
  <xsl:apply-templates/>
3583
4223
  </td>
3584
4224
  <td>
4225
+ <xsl:attribute name="id">
4226
+ <xsl:value-of select="concat($id,'_',$row_number,'_2')"/>
4227
+ </xsl:attribute>
3585
4228
 
3586
4229
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3587
4230
  <xsl:with-param name="process">true</xsl:with-param>
@@ -3592,50 +4235,122 @@
3592
4235
 
3593
4236
  </xsl:template><xsl:template match="*[local-name()='dt']">
3594
4237
  <xsl:param name="key_iso"/>
4238
+ <xsl:param name="split_keep-within-line"/>
3595
4239
 
3596
4240
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
3597
- <fo:table-cell>
4241
+ <xsl:call-template name="insert_dt_cell">
4242
+ <xsl:with-param name="key_iso" select="$key_iso"/>
4243
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4244
+ </xsl:call-template>
4245
+ <xsl:for-each select="following-sibling::*[local-name()='dd'][1]">
4246
+ <xsl:call-template name="insert_dd_cell">
4247
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4248
+ </xsl:call-template>
4249
+ </xsl:for-each>
4250
+ </fo:table-row>
4251
+ </xsl:template><xsl:template name="insert_dt_cell">
4252
+ <xsl:param name="key_iso"/>
4253
+ <xsl:param name="split_keep-within-line"/>
4254
+ <fo:table-cell xsl:use-attribute-sets="dt-cell-style">
4255
+
4256
+ <xsl:if test="$isGenerateTableIF = 'true'">
4257
+ <!-- border is mandatory, to calculate real width -->
4258
+ <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
4259
+ <xsl:attribute name="text-align">left</xsl:attribute>
4260
+ </xsl:if>
4261
+
4262
+
4263
+ <fo:block xsl:use-attribute-sets="dt-block-style">
4264
+ <xsl:copy-of select="@id"/>
4265
+
4266
+ <xsl:if test="normalize-space($key_iso) = 'true'">
4267
+ <xsl:attribute name="margin-top">0</xsl:attribute>
4268
+ </xsl:if>
4269
+
4270
+
4271
+
4272
+ <xsl:apply-templates>
4273
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4274
+ </xsl:apply-templates>
4275
+
4276
+ <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"/> -->
4277
+
4278
+ </fo:block>
4279
+ </fo:table-cell>
4280
+ </xsl:template><xsl:template name="insert_dd_cell">
4281
+ <xsl:param name="split_keep-within-line"/>
4282
+ <fo:table-cell xsl:use-attribute-sets="dd-cell-style">
4283
+
4284
+ <xsl:if test="$isGenerateTableIF = 'true'">
4285
+ <!-- border is mandatory, to calculate real width -->
4286
+ <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
4287
+ </xsl:if>
4288
+
4289
+ <fo:block>
4290
+
4291
+ <xsl:if test="$isGenerateTableIF = 'true'">
4292
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4293
+ </xsl:if>
4294
+
3598
4295
 
3599
- <fo:block xsl:use-attribute-sets="dt-style">
3600
- <xsl:copy-of select="@id"/>
3601
-
3602
- <xsl:if test="normalize-space($key_iso) = 'true'">
3603
- <xsl:attribute name="margin-top">0</xsl:attribute>
3604
- </xsl:if>
3605
-
3606
-
3607
-
3608
- <xsl:apply-templates/>
3609
- </fo:block>
3610
- </fo:table-cell>
3611
- <fo:table-cell>
3612
- <fo:block>
3613
-
3614
4296
 
3615
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3616
- <xsl:with-param name="process">true</xsl:with-param>
3617
- </xsl:apply-templates>
3618
- </fo:block>
3619
- </fo:table-cell>
3620
- </fo:table-row>
4297
+ <xsl:choose>
4298
+ <xsl:when test="$isGenerateTableIF = 'true'">
4299
+ <xsl:apply-templates> <!-- following-sibling::*[local-name()='dd'][1] -->
4300
+ <xsl:with-param name="process">true</xsl:with-param>
4301
+ </xsl:apply-templates>
4302
+ </xsl:when>
4303
+ <xsl:otherwise>
4304
+ <xsl:apply-templates select="."> <!-- following-sibling::*[local-name()='dd'][1] -->
4305
+ <xsl:with-param name="process">true</xsl:with-param>
4306
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4307
+ </xsl:apply-templates>
4308
+ </xsl:otherwise>
4309
+
4310
+ </xsl:choose>
4311
+
4312
+ <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"/> -->
4313
+
4314
+ </fo:block>
4315
+ </fo:table-cell>
3621
4316
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3622
4317
  <xsl:apply-templates/>
3623
4318
  </xsl:template><xsl:template match="*[local-name()='dd']">
3624
4319
  <xsl:param name="process">false</xsl:param>
4320
+ <xsl:param name="split_keep-within-line"/>
3625
4321
  <xsl:if test="$process = 'true'">
3626
4322
  <xsl:apply-templates select="@language"/>
3627
- <xsl:apply-templates/>
4323
+ <xsl:apply-templates>
4324
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4325
+ </xsl:apply-templates>
3628
4326
  </xsl:if>
3629
4327
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3630
4328
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
3631
- </xsl:template><xsl:template match="*[local-name()='em']">
4329
+ </xsl:template><xsl:template match="*[local-name()='dt']" mode="dl_if">
4330
+ <xsl:param name="id"/>
4331
+ <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
4332
+ <tr>
4333
+ <td>
4334
+ <xsl:copy-of select="node()"/>
4335
+ </td>
4336
+ <td>
4337
+
4338
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()"/>
4339
+
4340
+ </td>
4341
+ </tr>
4342
+
4343
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='em']">
3632
4344
  <fo:inline font-style="italic">
3633
4345
  <xsl:apply-templates/>
3634
4346
  </fo:inline>
3635
4347
  </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
4348
+ <xsl:param name="split_keep-within-line"/>
3636
4349
  <fo:inline font-weight="bold">
3637
4350
 
3638
- <xsl:apply-templates/>
4351
+ <xsl:apply-templates>
4352
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4353
+ </xsl:apply-templates>
3639
4354
  </fo:inline>
3640
4355
  </xsl:template><xsl:template match="*[local-name()='padding']">
3641
4356
  <fo:inline padding-right="{@value}"> </fo:inline>
@@ -3674,13 +4389,15 @@
3674
4389
  <xsl:choose>
3675
4390
  <xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
3676
4391
  <xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
3677
- <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
4392
+ <xsl:when test="ancestor::*[local-name()='note'] or ancestor::*[local-name()='example']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3678
4393
  <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3679
4394
  </xsl:choose>
3680
4395
  </xsl:attribute>
3681
4396
  </xsl:if>
3682
4397
  <xsl:apply-templates/>
3683
4398
  </fo:inline>
4399
+ </xsl:template><xsl:template match="*[local-name()='tt']/text()" priority="2">
4400
+ <xsl:call-template name="add_spaces_to_sourcecode"/>
3684
4401
  </xsl:template><xsl:template match="*[local-name()='underline']">
3685
4402
  <fo:inline text-decoration="underline">
3686
4403
  <xsl:apply-templates/>
@@ -3828,54 +4545,120 @@
3828
4545
  <fo:block break-after="page"/>
3829
4546
  <fo:block> </fo:block>
3830
4547
  <fo:block break-after="page"/>
4548
+ </xsl:template><xsl:template match="*[local-name() = 'span']">
4549
+ <xsl:apply-templates/>
3831
4550
  </xsl:template><xsl:template name="tokenize">
3832
4551
  <xsl:param name="text"/>
3833
4552
  <xsl:param name="separator" select="' '"/>
3834
4553
  <xsl:choose>
4554
+
4555
+ <xsl:when test="$isGenerateTableIF = 'true' and not(contains($text, $separator))">
4556
+ <word><xsl:value-of select="normalize-space($text)"/></word>
4557
+ </xsl:when>
3835
4558
  <xsl:when test="not(contains($text, $separator))">
3836
4559
  <word>
3837
- <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
3838
- <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
3839
4560
  <xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
3840
- <xsl:variable name="len_str">
3841
- <xsl:choose>
3842
- <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
3843
- <xsl:value-of select="$len_str_tmp * 1.5"/>
3844
- </xsl:when>
3845
- <xsl:otherwise>
3846
- <xsl:value-of select="$len_str_tmp"/>
3847
- </xsl:otherwise>
3848
- </xsl:choose>
3849
- </xsl:variable>
3850
-
3851
- <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
3852
- <xsl:message>
3853
- div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
3854
- len_str=<xsl:value-of select="$len_str"/>
3855
- len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
3856
- </xsl:message>
3857
- </xsl:if> -->
3858
- <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
3859
- <len_str><xsl:value-of select="$len_str"/></len_str> -->
3860
4561
  <xsl:choose>
3861
- <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
3862
- <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
4562
+ <xsl:when test="normalize-space(translate($text, 'X', '')) = ''"> <!-- special case for keep-together.within-line -->
4563
+ <xsl:value-of select="$len_str_tmp"/>
3863
4564
  </xsl:when>
3864
4565
  <xsl:otherwise>
3865
- <xsl:value-of select="$len_str"/>
4566
+ <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
4567
+ <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
4568
+ <xsl:variable name="len_str">
4569
+ <xsl:choose>
4570
+ <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
4571
+ <xsl:value-of select="$len_str_tmp * 1.5"/>
4572
+ </xsl:when>
4573
+ <xsl:otherwise>
4574
+ <xsl:value-of select="$len_str_tmp"/>
4575
+ </xsl:otherwise>
4576
+ </xsl:choose>
4577
+ </xsl:variable>
4578
+
4579
+ <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
4580
+ <xsl:message>
4581
+ div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
4582
+ len_str=<xsl:value-of select="$len_str"/>
4583
+ len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
4584
+ </xsl:message>
4585
+ </xsl:if> -->
4586
+ <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
4587
+ <len_str><xsl:value-of select="$len_str"/></len_str> -->
4588
+ <xsl:choose>
4589
+ <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
4590
+ <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
4591
+ </xsl:when>
4592
+ <xsl:otherwise>
4593
+ <xsl:value-of select="$len_str"/>
4594
+ </xsl:otherwise>
4595
+ </xsl:choose>
3866
4596
  </xsl:otherwise>
3867
4597
  </xsl:choose>
3868
4598
  </word>
3869
4599
  </xsl:when>
3870
4600
  <xsl:otherwise>
3871
4601
  <word>
3872
- <xsl:value-of select="string-length(normalize-space(substring-before($text, $separator)))"/>
4602
+ <xsl:variable name="word" select="normalize-space(substring-before($text, $separator))"/>
4603
+ <xsl:choose>
4604
+ <xsl:when test="$isGenerateTableIF = 'true'">
4605
+ <xsl:value-of select="$word"/>
4606
+ </xsl:when>
4607
+ <xsl:otherwise>
4608
+ <xsl:value-of select="string-length($word)"/>
4609
+ </xsl:otherwise>
4610
+ </xsl:choose>
3873
4611
  </word>
3874
4612
  <xsl:call-template name="tokenize">
3875
4613
  <xsl:with-param name="text" select="substring-after($text, $separator)"/>
3876
4614
  </xsl:call-template>
3877
4615
  </xsl:otherwise>
3878
4616
  </xsl:choose>
4617
+ </xsl:template><xsl:template name="tokenize_with_tags">
4618
+ <xsl:param name="tags"/>
4619
+ <xsl:param name="text"/>
4620
+ <xsl:param name="separator" select="' '"/>
4621
+ <xsl:choose>
4622
+
4623
+ <xsl:when test="not(contains($text, $separator))">
4624
+ <word>
4625
+ <xsl:call-template name="enclose_text_in_tags">
4626
+ <xsl:with-param name="text" select="normalize-space($text)"/>
4627
+ <xsl:with-param name="tags" select="$tags"/>
4628
+ </xsl:call-template>
4629
+ </word>
4630
+ </xsl:when>
4631
+ <xsl:otherwise>
4632
+ <word>
4633
+ <xsl:call-template name="enclose_text_in_tags">
4634
+ <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
4635
+ <xsl:with-param name="tags" select="$tags"/>
4636
+ </xsl:call-template>
4637
+ </word>
4638
+ <xsl:call-template name="tokenize_with_tags">
4639
+ <xsl:with-param name="text" select="substring-after($text, $separator)"/>
4640
+ </xsl:call-template>
4641
+ </xsl:otherwise>
4642
+ </xsl:choose>
4643
+ </xsl:template><xsl:template name="enclose_text_in_tags">
4644
+ <xsl:param name="text"/>
4645
+ <xsl:param name="tags"/>
4646
+ <xsl:param name="num">1</xsl:param> <!-- default (start) value -->
4647
+
4648
+ <xsl:variable name="tag_name" select="normalize-space(xalan:nodeset($tags)//tag[$num])"/>
4649
+
4650
+ <xsl:choose>
4651
+ <xsl:when test="$tag_name = ''"><xsl:value-of select="$text"/></xsl:when>
4652
+ <xsl:otherwise>
4653
+ <xsl:element name="{$tag_name}">
4654
+ <xsl:call-template name="enclose_text_in_tags">
4655
+ <xsl:with-param name="text" select="$text"/>
4656
+ <xsl:with-param name="tags" select="$tags"/>
4657
+ <xsl:with-param name="num" select="$num + 1"/>
4658
+ </xsl:call-template>
4659
+ </xsl:element>
4660
+ </xsl:otherwise>
4661
+ </xsl:choose>
3879
4662
  </xsl:template><xsl:template name="max_length">
3880
4663
  <xsl:param name="words"/>
3881
4664
  <xsl:for-each select="$words//word">
@@ -3948,36 +4731,47 @@
3948
4731
  </xsl:template><xsl:template name="add-zero-spaces-equal">
3949
4732
  <xsl:param name="text" select="."/>
3950
4733
  <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
4734
+ <xsl:variable name="regex_zero-space-after-equals">(==========)</xsl:variable>
3951
4735
  <xsl:variable name="zero-space-after-equal">=</xsl:variable>
4736
+ <xsl:variable name="regex_zero-space-after-equal">(=)</xsl:variable>
3952
4737
  <xsl:variable name="zero-space">​</xsl:variable>
3953
4738
  <xsl:choose>
3954
4739
  <xsl:when test="contains($text, $zero-space-after-equals)">
3955
- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
4740
+ <!-- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
3956
4741
  <xsl:value-of select="$zero-space-after-equals"/>
3957
4742
  <xsl:value-of select="$zero-space"/>
3958
4743
  <xsl:call-template name="add-zero-spaces-equal">
3959
4744
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
3960
- </xsl:call-template>
4745
+ </xsl:call-template> -->
4746
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equals,concat('$1',$zero_width_space))"/>
3961
4747
  </xsl:when>
3962
4748
  <xsl:when test="contains($text, $zero-space-after-equal)">
3963
- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
4749
+ <!-- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
3964
4750
  <xsl:value-of select="$zero-space-after-equal"/>
3965
4751
  <xsl:value-of select="$zero-space"/>
3966
4752
  <xsl:call-template name="add-zero-spaces-equal">
3967
4753
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
3968
- </xsl:call-template>
4754
+ </xsl:call-template> -->
4755
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),$regex_zero-space-after-equal,concat('$1',$zero_width_space))"/>
3969
4756
  </xsl:when>
3970
4757
  <xsl:otherwise>
3971
4758
  <xsl:value-of select="$text"/>
3972
4759
  </xsl:otherwise>
3973
4760
  </xsl:choose>
3974
4761
  </xsl:template><xsl:template name="getSimpleTable">
4762
+ <xsl:param name="id"/>
4763
+
3975
4764
  <xsl:variable name="simple-table">
3976
4765
 
4766
+ <!-- Step 0. replace <br/> to <p>...</p> -->
4767
+ <xsl:variable name="table_without_br">
4768
+ <xsl:apply-templates mode="table-without-br"/>
4769
+ </xsl:variable>
4770
+
3977
4771
  <!-- Step 1. colspan processing -->
3978
4772
  <xsl:variable name="simple-table-colspan">
3979
4773
  <tbody>
3980
- <xsl:apply-templates mode="simple-table-colspan"/>
4774
+ <xsl:apply-templates select="xalan:nodeset($table_without_br)" mode="simple-table-colspan"/>
3981
4775
  </tbody>
3982
4776
  </xsl:variable>
3983
4777
 
@@ -3986,10 +4780,67 @@
3986
4780
  <xsl:apply-templates select="xalan:nodeset($simple-table-colspan)" mode="simple-table-rowspan"/>
3987
4781
  </xsl:variable>
3988
4782
 
3989
- <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
3990
-
4783
+ <!-- Step 3: add id to each cell -->
4784
+ <!-- add <word>...</word> for each word, image, math -->
4785
+ <xsl:variable name="simple-table-id">
4786
+ <xsl:apply-templates select="xalan:nodeset($simple-table-rowspan)" mode="simple-table-id">
4787
+ <xsl:with-param name="id" select="$id"/>
4788
+ </xsl:apply-templates>
4789
+ </xsl:variable>
4790
+
4791
+ <xsl:copy-of select="xalan:nodeset($simple-table-id)"/>
4792
+
3991
4793
  </xsl:variable>
3992
4794
  <xsl:copy-of select="$simple-table"/>
4795
+ </xsl:template><xsl:template match="@*|node()" mode="table-without-br">
4796
+ <xsl:copy>
4797
+ <xsl:apply-templates select="@*|node()" mode="table-without-br"/>
4798
+ </xsl:copy>
4799
+ </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">
4800
+ <xsl:copy>
4801
+ <xsl:copy-of select="@*"/>
4802
+ <p>
4803
+ <xsl:copy-of select="node()"/>
4804
+ </p>
4805
+ </xsl:copy>
4806
+ </xsl:template><xsl:template match="*[local-name()='th' or local-name()='td'][*[local-name()='br']]" mode="table-without-br">
4807
+ <xsl:copy>
4808
+ <xsl:copy-of select="@*"/>
4809
+ <xsl:for-each select="*[local-name()='br']">
4810
+ <xsl:variable name="current_id" select="generate-id()"/>
4811
+ <p>
4812
+ <xsl:for-each select="preceding-sibling::node()[following-sibling::*[local-name() = 'br'][1][generate-id() = $current_id]][not(local-name() = 'br')]">
4813
+ <xsl:copy-of select="."/>
4814
+ </xsl:for-each>
4815
+ </p>
4816
+ <xsl:if test="not(following-sibling::*[local-name() = 'br'])">
4817
+ <p>
4818
+ <xsl:for-each select="following-sibling::node()">
4819
+ <xsl:copy-of select="."/>
4820
+ </xsl:for-each>
4821
+ </p>
4822
+ </xsl:if>
4823
+ </xsl:for-each>
4824
+ </xsl:copy>
4825
+ </xsl:template><xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p'][*[local-name()='br']]" mode="table-without-br">
4826
+ <xsl:for-each select="*[local-name()='br']">
4827
+ <xsl:variable name="current_id" select="generate-id()"/>
4828
+ <p>
4829
+ <xsl:for-each select="preceding-sibling::node()[following-sibling::*[local-name() = 'br'][1][generate-id() = $current_id]][not(local-name() = 'br')]">
4830
+ <xsl:copy-of select="."/>
4831
+ </xsl:for-each>
4832
+ </p>
4833
+ <xsl:if test="not(following-sibling::*[local-name() = 'br'])">
4834
+ <p>
4835
+ <xsl:for-each select="following-sibling::node()">
4836
+ <xsl:copy-of select="."/>
4837
+ </xsl:for-each>
4838
+ </p>
4839
+ </xsl:if>
4840
+ </xsl:for-each>
4841
+ </xsl:template><xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
4842
+ <xsl:variable name="text" select="translate(.,'&#9;&#10;&#13;','')"/>
4843
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),' {2,}',' ')"/>
3993
4844
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
3994
4845
  <xsl:apply-templates mode="simple-table-colspan"/>
3995
4846
  </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">
@@ -4038,47 +4889,167 @@
4038
4889
  <xsl:copy>
4039
4890
  <xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
4040
4891
  </xsl:copy>
4041
- </xsl:template><xsl:template match="tbody" mode="simple-table-rowspan">
4892
+ </xsl:template><xsl:template match="tbody" mode="simple-table-rowspan">
4893
+ <xsl:copy>
4894
+ <xsl:copy-of select="tr[1]"/>
4895
+ <xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
4896
+ <xsl:with-param name="previousRow" select="tr[1]"/>
4897
+ </xsl:apply-templates>
4898
+ </xsl:copy>
4899
+ </xsl:template><xsl:template match="tr" mode="simple-table-rowspan">
4900
+ <xsl:param name="previousRow"/>
4901
+ <xsl:variable name="currentRow" select="."/>
4902
+
4903
+ <xsl:variable name="normalizedTDs">
4904
+ <xsl:for-each select="xalan:nodeset($previousRow)//td">
4905
+ <xsl:choose>
4906
+ <xsl:when test="@rowspan &gt; 1">
4907
+ <xsl:copy>
4908
+ <xsl:attribute name="rowspan">
4909
+ <xsl:value-of select="@rowspan - 1"/>
4910
+ </xsl:attribute>
4911
+ <xsl:copy-of select="@*[not(name() = 'rowspan')]"/>
4912
+ <xsl:copy-of select="node()"/>
4913
+ </xsl:copy>
4914
+ </xsl:when>
4915
+ <xsl:otherwise>
4916
+ <xsl:copy-of select="$currentRow/td[1 + count(current()/preceding-sibling::td[not(@rowspan) or (@rowspan = 1)])]"/>
4917
+ </xsl:otherwise>
4918
+ </xsl:choose>
4919
+ </xsl:for-each>
4920
+ </xsl:variable>
4921
+
4922
+ <xsl:variable name="newRow">
4923
+ <xsl:copy>
4924
+ <xsl:copy-of select="$currentRow/@*"/>
4925
+ <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
4926
+ </xsl:copy>
4927
+ </xsl:variable>
4928
+ <xsl:copy-of select="$newRow"/>
4929
+
4930
+ <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
4931
+ <xsl:with-param name="previousRow" select="$newRow"/>
4932
+ </xsl:apply-templates>
4933
+ </xsl:template><xsl:template match="/" mode="simple-table-id">
4934
+ <xsl:param name="id"/>
4935
+ <xsl:variable name="id_prefixed" select="concat('table_if_',$id)"/> <!-- table id prefixed by 'table_if_' to simple search in IF -->
4936
+ <xsl:apply-templates select="@*|node()" mode="simple-table-id">
4937
+ <xsl:with-param name="id" select="$id_prefixed"/>
4938
+ </xsl:apply-templates>
4939
+ </xsl:template><xsl:template match="@*|node()" mode="simple-table-id">
4940
+ <xsl:param name="id"/>
4941
+ <xsl:copy>
4942
+ <xsl:apply-templates select="@*|node()" mode="simple-table-id">
4943
+ <xsl:with-param name="id" select="$id"/>
4944
+ </xsl:apply-templates>
4945
+ </xsl:copy>
4946
+ </xsl:template><xsl:template match="*[local-name()='tbody']" mode="simple-table-id">
4947
+ <xsl:param name="id"/>
4948
+ <xsl:copy>
4949
+ <xsl:copy-of select="@*"/>
4950
+ <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
4951
+ <xsl:apply-templates select="node()" mode="simple-table-id">
4952
+ <xsl:with-param name="id" select="$id"/>
4953
+ </xsl:apply-templates>
4954
+ </xsl:copy>
4955
+ </xsl:template><xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
4956
+ <xsl:param name="id"/>
4957
+ <xsl:copy>
4958
+ <xsl:copy-of select="@*"/>
4959
+ <xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
4960
+ <xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
4961
+ <xsl:attribute name="id">
4962
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
4963
+ </xsl:attribute>
4964
+
4965
+ <xsl:for-each select="*[local-name() = 'p']">
4966
+ <xsl:copy>
4967
+ <xsl:copy-of select="@*"/>
4968
+ <xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
4969
+ <xsl:attribute name="id">
4970
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
4971
+ </xsl:attribute>
4972
+
4973
+ <xsl:copy-of select="node()"/>
4974
+ </xsl:copy>
4975
+ </xsl:for-each>
4976
+
4977
+
4978
+ <xsl:if test="$isGenerateTableIF = 'true'"> <!-- split each paragraph to words, image, math -->
4979
+
4980
+ <xsl:variable name="td_text">
4981
+ <xsl:apply-templates select="." mode="td_text_with_formatting"/>
4982
+ </xsl:variable>
4983
+
4984
+ <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
4985
+
4986
+ <xsl:variable name="words">
4987
+ <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
4988
+ <word>
4989
+ <xsl:copy-of select="."/>
4990
+ </word>
4991
+ </xsl:for-each>
4992
+
4993
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
4994
+ <xsl:copy-of select="."/>
4995
+ </xsl:for-each>
4996
+
4997
+ </xsl:variable>
4998
+
4999
+ <xsl:for-each select="xalan:nodeset($words)/word">
5000
+ <xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
5001
+ <xsl:copy>
5002
+ <xsl:attribute name="id">
5003
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
5004
+ </xsl:attribute>
5005
+ <xsl:copy-of select="node()"/>
5006
+ </xsl:copy>
5007
+ </xsl:for-each>
5008
+ </xsl:if>
5009
+ </xsl:copy>
5010
+
5011
+ </xsl:template><xsl:template match="@*|node()" mode="td_text_with_formatting">
4042
5012
  <xsl:copy>
4043
- <xsl:copy-of select="tr[1]"/>
4044
- <xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
4045
- <xsl:with-param name="previousRow" select="tr[1]"/>
4046
- </xsl:apply-templates>
5013
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
4047
5014
  </xsl:copy>
4048
- </xsl:template><xsl:template match="tr" mode="simple-table-rowspan">
4049
- <xsl:param name="previousRow"/>
4050
- <xsl:variable name="currentRow" select="."/>
4051
-
4052
- <xsl:variable name="normalizedTDs">
4053
- <xsl:for-each select="xalan:nodeset($previousRow)//td">
4054
- <xsl:choose>
4055
- <xsl:when test="@rowspan &gt; 1">
4056
- <xsl:copy>
4057
- <xsl:attribute name="rowspan">
4058
- <xsl:value-of select="@rowspan - 1"/>
4059
- </xsl:attribute>
4060
- <xsl:copy-of select="@*[not(name() = 'rowspan')]"/>
4061
- <xsl:copy-of select="node()"/>
4062
- </xsl:copy>
4063
- </xsl:when>
4064
- <xsl:otherwise>
4065
- <xsl:copy-of select="$currentRow/td[1 + count(current()/preceding-sibling::td[not(@rowspan) or (@rowspan = 1)])]"/>
4066
- </xsl:otherwise>
4067
- </xsl:choose>
4068
- </xsl:for-each>
5015
+ </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">
5016
+ <xsl:variable name="formatting_tags">
5017
+ <xsl:call-template name="getFormattingTags"/>
4069
5018
  </xsl:variable>
4070
-
4071
- <xsl:variable name="newRow">
4072
- <xsl:copy>
4073
- <xsl:copy-of select="$currentRow/@*"/>
4074
- <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
4075
- </xsl:copy>
5019
+ <word>
5020
+ <xsl:call-template name="enclose_text_in_tags">
5021
+ <xsl:with-param name="text" select="normalize-space(.)"/>
5022
+ <xsl:with-param name="tags" select="$formatting_tags"/>
5023
+ </xsl:call-template>
5024
+ </word>
5025
+ </xsl:template><xsl:template match="*[local-name() != 'keep-together_within-line']/text()" mode="td_text_with_formatting">
5026
+
5027
+ <xsl:variable name="td_text" select="."/>
5028
+
5029
+ <xsl:variable name="string_with_added_zerospaces">
5030
+ <xsl:call-template name="add-zero-spaces-java">
5031
+ <xsl:with-param name="text" select="$td_text"/>
5032
+ </xsl:call-template>
4076
5033
  </xsl:variable>
4077
- <xsl:copy-of select="$newRow"/>
4078
-
4079
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
4080
- <xsl:with-param name="previousRow" select="$newRow"/>
4081
- </xsl:apply-templates>
5034
+
5035
+ <xsl:variable name="formatting_tags">
5036
+ <xsl:call-template name="getFormattingTags"/>
5037
+ </xsl:variable>
5038
+
5039
+ <!-- <word>text</word> -->
5040
+ <xsl:call-template name="tokenize_with_tags">
5041
+ <xsl:with-param name="tags" select="$formatting_tags"/>
5042
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
5043
+ </xsl:call-template>
5044
+ </xsl:template><xsl:template name="getFormattingTags">
5045
+ <tags>
5046
+ <xsl:if test="ancestor::*[local-name() = 'strong']"><tag>strong</tag></xsl:if>
5047
+ <xsl:if test="ancestor::*[local-name() = 'em']"><tag>em</tag></xsl:if>
5048
+ <xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
5049
+ <xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
5050
+ <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
5051
+ <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
5052
+ </tags>
4082
5053
  </xsl:template><xsl:template name="getLang">
4083
5054
  <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
4084
5055
  <xsl:variable name="language">
@@ -4133,6 +5104,9 @@
4133
5104
  <xsl:variable name="isDeleted" select="@deleted"/>
4134
5105
 
4135
5106
  <fo:inline xsl:use-attribute-sets="mathml-style">
5107
+
5108
+
5109
+
4136
5110
 
4137
5111
 
4138
5112
  <xsl:call-template name="setTrackChangesStyles">
@@ -4140,48 +5114,80 @@
4140
5114
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4141
5115
  </xsl:call-template>
4142
5116
 
5117
+ <xsl:if test="$add_math_as_text = 'true'">
5118
+ <!-- insert helper tag -->
5119
+ <!-- set unique font-size (fiction) -->
5120
+ <xsl:variable name="font-size_sfx"><xsl:number level="any"/></xsl:variable>
5121
+ <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 -->
5122
+ </xsl:if>
4143
5123
 
4144
-
4145
- <xsl:variable name="mathml">
4146
- <xsl:apply-templates select="." mode="mathml"/>
5124
+ <xsl:variable name="mathml_content">
5125
+ <xsl:apply-templates select="." mode="mathml_actual_text"/>
4147
5126
  </xsl:variable>
4148
- <fo:instream-foreign-object fox:alt-text="Math">
4149
5127
 
5128
+
5129
+ <xsl:call-template name="mathml_instream_object">
5130
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
5131
+ </xsl:call-template>
4150
5132
 
4151
-
4152
- <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
4153
- <xsl:variable name="comment_text_">
4154
- <xsl:choose>
4155
- <xsl:when test="normalize-space($comment_text_following) != ''">
4156
- <xsl:value-of select="$comment_text_following"/>
4157
- </xsl:when>
4158
- <xsl:otherwise>
4159
- <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
4160
- </xsl:otherwise>
4161
- </xsl:choose>
4162
- </xsl:variable>
4163
- <xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
4164
-
4165
- <xsl:if test="normalize-space($comment_text) != ''">
4166
- <!-- put Mathin Alternate Text -->
4167
- <xsl:attribute name="fox:alt-text">
4168
- <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
4169
- </xsl:attribute>
4170
- </xsl:if>
4171
-
4172
- <xsl:variable name="mathml_content">
4173
- <xsl:apply-templates select="." mode="mathml_actual_text"/>
4174
- </xsl:variable>
4175
- <!-- put MathML in Actual Text -->
4176
- <xsl:attribute name="fox:actual-text">
4177
- <xsl:value-of select="$mathml_content"/>
4178
- </xsl:attribute>
4179
-
4180
-
4181
-
4182
- <xsl:copy-of select="xalan:nodeset($mathml)"/>
4183
- </fo:instream-foreign-object>
5133
+
4184
5134
  </fo:inline>
5135
+ </xsl:template><xsl:template name="getMathml_comment_text">
5136
+ <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
5137
+ <xsl:variable name="comment_text_">
5138
+ <xsl:choose>
5139
+ <xsl:when test="normalize-space($comment_text_following) != ''">
5140
+ <xsl:value-of select="$comment_text_following"/>
5141
+ </xsl:when>
5142
+ <xsl:otherwise>
5143
+ <xsl:value-of select="normalize-space(translate(.,' ⁢',' '))"/>
5144
+ </xsl:otherwise>
5145
+ </xsl:choose>
5146
+ </xsl:variable>
5147
+ <xsl:variable name="comment_text_2" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
5148
+ <xsl:variable name="comment_text" select="java:trim(java:java.lang.String.new($comment_text_2))"/>
5149
+ <xsl:value-of select="$comment_text"/>
5150
+ </xsl:template><xsl:template name="mathml_instream_object">
5151
+ <xsl:param name="comment_text"/>
5152
+ <xsl:param name="mathml_content"/>
5153
+
5154
+ <xsl:variable name="comment_text_">
5155
+ <xsl:choose>
5156
+ <xsl:when test="normalize-space($comment_text) != ''"><xsl:value-of select="$comment_text"/></xsl:when>
5157
+ <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
5158
+ </xsl:choose>
5159
+ </xsl:variable>
5160
+
5161
+ <xsl:variable name="mathml">
5162
+ <xsl:apply-templates select="." mode="mathml"/>
5163
+ </xsl:variable>
5164
+
5165
+ <fo:instream-foreign-object fox:alt-text="Math">
5166
+
5167
+
5168
+
5169
+
5170
+
5171
+
5172
+
5173
+ <!-- put MathML in Actual Text -->
5174
+ <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
5175
+ <xsl:attribute name="fox:actual-text">
5176
+ <xsl:value-of select="$mathml_content"/>
5177
+ </xsl:attribute>
5178
+
5179
+ <!-- <xsl:if test="$add_math_as_text = 'true'"> -->
5180
+ <xsl:if test="normalize-space($comment_text_) != ''">
5181
+ <!-- put Mathin Alternate Text -->
5182
+ <xsl:attribute name="fox:alt-text">
5183
+ <xsl:value-of select="$comment_text_"/>
5184
+ </xsl:attribute>
5185
+ </xsl:if>
5186
+ <!-- </xsl:if> -->
5187
+
5188
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
5189
+
5190
+ </fo:instream-foreign-object>
4185
5191
  </xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
4186
5192
  <!-- <xsl:text>a+b</xsl:text> -->
4187
5193
  <xsl:text>&lt;</xsl:text>
@@ -4212,7 +5218,9 @@
4212
5218
  <!-- replace start and end spaces to non-break space -->
4213
5219
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
4214
5220
  </xsl:copy>
4215
- </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">
5221
+ </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">
5222
+ <xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
5223
+ </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4216
5224
  <xsl:variable name="target">
4217
5225
  <xsl:choose>
4218
5226
  <xsl:when test="@updatetype = 'true'">
@@ -4459,7 +5467,12 @@
4459
5467
 
4460
5468
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
4461
5469
 
5470
+ <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
5471
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
5472
+ </xsl:if>
5473
+
4462
5474
 
5475
+
4463
5476
 
4464
5477
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
4465
5478
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
@@ -4825,18 +5838,33 @@
4825
5838
  </xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
4826
5839
  <xsl:copy>
4827
5840
  <xsl:apply-templates select="@*" mode="svg_update"/>
4828
- <xsl:variable name="viewbox">
5841
+ <xsl:variable name="viewbox_">
4829
5842
  <xsl:call-template name="split">
4830
5843
  <xsl:with-param name="pText" select="@viewBox"/>
4831
5844
  <xsl:with-param name="sep" select="' '"/>
4832
5845
  </xsl:call-template>
4833
5846
  </xsl:variable>
5847
+ <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
5848
+ <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
5849
+ <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
5850
+
4834
5851
  <xsl:attribute name="width">
4835
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
5852
+ <xsl:choose>
5853
+ <xsl:when test="$width != ''">
5854
+ <xsl:value-of select="round($width)"/>
5855
+ </xsl:when>
5856
+ <xsl:otherwise>400</xsl:otherwise> <!-- default width -->
5857
+ </xsl:choose>
4836
5858
  </xsl:attribute>
4837
5859
  <xsl:attribute name="height">
4838
- <xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
5860
+ <xsl:choose>
5861
+ <xsl:when test="$height != ''">
5862
+ <xsl:value-of select="round($height)"/>
5863
+ </xsl:when>
5864
+ <xsl:otherwise>400</xsl:otherwise> <!-- default height -->
5865
+ </xsl:choose>
4839
5866
  </xsl:attribute>
5867
+
4840
5868
  <xsl:apply-templates mode="svg_update"/>
4841
5869
  </xsl:copy>
4842
5870
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
@@ -5031,7 +6059,11 @@
5031
6059
  <xsl:apply-templates mode="bookmarks"/>
5032
6060
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
5033
6061
  <xsl:apply-templates select="."/>
5034
- </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">
6062
+ </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">
6063
+ <xsl:apply-templates mode="contents"/>
6064
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
6065
+ <xsl:apply-templates mode="bookmarks"/>
6066
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="bookmarks">
5035
6067
  <xsl:apply-templates mode="bookmarks"/>
5036
6068
  </xsl:template><xsl:template name="addBookmarks">
5037
6069
  <xsl:param name="contents"/>
@@ -5313,7 +6345,9 @@
5313
6345
  <xsl:apply-templates/>
5314
6346
  </xsl:otherwise>
5315
6347
  </xsl:choose>
5316
- </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">
6348
+ </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">
6349
+ <xsl:value-of select="."/>
6350
+ </xsl:template><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
5317
6351
  <xsl:text> </xsl:text>
5318
6352
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
5319
6353
  <xsl:copy>
@@ -5344,9 +6378,22 @@
5344
6378
  </xsl:when>
5345
6379
  <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
5346
6380
  </xsl:choose>
6381
+ </xsl:template><xsl:template match="text()" mode="contents_item">
6382
+ <xsl:call-template name="keep_together_standard_number"/>
6383
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="contents_item">
6384
+ <xsl:apply-templates mode="contents_item"/>
5347
6385
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
5348
6386
 
5349
6387
  <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
6388
+
6389
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
6390
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6391
+ </xsl:if>
6392
+
6393
+ <xsl:if test="ancestor::*[local-name() = 'example']">
6394
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6395
+ </xsl:if>
6396
+
5350
6397
  <xsl:copy-of select="@id"/>
5351
6398
 
5352
6399
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -5446,17 +6493,15 @@
5446
6493
 
5447
6494
  <!-- split text by zero-width space -->
5448
6495
  <xsl:variable name="text_step4">
5449
- <xsl:call-template name="split">
6496
+ <xsl:call-template name="split_for_interspers">
5450
6497
  <xsl:with-param name="pText" select="$text_step3"/>
5451
6498
  <xsl:with-param name="sep" select="$zero_width_space"/>
5452
- <xsl:with-param name="normalize-space">false</xsl:with-param>
5453
- <xsl:with-param name="keep_sep">true</xsl:with-param>
5454
6499
  </xsl:call-template>
5455
6500
  </xsl:variable>
5456
6501
 
5457
- <xsl:for-each select="xalan:nodeset($text_step4)/item">
6502
+ <xsl:for-each select="xalan:nodeset($text_step4)/node()">
5458
6503
  <xsl:choose>
5459
- <xsl:when test="string-length() &gt; 30"> <!-- word with length more than 30 will be interspersed with zero-width space -->
6504
+ <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
5460
6505
  <xsl:call-template name="interspers">
5461
6506
  <xsl:with-param name="str" select="."/>
5462
6507
  </xsl:call-template>
@@ -5467,6 +6512,30 @@
5467
6512
  </xsl:choose>
5468
6513
  </xsl:for-each>
5469
6514
 
6515
+ </xsl:template><xsl:variable name="interspers_tag_open">###interspers123###</xsl:variable><xsl:variable name="interspers_tag_close">###/interspers123###</xsl:variable><xsl:template name="split_for_interspers">
6516
+ <xsl:param name="pText" select="."/>
6517
+ <xsl:param name="sep" select="','"/>
6518
+ <!-- word with length more than 30 will be interspersed with zero-width space -->
6519
+ <xsl:variable name="regex" select="concat('([^', $zero_width_space, ']{31,})')"/> <!-- sequence of characters (more 31), that doesn't contains zero-width space -->
6520
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new($pText),$regex,concat($interspers_tag_open,'$1',$interspers_tag_close))"/>
6521
+ <xsl:call-template name="replace_tag_interspers">
6522
+ <xsl:with-param name="text" select="$text"/>
6523
+ </xsl:call-template>
6524
+ </xsl:template><xsl:template name="replace_tag_interspers">
6525
+ <xsl:param name="text"/>
6526
+ <xsl:choose>
6527
+ <xsl:when test="contains($text, $interspers_tag_open)">
6528
+ <xsl:value-of select="substring-before($text, $interspers_tag_open)"/>
6529
+ <xsl:variable name="text_after" select="substring-after($text, $interspers_tag_open)"/>
6530
+ <interspers>
6531
+ <xsl:value-of select="substring-before($text_after, $interspers_tag_close)"/>
6532
+ </interspers>
6533
+ <xsl:call-template name="replace_tag_interspers">
6534
+ <xsl:with-param name="text" select="substring-after($text_after, $interspers_tag_close)"/>
6535
+ </xsl:call-template>
6536
+ </xsl:when>
6537
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
6538
+ </xsl:choose>
5470
6539
  </xsl:template><xsl:template name="interspers">
5471
6540
  <xsl:param name="str"/>
5472
6541
  <xsl:param name="char" select="$zero_width_space"/>
@@ -5695,7 +6764,9 @@
5695
6764
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
5696
6765
  </xsl:if>
5697
6766
  <xsl:variable name="simple-table">
5698
- <xsl:call-template name="getSimpleTable"/>
6767
+ <xsl:call-template name="getSimpleTable">
6768
+ <xsl:with-param name="id" select="@id"/>
6769
+ </xsl:call-template>
5699
6770
  </xsl:variable>
5700
6771
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
5701
6772
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
@@ -5802,39 +6873,67 @@
5802
6873
  </xsl:otherwise>
5803
6874
  </xsl:choose>
5804
6875
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5805
- <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5806
-
6876
+
6877
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
6878
+
5807
6879
 
6880
+
5808
6881
  <xsl:variable name="fo_element">
5809
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
6882
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
5810
6883
  block
5811
6884
  </xsl:variable>
5812
6885
 
5813
- <!-- display 'EXAMPLE' -->
5814
- <xsl:apply-templates select="*[local-name()='name']">
5815
- <xsl:with-param name="fo_element" select="$fo_element"/>
5816
- </xsl:apply-templates>
6886
+ <fo:block-container margin-left="0mm">
5817
6887
 
5818
- <xsl:choose>
5819
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
5820
- <fo:block-container xsl:use-attribute-sets="example-body-style">
5821
- <fo:block-container margin-left="0mm" margin-right="0mm">
5822
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
6888
+ <xsl:choose>
6889
+
6890
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
6891
+
6892
+ <!-- display name 'EXAMPLE' in a separate block -->
6893
+ <fo:block>
6894
+ <xsl:apply-templates select="*[local-name()='name']">
5823
6895
  <xsl:with-param name="fo_element" select="$fo_element"/>
5824
6896
  </xsl:apply-templates>
6897
+ </fo:block>
6898
+
6899
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
6900
+ <fo:block-container margin-left="0mm" margin-right="0mm">
6901
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
6902
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6903
+ </xsl:apply-templates>
6904
+ </fo:block-container>
5825
6905
  </fo:block-container>
5826
- </fo:block-container>
5827
- </xsl:when>
5828
- <xsl:otherwise>
5829
- <fo:inline>
5830
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
5831
- <xsl:with-param name="fo_element" select="$fo_element"/>
5832
- </xsl:apply-templates>
5833
- </fo:inline>
5834
- </xsl:otherwise>
5835
- </xsl:choose>
5836
-
5837
- </fo:block>
6906
+ </xsl:when> <!-- end block -->
6907
+
6908
+ <xsl:otherwise> <!-- inline -->
6909
+
6910
+ <!-- display 'EXAMPLE' and first element in the same line -->
6911
+ <fo:block>
6912
+ <xsl:apply-templates select="*[local-name()='name']">
6913
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6914
+ </xsl:apply-templates>
6915
+ <fo:inline>
6916
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
6917
+ <xsl:with-param name="fo_element" select="$fo_element"/>
6918
+ </xsl:apply-templates>
6919
+ </fo:inline>
6920
+ </fo:block>
6921
+
6922
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
6923
+ <!-- display further elements in blocks -->
6924
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
6925
+ <fo:block-container margin-left="0mm" margin-right="0mm">
6926
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
6927
+ <xsl:with-param name="fo_element" select="'block'"/>
6928
+ </xsl:apply-templates>
6929
+ </fo:block-container>
6930
+ </fo:block-container>
6931
+ </xsl:if>
6932
+ </xsl:otherwise> <!-- end inline -->
6933
+
6934
+ </xsl:choose>
6935
+ </fo:block-container>
6936
+ </fo:block-container>
5838
6937
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
5839
6938
  <xsl:param name="fo_element">block</xsl:param>
5840
6939
 
@@ -5866,14 +6965,20 @@
5866
6965
  </xsl:variable>
5867
6966
  <xsl:choose>
5868
6967
  <xsl:when test="starts-with(normalize-space($element), 'block')">
5869
- <fo:block xsl:use-attribute-sets="example-p-style">
5870
-
5871
- <xsl:if test="$num = 1">
5872
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
5873
- </xsl:if>
5874
-
5875
- <xsl:apply-templates/>
5876
- </fo:block>
6968
+ <fo:block-container>
6969
+ <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
6970
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6971
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
6972
+ </xsl:if>
6973
+ <fo:block xsl:use-attribute-sets="example-p-style">
6974
+
6975
+ <xsl:if test="$num = 1">
6976
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
6977
+ </xsl:if>
6978
+
6979
+ <xsl:apply-templates/>
6980
+ </fo:block>
6981
+ </fo:block-container>
5877
6982
  </xsl:when>
5878
6983
  <xsl:otherwise>
5879
6984
  <fo:inline xsl:use-attribute-sets="example-p-style">
@@ -5918,7 +7023,7 @@
5918
7023
  </xsl:otherwise>
5919
7024
  </xsl:choose> -->
5920
7025
  </fo:block>
5921
- </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
7026
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ') or starts-with(., '[SOURCE: Quoted from: ') or starts-with(., '[SOURCE: Modified from: ')]" priority="2">
5922
7027
  <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5923
7028
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5924
7029
  <xsl:if test="normalize-space() != ''">
@@ -6052,7 +7157,16 @@
6052
7157
  </fo:inline>
6053
7158
  </xsl:when>
6054
7159
  <xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
6055
- <fo:inline><xsl:apply-templates/></fo:inline>
7160
+
7161
+ <!-- if in bibitem[@hidden='true'] there is url[@type='src'], then create hyperlink -->
7162
+ <xsl:variable name="uri_src" select="normalize-space($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'src'])"/>
7163
+ <xsl:choose>
7164
+ <xsl:when test="$uri_src != ''">
7165
+ <fo:basic-link external-destination="{$uri_src}" fox:alt-text="{$uri_src}"><xsl:apply-templates/></fo:basic-link>
7166
+ </xsl:when>
7167
+ <xsl:otherwise><fo:inline><xsl:apply-templates/></fo:inline></xsl:otherwise>
7168
+ </xsl:choose>
7169
+
6056
7170
  </xsl:otherwise>
6057
7171
  </xsl:choose>
6058
7172
  </xsl:template><xsl:template match="*[local-name() = 'tab']">
@@ -6235,10 +7349,24 @@
6235
7349
 
6236
7350
  </fo:block>
6237
7351
  <xsl:apply-templates/>
6238
- </xsl:template><xsl:template match="*[local-name() = 'review']">
7352
+ </xsl:template><xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
6239
7353
  <!-- comment 2019-11-29 -->
6240
7354
  <!-- <fo:block font-weight="bold">Review:</fo:block>
6241
7355
  <xsl:apply-templates /> -->
7356
+
7357
+ <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
7358
+
7359
+ <xsl:choose>
7360
+ <!-- if there isn't the attribute '@from', then -->
7361
+ <xsl:when test="$id_from = ''">
7362
+ <fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
7363
+ </xsl:when>
7364
+ <!-- if there isn't element with id 'from', then create 'bookmark' here -->
7365
+ <xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
7366
+ <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
7367
+ </xsl:when>
7368
+ </xsl:choose>
7369
+
6242
7370
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
6243
7371
  <!-- 0xA0 to space replacement -->
6244
7372
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
@@ -6595,7 +7723,10 @@
6595
7723
  <!-- to split by '_' and other chars -->
6596
7724
  <xsl:call-template name="add-zero-spaces-java"/>
6597
7725
  </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
6598
- <fo:inline id="{@id}" font-size="1pt"/>
7726
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
7727
+ <fo:inline id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:inline>
7728
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
7729
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
6599
7730
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
6600
7731
  <!-- <row>
6601
7732
  <date>05-07-2013</date>
@@ -7115,6 +8246,120 @@
7115
8246
  <xsl:apply-templates select="." mode="update_xml_step1"/>
7116
8247
  </xsl:for-each>
7117
8248
  </xsl:copy>
8249
+ </xsl:template><xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
8250
+ <xsl:apply-templates mode="update_xml_step1"/>
8251
+ </xsl:template><xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
8252
+ <xsl:copy>
8253
+ <xsl:apply-templates select="@*|node()" mode="update_xml_enclose_keep-together_within-line"/>
8254
+ </xsl:copy>
8255
+ </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">
8256
+
8257
+ <!-- enclose standard's number into tag 'keep-together_within-line' -->
8258
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
8259
+ <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
8260
+ <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
8261
+ <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))"/>
8262
+ <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
8263
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
8264
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
8265
+ <xsl:with-param name="text" select="$text_"/>
8266
+ </xsl:call-template></text></xsl:variable>
8267
+
8268
+ <xsl:variable name="parent" select="local-name(..)"/>
8269
+
8270
+ <xsl:variable name="text2">
8271
+ <text><xsl:for-each select="xalan:nodeset($text)/text/node()">
8272
+ <xsl:copy-of select="."/>
8273
+ </xsl:for-each></text>
8274
+ </xsl:variable>
8275
+
8276
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
8277
+ <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
8278
+ <xsl:variable name="text3">
8279
+ <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
8280
+ <xsl:choose>
8281
+ <xsl:when test="self::text()">
8282
+ <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))"/>
8283
+ <xsl:variable name="text_units"><text><xsl:call-template name="replace_text_tags">
8284
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
8285
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
8286
+ <xsl:with-param name="text" select="$text_units_"/>
8287
+ </xsl:call-template></text></xsl:variable>
8288
+ <xsl:copy-of select="xalan:nodeset($text_units)/text/node()"/>
8289
+ </xsl:when>
8290
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
8291
+ </xsl:choose>
8292
+ </xsl:for-each></text>
8293
+ </xsl:variable>
8294
+
8295
+ <xsl:choose>
8296
+ <xsl:when test="ancestor::*[local-name() = 'td' or local-name() = 'th']">
8297
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
8298
+ <xsl:variable name="regex_dots_units">((\b((\S{1,3}\.\S+)|(\S+\.\S{1,3}))\b)|(\.\S{1,3})\b)</xsl:variable>
8299
+ <xsl:for-each select="xalan:nodeset($text3)/text/node()">
8300
+ <xsl:choose>
8301
+ <xsl:when test="self::text()">
8302
+ <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))"/>
8303
+ <xsl:variable name="text_dots"><text><xsl:call-template name="replace_text_tags">
8304
+ <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
8305
+ <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
8306
+ <xsl:with-param name="text" select="$text_dots_"/>
8307
+ </xsl:call-template></text></xsl:variable>
8308
+ <xsl:copy-of select="xalan:nodeset($text_dots)/text/node()"/>
8309
+ </xsl:when>
8310
+ <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise> <!-- copy 'as-is' for <fo:inline keep-together.within-line="always" ... -->
8311
+ </xsl:choose>
8312
+ </xsl:for-each>
8313
+ </xsl:when>
8314
+ <xsl:otherwise><xsl:copy-of select="xalan:nodeset($text3)/text/node()"/></xsl:otherwise>
8315
+ </xsl:choose>
8316
+
8317
+ </xsl:template><xsl:template name="replace_text_tags">
8318
+ <xsl:param name="tag_open"/>
8319
+ <xsl:param name="tag_close"/>
8320
+ <xsl:param name="text"/>
8321
+ <xsl:choose>
8322
+ <xsl:when test="contains($text, $tag_open)">
8323
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
8324
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
8325
+
8326
+ <xsl:element name="{substring-before(substring-after($tag_open, '###'),'###')}">
8327
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
8328
+ </xsl:element>
8329
+
8330
+ <xsl:call-template name="replace_text_tags">
8331
+ <xsl:with-param name="tag_open" select="$tag_open"/>
8332
+ <xsl:with-param name="tag_close" select="$tag_close"/>
8333
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
8334
+ </xsl:call-template>
8335
+ </xsl:when>
8336
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
8337
+ </xsl:choose>
8338
+ </xsl:template><xsl:template name="printEdition">
8339
+ <xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
8340
+ <xsl:text> </xsl:text>
8341
+ <xsl:choose>
8342
+ <xsl:when test="$edition_i18n != ''">
8343
+ <!-- Example: <edition language="fr">deuxième édition</edition> -->
8344
+ <xsl:call-template name="capitalize">
8345
+ <xsl:with-param name="str" select="$edition_i18n"/>
8346
+ </xsl:call-template>
8347
+ </xsl:when>
8348
+ <xsl:otherwise>
8349
+ <xsl:variable name="edition" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'])"/>
8350
+ <xsl:if test="$edition != ''"> <!-- Example: 1.3 -->
8351
+ <xsl:call-template name="capitalize">
8352
+ <xsl:with-param name="str">
8353
+ <xsl:call-template name="getLocalizedString">
8354
+ <xsl:with-param name="key">edition</xsl:with-param>
8355
+ </xsl:call-template>
8356
+ </xsl:with-param>
8357
+ </xsl:call-template>
8358
+ <xsl:text> </xsl:text>
8359
+ <xsl:value-of select="$edition"/>
8360
+ </xsl:if>
8361
+ </xsl:otherwise>
8362
+ </xsl:choose>
7118
8363
  </xsl:template><xsl:template name="convertDate">
7119
8364
  <xsl:param name="date"/>
7120
8365
  <xsl:param name="format" select="'short'"/>
@@ -7802,4 +9047,40 @@
7802
9047
  <xsl:value-of select="$value"/>
7803
9048
  </xsl:otherwise>
7804
9049
  </xsl:choose>
9050
+ </xsl:template><xsl:template match="*" mode="print_as_xml">
9051
+ <xsl:param name="level">0</xsl:param>
9052
+
9053
+ <fo:block margin-left="{2*$level}mm">
9054
+ <xsl:text>
9055
+ &lt;</xsl:text>
9056
+ <xsl:value-of select="local-name()"/>
9057
+ <xsl:for-each select="@*">
9058
+ <xsl:text> </xsl:text>
9059
+ <xsl:value-of select="local-name()"/>
9060
+ <xsl:text>="</xsl:text>
9061
+ <xsl:value-of select="."/>
9062
+ <xsl:text>"</xsl:text>
9063
+ </xsl:for-each>
9064
+ <xsl:text>&gt;</xsl:text>
9065
+
9066
+ <xsl:if test="not(*)">
9067
+ <fo:inline font-weight="bold"><xsl:value-of select="."/></fo:inline>
9068
+ <xsl:text>&lt;/</xsl:text>
9069
+ <xsl:value-of select="local-name()"/>
9070
+ <xsl:text>&gt;</xsl:text>
9071
+ </xsl:if>
9072
+ </fo:block>
9073
+
9074
+ <xsl:if test="*">
9075
+ <fo:block>
9076
+ <xsl:apply-templates mode="print_as_xml">
9077
+ <xsl:with-param name="level" select="$level + 1"/>
9078
+ </xsl:apply-templates>
9079
+ </fo:block>
9080
+ <fo:block margin-left="{2*$level}mm">
9081
+ <xsl:text>&lt;/</xsl:text>
9082
+ <xsl:value-of select="local-name()"/>
9083
+ <xsl:text>&gt;</xsl:text>
9084
+ </fo:block>
9085
+ </xsl:if>
7805
9086
  </xsl:template></xsl:stylesheet>