metanorma-itu 2.8.9 → 2.8.12

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c79cddef8a6aef9e8d667048e0dd426441c2dc129c0f21c69525239a48144ce1
4
- data.tar.gz: 755506724bd48e5a84cfd1208bc942d4ba4dad8cae6d44f1a014338320e4bc4b
3
+ metadata.gz: 9f55df171f32b8aa5c0e6712c2eaf872a5798004f9fec44289f5620eb5944bfa
4
+ data.tar.gz: e06cf021857a55ff7596cab2222a84571e8e9458487043dc9f8ad5edaf0654ad
5
5
  SHA512:
6
- metadata.gz: 34f34dce2494bce28d4849f8b2bacf5b1045834d9ea766cd34e9cf1dbf2e46ec09412e1c6170598652206e138ac6a771f54cc1c87e5689e961a8ba75cff3cbb1
7
- data.tar.gz: 5a83fa8c083ce8c66ef29131d414c2b0d48edaa5ead51543cdcfae92686a4c14d365eeaeb9607449a7875ca5df4d0071420f72a212028cef86dc867703ca6538
6
+ metadata.gz: 4fae0e7fc149b3bb469be04cea54ce61d89da0ffcf2314764505392340f934a386b55a23b681a11143589a10ad4252c9469414e74d7b3dffd79b463b76488b3b
7
+ data.tar.gz: 6ebc95406a8a9b70cf268427065468641463fd6f45eecb1ff216fb85d1da046f89b4f9a7b13ffe7a64adc6969cae0c47ed861fd25a2bb4f04b769369c907ef51
data/.rubocop.yml CHANGED
@@ -3,8 +3,20 @@
3
3
  inherit_from:
4
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
5
 
6
+ # Rubocop plugins enabled centrally so every metanorma-org gem picks them up
7
+ # on cimas sync — best practice belongs at the shared-template layer, not
8
+ # per-repo. Per ronaldtse feedback on metanorma/ci#332.
9
+ plugins:
10
+ - rubocop-rspec
11
+ - rubocop-performance
12
+ - rubocop-rake
13
+
6
14
  # local repo-specific modifications
7
15
  # ...
8
16
 
9
17
  AllCops:
10
- TargetRubyVersion: 3.4
18
+ # 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum
19
+ # Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before
20
+ # this commit — 3.4 was above the org's stated minimum and would have
21
+ # applied Rubocop rules that fail-close on gems still targeting 3.3.
22
+ TargetRubyVersion: 3.3
@@ -792,7 +792,9 @@ nav #toc {
792
792
  background-color: #da1d52;
793
793
  color: white !important;
794
794
  cursor: pointer;
795
- z-index: 100;
795
+ left: 0;
796
+ top: 0;
797
+ z-index: 103;
796
798
  }
797
799
  #toggle span {
798
800
  text-align: center;
@@ -881,7 +883,7 @@ figure {
881
883
  font-size: {{monospacefontsize}};
882
884
  }
883
885
 
884
- table figure {
886
+ table figure, figure pre {
885
887
  padding: 0;
886
888
  margin: 0;
887
889
  }
@@ -158,7 +158,7 @@ figure {
158
158
  font-size: $monospacefontsize;
159
159
  }
160
160
 
161
- table figure {
161
+ table figure, figure pre {
162
162
  padding: 0;
163
163
  margin: 0;
164
164
  }
@@ -1948,6 +1948,19 @@
1948
1948
  <xsl:call-template name="insertListOf_Item"/>
1949
1949
  </xsl:for-each>
1950
1950
 
1951
+ <!-- List of Examples -->
1952
+ <xsl:for-each select="$contents//mnx:examples/mnx:example">
1953
+ <xsl:if test="position() = 1">
1954
+ <xsl:call-template name="insertListOf_Title">
1955
+ <xsl:with-param name="title" select="$title-list-examples"/>
1956
+ </xsl:call-template>
1957
+ <fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
1958
+ <xsl:value-of select="$i18n_page"/>
1959
+ </fo:block>
1960
+ </xsl:if>
1961
+ <xsl:call-template name="insertListOf_Item"/>
1962
+ </xsl:for-each>
1963
+
1951
1964
  </xsl:if>
1952
1965
  </fo:block>
1953
1966
  </fo:block-container>
@@ -1957,9 +1970,11 @@
1957
1970
 
1958
1971
  <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="4">
1959
1972
  <fo:block xsl:use-attribute-sets="toc-title-style">
1973
+ <xsl:call-template name="refine_toc-title-style"/>
1960
1974
  <xsl:apply-templates/>
1961
1975
  </fo:block>
1962
1976
  <fo:block xsl:use-attribute-sets="toc-title-page-style">
1977
+ <xsl:call-template name="refine_toc-title-page-style"/>
1963
1978
  <xsl:call-template name="getLocalizedString"><xsl:with-param name="key">Page.sg</xsl:with-param><xsl:with-param name="bibdata_updated" select="/*/mn:bibdata"/></xsl:call-template>
1964
1979
  </fo:block>
1965
1980
  </xsl:template>
@@ -3143,6 +3158,16 @@
3143
3158
  </xsl:if>
3144
3159
  </xsl:variable>
3145
3160
 
3161
+ <xsl:variable name="title-list-examples">
3162
+ <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
3163
+ <xsl:value-of select="$toc_example_title"/>
3164
+ <xsl:if test="normalize-space($toc_example_title) = ''">
3165
+ <xsl:call-template name="getLocalizedString">
3166
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
3167
+ </xsl:call-template>
3168
+ </xsl:if>
3169
+ </xsl:variable>
3170
+
3146
3171
  <xsl:variable name="title-list-recommendations">
3147
3172
  <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
3148
3173
  <xsl:value-of select="$toc_requirement_title"/>
@@ -4054,6 +4079,14 @@
4054
4079
 
4055
4080
  <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
4056
4081
 
4082
+ <xsl:template match="mn:pagebreak" mode="update_xml_step1">
4083
+ <xsl:copy>
4084
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
4085
+ <xsl:attribute name="from_source_xml">true</xsl:attribute>
4086
+ <xsl:apply-templates select="node()" mode="update_xml_step1"/>
4087
+ </xsl:copy>
4088
+ </xsl:template>
4089
+
4057
4090
  <!-- END: update new Presentation XML -->
4058
4091
 
4059
4092
  <!-- =========================================================================== -->
@@ -4091,6 +4124,7 @@
4091
4124
  <xsl:for-each select="ancestor-or-self::*[ancestor::mn:preface or ancestor::mn:sections or ancestor-or-self::mn:annex]">
4092
4125
  <xsl:if test="following-sibling::*">false</xsl:if>
4093
4126
  </xsl:for-each>
4127
+ <xsl:if test="@from_source_xml = 'true'">false</xsl:if>
4094
4128
  </xsl:variable>
4095
4129
 
4096
4130
  <xsl:if test="contains($isLast, 'false')">
@@ -5015,6 +5049,7 @@
5015
5049
  </xsl:attribute-set> <!-- sourcecode-style -->
5016
5050
 
5017
5051
  <xsl:template name="refine_sourcecode-style">
5052
+ <xsl:call-template name="setKeepAttributes"/>
5018
5053
  </xsl:template> <!-- refine_sourcecode-style -->
5019
5054
 
5020
5055
  <xsl:attribute-set name="sourcecode-number-style">
@@ -5759,10 +5794,38 @@
5759
5794
  <xsl:template name="refine_strike-style">
5760
5795
  </xsl:template>
5761
5796
 
5797
+ <xsl:attribute-set name="hr-block-style">
5798
+ <xsl:attribute name="font-size">1pt</xsl:attribute>
5799
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5800
+ <xsl:attribute name="role">SKIP</xsl:attribute>
5801
+ <xsl:attribute name="padding-top">-2pt</xsl:attribute>
5802
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
5803
+ </xsl:attribute-set>
5804
+
5805
+ <xsl:template name="refine_hr-block-style">
5806
+ </xsl:template>
5807
+
5808
+ <xsl:attribute-set name="hr-style">
5809
+ <xsl:attribute name="leader-pattern">rule</xsl:attribute>
5810
+ <xsl:attribute name="leader-length">100%</xsl:attribute>
5811
+ </xsl:attribute-set>
5812
+
5813
+ <xsl:template name="refine_hr-style">
5814
+ </xsl:template>
5815
+
5762
5816
  <xsl:template match="mn:br">
5763
5817
  <xsl:value-of select="$linebreak"/>
5764
5818
  </xsl:template>
5765
5819
 
5820
+ <xsl:template match="mn:hr">
5821
+ <fo:block xsl:use-attribute-sets="hr-block-style">
5822
+ <xsl:call-template name="refine_hr-block-style"/>
5823
+ <fo:leader xsl:use-attribute-sets="hr-style">
5824
+ <xsl:call-template name="refine_hr-style"/>
5825
+ </fo:leader>
5826
+ </fo:block>
5827
+ </xsl:template>
5828
+
5766
5829
  <xsl:template match="mn:em">
5767
5830
  <fo:inline xsl:use-attribute-sets="em-style">
5768
5831
  <xsl:call-template name="refine_em_style"/>
@@ -7000,6 +7063,7 @@
7000
7063
  text line 1
7001
7064
  text line 2
7002
7065
  -->
7066
+ <xsl:variable name="example_display_in"><!-- don't change here, only for override xsl --></xsl:variable> <!-- block or inline -->
7003
7067
  <xsl:template match="mn:example" name="example">
7004
7068
  <xsl:call-template name="setNamedDestination"/>
7005
7069
  <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
@@ -7009,7 +7073,8 @@
7009
7073
  <xsl:call-template name="refine_example-style"/>
7010
7074
 
7011
7075
  <xsl:variable name="fo_element">
7012
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
7076
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
7077
+ <xsl:if test="normalize-space($example_display_in) != ''"><xsl:value-of select="$example_display_in"/></xsl:if>block
7013
7078
  </xsl:variable>
7014
7079
 
7015
7080
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -8613,6 +8678,12 @@
8613
8678
  <style name="{$key}-left"><xsl:value-of select="$value"/></style>
8614
8679
  <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
8615
8680
  </xsl:if>
8681
+ <xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
8682
+ <style name="keep-together.within-page">always</style>
8683
+ </xsl:if>
8684
+ <xsl:if test="$key = 'page-break-after' and $value = 'always'">
8685
+ <style name="break-after">page</style>
8686
+ </xsl:if>
8616
8687
  </xsl:for-each>
8617
8688
  </xsl:variable>
8618
8689
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
@@ -8656,6 +8727,11 @@
8656
8727
 
8657
8728
  <fo:block role="SKIP">
8658
8729
 
8730
+ <xsl:variable name="styles">
8731
+ <styles><xsl:call-template name="setTableStyles"/></styles>
8732
+ </xsl:variable>
8733
+ <xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
8734
+
8659
8735
  <xsl:if test="$isGenerateTableIF = 'true'">
8660
8736
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
8661
8737
  </xsl:if>
@@ -10849,10 +10925,26 @@
10849
10925
  <!-- ====== -->
10850
10926
  <!-- ====== -->
10851
10927
 
10852
- <xsl:attribute-set name="quote-style">
10928
+ <xsl:attribute-set name="quote-container-style">
10853
10929
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
10854
10930
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
10931
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10932
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
10933
+ </xsl:attribute-set>
10934
+
10935
+ <xsl:template name="refine_quote-container-style">
10936
+ <xsl:if test="parent::mn:note">
10937
+ <xsl:if test="not(ancestor::mn:table)">
10938
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
10939
+ </xsl:if>
10940
+ </xsl:if>
10941
+ </xsl:template>
10942
+
10943
+ <xsl:attribute-set name="quote-style">
10944
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
10945
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
10855
10946
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
10947
+
10856
10948
  </xsl:attribute-set> <!-- quote-style -->
10857
10949
 
10858
10950
  <xsl:template name="refine_quote-style">
@@ -10860,6 +10952,7 @@
10860
10952
 
10861
10953
  <xsl:attribute-set name="quote-source-style">
10862
10954
  <xsl:attribute name="text-align">right</xsl:attribute>
10955
+ <xsl:attribute name="margin-right">-12mm</xsl:attribute>
10863
10956
  </xsl:attribute-set> <!-- quote-source-style -->
10864
10957
 
10865
10958
  <xsl:template name="refine_quote-source-style">
@@ -10882,12 +10975,9 @@
10882
10975
 
10883
10976
  <xsl:call-template name="setBlockSpanAll"/>
10884
10977
 
10885
- <xsl:if test="parent::mn:note">
10886
- <xsl:if test="not(ancestor::mn:table)">
10887
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
10888
- </xsl:if>
10889
- </xsl:if>
10890
- <fo:block-container margin-left="0mm" role="SKIP">
10978
+ <fo:block-container xsl:use-attribute-sets="quote-container-style">
10979
+ <xsl:call-template name="refine_quote-container-style"/>
10980
+
10891
10981
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
10892
10982
 
10893
10983
  <xsl:call-template name="refine_quote-style"/>
@@ -10899,14 +10989,16 @@
10899
10989
  </fo:block-container>
10900
10990
  </fo:block-container>
10901
10991
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
10902
- <fo:block xsl:use-attribute-sets="quote-source-style">
10903
- <xsl:call-template name="refine_quote-source-style"/>
10904
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
10905
- <xsl:apply-templates select="mn:author"/>
10906
- <xsl:apply-templates select="mn:fmt-source"/>
10907
- <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
10908
- <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
10909
- </fo:block>
10992
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10993
+ <fo:block xsl:use-attribute-sets="quote-source-style">
10994
+ <xsl:call-template name="refine_quote-source-style"/>
10995
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
10996
+ <xsl:apply-templates select="mn:author"/>
10997
+ <xsl:apply-templates select="mn:fmt-source"/>
10998
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
10999
+ <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
11000
+ </fo:block>
11001
+ </fo:block-container>
10910
11002
  </xsl:if>
10911
11003
 
10912
11004
  </fo:block-container>
@@ -14475,7 +14567,7 @@
14475
14567
  <xsl:template name="refine_toc-pagenumber-style">
14476
14568
  </xsl:template>
14477
14569
 
14478
- <!-- List of Figures, Tables -->
14570
+ <!-- List of Figures, Tables, Examples -->
14479
14571
  <xsl:attribute-set name="toc-listof-title-style">
14480
14572
  <xsl:attribute name="space-before">36pt</xsl:attribute>
14481
14573
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -14579,6 +14671,9 @@
14579
14671
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
14580
14672
  <xsl:call-template name="processFigures_Contents"/>
14581
14673
  </xsl:if>
14674
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
14675
+ <xsl:call-template name="processExamples_Contents"/>
14676
+ </xsl:if>
14582
14677
  </xsl:template>
14583
14678
 
14584
14679
  <xsl:template name="processTables_Contents">
@@ -14625,7 +14720,29 @@
14625
14720
  </mnx:figures>
14626
14721
  </xsl:template>
14627
14722
 
14628
- <xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name" mode="contents">
14723
+ <xsl:template name="processExamples_Contents">
14724
+ <mnx:examples>
14725
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
14726
+ <xsl:choose>
14727
+ <xsl:when test="mn:fmt-name">
14728
+ <xsl:variable name="fmt_name">
14729
+ <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
14730
+ </xsl:variable>
14731
+ <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
14732
+ <xsl:copy-of select="$fmt_name"/>
14733
+ </mnx:example>
14734
+ </xsl:when>
14735
+ <xsl:otherwise>
14736
+ <mnx:example id="{@id}" alt-text="{mn:name}">
14737
+ <xsl:copy-of select="mn:name"/>
14738
+ </mnx:example>
14739
+ </xsl:otherwise>
14740
+ </xsl:choose>
14741
+ </xsl:for-each>
14742
+ </mnx:examples>
14743
+ </xsl:template>
14744
+
14745
+ <xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:example/mn:name | mnx:example/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name" mode="contents">
14629
14746
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
14630
14747
  <xsl:apply-templates mode="contents"/>
14631
14748
  <xsl:text> </xsl:text>
@@ -14634,40 +14751,40 @@
14634
14751
 
14635
14752
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
14636
14753
 
14637
- <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
14754
+ <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:example/mn:fmt-name | mnx:example/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
14638
14755
  <xsl:apply-templates mode="contents"/>
14639
14756
  <xsl:text> </xsl:text>
14640
14757
  </xsl:template>
14641
14758
 
14642
- <xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name | mn:sourcecode/mn:name" mode="bookmarks">
14759
+ <xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:example/mn:name | mnx:example/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name | mn:sourcecode/mn:name" mode="bookmarks">
14643
14760
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
14644
14761
  <xsl:apply-templates mode="bookmarks"/>
14645
14762
  <xsl:text> </xsl:text>
14646
14763
  </xsl:if>
14647
14764
  </xsl:template>
14648
14765
 
14649
- <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
14766
+ <xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:example/mn:fmt-name | mnx:example/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
14650
14767
  <xsl:apply-templates mode="bookmarks"/>
14651
14768
  <xsl:text> </xsl:text>
14652
14769
  </xsl:template>
14653
14770
 
14654
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:name/text()" mode="contents" priority="2">
14771
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:name/text()" mode="contents" priority="2">
14655
14772
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
14656
14773
  <xsl:value-of select="."/>
14657
14774
  </xsl:if>
14658
14775
  </xsl:template>
14659
14776
 
14660
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
14777
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
14661
14778
  <xsl:value-of select="."/>
14662
14779
  </xsl:template>
14663
14780
 
14664
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:name//text()" mode="bookmarks" priority="2">
14781
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:name//text()" mode="bookmarks" priority="2">
14665
14782
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
14666
14783
  <xsl:value-of select="."/>
14667
14784
  </xsl:if>
14668
14785
  </xsl:template>
14669
14786
 
14670
- <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
14787
+ <xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
14671
14788
  <xsl:value-of select="."/>
14672
14789
  </xsl:template>
14673
14790
 
@@ -14900,6 +15017,11 @@
14900
15017
  <xsl:with-param name="lang" select="@lang"/>
14901
15018
  </xsl:call-template>
14902
15019
 
15020
+ <xsl:call-template name="insertExampleBookmarks">
15021
+ <xsl:with-param name="contents" select="mnx:contents"/>
15022
+ <xsl:with-param name="lang" select="@lang"/>
15023
+ </xsl:call-template>
15024
+
14903
15025
  </fo:bookmark>
14904
15026
 
14905
15027
  </xsl:for-each>
@@ -14918,6 +15040,11 @@
14918
15040
  <xsl:with-param name="lang" select="@lang"/>
14919
15041
  </xsl:call-template>
14920
15042
 
15043
+ <xsl:call-template name="insertExampleBookmarks">
15044
+ <xsl:with-param name="contents" select="mnx:contents"/>
15045
+ <xsl:with-param name="lang" select="@lang"/>
15046
+ </xsl:call-template>
15047
+
14921
15048
  </xsl:for-each>
14922
15049
  </xsl:otherwise>
14923
15050
  </xsl:choose>
@@ -14934,6 +15061,11 @@
14934
15061
  <xsl:with-param name="lang" select="@lang"/>
14935
15062
  </xsl:call-template>
14936
15063
 
15064
+ <xsl:call-template name="insertExampleBookmarks">
15065
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15066
+ <xsl:with-param name="lang" select="@lang"/>
15067
+ </xsl:call-template>
15068
+
14937
15069
  </xsl:otherwise>
14938
15070
  </xsl:choose>
14939
15071
 
@@ -15014,6 +15146,46 @@
15014
15146
  </fo:bookmark>
15015
15147
  </xsl:if>
15016
15148
  </xsl:template> <!-- insertTableBookmarks -->
15149
+
15150
+ <xsl:template name="insertExampleBookmarks">
15151
+ <xsl:param name="contents"/>
15152
+ <xsl:param name="lang"/>
15153
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15154
+ <xsl:if test="$contents_nodes/mnx:example">
15155
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
15156
+ <fo:bookmark-title>
15157
+ <xsl:choose>
15158
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
15159
+ <xsl:otherwise>Examples</xsl:otherwise>
15160
+ </xsl:choose>
15161
+ </fo:bookmark-title>
15162
+ <xsl:for-each select="$contents_nodes/mnx:example">
15163
+ <fo:bookmark internal-destination="{@id}">
15164
+ <fo:bookmark-title>
15165
+ <xsl:value-of select="normalize-space(mnx:title)"/>
15166
+ </fo:bookmark-title>
15167
+ </fo:bookmark>
15168
+ </xsl:for-each>
15169
+ </fo:bookmark>
15170
+ </xsl:if>
15171
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
15172
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15173
+
15174
+ <xsl:variable name="bookmark-title">
15175
+ <xsl:value-of select="$title-list-examples"/>
15176
+ </xsl:variable>
15177
+
15178
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
15179
+
15180
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
15181
+ <fo:bookmark internal-destination="{@id}">
15182
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
15183
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
15184
+ </fo:bookmark>
15185
+ </xsl:for-each>
15186
+ </fo:bookmark>
15187
+ </xsl:if>
15188
+ </xsl:template> <!-- insertExampleBookmarks -->
15017
15189
  <!-- End Bookmarks -->
15018
15190
 
15019
15191
  <!-- ============================ -->
@@ -16064,6 +16236,10 @@
16064
16236
  <fo:block break-after="page"/>
16065
16237
  </xsl:template>
16066
16238
 
16239
+ <xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
16240
+ <fo:block break-after="page"/>
16241
+ </xsl:template>
16242
+
16067
16243
  <xsl:variable name="font_main_root_style">
16068
16244
  <root-style xsl:use-attribute-sets="root-style">
16069
16245
  </root-style>