metanorma-ieee 1.6.11 → 1.6.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: e016d0278141ee691cf614022025588aa67e47edfd080ce4395e3d6faab39c8e
4
- data.tar.gz: 27e4f8a4f0de51fe4cd6a075990afebd7992cad149e9581c399e46c0849046d3
3
+ metadata.gz: 040d8a4d5f82f4885d3c664a2e578d1fe09779d9d9d859b99ddb6c255063fc1b
4
+ data.tar.gz: 85f374a9a188ac0c19b20aff633689cd73bccb8d11b87fef93ab7f789f6de18a
5
5
  SHA512:
6
- metadata.gz: 6cfd05e2cf70bdd4bb26feb77645afcc241ed2caadde5d8c913d71b02390856242ecf19a4c0e5ed3755b182f259f08e6bf83662e6b513d5e1bafec0e51c63070
7
- data.tar.gz: c70ab7c73f0ba053331cb3843099652b8602b057d24b28727cf6f54baf061e0c3e63adc7a063ed33f01bf618fab5ea2eb70bc398658bf4ff44a45f939172e18a
6
+ metadata.gz: 4b55c48a11df1184e7862227459744e16eeb255b25b5f8d35cddf5833d7c19fa93b814a2f16291d90d7f10426f9d90485bd2891a84bd7f91ce22e04e36d338e8
7
+ data.tar.gz: dde948124ac484a17882783a1504bc14f2f0fb15d549c90ebd9e313298a9bdfe460d0d64b7040717ef499462a00b586c16201071d54439a371ed277cdbcd3039
@@ -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">
@@ -15227,6 +15287,9 @@
15227
15287
  </xsl:attribute-set>
15228
15288
 
15229
15289
  <xsl:template name="refine_toc-title-style">
15290
+ <xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">
15291
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15292
+ </xsl:if>
15230
15293
  </xsl:template>
15231
15294
 
15232
15295
  <xsl:attribute-set name="toc-title-page-style">
@@ -15264,7 +15327,7 @@
15264
15327
  <xsl:template name="refine_toc-pagenumber-style">
15265
15328
  </xsl:template>
15266
15329
 
15267
- <!-- List of Figures, Tables -->
15330
+ <!-- List of Figures, Tables, Examples -->
15268
15331
  <xsl:attribute-set name="toc-listof-title-style">
15269
15332
  <xsl:attribute name="role">TOCI</xsl:attribute>
15270
15333
  <xsl:attribute name="space-before">18pt</xsl:attribute>
@@ -15375,6 +15438,9 @@
15375
15438
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
15376
15439
  <xsl:call-template name="processFigures_Contents"/>
15377
15440
  </xsl:if>
15441
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
15442
+ <xsl:call-template name="processExamples_Contents"/>
15443
+ </xsl:if>
15378
15444
  </xsl:template>
15379
15445
 
15380
15446
  <xsl:template name="processTables_Contents">
@@ -15421,7 +15487,29 @@
15421
15487
  </mnx:figures>
15422
15488
  </xsl:template>
15423
15489
 
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">
15490
+ <xsl:template name="processExamples_Contents">
15491
+ <mnx:examples>
15492
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
15493
+ <xsl:choose>
15494
+ <xsl:when test="mn:fmt-name">
15495
+ <xsl:variable name="fmt_name">
15496
+ <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
15497
+ </xsl:variable>
15498
+ <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
15499
+ <xsl:copy-of select="$fmt_name"/>
15500
+ </mnx:example>
15501
+ </xsl:when>
15502
+ <xsl:otherwise>
15503
+ <mnx:example id="{@id}" alt-text="{mn:name}">
15504
+ <xsl:copy-of select="mn:name"/>
15505
+ </mnx:example>
15506
+ </xsl:otherwise>
15507
+ </xsl:choose>
15508
+ </xsl:for-each>
15509
+ </mnx:examples>
15510
+ </xsl:template>
15511
+
15512
+ <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
15513
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
15426
15514
  <xsl:apply-templates mode="contents"/>
15427
15515
  <xsl:text> </xsl:text>
@@ -15430,40 +15518,40 @@
15430
15518
 
15431
15519
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
15432
15520
 
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">
15521
+ <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
15522
  <xsl:apply-templates mode="contents"/>
15435
15523
  <xsl:text> </xsl:text>
15436
15524
  </xsl:template>
15437
15525
 
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">
15526
+ <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
15527
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
15440
15528
  <xsl:apply-templates mode="bookmarks"/>
15441
15529
  <xsl:text> </xsl:text>
15442
15530
  </xsl:if>
15443
15531
  </xsl:template>
15444
15532
 
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">
15533
+ <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
15534
  <xsl:apply-templates mode="bookmarks"/>
15447
15535
  <xsl:text> </xsl:text>
15448
15536
  </xsl:template>
15449
15537
 
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">
15538
+ <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
15539
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
15452
15540
  <xsl:value-of select="."/>
15453
15541
  </xsl:if>
15454
15542
  </xsl:template>
15455
15543
 
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">
15544
+ <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
15545
  <xsl:value-of select="."/>
15458
15546
  </xsl:template>
15459
15547
 
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">
15548
+ <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
15549
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
15462
15550
  <xsl:value-of select="."/>
15463
15551
  </xsl:if>
15464
15552
  </xsl:template>
15465
15553
 
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">
15554
+ <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
15555
  <xsl:value-of select="."/>
15468
15556
  </xsl:template>
15469
15557
 
@@ -15696,6 +15784,11 @@
15696
15784
  <xsl:with-param name="lang" select="@lang"/>
15697
15785
  </xsl:call-template>
15698
15786
 
15787
+ <xsl:call-template name="insertExampleBookmarks">
15788
+ <xsl:with-param name="contents" select="mnx:contents"/>
15789
+ <xsl:with-param name="lang" select="@lang"/>
15790
+ </xsl:call-template>
15791
+
15699
15792
  </fo:bookmark>
15700
15793
 
15701
15794
  </xsl:for-each>
@@ -15714,6 +15807,11 @@
15714
15807
  <xsl:with-param name="lang" select="@lang"/>
15715
15808
  </xsl:call-template>
15716
15809
 
15810
+ <xsl:call-template name="insertExampleBookmarks">
15811
+ <xsl:with-param name="contents" select="mnx:contents"/>
15812
+ <xsl:with-param name="lang" select="@lang"/>
15813
+ </xsl:call-template>
15814
+
15717
15815
  </xsl:for-each>
15718
15816
  </xsl:otherwise>
15719
15817
  </xsl:choose>
@@ -15730,6 +15828,11 @@
15730
15828
  <xsl:with-param name="lang" select="@lang"/>
15731
15829
  </xsl:call-template>
15732
15830
 
15831
+ <xsl:call-template name="insertExampleBookmarks">
15832
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15833
+ <xsl:with-param name="lang" select="@lang"/>
15834
+ </xsl:call-template>
15835
+
15733
15836
  </xsl:otherwise>
15734
15837
  </xsl:choose>
15735
15838
 
@@ -15810,6 +15913,46 @@
15810
15913
  </fo:bookmark>
15811
15914
  </xsl:if>
15812
15915
  </xsl:template> <!-- insertTableBookmarks -->
15916
+
15917
+ <xsl:template name="insertExampleBookmarks">
15918
+ <xsl:param name="contents"/>
15919
+ <xsl:param name="lang"/>
15920
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15921
+ <xsl:if test="$contents_nodes/mnx:example">
15922
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
15923
+ <fo:bookmark-title>
15924
+ <xsl:choose>
15925
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
15926
+ <xsl:otherwise>Examples</xsl:otherwise>
15927
+ </xsl:choose>
15928
+ </fo:bookmark-title>
15929
+ <xsl:for-each select="$contents_nodes/mnx:example">
15930
+ <fo:bookmark internal-destination="{@id}">
15931
+ <fo:bookmark-title>
15932
+ <xsl:value-of select="normalize-space(mnx:title)"/>
15933
+ </fo:bookmark-title>
15934
+ </fo:bookmark>
15935
+ </xsl:for-each>
15936
+ </fo:bookmark>
15937
+ </xsl:if>
15938
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
15939
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15940
+
15941
+ <xsl:variable name="bookmark-title">
15942
+ <xsl:value-of select="$title-list-examples"/>
15943
+ </xsl:variable>
15944
+
15945
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
15946
+
15947
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
15948
+ <fo:bookmark internal-destination="{@id}">
15949
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
15950
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
15951
+ </fo:bookmark>
15952
+ </xsl:for-each>
15953
+ </fo:bookmark>
15954
+ </xsl:if>
15955
+ </xsl:template> <!-- insertExampleBookmarks -->
15813
15956
  <!-- End Bookmarks -->
15814
15957
 
15815
15958
  <!-- ============================ -->
@@ -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">
@@ -15227,6 +15287,9 @@
15227
15287
  </xsl:attribute-set>
15228
15288
 
15229
15289
  <xsl:template name="refine_toc-title-style">
15290
+ <xsl:if test="($current_template = 'standard' or $current_template = 'draft') and ($stage = 'published' or $stage = 'approved' or $stage_published = 'true')">
15291
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
15292
+ </xsl:if>
15230
15293
  </xsl:template>
15231
15294
 
15232
15295
  <xsl:attribute-set name="toc-title-page-style">
@@ -15264,7 +15327,7 @@
15264
15327
  <xsl:template name="refine_toc-pagenumber-style">
15265
15328
  </xsl:template>
15266
15329
 
15267
- <!-- List of Figures, Tables -->
15330
+ <!-- List of Figures, Tables, Examples -->
15268
15331
  <xsl:attribute-set name="toc-listof-title-style">
15269
15332
  <xsl:attribute name="role">TOCI</xsl:attribute>
15270
15333
  <xsl:attribute name="space-before">18pt</xsl:attribute>
@@ -15375,6 +15438,9 @@
15375
15438
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
15376
15439
  <xsl:call-template name="processFigures_Contents"/>
15377
15440
  </xsl:if>
15441
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
15442
+ <xsl:call-template name="processExamples_Contents"/>
15443
+ </xsl:if>
15378
15444
  </xsl:template>
15379
15445
 
15380
15446
  <xsl:template name="processTables_Contents">
@@ -15421,7 +15487,29 @@
15421
15487
  </mnx:figures>
15422
15488
  </xsl:template>
15423
15489
 
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">
15490
+ <xsl:template name="processExamples_Contents">
15491
+ <mnx:examples>
15492
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
15493
+ <xsl:choose>
15494
+ <xsl:when test="mn:fmt-name">
15495
+ <xsl:variable name="fmt_name">
15496
+ <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
15497
+ </xsl:variable>
15498
+ <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
15499
+ <xsl:copy-of select="$fmt_name"/>
15500
+ </mnx:example>
15501
+ </xsl:when>
15502
+ <xsl:otherwise>
15503
+ <mnx:example id="{@id}" alt-text="{mn:name}">
15504
+ <xsl:copy-of select="mn:name"/>
15505
+ </mnx:example>
15506
+ </xsl:otherwise>
15507
+ </xsl:choose>
15508
+ </xsl:for-each>
15509
+ </mnx:examples>
15510
+ </xsl:template>
15511
+
15512
+ <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
15513
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
15426
15514
  <xsl:apply-templates mode="contents"/>
15427
15515
  <xsl:text> </xsl:text>
@@ -15430,40 +15518,40 @@
15430
15518
 
15431
15519
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
15432
15520
 
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">
15521
+ <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
15522
  <xsl:apply-templates mode="contents"/>
15435
15523
  <xsl:text> </xsl:text>
15436
15524
  </xsl:template>
15437
15525
 
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">
15526
+ <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
15527
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
15440
15528
  <xsl:apply-templates mode="bookmarks"/>
15441
15529
  <xsl:text> </xsl:text>
15442
15530
  </xsl:if>
15443
15531
  </xsl:template>
15444
15532
 
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">
15533
+ <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
15534
  <xsl:apply-templates mode="bookmarks"/>
15447
15535
  <xsl:text> </xsl:text>
15448
15536
  </xsl:template>
15449
15537
 
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">
15538
+ <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
15539
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
15452
15540
  <xsl:value-of select="."/>
15453
15541
  </xsl:if>
15454
15542
  </xsl:template>
15455
15543
 
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">
15544
+ <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
15545
  <xsl:value-of select="."/>
15458
15546
  </xsl:template>
15459
15547
 
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">
15548
+ <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
15549
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
15462
15550
  <xsl:value-of select="."/>
15463
15551
  </xsl:if>
15464
15552
  </xsl:template>
15465
15553
 
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">
15554
+ <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
15555
  <xsl:value-of select="."/>
15468
15556
  </xsl:template>
15469
15557
 
@@ -15696,6 +15784,11 @@
15696
15784
  <xsl:with-param name="lang" select="@lang"/>
15697
15785
  </xsl:call-template>
15698
15786
 
15787
+ <xsl:call-template name="insertExampleBookmarks">
15788
+ <xsl:with-param name="contents" select="mnx:contents"/>
15789
+ <xsl:with-param name="lang" select="@lang"/>
15790
+ </xsl:call-template>
15791
+
15699
15792
  </fo:bookmark>
15700
15793
 
15701
15794
  </xsl:for-each>
@@ -15714,6 +15807,11 @@
15714
15807
  <xsl:with-param name="lang" select="@lang"/>
15715
15808
  </xsl:call-template>
15716
15809
 
15810
+ <xsl:call-template name="insertExampleBookmarks">
15811
+ <xsl:with-param name="contents" select="mnx:contents"/>
15812
+ <xsl:with-param name="lang" select="@lang"/>
15813
+ </xsl:call-template>
15814
+
15717
15815
  </xsl:for-each>
15718
15816
  </xsl:otherwise>
15719
15817
  </xsl:choose>
@@ -15730,6 +15828,11 @@
15730
15828
  <xsl:with-param name="lang" select="@lang"/>
15731
15829
  </xsl:call-template>
15732
15830
 
15831
+ <xsl:call-template name="insertExampleBookmarks">
15832
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
15833
+ <xsl:with-param name="lang" select="@lang"/>
15834
+ </xsl:call-template>
15835
+
15733
15836
  </xsl:otherwise>
15734
15837
  </xsl:choose>
15735
15838
 
@@ -15810,6 +15913,46 @@
15810
15913
  </fo:bookmark>
15811
15914
  </xsl:if>
15812
15915
  </xsl:template> <!-- insertTableBookmarks -->
15916
+
15917
+ <xsl:template name="insertExampleBookmarks">
15918
+ <xsl:param name="contents"/>
15919
+ <xsl:param name="lang"/>
15920
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
15921
+ <xsl:if test="$contents_nodes/mnx:example">
15922
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
15923
+ <fo:bookmark-title>
15924
+ <xsl:choose>
15925
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
15926
+ <xsl:otherwise>Examples</xsl:otherwise>
15927
+ </xsl:choose>
15928
+ </fo:bookmark-title>
15929
+ <xsl:for-each select="$contents_nodes/mnx:example">
15930
+ <fo:bookmark internal-destination="{@id}">
15931
+ <fo:bookmark-title>
15932
+ <xsl:value-of select="normalize-space(mnx:title)"/>
15933
+ </fo:bookmark-title>
15934
+ </fo:bookmark>
15935
+ </xsl:for-each>
15936
+ </fo:bookmark>
15937
+ </xsl:if>
15938
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
15939
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
15940
+
15941
+ <xsl:variable name="bookmark-title">
15942
+ <xsl:value-of select="$title-list-examples"/>
15943
+ </xsl:variable>
15944
+
15945
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
15946
+
15947
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
15948
+ <fo:bookmark internal-destination="{@id}">
15949
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
15950
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
15951
+ </fo:bookmark>
15952
+ </xsl:for-each>
15953
+ </fo:bookmark>
15954
+ </xsl:if>
15955
+ </xsl:template> <!-- insertExampleBookmarks -->
15813
15956
  <!-- End Bookmarks -->
15814
15957
 
15815
15958
  <!-- ============================ -->
@@ -105,7 +105,7 @@ module IsoDoc
105
105
  def note_style_cleanup(docxml)
106
106
  docxml.xpath("//span[@class = 'note_label']").each do |s|
107
107
  multi = /^#{@i18n.note}\s+[A-Z0-9.]+/.match?(s.text)
108
- div = s.at("./ancestor::div[@class = 'Note']")
108
+ div = s.at("./ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' Note ')]")
109
109
  if multi
110
110
  s.remove
111
111
  seq = notesequence(div)
@@ -213,6 +213,12 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
213
213
  <define name="ExampleAttributes">
214
214
  <ref name="NumberingAttributes"/>
215
215
  <ref name="BlockAttributes"/>
216
+ <optional>
217
+ <attribute name="collapsible">
218
+ <a:documentation>Render the example as collapsible (HTML5 details/summary)</a:documentation>
219
+ <data type="boolean"/>
220
+ </attribute>
221
+ </optional>
216
222
  </define>
217
223
  <define name="ExampleBody">
218
224
  <optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ieee
3
- VERSION = "1.6.11".freeze
3
+ VERSION = "1.6.13".freeze
4
4
  end
5
5
  end
@@ -24,7 +24,7 @@ template:
24
24
  manual: book
25
25
  proceedings: book
26
26
  inproceedings: "{{ creatornames }}$$$ “{{ title }}$$$|” <em>{{host_title}}</em>$$$ {{place}}$$$ {{extent}}$$$ {{disambiguated_date}}$$$ {{ labels['viewed'] }}_{{date_accessed}}$$$ {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: '$$$ ' }}{% endif %}{% endif %} $$$"
27
- inbook: "{{ creatornames }}$$$ “{{ title }}$$$|” {{ labels['in'] }} {{ host_creatornames}} ({{ host_role}}) : <em>{{host_title}}</em>$$$ {{place}}: {{publisher}}$$$ {{disambiguated_date}}$$$ {{extent}}$$$ {{ labels['viewed'] }}_{{date_accessed}}$$$ {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: '$$$ ' }}{% endif %}{% endif %} $$$"
27
+ inbook: "{{ creatornames }}$$$ “{{ title }}$$$|” {{ labels['in_document'] }} {{ host_creatornames}} ({{ host_role}}) : <em>{{host_title}}</em>$$$ {{place}}: {{publisher}}$$$ {{disambiguated_date}}$$$ {{extent}}$$$ {{ labels['viewed'] }}_{{date_accessed}}$$$ {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: '$$$ ' }}{% endif %}{% endif %} $$$"
28
28
  incollection: inbook
29
29
  thesis: "{{ creatornames }} $$$ “{{ title }}$$$|” {{ medium | capitalize }}$$$ {{ publisher }}$$$ {{ disambiguated_date }}$$$ {{ labels['viewed'] }}_{{date_accessed}}$$$ {% if uri %}{{ uri }}{% else %}{% if doi %}DOI: {{ doi | join: '$$$ ' }}{% endif %}{% endif %} $$$"
30
30
  unpublished: thesis
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ieee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.11
4
+ version: 1.6.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2026-05-25 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: metanorma-standoc
@@ -359,7 +358,6 @@ homepage: https://github.com/metanorma/metanorma-ieee
359
358
  licenses:
360
359
  - BSD-2-Clause
361
360
  metadata: {}
362
- post_install_message:
363
361
  rdoc_options: []
364
362
  require_paths:
365
363
  - lib
@@ -374,8 +372,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
374
372
  - !ruby/object:Gem::Version
375
373
  version: '0'
376
374
  requirements: []
377
- rubygems_version: 3.5.22
378
- signing_key:
375
+ rubygems_version: 4.0.10
379
376
  specification_version: 4
380
377
  summary: Metanorma for the IEEE
381
378
  test_files: []