metanorma-iho 1.3.9 → 1.3.10

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: 699ecaf6af88f3e45620bdd4ccf9f6595eb83fde99eb19250c6110dd25728efd
4
- data.tar.gz: a1f93357ee69e9f7715fb0d62dffa5fe5dcd69b2a29bf4e86bb07ec5f654029a
3
+ metadata.gz: 9e660ed4d563e1150c03de5a0df30acdb2cf987540fa39bf796508a17cc712f4
4
+ data.tar.gz: 78b5521d52073ef71653e22a99c48db2664825393e24d29ab5c198a540d32394
5
5
  SHA512:
6
- metadata.gz: 561888ca71758aa49b61d78e30d0ad8fc0465fa7ed8fd5d0ec4f5f6015bdbd1e4181f0e046890ffe623545dd9d3b700ee6de89384f43da66d87255579f59beaa
7
- data.tar.gz: '039998c1132f430863caf171c2549883cfcf95eec4def1fd86139d79d0d67976df0f4d5125fb435053b2aed2911823cf4b1a2ecd3512318e4c50a8f448cff896'
6
+ metadata.gz: 77b54bca3cf52b55e6858e6f6174cdd82a8582c4c44afcd6faa165104b98f7f1a06eb1a2bb161943430667579f10d5daec465c503c44fb666982f2b3cabb6682
7
+ data.tar.gz: 07eefe66c1c4081fb59777d7f96d4941d4fc3e44d521c9fa6216a791ba6f55d483b2bd60e20e416fea5877850c7fa28f4ae4a4f4d670953e56ae75b6b837beaf
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
@@ -150,6 +150,11 @@ a.FootnoteRef, span.FootnoteRef {
150
150
  vertical-align: super;
151
151
  }
152
152
 
153
+ a.TableFootnoteRef, a.FootnoteRef, a.footnote-number,
154
+ sup a, a:has(> sup) {
155
+ vertical-align: baseline;
156
+ }
157
+
153
158
  .addition {
154
159
  color: blue;
155
160
  }
@@ -666,7 +666,11 @@
666
666
  <xsl:call-template name="setAltText">
667
667
  <xsl:with-param name="value" select="@alt-text"/>
668
668
  </xsl:call-template>
669
- <xsl:apply-templates select="." mode="contents"/>
669
+ <xsl:variable name="item">
670
+ <!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
671
+ <xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
672
+ </xsl:variable>
673
+ <xsl:apply-templates select="xalan:nodeset($item)/node()"/>
670
674
  <fo:inline keep-together.within-line="always">
671
675
  <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
672
676
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
@@ -763,7 +767,7 @@
763
767
  <xsl:for-each select="$contents//mnx:tables/mnx:table">
764
768
  <xsl:if test="position() = 1">
765
769
  <xsl:call-template name="insertListOf_Title">
766
- <xsl:with-param name="title" select="$title-list-tables"/>
770
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
767
771
  </xsl:call-template>
768
772
  </xsl:if>
769
773
  <xsl:call-template name="insertListOf_Item"/>
@@ -773,7 +777,7 @@
773
777
  <xsl:for-each select="$contents//mnx:figures/mnx:figure">
774
778
  <xsl:if test="position() = 1">
775
779
  <xsl:call-template name="insertListOf_Title">
776
- <xsl:with-param name="title" select="$title-list-figures"/>
780
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
777
781
  </xsl:call-template>
778
782
  </xsl:if>
779
783
  <xsl:call-template name="insertListOf_Item"/>
@@ -783,7 +787,7 @@
783
787
  <xsl:for-each select="$contents//mnx:examples/mnx:example">
784
788
  <xsl:if test="position() = 1">
785
789
  <xsl:call-template name="insertListOf_Title">
786
- <xsl:with-param name="title" select="$title-list-examples"/>
790
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
787
791
  </xsl:call-template>
788
792
  </xsl:if>
789
793
  <xsl:call-template name="insertListOf_Item"/>
@@ -1376,45 +1380,59 @@
1376
1380
 
1377
1381
  <xsl:variable name="ace_tag">ace-tag_</xsl:variable>
1378
1382
 
1379
- <xsl:variable name="title-list-tables">
1380
- <xsl:variable name="toc_table_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title"/>
1381
- <xsl:value-of select="$toc_table_title"/>
1382
- <xsl:if test="normalize-space($toc_table_title) = ''">
1383
- <xsl:call-template name="getLocalizedString">
1384
- <xsl:with-param name="key">toc_tables</xsl:with-param>
1385
- </xsl:call-template>
1386
- </xsl:if>
1387
- </xsl:variable>
1383
+ <xsl:variable name="toc_title_lists_">
1384
+ <xsl:for-each select="//mn:metanorma">
1385
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
1386
+ <xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
1387
+ <xsl:variable name="current_document">
1388
+ <xsl:copy-of select="."/>
1389
+ </xsl:variable>
1390
+ <xsl:for-each select="xalan:nodeset($current_document)">
1391
+ <mnx:doc id="{$docid}" num="{$num}">
1392
+ <mnx:title-list-tables>
1393
+ <xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
1394
+ <xsl:value-of select="$toc_table_title"/>
1395
+ <xsl:if test="normalize-space($toc_table_title) = ''">
1396
+ <xsl:call-template name="getLocalizedString">
1397
+ <xsl:with-param name="key">toc_tables</xsl:with-param>
1398
+ </xsl:call-template>
1399
+ </xsl:if>
1400
+ </mnx:title-list-tables>
1388
1401
 
1389
- <xsl:variable name="title-list-figures">
1390
- <xsl:variable name="toc_figure_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title"/>
1391
- <xsl:value-of select="$toc_figure_title"/>
1392
- <xsl:if test="normalize-space($toc_figure_title) = ''">
1393
- <xsl:call-template name="getLocalizedString">
1394
- <xsl:with-param name="key">toc_figures</xsl:with-param>
1395
- </xsl:call-template>
1396
- </xsl:if>
1397
- </xsl:variable>
1402
+ <mnx:title-list-figures>
1403
+ <xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
1404
+ <xsl:value-of select="$toc_figure_title"/>
1405
+ <xsl:if test="normalize-space($toc_figure_title) = ''">
1406
+ <xsl:call-template name="getLocalizedString">
1407
+ <xsl:with-param name="key">toc_figures</xsl:with-param>
1408
+ </xsl:call-template>
1409
+ </xsl:if>
1410
+ </mnx:title-list-figures>
1398
1411
 
1399
- <xsl:variable name="title-list-examples">
1400
- <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
1401
- <xsl:value-of select="$toc_example_title"/>
1402
- <xsl:if test="normalize-space($toc_example_title) = ''">
1403
- <xsl:call-template name="getLocalizedString">
1404
- <xsl:with-param name="key">toc_examples</xsl:with-param>
1405
- </xsl:call-template>
1406
- </xsl:if>
1407
- </xsl:variable>
1412
+ <mnx:title-list-examples>
1413
+ <xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
1414
+ <xsl:value-of select="$toc_example_title"/>
1415
+ <xsl:if test="normalize-space($toc_example_title) = ''">
1416
+ <xsl:call-template name="getLocalizedString">
1417
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
1418
+ </xsl:call-template>
1419
+ </xsl:if>
1420
+ </mnx:title-list-examples>
1408
1421
 
1409
- <xsl:variable name="title-list-recommendations">
1410
- <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
1411
- <xsl:value-of select="$toc_requirement_title"/>
1412
- <xsl:if test="normalize-space($toc_requirement_title) = ''">
1413
- <xsl:call-template name="getLocalizedString">
1414
- <xsl:with-param name="key">toc_recommendations</xsl:with-param>
1415
- </xsl:call-template>
1416
- </xsl:if>
1422
+ <mnx:title-list-recommendations>
1423
+ <xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
1424
+ <xsl:value-of select="$toc_requirement_title"/>
1425
+ <xsl:if test="normalize-space($toc_requirement_title) = ''">
1426
+ <xsl:call-template name="getLocalizedString">
1427
+ <xsl:with-param name="key">toc_recommendations</xsl:with-param>
1428
+ </xsl:call-template>
1429
+ </xsl:if>
1430
+ </mnx:title-list-recommendations>
1431
+ </mnx:doc>
1432
+ </xsl:for-each>
1433
+ </xsl:for-each>
1417
1434
  </xsl:variable>
1435
+ <xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
1418
1436
 
1419
1437
  <xsl:variable name="bibdata">
1420
1438
  <xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
@@ -2208,7 +2226,7 @@
2208
2226
  <xsl:apply-templates mode="update_xml_step1"/>
2209
2227
  </xsl:template>
2210
2228
 
2211
- <xsl:template match="mn:semx" mode="update_xml_step1">
2229
+ <xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
2212
2230
  <xsl:apply-templates mode="update_xml_step1"/>
2213
2231
  </xsl:template>
2214
2232
 
@@ -2491,7 +2509,7 @@
2491
2509
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
2492
2510
  <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>
2493
2511
 
2494
- <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">
2512
+ <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">
2495
2513
 
2496
2514
  <xsl:variable name="parent" select="local-name(..)"/>
2497
2515
 
@@ -2536,7 +2554,7 @@
2536
2554
  <xsl:variable name="text">
2537
2555
  <xsl:element name="text" namespace="{$namespace_full}">
2538
2556
  <xsl:choose>
2539
- <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 -->
2557
+ <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 -->
2540
2558
  <xsl:otherwise>
2541
2559
  <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))"/>
2542
2560
  <!-- <xsl:value-of select="$text__"/> -->
@@ -2614,6 +2632,10 @@
2614
2632
  <xsl:copy-of select="."/>
2615
2633
  </xsl:template>
2616
2634
 
2635
+ <xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
2636
+ <xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
2637
+ </xsl:template>
2638
+
2617
2639
  <xsl:template name="replace_text_tags">
2618
2640
  <xsl:param name="tag_open"/>
2619
2641
  <xsl:param name="tag_close"/>
@@ -9891,6 +9913,7 @@
9891
9913
  <xsl:variable name="svg_content">
9892
9914
  <xsl:apply-templates select="." mode="svg_update"/>
9893
9915
  </xsl:variable>
9916
+ <!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
9894
9917
 
9895
9918
  <xsl:variable name="alt-text">
9896
9919
  <xsl:choose>
@@ -10105,7 +10128,7 @@
10105
10128
  </xsl:copy>
10106
10129
  </xsl:template>
10107
10130
 
10108
- <xsl:template match="mn:image/@href" mode="svg_update">
10131
+ <xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
10109
10132
  <xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
10110
10133
  <xsl:value-of select="."/>
10111
10134
  </xsl:attribute>
@@ -12730,13 +12753,13 @@
12730
12753
 
12731
12754
  <xsl:template name="processTablesFigures_Contents">
12732
12755
  <xsl:param name="always"/>
12733
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
12756
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
12734
12757
  <xsl:call-template name="processTables_Contents"/>
12735
12758
  </xsl:if>
12736
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
12759
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
12737
12760
  <xsl:call-template name="processFigures_Contents"/>
12738
12761
  </xsl:if>
12739
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
12762
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
12740
12763
  <xsl:call-template name="processExamples_Contents"/>
12741
12764
  </xsl:if>
12742
12765
  </xsl:template>
@@ -12787,22 +12810,22 @@
12787
12810
 
12788
12811
  <xsl:template name="processExamples_Contents">
12789
12812
  <mnx:examples>
12790
- <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
12791
- <xsl:choose>
12792
- <xsl:when test="mn:fmt-name">
12793
- <xsl:variable name="fmt_name">
12794
- <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
12795
- </xsl:variable>
12796
- <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
12797
- <xsl:copy-of select="$fmt_name"/>
12798
- </mnx:example>
12799
- </xsl:when>
12800
- <xsl:otherwise>
12801
- <mnx:example id="{@id}" alt-text="{mn:name}">
12802
- <xsl:copy-of select="mn:name"/>
12803
- </mnx:example>
12804
- </xsl:otherwise>
12805
- </xsl:choose>
12813
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
12814
+ <!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
12815
+ //example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
12816
+ with the last two elements dropped if //example/name does not exist. -->
12817
+ <xsl:variable name="example_name">
12818
+ <xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
12819
+ </xsl:variable>
12820
+ <mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
12821
+ <xsl:element name="fmt-name" namespace="{$namespace_full}">
12822
+ <xsl:value-of select="mn:fmt-xref-label[@container]"/>
12823
+ <xsl:if test="normalize-space($example_name) != ''">
12824
+ <xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
12825
+ <xsl:copy-of select="$example_name"/>
12826
+ </xsl:if>
12827
+ </xsl:element>
12828
+ </mnx:example>
12806
12829
  </xsl:for-each>
12807
12830
  </mnx:examples>
12808
12831
  </xsl:template>
@@ -13075,15 +13098,18 @@
13075
13098
 
13076
13099
  <xsl:call-template name="insertFigureBookmarks">
13077
13100
  <xsl:with-param name="contents" select="mnx:contents"/>
13101
+ <xsl:with-param name="num" select="@num"/>
13078
13102
  </xsl:call-template>
13079
13103
 
13080
13104
  <xsl:call-template name="insertTableBookmarks">
13081
13105
  <xsl:with-param name="contents" select="mnx:contents"/>
13106
+ <xsl:with-param name="num" select="@num"/>
13082
13107
  <xsl:with-param name="lang" select="@lang"/>
13083
13108
  </xsl:call-template>
13084
13109
 
13085
13110
  <xsl:call-template name="insertExampleBookmarks">
13086
13111
  <xsl:with-param name="contents" select="mnx:contents"/>
13112
+ <xsl:with-param name="num" select="@num"/>
13087
13113
  <xsl:with-param name="lang" select="@lang"/>
13088
13114
  </xsl:call-template>
13089
13115
 
@@ -13098,15 +13124,18 @@
13098
13124
 
13099
13125
  <xsl:call-template name="insertFigureBookmarks">
13100
13126
  <xsl:with-param name="contents" select="mnx:contents"/>
13127
+ <xsl:with-param name="num" select="@num"/>
13101
13128
  </xsl:call-template>
13102
13129
 
13103
13130
  <xsl:call-template name="insertTableBookmarks">
13104
13131
  <xsl:with-param name="contents" select="mnx:contents"/>
13132
+ <xsl:with-param name="num" select="@num"/>
13105
13133
  <xsl:with-param name="lang" select="@lang"/>
13106
13134
  </xsl:call-template>
13107
13135
 
13108
13136
  <xsl:call-template name="insertExampleBookmarks">
13109
13137
  <xsl:with-param name="contents" select="mnx:contents"/>
13138
+ <xsl:with-param name="num" select="@num"/>
13110
13139
  <xsl:with-param name="lang" select="@lang"/>
13111
13140
  </xsl:call-template>
13112
13141
 
@@ -13119,15 +13148,18 @@
13119
13148
 
13120
13149
  <xsl:call-template name="insertFigureBookmarks">
13121
13150
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13151
+ <xsl:with-param name="num" select="@num"/>
13122
13152
  </xsl:call-template>
13123
13153
 
13124
13154
  <xsl:call-template name="insertTableBookmarks">
13125
13155
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13156
+ <xsl:with-param name="num" select="@num"/>
13126
13157
  <xsl:with-param name="lang" select="@lang"/>
13127
13158
  </xsl:call-template>
13128
13159
 
13129
13160
  <xsl:call-template name="insertExampleBookmarks">
13130
13161
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13162
+ <xsl:with-param name="num" select="@num"/>
13131
13163
  <xsl:with-param name="lang" select="@lang"/>
13132
13164
  </xsl:call-template>
13133
13165
 
@@ -13143,6 +13175,7 @@
13143
13175
 
13144
13176
  <xsl:template name="insertFigureBookmarks">
13145
13177
  <xsl:param name="contents"/>
13178
+ <xsl:param name="num"/>
13146
13179
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13147
13180
  <xsl:if test="$contents_nodes/mnx:figure">
13148
13181
  <fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
@@ -13160,7 +13193,7 @@
13160
13193
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13161
13194
 
13162
13195
  <xsl:variable name="bookmark-title">
13163
- <xsl:value-of select="$title-list-figures"/>
13196
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
13164
13197
  </xsl:variable>
13165
13198
  <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
13166
13199
  <xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
@@ -13174,6 +13207,7 @@
13174
13207
 
13175
13208
  <xsl:template name="insertTableBookmarks">
13176
13209
  <xsl:param name="contents"/>
13210
+ <xsl:param name="num"/>
13177
13211
  <xsl:param name="lang"/>
13178
13212
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13179
13213
  <xsl:if test="$contents_nodes/mnx:table">
@@ -13197,7 +13231,7 @@
13197
13231
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13198
13232
 
13199
13233
  <xsl:variable name="bookmark-title">
13200
- <xsl:value-of select="$title-list-tables"/>
13234
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
13201
13235
  </xsl:variable>
13202
13236
 
13203
13237
  <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
@@ -13212,8 +13246,9 @@
13212
13246
  </xsl:if>
13213
13247
  </xsl:template> <!-- insertTableBookmarks -->
13214
13248
 
13215
- <xsl:template name="insertExampleBookmarks">
13249
+ <xsl:template name="insertExampleBookmarks">
13216
13250
  <xsl:param name="contents"/>
13251
+ <xsl:param name="num"/>
13217
13252
  <xsl:param name="lang"/>
13218
13253
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13219
13254
  <xsl:if test="$contents_nodes/mnx:example">
@@ -13237,7 +13272,7 @@
13237
13272
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13238
13273
 
13239
13274
  <xsl:variable name="bookmark-title">
13240
- <xsl:value-of select="$title-list-examples"/>
13275
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
13241
13276
  </xsl:variable>
13242
13277
 
13243
13278
  <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
@@ -13398,6 +13433,18 @@
13398
13433
  </xsl:copy>
13399
13434
  </xsl:template>
13400
13435
 
13436
+ <xsl:template match="mn:tt" mode="contents_item">
13437
+ <xsl:copy>
13438
+ <xsl:apply-templates mode="contents_item"/>
13439
+ </xsl:copy>
13440
+ </xsl:template>
13441
+
13442
+ <xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
13443
+ <xsl:copy>
13444
+ <xsl:apply-templates mode="contents_item"/>
13445
+ </xsl:copy>
13446
+ </xsl:template>
13447
+
13401
13448
  <xsl:template match="mn:stem" mode="contents_item"/>
13402
13449
  <xsl:template match="mn:fmt-stem" mode="contents_item">
13403
13450
  <xsl:copy-of select="."/>