metanorma-itu 2.8.12 → 2.8.13

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: 9f55df171f32b8aa5c0e6712c2eaf872a5798004f9fec44289f5620eb5944bfa
4
- data.tar.gz: e06cf021857a55ff7596cab2222a84571e8e9458487043dc9f8ad5edaf0654ad
3
+ metadata.gz: 6fd707fc482a2f5f2b4dae81b68195bad5b09976746382c3d6710694edb3db06
4
+ data.tar.gz: aedec4f45b3ff06442feafa42f37aeec1a450f0ff0f58fb3179534f9325b27eb
5
5
  SHA512:
6
- metadata.gz: 4fae0e7fc149b3bb469be04cea54ce61d89da0ffcf2314764505392340f934a386b55a23b681a11143589a10ad4252c9469414e74d7b3dffd79b463b76488b3b
7
- data.tar.gz: 6ebc95406a8a9b70cf268427065468641463fd6f45eecb1ff216fb85d1da046f89b4f9a7b13ffe7a64adc6969cae0c47ed861fd25a2bb4f04b769369c907ef51
6
+ metadata.gz: 64cc0674083166ed8fbb06e59f114258696e996ab0788b6e02c78869b3acf8a0fffd2aa1215899470264c24fd9d156cba2f60bab8221cec7a2d0be129f90254b
7
+ data.tar.gz: 120c1a6b72a5101accedc5abf29935d67c293664f9864c201f83fccd57d1aa9d4ab30b88f1e30f17b6c44366d90d6cd9fe5cce67768aefc7052ca3643eb51627
data/.rubocop.yml CHANGED
@@ -2,6 +2,15 @@
2
2
  # See https://github.com/metanorma/cimas
3
3
  inherit_from:
4
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
+ # .rubocop_todo.yml MUST be the last entry. inherit_from is last-wins:
6
+ # if listed before oss-guides, the shared config's stricter Metrics/
7
+ # (MethodLength, BlockLength, etc.) rules override the todo's per-file
8
+ # grandfathering, and the todo becomes inert on those cops. Empirically
9
+ # verified on suma 2026-07-06: with todo listed first, 34 Metrics/* offenses
10
+ # remained; moved last, cleared. Every gem in the metanorma-org fleet
11
+ # already ships a `.rubocop_todo.yml` on its live tree (audited 2026-07-06,
12
+ # 54/54 have it), so this reference is safe to emit unconditionally.
13
+ - .rubocop_todo.yml
5
14
 
6
15
  # Rubocop plugins enabled centrally so every metanorma-org gem picks them up
7
16
  # on cimas sync — best practice belongs at the shared-template layer, not
@@ -105,6 +105,14 @@ module IsoDoc
105
105
  n = dlist.at(ns("./colgroup")) and ret = "#{n.remove.to_xml}#{ret}"
106
106
  n = dlist.at(ns("./fmt-name")) and ret = "#{n.remove.to_xml}#{ret}"
107
107
  dlist.name = "table"
108
+ # GOTCHA (metanorma/iso-10303#712): ITU renders definition lists as
109
+ # tables, and this hard-sets class="dl", OVERWRITING any author custom
110
+ # @class ([class="..."]). So the block-@class support added in
111
+ # metanorma-standoc#1197 does NOT reach dl in ITU. Left as-is
112
+ # deliberately (class="dl" is the intentional dl-as-table marker); making
113
+ # it additive would re-enter the dl->table / MsoISOTable-border
114
+ # interaction. If an author class is ever wanted here, merge instead of
115
+ # overwrite: ["dl", dlist["class"]].compact.join(" ").
108
116
  dlist["class"] = "dl"
109
117
  dlist.children.first.previous = ret
110
118
  end
@@ -143,6 +143,11 @@ a.FootnoteRef, span.FootnoteRef {
143
143
  vertical-align: super;
144
144
  }
145
145
 
146
+ a.TableFootnoteRef, a.FootnoteRef, a.footnote-number,
147
+ sup a, a:has(> sup) {
148
+ vertical-align: baseline;
149
+ }
150
+
146
151
  .addition {
147
152
  color: blue;
148
153
  }
@@ -143,6 +143,11 @@ a.FootnoteRef, span.FootnoteRef {
143
143
  vertical-align: super;
144
144
  }
145
145
 
146
+ a.TableFootnoteRef, a.FootnoteRef, a.footnote-number,
147
+ sup a, a:has(> sup) {
148
+ vertical-align: baseline;
149
+ }
150
+
146
151
  .addition {
147
152
  color: blue;
148
153
  }
@@ -1845,7 +1845,11 @@
1845
1845
  <xsl:call-template name="setAltText">
1846
1846
  <xsl:with-param name="value" select="@alt-text"/>
1847
1847
  </xsl:call-template>
1848
- <xsl:apply-templates select="." mode="contents"/>
1848
+ <xsl:variable name="item">
1849
+ <!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
1850
+ <xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
1851
+ </xsl:variable>
1852
+ <xsl:apply-templates select="xalan:nodeset($item)/node()"/>
1849
1853
  <fo:inline keep-together.within-line="always">
1850
1854
  <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
1851
1855
  <fo:page-number-citation ref-id="{@id}"/>
@@ -1926,7 +1930,7 @@
1926
1930
  <xsl:for-each select="$contents//mnx:tables/mnx:table">
1927
1931
  <xsl:if test="position() = 1">
1928
1932
  <xsl:call-template name="insertListOf_Title">
1929
- <xsl:with-param name="title" select="$title-list-tables"/>
1933
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
1930
1934
  </xsl:call-template>
1931
1935
  <fo:block xsl:use-attribute-sets="toc-title-page-style">
1932
1936
  <xsl:value-of select="$i18n_page"/>
@@ -1939,7 +1943,7 @@
1939
1943
  <xsl:for-each select="$contents//mnx:figures/mnx:figure">
1940
1944
  <xsl:if test="position() = 1">
1941
1945
  <xsl:call-template name="insertListOf_Title">
1942
- <xsl:with-param name="title" select="$title-list-figures"/>
1946
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
1943
1947
  </xsl:call-template>
1944
1948
  <fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
1945
1949
  <xsl:value-of select="$i18n_page"/>
@@ -1952,7 +1956,7 @@
1952
1956
  <xsl:for-each select="$contents//mnx:examples/mnx:example">
1953
1957
  <xsl:if test="position() = 1">
1954
1958
  <xsl:call-template name="insertListOf_Title">
1955
- <xsl:with-param name="title" select="$title-list-examples"/>
1959
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
1956
1960
  </xsl:call-template>
1957
1961
  <fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
1958
1962
  <xsl:value-of select="$i18n_page"/>
@@ -3138,45 +3142,59 @@
3138
3142
 
3139
3143
  <xsl:variable name="ace_tag">ace-tag_</xsl:variable>
3140
3144
 
3141
- <xsl:variable name="title-list-tables">
3142
- <xsl:variable name="toc_table_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title"/>
3143
- <xsl:value-of select="$toc_table_title"/>
3144
- <xsl:if test="normalize-space($toc_table_title) = ''">
3145
- <xsl:call-template name="getLocalizedString">
3146
- <xsl:with-param name="key">toc_tables</xsl:with-param>
3147
- </xsl:call-template>
3148
- </xsl:if>
3149
- </xsl:variable>
3145
+ <xsl:variable name="toc_title_lists_">
3146
+ <xsl:for-each select="//mn:metanorma">
3147
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
3148
+ <xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
3149
+ <xsl:variable name="current_document">
3150
+ <xsl:copy-of select="."/>
3151
+ </xsl:variable>
3152
+ <xsl:for-each select="xalan:nodeset($current_document)">
3153
+ <mnx:doc id="{$docid}" num="{$num}">
3154
+ <mnx:title-list-tables>
3155
+ <xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
3156
+ <xsl:value-of select="$toc_table_title"/>
3157
+ <xsl:if test="normalize-space($toc_table_title) = ''">
3158
+ <xsl:call-template name="getLocalizedString">
3159
+ <xsl:with-param name="key">toc_tables</xsl:with-param>
3160
+ </xsl:call-template>
3161
+ </xsl:if>
3162
+ </mnx:title-list-tables>
3150
3163
 
3151
- <xsl:variable name="title-list-figures">
3152
- <xsl:variable name="toc_figure_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title"/>
3153
- <xsl:value-of select="$toc_figure_title"/>
3154
- <xsl:if test="normalize-space($toc_figure_title) = ''">
3155
- <xsl:call-template name="getLocalizedString">
3156
- <xsl:with-param name="key">toc_figures</xsl:with-param>
3157
- </xsl:call-template>
3158
- </xsl:if>
3159
- </xsl:variable>
3164
+ <mnx:title-list-figures>
3165
+ <xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
3166
+ <xsl:value-of select="$toc_figure_title"/>
3167
+ <xsl:if test="normalize-space($toc_figure_title) = ''">
3168
+ <xsl:call-template name="getLocalizedString">
3169
+ <xsl:with-param name="key">toc_figures</xsl:with-param>
3170
+ </xsl:call-template>
3171
+ </xsl:if>
3172
+ </mnx:title-list-figures>
3160
3173
 
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>
3174
+ <mnx:title-list-examples>
3175
+ <xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
3176
+ <xsl:value-of select="$toc_example_title"/>
3177
+ <xsl:if test="normalize-space($toc_example_title) = ''">
3178
+ <xsl:call-template name="getLocalizedString">
3179
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
3180
+ </xsl:call-template>
3181
+ </xsl:if>
3182
+ </mnx:title-list-examples>
3170
3183
 
3171
- <xsl:variable name="title-list-recommendations">
3172
- <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
3173
- <xsl:value-of select="$toc_requirement_title"/>
3174
- <xsl:if test="normalize-space($toc_requirement_title) = ''">
3175
- <xsl:call-template name="getLocalizedString">
3176
- <xsl:with-param name="key">toc_recommendations</xsl:with-param>
3177
- </xsl:call-template>
3178
- </xsl:if>
3184
+ <mnx:title-list-recommendations>
3185
+ <xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
3186
+ <xsl:value-of select="$toc_requirement_title"/>
3187
+ <xsl:if test="normalize-space($toc_requirement_title) = ''">
3188
+ <xsl:call-template name="getLocalizedString">
3189
+ <xsl:with-param name="key">toc_recommendations</xsl:with-param>
3190
+ </xsl:call-template>
3191
+ </xsl:if>
3192
+ </mnx:title-list-recommendations>
3193
+ </mnx:doc>
3194
+ </xsl:for-each>
3195
+ </xsl:for-each>
3179
3196
  </xsl:variable>
3197
+ <xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
3180
3198
 
3181
3199
  <xsl:variable name="bibdata">
3182
3200
  <xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
@@ -3999,7 +4017,7 @@
3999
4017
  <xsl:apply-templates mode="update_xml_step1"/>
4000
4018
  </xsl:template>
4001
4019
 
4002
- <xsl:template match="mn:semx" mode="update_xml_step1">
4020
+ <xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
4003
4021
  <xsl:apply-templates mode="update_xml_step1"/>
4004
4022
  </xsl:template>
4005
4023
 
@@ -4282,7 +4300,7 @@
4282
4300
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
4283
4301
  <xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
4284
4302
 
4285
- <xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() &gt; 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
4303
+ <xsl:template match="text()[not( (ancestor::mn:bibdata and not(ancestor::mn:title)) or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() &gt; 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or (ancestor::mn:fmt-name and not(ancestor::mn:semx[@element = 'name'])) or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
4286
4304
 
4287
4305
  <xsl:variable name="parent" select="local-name(..)"/>
4288
4306
 
@@ -4327,7 +4345,7 @@
4327
4345
  <xsl:variable name="text">
4328
4346
  <xsl:element name="text" namespace="{$namespace_full}">
4329
4347
  <xsl:choose>
4330
- <xsl:when test="ancestor::mn:table"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
4348
+ <xsl:when test="ancestor::mn:table and not(ancestor::mn:fmt-name)"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
4331
4349
  <xsl:otherwise>
4332
4350
  <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))"/>
4333
4351
  <!-- <xsl:value-of select="$text__"/> -->
@@ -4405,6 +4423,10 @@
4405
4423
  <xsl:copy-of select="."/>
4406
4424
  </xsl:template>
4407
4425
 
4426
+ <xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
4427
+ <xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
4428
+ </xsl:template>
4429
+
4408
4430
  <xsl:template name="replace_text_tags">
4409
4431
  <xsl:param name="tag_open"/>
4410
4432
  <xsl:param name="tag_close"/>
@@ -11794,6 +11816,7 @@
11794
11816
  <xsl:variable name="svg_content">
11795
11817
  <xsl:apply-templates select="." mode="svg_update"/>
11796
11818
  </xsl:variable>
11819
+ <!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
11797
11820
 
11798
11821
  <xsl:variable name="alt-text">
11799
11822
  <xsl:choose>
@@ -12008,7 +12031,7 @@
12008
12031
  </xsl:copy>
12009
12032
  </xsl:template>
12010
12033
 
12011
- <xsl:template match="mn:image/@href" mode="svg_update">
12034
+ <xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
12012
12035
  <xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
12013
12036
  <xsl:value-of select="."/>
12014
12037
  </xsl:attribute>
@@ -14665,13 +14688,13 @@
14665
14688
 
14666
14689
  <xsl:template name="processTablesFigures_Contents">
14667
14690
  <xsl:param name="always"/>
14668
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
14691
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
14669
14692
  <xsl:call-template name="processTables_Contents"/>
14670
14693
  </xsl:if>
14671
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
14694
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
14672
14695
  <xsl:call-template name="processFigures_Contents"/>
14673
14696
  </xsl:if>
14674
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
14697
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
14675
14698
  <xsl:call-template name="processExamples_Contents"/>
14676
14699
  </xsl:if>
14677
14700
  </xsl:template>
@@ -14722,22 +14745,22 @@
14722
14745
 
14723
14746
  <xsl:template name="processExamples_Contents">
14724
14747
  <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>
14748
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
14749
+ <!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
14750
+ //example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
14751
+ with the last two elements dropped if //example/name does not exist. -->
14752
+ <xsl:variable name="example_name">
14753
+ <xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
14754
+ </xsl:variable>
14755
+ <mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
14756
+ <xsl:element name="fmt-name" namespace="{$namespace_full}">
14757
+ <xsl:value-of select="mn:fmt-xref-label[@container]"/>
14758
+ <xsl:if test="normalize-space($example_name) != ''">
14759
+ <xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
14760
+ <xsl:copy-of select="$example_name"/>
14761
+ </xsl:if>
14762
+ </xsl:element>
14763
+ </mnx:example>
14741
14764
  </xsl:for-each>
14742
14765
  </mnx:examples>
14743
14766
  </xsl:template>
@@ -15010,15 +15033,18 @@
15010
15033
 
15011
15034
  <xsl:call-template name="insertFigureBookmarks">
15012
15035
  <xsl:with-param name="contents" select="mnx:contents"/>
15036
+ <xsl:with-param name="num" select="@num"/>
15013
15037
  </xsl:call-template>
15014
15038
 
15015
15039
  <xsl:call-template name="insertTableBookmarks">
15016
15040
  <xsl:with-param name="contents" select="mnx:contents"/>
15041
+ <xsl:with-param name="num" select="@num"/>
15017
15042
  <xsl:with-param name="lang" select="@lang"/>
15018
15043
  </xsl:call-template>
15019
15044
 
15020
15045
  <xsl:call-template name="insertExampleBookmarks">
15021
15046
  <xsl:with-param name="contents" select="mnx:contents"/>
15047
+ <xsl:with-param name="num" select="@num"/>
15022
15048
  <xsl:with-param name="lang" select="@lang"/>
15023
15049
  </xsl:call-template>
15024
15050
 
@@ -15033,15 +15059,18 @@
15033
15059
 
15034
15060
  <xsl:call-template name="insertFigureBookmarks">
15035
15061
  <xsl:with-param name="contents" select="mnx:contents"/>
15062
+ <xsl:with-param name="num" select="@num"/>
15036
15063
  </xsl:call-template>
15037
15064
 
15038
15065
  <xsl:call-template name="insertTableBookmarks">
15039
15066
  <xsl:with-param name="contents" select="mnx:contents"/>
15067
+ <xsl:with-param name="num" select="@num"/>
15040
15068
  <xsl:with-param name="lang" select="@lang"/>
15041
15069
  </xsl:call-template>
15042
15070
 
15043
15071
  <xsl:call-template name="insertExampleBookmarks">
15044
15072
  <xsl:with-param name="contents" select="mnx:contents"/>
15073
+ <xsl:with-param name="num" select="@num"/>
15045
15074
  <xsl:with-param name="lang" select="@lang"/>
15046
15075
  </xsl:call-template>
15047
15076
 
@@ -15054,15 +15083,18 @@
15054
15083
 
15055
15084
  <xsl:call-template name="insertFigureBookmarks">
15056
15085
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15086
+ <xsl:with-param name="num" select="@num"/>
15057
15087
  </xsl:call-template>
15058
15088
 
15059
15089
  <xsl:call-template name="insertTableBookmarks">
15060
15090
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15091
+ <xsl:with-param name="num" select="@num"/>
15061
15092
  <xsl:with-param name="lang" select="@lang"/>
15062
15093
  </xsl:call-template>
15063
15094
 
15064
15095
  <xsl:call-template name="insertExampleBookmarks">
15065
15096
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15097
+ <xsl:with-param name="num" select="@num"/>
15066
15098
  <xsl:with-param name="lang" select="@lang"/>
15067
15099
  </xsl:call-template>
15068
15100
 
@@ -15078,6 +15110,7 @@
15078
15110
 
15079
15111
  <xsl:template name="insertFigureBookmarks">
15080
15112
  <xsl:param name="contents"/>
15113
+ <xsl:param name="num"/>
15081
15114
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15082
15115
  <xsl:if test="$contents_nodes/mnx:figure">
15083
15116
  <fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
@@ -15095,7 +15128,7 @@
15095
15128
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15096
15129
 
15097
15130
  <xsl:variable name="bookmark-title">
15098
- <xsl:value-of select="$title-list-figures"/>
15131
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
15099
15132
  </xsl:variable>
15100
15133
  <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
15101
15134
  <xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
@@ -15109,6 +15142,7 @@
15109
15142
 
15110
15143
  <xsl:template name="insertTableBookmarks">
15111
15144
  <xsl:param name="contents"/>
15145
+ <xsl:param name="num"/>
15112
15146
  <xsl:param name="lang"/>
15113
15147
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15114
15148
  <xsl:if test="$contents_nodes/mnx:table">
@@ -15132,7 +15166,7 @@
15132
15166
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15133
15167
 
15134
15168
  <xsl:variable name="bookmark-title">
15135
- <xsl:value-of select="$title-list-tables"/>
15169
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
15136
15170
  </xsl:variable>
15137
15171
 
15138
15172
  <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
@@ -15147,8 +15181,9 @@
15147
15181
  </xsl:if>
15148
15182
  </xsl:template> <!-- insertTableBookmarks -->
15149
15183
 
15150
- <xsl:template name="insertExampleBookmarks">
15184
+ <xsl:template name="insertExampleBookmarks">
15151
15185
  <xsl:param name="contents"/>
15186
+ <xsl:param name="num"/>
15152
15187
  <xsl:param name="lang"/>
15153
15188
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15154
15189
  <xsl:if test="$contents_nodes/mnx:example">
@@ -15172,7 +15207,7 @@
15172
15207
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15173
15208
 
15174
15209
  <xsl:variable name="bookmark-title">
15175
- <xsl:value-of select="$title-list-examples"/>
15210
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
15176
15211
  </xsl:variable>
15177
15212
 
15178
15213
  <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
@@ -15333,6 +15368,18 @@
15333
15368
  </xsl:copy>
15334
15369
  </xsl:template>
15335
15370
 
15371
+ <xsl:template match="mn:tt" mode="contents_item">
15372
+ <xsl:copy>
15373
+ <xsl:apply-templates mode="contents_item"/>
15374
+ </xsl:copy>
15375
+ </xsl:template>
15376
+
15377
+ <xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
15378
+ <xsl:copy>
15379
+ <xsl:apply-templates mode="contents_item"/>
15380
+ </xsl:copy>
15381
+ </xsl:template>
15382
+
15336
15383
  <xsl:template match="mn:stem" mode="contents_item"/>
15337
15384
  <xsl:template match="mn:fmt-stem" mode="contents_item">
15338
15385
  <xsl:copy-of select="."/>