metanorma-ieee 1.6.14 → 1.6.15

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: 10f299f72ac024f79dc4e8c4aa4889bdbcd6aff5829c4ee2b15bfbc230a840cc
4
- data.tar.gz: d974f25d4e8f6fb6c116095ab005cfc9ec9957f63fd9c209517f4b4d245a81c9
3
+ metadata.gz: ddb0a44ce950881c6419e32522921aa3eeeac3eddd44034241ed38dc76b16780
4
+ data.tar.gz: d97a19b2f181e37d71ef878dcb6166e90e277c35f119a826a9d87f5473e0f1f6
5
5
  SHA512:
6
- metadata.gz: 06001f7ef6cc065590700d54b9b67c84acbe1b5567bf593874600041140a0a8898afd0e3dd4ca9dc78e62c32d84105323bece805c6489e0c095b0b34c0e3287f
7
- data.tar.gz: 146fb02ea7162a40af726d71d2af54de88d2063d78b5beec661bb5056cf4577ddbc5b4da3b2649fac40d453ea5e20e631d5432493dd82871f3144335c595fba5
6
+ metadata.gz: 898d9b571436c42dae6ab55cf802d704ebc14952c556f9d5964d8482b6a3bf0bfb4902c9e321a7b68ad20723e6288244e1cdc21d7ece6e86f2b2e957d6d4718a
7
+ data.tar.gz: 7c773c727f88c1222014e8665ae665d1b02c725518083cb16a7aa2137b38702ffb3718b38c2f44e95e562813403ee008efcb43fb4c82ad1080cb854a87de1d60
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
  }
@@ -1449,33 +1449,33 @@
1449
1449
  </xsl:choose>
1450
1450
 
1451
1451
  <!-- List of Tables -->
1452
- <xsl:for-each select="$contents//mnx:tables/mnx:table">
1452
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
1453
1453
  <xsl:if test="position() = 1">
1454
1454
  <!-- <fo:block break-after="page"/> -->
1455
1455
  <xsl:call-template name="insertListOf_Title">
1456
- <xsl:with-param name="title" select="$title-list-tables"/>
1456
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
1457
1457
  </xsl:call-template>
1458
1458
  </xsl:if>
1459
1459
  <xsl:call-template name="insertListOf_Item"/>
1460
1460
  </xsl:for-each>
1461
1461
 
1462
1462
  <!-- List of Figures -->
1463
- <xsl:for-each select="$contents//mnx:figures/mnx:figure">
1463
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
1464
1464
  <xsl:if test="position() = 1">
1465
1465
  <!-- <fo:block break-after="page"/> -->
1466
1466
  <xsl:call-template name="insertListOf_Title">
1467
- <xsl:with-param name="title" select="$title-list-figures"/>
1467
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
1468
1468
  </xsl:call-template>
1469
1469
  </xsl:if>
1470
1470
  <xsl:call-template name="insertListOf_Item"/>
1471
1471
  </xsl:for-each>
1472
1472
 
1473
1473
  <!-- List of Examples -->
1474
- <xsl:for-each select="$contents//mnx:examples/mnx:example">
1474
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
1475
1475
  <xsl:if test="position() = 1">
1476
1476
  <!-- <fo:block break-after="page"/> -->
1477
1477
  <xsl:call-template name="insertListOf_Title">
1478
- <xsl:with-param name="title" select="$title-list-examples"/>
1478
+ <xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
1479
1479
  </xsl:call-template>
1480
1480
  </xsl:if>
1481
1481
  <xsl:call-template name="insertListOf_Item"/>
@@ -2173,7 +2173,11 @@
2173
2173
  <xsl:call-template name="setAltText">
2174
2174
  <xsl:with-param name="value" select="@alt-text"/>
2175
2175
  </xsl:call-template>
2176
- <xsl:apply-templates select="." mode="contents"/>
2176
+ <xsl:variable name="item">
2177
+ <!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
2178
+ <xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
2179
+ </xsl:variable>
2180
+ <xsl:apply-templates select="xalan:nodeset($item)/node()"/>
2177
2181
  <fo:inline keep-together.within-line="always">
2178
2182
  <fo:leader font-weight="normal" leader-pattern="dots"/>
2179
2183
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
@@ -2204,7 +2208,7 @@
2204
2208
 
2205
2209
  </xsl:template>
2206
2210
 
2207
- <xsl:template match="mnx:figures/mnx:figure/mn:fmt-name/text()[1] | mnx:tables/mnx:table/mn:fmt-name/text()[1]" mode="contents" priority="3">
2211
+ <xsl:template match="mnx:figures/mnx:figure/mn:fmt-name/text()[1] | mnx:tables/mnx:table/mn:fmt-name/text()[1]" mode="contents_item" priority="3">
2208
2212
  <xsl:choose>
2209
2213
  <xsl:when test="$current_template = 'standard' and contains(.,'—')"><xsl:value-of select="substring-after(.,'—')"/></xsl:when>
2210
2214
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -3901,45 +3905,59 @@
3901
3905
 
3902
3906
  <xsl:variable name="ace_tag">ace-tag_</xsl:variable>
3903
3907
 
3904
- <xsl:variable name="title-list-tables">
3905
- <xsl:variable name="toc_table_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title"/>
3906
- <xsl:value-of select="$toc_table_title"/>
3907
- <xsl:if test="normalize-space($toc_table_title) = ''">
3908
- <xsl:call-template name="getLocalizedString">
3909
- <xsl:with-param name="key">toc_tables</xsl:with-param>
3910
- </xsl:call-template>
3911
- </xsl:if>
3912
- </xsl:variable>
3908
+ <xsl:variable name="toc_title_lists_">
3909
+ <xsl:for-each select="//mn:metanorma">
3910
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
3911
+ <xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
3912
+ <xsl:variable name="current_document">
3913
+ <xsl:copy-of select="."/>
3914
+ </xsl:variable>
3915
+ <xsl:for-each select="xalan:nodeset($current_document)">
3916
+ <mnx:doc id="{$docid}" num="{$num}">
3917
+ <mnx:title-list-tables>
3918
+ <xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
3919
+ <xsl:value-of select="$toc_table_title"/>
3920
+ <xsl:if test="normalize-space($toc_table_title) = ''">
3921
+ <xsl:call-template name="getLocalizedString">
3922
+ <xsl:with-param name="key">toc_tables</xsl:with-param>
3923
+ </xsl:call-template>
3924
+ </xsl:if>
3925
+ </mnx:title-list-tables>
3913
3926
 
3914
- <xsl:variable name="title-list-figures">
3915
- <xsl:variable name="toc_figure_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title"/>
3916
- <xsl:value-of select="$toc_figure_title"/>
3917
- <xsl:if test="normalize-space($toc_figure_title) = ''">
3918
- <xsl:call-template name="getLocalizedString">
3919
- <xsl:with-param name="key">toc_figures</xsl:with-param>
3920
- </xsl:call-template>
3921
- </xsl:if>
3922
- </xsl:variable>
3927
+ <mnx:title-list-figures>
3928
+ <xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
3929
+ <xsl:value-of select="$toc_figure_title"/>
3930
+ <xsl:if test="normalize-space($toc_figure_title) = ''">
3931
+ <xsl:call-template name="getLocalizedString">
3932
+ <xsl:with-param name="key">toc_figures</xsl:with-param>
3933
+ </xsl:call-template>
3934
+ </xsl:if>
3935
+ </mnx:title-list-figures>
3923
3936
 
3924
- <xsl:variable name="title-list-examples">
3925
- <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
3926
- <xsl:value-of select="$toc_example_title"/>
3927
- <xsl:if test="normalize-space($toc_example_title) = ''">
3928
- <xsl:call-template name="getLocalizedString">
3929
- <xsl:with-param name="key">toc_examples</xsl:with-param>
3930
- </xsl:call-template>
3931
- </xsl:if>
3932
- </xsl:variable>
3937
+ <mnx:title-list-examples>
3938
+ <xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
3939
+ <xsl:value-of select="$toc_example_title"/>
3940
+ <xsl:if test="normalize-space($toc_example_title) = ''">
3941
+ <xsl:call-template name="getLocalizedString">
3942
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
3943
+ </xsl:call-template>
3944
+ </xsl:if>
3945
+ </mnx:title-list-examples>
3933
3946
 
3934
- <xsl:variable name="title-list-recommendations">
3935
- <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
3936
- <xsl:value-of select="$toc_requirement_title"/>
3937
- <xsl:if test="normalize-space($toc_requirement_title) = ''">
3938
- <xsl:call-template name="getLocalizedString">
3939
- <xsl:with-param name="key">toc_recommendations</xsl:with-param>
3940
- </xsl:call-template>
3941
- </xsl:if>
3947
+ <mnx:title-list-recommendations>
3948
+ <xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
3949
+ <xsl:value-of select="$toc_requirement_title"/>
3950
+ <xsl:if test="normalize-space($toc_requirement_title) = ''">
3951
+ <xsl:call-template name="getLocalizedString">
3952
+ <xsl:with-param name="key">toc_recommendations</xsl:with-param>
3953
+ </xsl:call-template>
3954
+ </xsl:if>
3955
+ </mnx:title-list-recommendations>
3956
+ </mnx:doc>
3957
+ </xsl:for-each>
3958
+ </xsl:for-each>
3942
3959
  </xsl:variable>
3960
+ <xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
3943
3961
 
3944
3962
  <xsl:variable name="bibdata">
3945
3963
  <xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
@@ -4714,7 +4732,7 @@
4714
4732
  <xsl:apply-templates mode="update_xml_step1"/>
4715
4733
  </xsl:template>
4716
4734
 
4717
- <xsl:template match="mn:semx" mode="update_xml_step1">
4735
+ <xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
4718
4736
  <xsl:apply-templates mode="update_xml_step1"/>
4719
4737
  </xsl:template>
4720
4738
 
@@ -5100,7 +5118,7 @@
5100
5118
  <xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
5101
5119
  <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>
5102
5120
 
5103
- <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">
5121
+ <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">
5104
5122
 
5105
5123
  <xsl:variable name="parent" select="local-name(..)"/>
5106
5124
 
@@ -5145,7 +5163,7 @@
5145
5163
  <xsl:variable name="text">
5146
5164
  <xsl:element name="text" namespace="{$namespace_full}">
5147
5165
  <xsl:choose>
5148
- <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 -->
5166
+ <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 -->
5149
5167
  <xsl:otherwise>
5150
5168
  <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))"/>
5151
5169
  <!-- <xsl:value-of select="$text__"/> -->
@@ -5223,6 +5241,10 @@
5223
5241
  <xsl:copy-of select="."/>
5224
5242
  </xsl:template>
5225
5243
 
5244
+ <xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
5245
+ <xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
5246
+ </xsl:template>
5247
+
5226
5248
  <xsl:template name="replace_text_tags">
5227
5249
  <xsl:param name="tag_open"/>
5228
5250
  <xsl:param name="tag_close"/>
@@ -12562,6 +12584,7 @@
12562
12584
  <xsl:variable name="svg_content">
12563
12585
  <xsl:apply-templates select="." mode="svg_update"/>
12564
12586
  </xsl:variable>
12587
+ <!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
12565
12588
 
12566
12589
  <xsl:variable name="alt-text">
12567
12590
  <xsl:choose>
@@ -12776,7 +12799,7 @@
12776
12799
  </xsl:copy>
12777
12800
  </xsl:template>
12778
12801
 
12779
- <xsl:template match="mn:image/@href" mode="svg_update">
12802
+ <xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
12780
12803
  <xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
12781
12804
  <xsl:value-of select="."/>
12782
12805
  </xsl:attribute>
@@ -15459,13 +15482,13 @@
15459
15482
 
15460
15483
  <xsl:template name="processTablesFigures_Contents">
15461
15484
  <xsl:param name="always"/>
15462
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
15485
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
15463
15486
  <xsl:call-template name="processTables_Contents"/>
15464
15487
  </xsl:if>
15465
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
15488
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
15466
15489
  <xsl:call-template name="processFigures_Contents"/>
15467
15490
  </xsl:if>
15468
- <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
15491
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
15469
15492
  <xsl:call-template name="processExamples_Contents"/>
15470
15493
  </xsl:if>
15471
15494
  </xsl:template>
@@ -15516,22 +15539,22 @@
15516
15539
 
15517
15540
  <xsl:template name="processExamples_Contents">
15518
15541
  <mnx:examples>
15519
- <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
15520
- <xsl:choose>
15521
- <xsl:when test="mn:fmt-name">
15522
- <xsl:variable name="fmt_name">
15523
- <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
15524
- </xsl:variable>
15525
- <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
15526
- <xsl:copy-of select="$fmt_name"/>
15527
- </mnx:example>
15528
- </xsl:when>
15529
- <xsl:otherwise>
15530
- <mnx:example id="{@id}" alt-text="{mn:name}">
15531
- <xsl:copy-of select="mn:name"/>
15532
- </mnx:example>
15533
- </xsl:otherwise>
15534
- </xsl:choose>
15542
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
15543
+ <!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
15544
+ //example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
15545
+ with the last two elements dropped if //example/name does not exist. -->
15546
+ <xsl:variable name="example_name">
15547
+ <xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
15548
+ </xsl:variable>
15549
+ <mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
15550
+ <xsl:element name="fmt-name" namespace="{$namespace_full}">
15551
+ <xsl:value-of select="mn:fmt-xref-label[@container]"/>
15552
+ <xsl:if test="normalize-space($example_name) != ''">
15553
+ <xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
15554
+ <xsl:copy-of select="$example_name"/>
15555
+ </xsl:if>
15556
+ </xsl:element>
15557
+ </mnx:example>
15535
15558
  </xsl:for-each>
15536
15559
  </mnx:examples>
15537
15560
  </xsl:template>
@@ -15804,15 +15827,18 @@
15804
15827
 
15805
15828
  <xsl:call-template name="insertFigureBookmarks">
15806
15829
  <xsl:with-param name="contents" select="mnx:contents"/>
15830
+ <xsl:with-param name="num" select="@num"/>
15807
15831
  </xsl:call-template>
15808
15832
 
15809
15833
  <xsl:call-template name="insertTableBookmarks">
15810
15834
  <xsl:with-param name="contents" select="mnx:contents"/>
15835
+ <xsl:with-param name="num" select="@num"/>
15811
15836
  <xsl:with-param name="lang" select="@lang"/>
15812
15837
  </xsl:call-template>
15813
15838
 
15814
15839
  <xsl:call-template name="insertExampleBookmarks">
15815
15840
  <xsl:with-param name="contents" select="mnx:contents"/>
15841
+ <xsl:with-param name="num" select="@num"/>
15816
15842
  <xsl:with-param name="lang" select="@lang"/>
15817
15843
  </xsl:call-template>
15818
15844
 
@@ -15827,15 +15853,18 @@
15827
15853
 
15828
15854
  <xsl:call-template name="insertFigureBookmarks">
15829
15855
  <xsl:with-param name="contents" select="mnx:contents"/>
15856
+ <xsl:with-param name="num" select="@num"/>
15830
15857
  </xsl:call-template>
15831
15858
 
15832
15859
  <xsl:call-template name="insertTableBookmarks">
15833
15860
  <xsl:with-param name="contents" select="mnx:contents"/>
15861
+ <xsl:with-param name="num" select="@num"/>
15834
15862
  <xsl:with-param name="lang" select="@lang"/>
15835
15863
  </xsl:call-template>
15836
15864
 
15837
15865
  <xsl:call-template name="insertExampleBookmarks">
15838
15866
  <xsl:with-param name="contents" select="mnx:contents"/>
15867
+ <xsl:with-param name="num" select="@num"/>
15839
15868
  <xsl:with-param name="lang" select="@lang"/>
15840
15869
  </xsl:call-template>
15841
15870
 
@@ -15848,15 +15877,18 @@
15848
15877
 
15849
15878
  <xsl:call-template name="insertFigureBookmarks">
15850
15879
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15880
+ <xsl:with-param name="num" select="@num"/>
15851
15881
  </xsl:call-template>
15852
15882
 
15853
15883
  <xsl:call-template name="insertTableBookmarks">
15854
15884
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15885
+ <xsl:with-param name="num" select="@num"/>
15855
15886
  <xsl:with-param name="lang" select="@lang"/>
15856
15887
  </xsl:call-template>
15857
15888
 
15858
15889
  <xsl:call-template name="insertExampleBookmarks">
15859
15890
  <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15891
+ <xsl:with-param name="num" select="@num"/>
15860
15892
  <xsl:with-param name="lang" select="@lang"/>
15861
15893
  </xsl:call-template>
15862
15894
 
@@ -15872,6 +15904,7 @@
15872
15904
 
15873
15905
  <xsl:template name="insertFigureBookmarks">
15874
15906
  <xsl:param name="contents"/>
15907
+ <xsl:param name="num"/>
15875
15908
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15876
15909
  <xsl:if test="$contents_nodes/mnx:figure">
15877
15910
  <fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
@@ -15889,7 +15922,7 @@
15889
15922
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15890
15923
 
15891
15924
  <xsl:variable name="bookmark-title">
15892
- <xsl:value-of select="$title-list-figures"/>
15925
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
15893
15926
  </xsl:variable>
15894
15927
  <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
15895
15928
  <xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
@@ -15903,6 +15936,7 @@
15903
15936
 
15904
15937
  <xsl:template name="insertTableBookmarks">
15905
15938
  <xsl:param name="contents"/>
15939
+ <xsl:param name="num"/>
15906
15940
  <xsl:param name="lang"/>
15907
15941
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15908
15942
  <xsl:if test="$contents_nodes/mnx:table">
@@ -15926,7 +15960,7 @@
15926
15960
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15927
15961
 
15928
15962
  <xsl:variable name="bookmark-title">
15929
- <xsl:value-of select="$title-list-tables"/>
15963
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
15930
15964
  </xsl:variable>
15931
15965
 
15932
15966
  <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
@@ -15941,8 +15975,9 @@
15941
15975
  </xsl:if>
15942
15976
  </xsl:template> <!-- insertTableBookmarks -->
15943
15977
 
15944
- <xsl:template name="insertExampleBookmarks">
15978
+ <xsl:template name="insertExampleBookmarks">
15945
15979
  <xsl:param name="contents"/>
15980
+ <xsl:param name="num"/>
15946
15981
  <xsl:param name="lang"/>
15947
15982
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15948
15983
  <xsl:if test="$contents_nodes/mnx:example">
@@ -15966,7 +16001,7 @@
15966
16001
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15967
16002
 
15968
16003
  <xsl:variable name="bookmark-title">
15969
- <xsl:value-of select="$title-list-examples"/>
16004
+ <xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
15970
16005
  </xsl:variable>
15971
16006
 
15972
16007
  <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
@@ -16127,6 +16162,18 @@
16127
16162
  </xsl:copy>
16128
16163
  </xsl:template>
16129
16164
 
16165
+ <xsl:template match="mn:tt" mode="contents_item">
16166
+ <xsl:copy>
16167
+ <xsl:apply-templates mode="contents_item"/>
16168
+ </xsl:copy>
16169
+ </xsl:template>
16170
+
16171
+ <xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
16172
+ <xsl:copy>
16173
+ <xsl:apply-templates mode="contents_item"/>
16174
+ </xsl:copy>
16175
+ </xsl:template>
16176
+
16130
16177
  <xsl:template match="mn:stem" mode="contents_item"/>
16131
16178
  <xsl:template match="mn:fmt-stem" mode="contents_item">
16132
16179
  <xsl:copy-of select="."/>