metanorma-ieee 1.6.11 → 1.6.14

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: e016d0278141ee691cf614022025588aa67e47edfd080ce4395e3d6faab39c8e
4
- data.tar.gz: 27e4f8a4f0de51fe4cd6a075990afebd7992cad149e9581c399e46c0849046d3
3
+ metadata.gz: 10f299f72ac024f79dc4e8c4aa4889bdbcd6aff5829c4ee2b15bfbc230a840cc
4
+ data.tar.gz: d974f25d4e8f6fb6c116095ab005cfc9ec9957f63fd9c209517f4b4d245a81c9
5
5
  SHA512:
6
- metadata.gz: 6cfd05e2cf70bdd4bb26feb77645afcc241ed2caadde5d8c913d71b02390856242ecf19a4c0e5ed3755b182f259f08e6bf83662e6b513d5e1bafec0e51c63070
7
- data.tar.gz: c70ab7c73f0ba053331cb3843099652b8602b057d24b28727cf6f54baf061e0c3e63adc7a063ed33f01bf618fab5ea2eb70bc398658bf4ff44a45f939172e18a
6
+ metadata.gz: 06001f7ef6cc065590700d54b9b67c84acbe1b5567bf593874600041140a0a8898afd0e3dd4ca9dc78e62c32d84105323bece805c6489e0c095b0b34c0e3287f
7
+ data.tar.gz: 146fb02ea7162a40af726d71d2af54de88d2063d78b5beec661bb5056cf4577ddbc5b4da3b2649fac40d453ea5e20e631d5432493dd82871f3144335c595fba5
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
@@ -1469,6 +1469,18 @@
1469
1469
  </xsl:if>
1470
1470
  <xsl:call-template name="insertListOf_Item"/>
1471
1471
  </xsl:for-each>
1472
+
1473
+ <!-- List of Examples -->
1474
+ <xsl:for-each select="$contents//mnx:examples/mnx:example">
1475
+ <xsl:if test="position() = 1">
1476
+ <!-- <fo:block break-after="page"/> -->
1477
+ <xsl:call-template name="insertListOf_Title">
1478
+ <xsl:with-param name="title" select="$title-list-examples"/>
1479
+ </xsl:call-template>
1480
+ </xsl:if>
1481
+ <xsl:call-template name="insertListOf_Item"/>
1482
+ </xsl:for-each>
1483
+
1472
1484
  </xsl:when> <!-- 'standard' or 'draft' -->
1473
1485
 
1474
1486
  <xsl:when test="$current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report'">
@@ -1482,14 +1494,14 @@
1482
1494
  </xsl:choose>
1483
1495
  </xsl:variable>
1484
1496
 
1485
- <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:item[@display = 'true'][@level &lt;= $toc_level or @type = 'figure' or @type = 'table']">
1497
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:item[@display = 'true'][@level &lt;= $toc_level or @type = 'figure' or @type = 'table' or @type = 'example']">
1486
1498
  <fo:block role="TOCI">
1487
1499
  <xsl:if test="@level = 1">
1488
1500
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1489
1501
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1490
1502
  </xsl:if>
1491
1503
 
1492
- <xsl:if test="@type = 'figure' or @type = 'table' and preceding-sibling::mnx:item[1][@type = 'figure' or @type = 'table']">
1504
+ <xsl:if test="@type = 'figure' or @type = 'table' or @type = 'example' and preceding-sibling::mnx:item[1][@type = 'figure' or @type = 'table' or @type = 'example']">
1493
1505
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
1494
1506
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1495
1507
  </xsl:if>
@@ -1546,9 +1558,7 @@
1546
1558
  </xsl:when>
1547
1559
  <xsl:otherwise>
1548
1560
  <fo:block xsl:use-attribute-sets="toc-title-style">
1549
- <xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">
1550
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1551
- </xsl:if>
1561
+ <xsl:call-template name="refine_toc-title-style"/>
1552
1562
  <!-- Contents -->
1553
1563
  <xsl:apply-templates/>
1554
1564
  </fo:block>
@@ -3911,6 +3921,16 @@
3911
3921
  </xsl:if>
3912
3922
  </xsl:variable>
3913
3923
 
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>
3933
+
3914
3934
  <xsl:variable name="title-list-recommendations">
3915
3935
  <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
3916
3936
  <xsl:value-of select="$toc_requirement_title"/>
@@ -4774,6 +4794,14 @@
4774
4794
 
4775
4795
  <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
4776
4796
 
4797
+ <xsl:template match="mn:pagebreak" mode="update_xml_step1">
4798
+ <xsl:copy>
4799
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
4800
+ <xsl:attribute name="from_source_xml">true</xsl:attribute>
4801
+ <xsl:apply-templates select="node()" mode="update_xml_step1"/>
4802
+ </xsl:copy>
4803
+ </xsl:template>
4804
+
4777
4805
  <!-- END: update new Presentation XML -->
4778
4806
 
4779
4807
  <!-- =========================================================================== -->
@@ -4811,6 +4839,7 @@
4811
4839
  <xsl:for-each select="ancestor-or-self::*[ancestor::mn:preface or ancestor::mn:sections or ancestor-or-self::mn:annex]">
4812
4840
  <xsl:if test="following-sibling::*">false</xsl:if>
4813
4841
  </xsl:for-each>
4842
+ <xsl:if test="@from_source_xml = 'true'">false</xsl:if>
4814
4843
  </xsl:variable>
4815
4844
 
4816
4845
  <xsl:if test="contains($isLast, 'false')">
@@ -5856,6 +5885,7 @@
5856
5885
  </xsl:attribute-set> <!-- sourcecode-style -->
5857
5886
 
5858
5887
  <xsl:template name="refine_sourcecode-style">
5888
+ <xsl:call-template name="setKeepAttributes"/>
5859
5889
  </xsl:template> <!-- refine_sourcecode-style -->
5860
5890
 
5861
5891
  <xsl:attribute-set name="sourcecode-number-style">
@@ -6595,10 +6625,38 @@
6595
6625
  <xsl:template name="refine_strike-style">
6596
6626
  </xsl:template>
6597
6627
 
6628
+ <xsl:attribute-set name="hr-block-style">
6629
+ <xsl:attribute name="font-size">1pt</xsl:attribute>
6630
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
6631
+ <xsl:attribute name="role">SKIP</xsl:attribute>
6632
+ <xsl:attribute name="padding-top">-2pt</xsl:attribute>
6633
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
6634
+ </xsl:attribute-set>
6635
+
6636
+ <xsl:template name="refine_hr-block-style">
6637
+ </xsl:template>
6638
+
6639
+ <xsl:attribute-set name="hr-style">
6640
+ <xsl:attribute name="leader-pattern">rule</xsl:attribute>
6641
+ <xsl:attribute name="leader-length">100%</xsl:attribute>
6642
+ </xsl:attribute-set>
6643
+
6644
+ <xsl:template name="refine_hr-style">
6645
+ </xsl:template>
6646
+
6598
6647
  <xsl:template match="mn:br">
6599
6648
  <xsl:value-of select="$linebreak"/>
6600
6649
  </xsl:template>
6601
6650
 
6651
+ <xsl:template match="mn:hr">
6652
+ <fo:block xsl:use-attribute-sets="hr-block-style">
6653
+ <xsl:call-template name="refine_hr-block-style"/>
6654
+ <fo:leader xsl:use-attribute-sets="hr-style">
6655
+ <xsl:call-template name="refine_hr-style"/>
6656
+ </fo:leader>
6657
+ </fo:block>
6658
+ </xsl:template>
6659
+
6602
6660
  <xsl:template match="mn:em">
6603
6661
  <fo:inline xsl:use-attribute-sets="em-style">
6604
6662
  <xsl:call-template name="refine_em_style"/>
@@ -7833,6 +7891,7 @@
7833
7891
  text line 1
7834
7892
  text line 2
7835
7893
  -->
7894
+ <xsl:variable name="example_display_in"><!-- don't change here, only for override xsl --></xsl:variable> <!-- block or inline -->
7836
7895
  <xsl:template match="mn:example" name="example">
7837
7896
  <xsl:call-template name="setNamedDestination"/>
7838
7897
  <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
@@ -7842,7 +7901,8 @@
7842
7901
  <xsl:call-template name="refine_example-style"/>
7843
7902
 
7844
7903
  <xsl:variable name="fo_element">
7845
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
7904
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
7905
+ <xsl:if test="normalize-space($example_display_in) != ''"><xsl:value-of select="$example_display_in"/></xsl:if>block
7846
7906
  </xsl:variable>
7847
7907
 
7848
7908
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -9418,6 +9478,12 @@
9418
9478
  <style name="{$key}-left"><xsl:value-of select="$value"/></style>
9419
9479
  <style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
9420
9480
  </xsl:if>
9481
+ <xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
9482
+ <style name="keep-together.within-page">always</style>
9483
+ </xsl:if>
9484
+ <xsl:if test="$key = 'page-break-after' and $value = 'always'">
9485
+ <style name="break-after">page</style>
9486
+ </xsl:if>
9421
9487
  </xsl:for-each>
9422
9488
  </xsl:variable>
9423
9489
  <xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
@@ -9461,6 +9527,11 @@
9461
9527
 
9462
9528
  <fo:block role="SKIP">
9463
9529
 
9530
+ <xsl:variable name="styles">
9531
+ <styles><xsl:call-template name="setTableStyles"/></styles>
9532
+ </xsl:variable>
9533
+ <xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
9534
+
9464
9535
  <xsl:if test="$isGenerateTableIF = 'true'">
9465
9536
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
9466
9537
  </xsl:if>
@@ -11622,9 +11693,25 @@
11622
11693
  <!-- ====== -->
11623
11694
  <!-- ====== -->
11624
11695
 
11625
- <xsl:attribute-set name="quote-style">
11696
+ <xsl:attribute-set name="quote-container-style">
11626
11697
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
11627
11698
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
11699
+ <xsl:attribute name="role">SKIP</xsl:attribute>
11700
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
11701
+ </xsl:attribute-set>
11702
+
11703
+ <xsl:template name="refine_quote-container-style">
11704
+ <xsl:if test="parent::mn:note">
11705
+ <xsl:if test="not(ancestor::mn:table)">
11706
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
11707
+ </xsl:if>
11708
+ </xsl:if>
11709
+ </xsl:template>
11710
+
11711
+ <xsl:attribute-set name="quote-style">
11712
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
11713
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
11714
+
11628
11715
  </xsl:attribute-set> <!-- quote-style -->
11629
11716
 
11630
11717
  <xsl:template name="refine_quote-style">
@@ -11632,6 +11719,7 @@
11632
11719
 
11633
11720
  <xsl:attribute-set name="quote-source-style">
11634
11721
  <xsl:attribute name="text-align">right</xsl:attribute>
11722
+ <xsl:attribute name="margin-right">-12mm</xsl:attribute>
11635
11723
  </xsl:attribute-set> <!-- quote-source-style -->
11636
11724
 
11637
11725
  <xsl:template name="refine_quote-source-style">
@@ -11654,12 +11742,9 @@
11654
11742
 
11655
11743
  <xsl:call-template name="setBlockSpanAll"/>
11656
11744
 
11657
- <xsl:if test="parent::mn:note">
11658
- <xsl:if test="not(ancestor::mn:table)">
11659
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
11660
- </xsl:if>
11661
- </xsl:if>
11662
- <fo:block-container margin-left="0mm" role="SKIP">
11745
+ <fo:block-container xsl:use-attribute-sets="quote-container-style">
11746
+ <xsl:call-template name="refine_quote-container-style"/>
11747
+
11663
11748
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
11664
11749
 
11665
11750
  <xsl:call-template name="refine_quote-style"/>
@@ -11671,14 +11756,16 @@
11671
11756
  </fo:block-container>
11672
11757
  </fo:block-container>
11673
11758
  <xsl:if test="mn:author or mn:fmt-source or mn:attribution">
11674
- <fo:block xsl:use-attribute-sets="quote-source-style">
11675
- <xsl:call-template name="refine_quote-source-style"/>
11676
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
11677
- <xsl:apply-templates select="mn:author"/>
11678
- <xsl:apply-templates select="mn:fmt-source"/>
11679
- <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
11680
- <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
11681
- </fo:block>
11759
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
11760
+ <fo:block xsl:use-attribute-sets="quote-source-style">
11761
+ <xsl:call-template name="refine_quote-source-style"/>
11762
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
11763
+ <xsl:apply-templates select="mn:author"/>
11764
+ <xsl:apply-templates select="mn:fmt-source"/>
11765
+ <!-- added for https://github.com/metanorma/isodoc/issues/607 -->
11766
+ <xsl:apply-templates select="mn:attribution/mn:p/node()"/>
11767
+ </fo:block>
11768
+ </fo:block-container>
11682
11769
  </xsl:if>
11683
11770
 
11684
11771
  </fo:block-container>
@@ -15227,6 +15314,9 @@
15227
15314
  </xsl:attribute-set>
15228
15315
 
15229
15316
  <xsl:template name="refine_toc-title-style">
15317
+ <xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">
15318
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15319
+ </xsl:if>
15230
15320
  </xsl:template>
15231
15321
 
15232
15322
  <xsl:attribute-set name="toc-title-page-style">
@@ -15264,7 +15354,7 @@
15264
15354
  <xsl:template name="refine_toc-pagenumber-style">
15265
15355
  </xsl:template>
15266
15356
 
15267
- <!-- List of Figures, Tables -->
15357
+ <!-- List of Figures, Tables, Examples -->
15268
15358
  <xsl:attribute-set name="toc-listof-title-style">
15269
15359
  <xsl:attribute name="role">TOCI</xsl:attribute>
15270
15360
  <xsl:attribute name="space-before">18pt</xsl:attribute>
@@ -15375,6 +15465,9 @@
15375
15465
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
15376
15466
  <xsl:call-template name="processFigures_Contents"/>
15377
15467
  </xsl:if>
15468
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
15469
+ <xsl:call-template name="processExamples_Contents"/>
15470
+ </xsl:if>
15378
15471
  </xsl:template>
15379
15472
 
15380
15473
  <xsl:template name="processTables_Contents">
@@ -15421,7 +15514,29 @@
15421
15514
  </mnx:figures>
15422
15515
  </xsl:template>
15423
15516
 
15424
- <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">
15517
+ <xsl:template name="processExamples_Contents">
15518
+ <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>
15535
+ </xsl:for-each>
15536
+ </mnx:examples>
15537
+ </xsl:template>
15538
+
15539
+ <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">
15425
15540
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
15426
15541
  <xsl:apply-templates mode="contents"/>
15427
15542
  <xsl:text> </xsl:text>
@@ -15430,40 +15545,40 @@
15430
15545
 
15431
15546
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
15432
15547
 
15433
- <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">
15548
+ <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">
15434
15549
  <xsl:apply-templates mode="contents"/>
15435
15550
  <xsl:text> </xsl:text>
15436
15551
  </xsl:template>
15437
15552
 
15438
- <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">
15553
+ <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">
15439
15554
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
15440
15555
  <xsl:apply-templates mode="bookmarks"/>
15441
15556
  <xsl:text> </xsl:text>
15442
15557
  </xsl:if>
15443
15558
  </xsl:template>
15444
15559
 
15445
- <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">
15560
+ <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">
15446
15561
  <xsl:apply-templates mode="bookmarks"/>
15447
15562
  <xsl:text> </xsl:text>
15448
15563
  </xsl:template>
15449
15564
 
15450
- <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">
15565
+ <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">
15451
15566
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
15452
15567
  <xsl:value-of select="."/>
15453
15568
  </xsl:if>
15454
15569
  </xsl:template>
15455
15570
 
15456
- <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">
15571
+ <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">
15457
15572
  <xsl:value-of select="."/>
15458
15573
  </xsl:template>
15459
15574
 
15460
- <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">
15575
+ <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">
15461
15576
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
15462
15577
  <xsl:value-of select="."/>
15463
15578
  </xsl:if>
15464
15579
  </xsl:template>
15465
15580
 
15466
- <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">
15581
+ <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">
15467
15582
  <xsl:value-of select="."/>
15468
15583
  </xsl:template>
15469
15584
 
@@ -15696,6 +15811,11 @@
15696
15811
  <xsl:with-param name="lang" select="@lang"/>
15697
15812
  </xsl:call-template>
15698
15813
 
15814
+ <xsl:call-template name="insertExampleBookmarks">
15815
+ <xsl:with-param name="contents" select="mnx:contents"/>
15816
+ <xsl:with-param name="lang" select="@lang"/>
15817
+ </xsl:call-template>
15818
+
15699
15819
  </fo:bookmark>
15700
15820
 
15701
15821
  </xsl:for-each>
@@ -15714,6 +15834,11 @@
15714
15834
  <xsl:with-param name="lang" select="@lang"/>
15715
15835
  </xsl:call-template>
15716
15836
 
15837
+ <xsl:call-template name="insertExampleBookmarks">
15838
+ <xsl:with-param name="contents" select="mnx:contents"/>
15839
+ <xsl:with-param name="lang" select="@lang"/>
15840
+ </xsl:call-template>
15841
+
15717
15842
  </xsl:for-each>
15718
15843
  </xsl:otherwise>
15719
15844
  </xsl:choose>
@@ -15730,6 +15855,11 @@
15730
15855
  <xsl:with-param name="lang" select="@lang"/>
15731
15856
  </xsl:call-template>
15732
15857
 
15858
+ <xsl:call-template name="insertExampleBookmarks">
15859
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15860
+ <xsl:with-param name="lang" select="@lang"/>
15861
+ </xsl:call-template>
15862
+
15733
15863
  </xsl:otherwise>
15734
15864
  </xsl:choose>
15735
15865
 
@@ -15810,6 +15940,46 @@
15810
15940
  </fo:bookmark>
15811
15941
  </xsl:if>
15812
15942
  </xsl:template> <!-- insertTableBookmarks -->
15943
+
15944
+ <xsl:template name="insertExampleBookmarks">
15945
+ <xsl:param name="contents"/>
15946
+ <xsl:param name="lang"/>
15947
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15948
+ <xsl:if test="$contents_nodes/mnx:example">
15949
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
15950
+ <fo:bookmark-title>
15951
+ <xsl:choose>
15952
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
15953
+ <xsl:otherwise>Examples</xsl:otherwise>
15954
+ </xsl:choose>
15955
+ </fo:bookmark-title>
15956
+ <xsl:for-each select="$contents_nodes/mnx:example">
15957
+ <fo:bookmark internal-destination="{@id}">
15958
+ <fo:bookmark-title>
15959
+ <xsl:value-of select="normalize-space(mnx:title)"/>
15960
+ </fo:bookmark-title>
15961
+ </fo:bookmark>
15962
+ </xsl:for-each>
15963
+ </fo:bookmark>
15964
+ </xsl:if>
15965
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
15966
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15967
+
15968
+ <xsl:variable name="bookmark-title">
15969
+ <xsl:value-of select="$title-list-examples"/>
15970
+ </xsl:variable>
15971
+
15972
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
15973
+
15974
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
15975
+ <fo:bookmark internal-destination="{@id}">
15976
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
15977
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
15978
+ </fo:bookmark>
15979
+ </xsl:for-each>
15980
+ </fo:bookmark>
15981
+ </xsl:if>
15982
+ </xsl:template> <!-- insertExampleBookmarks -->
15813
15983
  <!-- End Bookmarks -->
15814
15984
 
15815
15985
  <!-- ============================ -->
@@ -16891,6 +17061,10 @@
16891
17061
  <fo:block break-after="page"/>
16892
17062
  </xsl:template>
16893
17063
 
17064
+ <xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
17065
+ <fo:block break-after="page"/>
17066
+ </xsl:template>
17067
+
16894
17068
  <xsl:variable name="font_main_root_style">
16895
17069
  <root-style xsl:use-attribute-sets="root-style">
16896
17070
  </root-style>