metanorma-ogc 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,8 +9,6 @@
9
9
 
10
10
  <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
11
11
 
12
- <xsl:variable name="pageWidth" select="215.9"/>
13
- <xsl:variable name="pageHeight" select="279.4"/>
14
12
  <xsl:variable name="marginLeftRight1" select="25.4"/>
15
13
  <xsl:variable name="marginLeftRight2" select="25.4"/>
16
14
  <xsl:variable name="marginTop" select="25.4"/>
@@ -443,64 +441,21 @@
443
441
  <xsl:value-of select="."/><xsl:text> </xsl:text>
444
442
  </fo:block>
445
443
  </xsl:template>
444
+
446
445
 
447
- <xsl:template match="ogc:license-statement//ogc:title">
448
- <xsl:variable name="level">
449
- <xsl:call-template name="getLevel"/>
450
- </xsl:variable>
451
- <fo:block font-family="Lato" text-align="center" font-weight="bold" margin-top="4pt" role="H{$level}">
452
- <xsl:apply-templates/>
453
- </fo:block>
454
- </xsl:template>
455
-
456
- <xsl:template match="ogc:license-statement//ogc:p">
457
- <fo:block font-size="8pt" margin-top="14pt" line-height="115%">
458
- <xsl:if test="following-sibling::ogc:p">
459
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
460
- </xsl:if>
461
- <xsl:apply-templates/>
462
- </fo:block>
463
- </xsl:template>
464
-
465
- <xsl:template match="ogc:feedback-statement">
446
+ <xsl:template match="ogc:feedback-statement" priority="2">
466
447
  <fo:block margin-top="12pt" margin-bottom="12pt">
467
448
  <xsl:apply-templates select="ogc:clause[1]"/>
468
449
  </fo:block>
469
450
  </xsl:template>
470
451
 
471
- <xsl:template match="ogc:copyright-statement | ogc:legal-statement">
472
- <fo:block>
473
- <xsl:apply-templates/>
474
- </fo:block>
475
- </xsl:template>
476
452
 
477
453
  <xsl:template match="ogc:copyright-statement//ogc:clause | ogc:legal-statement//ogc:clause" priority="2">
478
454
  <fo:block margin-top="6pt">
479
455
  <xsl:apply-templates/>
480
456
  </fo:block>
481
457
  </xsl:template>
482
-
483
- <xsl:template match="ogc:copyright-statement//ogc:title | ogc:legal-statement//ogc:title">
484
- <xsl:variable name="level">
485
- <xsl:call-template name="getLevel"/>
486
- </xsl:variable>
487
- <fo:block font-family="Lato" text-align="center" font-weight="bold" role="H{$level}">
488
- <xsl:apply-templates/>
489
- </fo:block>
490
- </xsl:template>
491
458
 
492
- <xsl:template match="ogc:copyright-statement//ogc:p | ogc:legal-statement//ogc:p">
493
- <fo:block>
494
- <xsl:attribute name="text-align">
495
- <xsl:choose>
496
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
497
- <xsl:otherwise>left</xsl:otherwise>
498
- </xsl:choose>
499
- </xsl:attribute>
500
- <xsl:apply-templates/>
501
- </fo:block>
502
- </xsl:template>
503
-
504
459
 
505
460
  <xsl:template match="/*/*[local-name() = 'preface']/*" priority="3">
506
461
  <fo:block>
@@ -596,7 +551,7 @@
596
551
  <!-- ====== -->
597
552
  <!-- ====== -->
598
553
 
599
- <xsl:template match="ogc:p">
554
+ <xsl:template match="ogc:p" name="paragraph">
600
555
  <xsl:param name="inline" select="'false'"/>
601
556
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
602
557
  <xsl:variable name="element-name">
@@ -769,13 +724,6 @@
769
724
 
770
725
 
771
726
 
772
- <xsl:template match="ogc:pagebreak">
773
- <fo:block break-after="page"/>
774
- <fo:block> </fo:block>
775
- <fo:block break-after="page"/>
776
- </xsl:template>
777
-
778
-
779
727
  <xsl:template name="insertHeaderFooter">
780
728
 
781
729
  <fo:static-content flow-name="xsl-footnote-separator">
@@ -848,7 +796,11 @@
848
796
  </xsl:choose>
849
797
  </xsl:template>
850
798
 
851
- <xsl:variable name="titles_">
799
+ <xsl:variable name="pageWidth_">
800
+ 215.9
801
+ </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
802
+ 279.4
803
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
852
804
 
853
805
  <title-edition lang="en">
854
806
 
@@ -953,6 +905,75 @@
953
905
 
954
906
 
955
907
 
908
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
909
+
910
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
911
+
912
+
913
+ <xsl:attribute name="font-family">Lato</xsl:attribute>
914
+ <xsl:attribute name="text-align">center</xsl:attribute>
915
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
916
+
917
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
918
+
919
+
920
+
921
+ <xsl:attribute name="text-align">left</xsl:attribute>
922
+
923
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-style">
924
+
925
+
926
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
927
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
928
+
929
+
930
+
931
+
932
+
933
+
934
+ <xsl:attribute name="font-family">Lato</xsl:attribute>
935
+ <xsl:attribute name="text-align">center</xsl:attribute>
936
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
937
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
938
+
939
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
940
+
941
+
942
+
943
+
944
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
945
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
946
+ <xsl:attribute name="line-height">135%</xsl:attribute>
947
+
948
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
949
+
950
+
951
+
952
+
953
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
954
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
955
+
956
+
957
+
958
+
959
+ <xsl:attribute name="font-family">Lato</xsl:attribute>
960
+ <xsl:attribute name="text-align">center</xsl:attribute>
961
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
962
+
963
+
964
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
965
+
966
+ <xsl:attribute name="text-align">left</xsl:attribute>
967
+
968
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
969
+
970
+
971
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
972
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
973
+
974
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
975
+
976
+
956
977
  </xsl:attribute-set><xsl:attribute-set name="link-style">
957
978
 
958
979
 
@@ -1870,6 +1891,7 @@
1870
1891
  </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
1871
1892
 
1872
1893
 
1894
+
1873
1895
  </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
1874
1896
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
1875
1897
  <xsl:attribute name="font-size">65%</xsl:attribute>
@@ -1979,6 +2001,109 @@
1979
2001
  <xsl:value-of select="."/>
1980
2002
  </xsl:template><xsl:template match="*[local-name()='br']">
1981
2003
  <xsl:value-of select="$linebreak"/>
2004
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
2005
+ <fo:block xsl:use-attribute-sets="copyright-statement-style">
2006
+ <xsl:apply-templates/>
2007
+ </fo:block>
2008
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
2009
+
2010
+ <xsl:variable name="level">
2011
+ <xsl:call-template name="getLevel"/>
2012
+ </xsl:variable>
2013
+ <fo:block role="H{$level}" xsl:use-attribute-sets="copyright-statement-title-style">
2014
+ <xsl:apply-templates/>
2015
+ </fo:block>
2016
+
2017
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
2018
+
2019
+
2020
+ <fo:block xsl:use-attribute-sets="copyright-statement-p-style">
2021
+
2022
+
2023
+
2024
+
2025
+ <xsl:if test="@align">
2026
+ <xsl:attribute name="text-align">
2027
+ <xsl:value-of select="@align"/>
2028
+ </xsl:attribute>
2029
+ </xsl:if>
2030
+
2031
+
2032
+ <xsl:apply-templates/>
2033
+ </fo:block>
2034
+
2035
+
2036
+ </xsl:template><xsl:template match="*[local-name()='license-statement']">
2037
+ <fo:block xsl:use-attribute-sets="license-statement-style">
2038
+ <xsl:apply-templates/>
2039
+ </fo:block>
2040
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
2041
+
2042
+ <xsl:variable name="level">
2043
+ <xsl:call-template name="getLevel"/>
2044
+ </xsl:variable>
2045
+ <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
2046
+ <xsl:apply-templates/>
2047
+ </fo:block>
2048
+
2049
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
2050
+
2051
+ <fo:block xsl:use-attribute-sets="license-statement-p-style">
2052
+
2053
+
2054
+
2055
+
2056
+ <xsl:if test="following-sibling::*[local-name() = 'p']">
2057
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
2058
+ </xsl:if>
2059
+
2060
+
2061
+ <xsl:apply-templates/>
2062
+ </fo:block>
2063
+
2064
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']">
2065
+ <fo:block xsl:use-attribute-sets="legal-statement-style">
2066
+ <xsl:apply-templates/>
2067
+ </fo:block>
2068
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
2069
+
2070
+ <!-- ogc-white-paper rsd -->
2071
+ <xsl:variable name="level">
2072
+ <xsl:call-template name="getLevel"/>
2073
+ </xsl:variable>
2074
+ <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
2075
+ <xsl:apply-templates/>
2076
+ </fo:block>
2077
+
2078
+
2079
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
2080
+
2081
+ <!-- csa -->
2082
+ <fo:block xsl:use-attribute-sets="legal-statement-p-style">
2083
+
2084
+ <xsl:if test="@align">
2085
+ <xsl:attribute name="text-align">
2086
+ <xsl:value-of select="@align"/>
2087
+ </xsl:attribute>
2088
+ </xsl:if>
2089
+
2090
+ <xsl:apply-templates/>
2091
+ </fo:block>
2092
+
2093
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']">
2094
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
2095
+ <xsl:apply-templates/>
2096
+ </fo:block>
2097
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
2098
+
2099
+ <!-- process in the template 'title' -->
2100
+ <xsl:call-template name="title"/>
2101
+
2102
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
2103
+
2104
+ <!-- process in the template 'paragraph' -->
2105
+ <xsl:call-template name="paragraph"/>
2106
+
1982
2107
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1983
2108
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1984
2109
  <xsl:call-template name="add-zero-spaces-java"/>
@@ -2120,7 +2245,7 @@
2120
2245
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2121
2246
  </xsl:when>
2122
2247
  <xsl:otherwise>
2123
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2248
+ <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 -->
2124
2249
  </xsl:otherwise>
2125
2250
  </xsl:choose>
2126
2251
 
@@ -2336,7 +2461,7 @@
2336
2461
 
2337
2462
  <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
2338
2463
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2339
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2464
+ </xsl:template><xsl:template match="*[local-name()='thead']">
2340
2465
  <xsl:param name="cols-count"/>
2341
2466
  <fo:table-header>
2342
2467
 
@@ -2361,13 +2486,13 @@
2361
2486
  <fo:table-body>
2362
2487
  <xsl:apply-templates/>
2363
2488
  </fo:table-body>
2364
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2489
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
2365
2490
  <xsl:apply-templates/>
2366
2491
  </xsl:template><xsl:template name="insertTableFooter">
2367
2492
  <xsl:param name="cols-count"/>
2368
2493
  <xsl:if test="../*[local-name()='tfoot']">
2369
2494
  <fo:table-footer>
2370
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2495
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
2371
2496
  </fo:table-footer>
2372
2497
  </xsl:if>
2373
2498
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
@@ -2453,7 +2578,7 @@
2453
2578
 
2454
2579
  <!-- except gb and bsi -->
2455
2580
 
2456
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2581
+ <xsl:apply-templates select="../*[local-name()='note']"/>
2457
2582
 
2458
2583
 
2459
2584
 
@@ -2491,7 +2616,7 @@
2491
2616
 
2492
2617
 
2493
2618
 
2494
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
2619
+ <xsl:apply-templates select="../*[local-name()='thead']">
2495
2620
  <xsl:with-param name="cols-count" select="$cols-count"/>
2496
2621
  </xsl:apply-templates>
2497
2622
 
@@ -2633,7 +2758,7 @@
2633
2758
  <xsl:apply-templates/>
2634
2759
  </fo:block>
2635
2760
  </fo:table-cell>
2636
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
2761
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
2637
2762
 
2638
2763
  <fo:block xsl:use-attribute-sets="table-note-style">
2639
2764
 
@@ -2656,10 +2781,10 @@
2656
2781
 
2657
2782
 
2658
2783
 
2659
- <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
2784
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2660
2785
  </fo:block>
2661
2786
 
2662
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
2787
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
2663
2788
  <xsl:apply-templates/>
2664
2789
  </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
2665
2790
 
@@ -3199,7 +3324,9 @@
3199
3324
  </td>
3200
3325
  <td>
3201
3326
 
3202
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3327
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3328
+ <xsl:with-param name="process">true</xsl:with-param>
3329
+ </xsl:apply-templates>
3203
3330
 
3204
3331
  </td>
3205
3332
  </tr>
@@ -3226,15 +3353,20 @@
3226
3353
  <fo:block>
3227
3354
 
3228
3355
 
3229
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3356
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3357
+ <xsl:with-param name="process">true</xsl:with-param>
3358
+ </xsl:apply-templates>
3230
3359
  </fo:block>
3231
3360
  </fo:table-cell>
3232
3361
  </fo:table-row>
3233
3362
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3234
3363
  <xsl:apply-templates/>
3235
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
3236
- <xsl:apply-templates select="@language"/>
3237
- <xsl:apply-templates/>
3364
+ </xsl:template><xsl:template match="*[local-name()='dd']">
3365
+ <xsl:param name="process">false</xsl:param>
3366
+ <xsl:if test="$process = 'true'">
3367
+ <xsl:apply-templates select="@language"/>
3368
+ <xsl:apply-templates/>
3369
+ </xsl:if>
3238
3370
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3239
3371
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
3240
3372
  </xsl:template><xsl:template match="*[local-name()='em']">
@@ -3409,7 +3541,11 @@
3409
3541
  <xsl:with-param name="text" select="substring($text,2)"/>
3410
3542
  </xsl:call-template>
3411
3543
  </xsl:if>
3412
- </xsl:template><xsl:template name="tokenize">
3544
+ </xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
3545
+ <fo:block break-after="page"/>
3546
+ <fo:block> </fo:block>
3547
+ <fo:block break-after="page"/>
3548
+ </xsl:template><xsl:template name="tokenize">
3413
3549
  <xsl:param name="text"/>
3414
3550
  <xsl:param name="separator" select="' '"/>
3415
3551
  <xsl:choose>
@@ -3841,10 +3977,10 @@
3841
3977
  </fo:inline>
3842
3978
  </xsl:template><xsl:template match="*[local-name()='appendix']">
3843
3979
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
3844
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
3980
+ <xsl:apply-templates select="*[local-name()='title']"/>
3845
3981
  </fo:block>
3846
- <xsl:apply-templates/>
3847
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
3982
+ <xsl:apply-templates select="node()[not(local-name()='title')]"/>
3983
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
3848
3984
  <xsl:variable name="level">
3849
3985
  <xsl:call-template name="getLevel"/>
3850
3986
  </xsl:variable>
@@ -4468,7 +4604,7 @@
4468
4604
  <xsl:value-of select="."/>
4469
4605
  </xsl:template><xsl:template match="node()" mode="contents">
4470
4606
  <xsl:apply-templates mode="contents"/>
4471
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
4607
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4472
4608
  <xsl:variable name="level">
4473
4609
  <xsl:call-template name="getLevel">
4474
4610
  <xsl:with-param name="depth" select="@depth"/>
@@ -4476,10 +4612,15 @@
4476
4612
  </xsl:variable>
4477
4613
 
4478
4614
  <xsl:variable name="section">
4479
- <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4615
+ <xsl:choose>
4616
+ <xsl:when test="@type = 'section-title'"/>
4617
+ <xsl:otherwise>
4618
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4619
+ </xsl:otherwise>
4620
+ </xsl:choose>
4480
4621
  </xsl:variable>
4481
4622
 
4482
- <xsl:variable name="type">floating-title</xsl:variable>
4623
+ <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
4483
4624
 
4484
4625
  <xsl:variable name="display">
4485
4626
  <xsl:choose>
@@ -4496,7 +4637,16 @@
4496
4637
  <xsl:variable name="title">
4497
4638
  <xsl:choose>
4498
4639
  <xsl:when test="*[local-name() = 'tab']">
4499
- <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4640
+ <xsl:choose>
4641
+ <xsl:when test="@type = 'section-title'">
4642
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4643
+ <xsl:text>: </xsl:text>
4644
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4645
+ </xsl:when>
4646
+ <xsl:otherwise>
4647
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
4648
+ </xsl:otherwise>
4649
+ </xsl:choose>
4500
4650
  </xsl:when>
4501
4651
  <xsl:otherwise>
4502
4652
  <xsl:copy-of select="node()"/>
@@ -6235,7 +6385,7 @@
6235
6385
  </fo:inline>
6236
6386
  </xsl:template><xsl:template match="@language">
6237
6387
  <xsl:copy-of select="."/>
6238
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
6388
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
6239
6389
  <xsl:call-template name="title"/>
6240
6390
  </xsl:template><xsl:template match="*[local-name() = 'admonition']">
6241
6391
 
@@ -6300,27 +6450,17 @@
6300
6450
  <xsl:variable name="month" select="substring($date, 6, 2)"/>
6301
6451
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
6302
6452
  <xsl:variable name="monthStr">
6303
- <xsl:choose>
6304
- <xsl:when test="$month = '01'">january</xsl:when>
6305
- <xsl:when test="$month = '02'">february</xsl:when>
6306
- <xsl:when test="$month = '03'">march</xsl:when>
6307
- <xsl:when test="$month = '04'">april</xsl:when>
6308
- <xsl:when test="$month = '05'">may</xsl:when>
6309
- <xsl:when test="$month = '06'">june</xsl:when>
6310
- <xsl:when test="$month = '07'">july</xsl:when>
6311
- <xsl:when test="$month = '08'">august</xsl:when>
6312
- <xsl:when test="$month = '09'">september</xsl:when>
6313
- <xsl:when test="$month = '10'">october</xsl:when>
6314
- <xsl:when test="$month = '11'">november</xsl:when>
6315
- <xsl:when test="$month = '12'">december</xsl:when>
6316
- </xsl:choose>
6453
+ <xsl:call-template name="getMonthByNum">
6454
+ <xsl:with-param name="num" select="$month"/>
6455
+ <xsl:with-param name="lowercase" select="'true'"/>
6456
+ </xsl:call-template>
6317
6457
  </xsl:variable>
6318
6458
  <xsl:variable name="monthStr_localized">
6319
6459
  <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
6320
6460
  </xsl:variable>
6321
6461
  <xsl:variable name="result">
6322
6462
  <xsl:choose>
6323
- <xsl:when test="$format = 'ddMMyyyy'">
6463
+ <xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
6324
6464
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6325
6465
  <xsl:text> </xsl:text>
6326
6466
  <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
@@ -6333,11 +6473,57 @@
6333
6473
  <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
6334
6474
  </xsl:when>
6335
6475
  <xsl:otherwise>
6336
- <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
6476
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
6337
6477
  </xsl:otherwise>
6338
6478
  </xsl:choose>
6339
6479
  </xsl:variable>
6340
6480
  <xsl:value-of select="$result"/>
6481
+ </xsl:template><xsl:template name="getMonthByNum">
6482
+ <xsl:param name="num"/>
6483
+ <xsl:param name="lang">en</xsl:param>
6484
+ <xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
6485
+ <xsl:variable name="monthStr_">
6486
+ <xsl:choose>
6487
+ <xsl:when test="$lang = 'fr'">
6488
+ <xsl:choose>
6489
+ <xsl:when test="$num = '01'">Janvier</xsl:when>
6490
+ <xsl:when test="$num = '02'">Février</xsl:when>
6491
+ <xsl:when test="$num = '03'">Mars</xsl:when>
6492
+ <xsl:when test="$num = '04'">Avril</xsl:when>
6493
+ <xsl:when test="$num = '05'">Mai</xsl:when>
6494
+ <xsl:when test="$num = '06'">Juin</xsl:when>
6495
+ <xsl:when test="$num = '07'">Juillet</xsl:when>
6496
+ <xsl:when test="$num = '08'">Août</xsl:when>
6497
+ <xsl:when test="$num = '09'">Septembre</xsl:when>
6498
+ <xsl:when test="$num = '10'">Octobre</xsl:when>
6499
+ <xsl:when test="$num = '11'">Novembre</xsl:when>
6500
+ <xsl:when test="$num = '12'">Décembre</xsl:when>
6501
+ </xsl:choose>
6502
+ </xsl:when>
6503
+ <xsl:otherwise>
6504
+ <xsl:choose>
6505
+ <xsl:when test="$num = '01'">January</xsl:when>
6506
+ <xsl:when test="$num = '02'">February</xsl:when>
6507
+ <xsl:when test="$num = '03'">March</xsl:when>
6508
+ <xsl:when test="$num = '04'">April</xsl:when>
6509
+ <xsl:when test="$num = '05'">May</xsl:when>
6510
+ <xsl:when test="$num = '06'">June</xsl:when>
6511
+ <xsl:when test="$num = '07'">July</xsl:when>
6512
+ <xsl:when test="$num = '08'">August</xsl:when>
6513
+ <xsl:when test="$num = '09'">September</xsl:when>
6514
+ <xsl:when test="$num = '10'">October</xsl:when>
6515
+ <xsl:when test="$num = '11'">November</xsl:when>
6516
+ <xsl:when test="$num = '12'">December</xsl:when>
6517
+ </xsl:choose>
6518
+ </xsl:otherwise>
6519
+ </xsl:choose>
6520
+ </xsl:variable>
6521
+ <xsl:choose>
6522
+ <xsl:when test="normalize-space($lowercase) = 'true'">
6523
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
6524
+ </xsl:when>
6525
+ <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
6526
+ </xsl:choose>
6341
6527
  </xsl:template><xsl:template name="insertKeywords">
6342
6528
  <xsl:param name="sorting" select="'true'"/>
6343
6529
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -6798,6 +6984,25 @@
6798
6984
  </xsl:otherwise>
6799
6985
  </xsl:choose>
6800
6986
  </xsl:if>
6987
+ </xsl:template><xsl:template name="number-to-ordinal">
6988
+ <xsl:param name="number"/>
6989
+ <xsl:param name="curr_lang"/>
6990
+ <xsl:choose>
6991
+ <xsl:when test="$curr_lang = 'fr'">
6992
+ <xsl:choose>
6993
+ <xsl:when test="$number = '1'">re</xsl:when>
6994
+ <xsl:otherwise>e</xsl:otherwise>
6995
+ </xsl:choose>
6996
+ </xsl:when>
6997
+ <xsl:otherwise>
6998
+ <xsl:choose>
6999
+ <xsl:when test="$number = 1">st</xsl:when>
7000
+ <xsl:when test="$number = 2">nd</xsl:when>
7001
+ <xsl:when test="$number = 3">rd</xsl:when>
7002
+ <xsl:otherwise>th</xsl:otherwise>
7003
+ </xsl:choose>
7004
+ </xsl:otherwise>
7005
+ </xsl:choose>
6801
7006
  </xsl:template><xsl:template name="setAltText">
6802
7007
  <xsl:param name="value"/>
6803
7008
  <xsl:attribute name="fox:alt-text">