metanorma-ieee 1.6.10 → 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: 7ae3dc5271b5b6922a7c4d5c97a069467a8abe8b932eebe915288b3919bb570a
4
- data.tar.gz: 2813a9169b01737e54bb8bd30b3efc67f313f3b737390434293a8a636611c76a
3
+ metadata.gz: 040d8a4d5f82f4885d3c664a2e578d1fe09779d9d9d859b99ddb6c255063fc1b
4
+ data.tar.gz: 85f374a9a188ac0c19b20aff633689cd73bccb8d11b87fef93ab7f789f6de18a
5
5
  SHA512:
6
- metadata.gz: 9ae22a0ab171d82c4f62c00ecb21acbd527830595f2742f6f0c56ab1472d9b5a217f1c9c22a3b9aeb555718ee45493127300338e708d150dec61696ddb3c2812
7
- data.tar.gz: 1f82da62388754f1e997341350d05f26eb71f662520475734f4f689dce1c6e8ba3076671f807d9e08db24953ff60bdc2b5d31308d77dcba990754107d47ecdd6
6
+ metadata.gz: 4b55c48a11df1184e7862227459744e16eeb255b25b5f8d35cddf5833d7c19fa93b814a2f16291d90d7f10426f9d90485bd2891a84bd7f91ce22e04e36d338e8
7
+ data.tar.gz: dde948124ac484a17882783a1504bc14f2f0fb15d549c90ebd9e313298a9bdfe460d0d64b7040717ef499462a00b586c16201071d54439a371ed277cdbcd3039
@@ -931,7 +931,9 @@ nav {
931
931
  background-color: black;
932
932
  color: white !important;
933
933
  cursor: pointer;
934
- z-index: 100;
934
+ left: 0;
935
+ top: 0;
936
+ z-index: 103;
935
937
  }
936
938
  #toggle span {
937
939
  text-align: center;
@@ -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
  <!-- ============================ -->
@@ -29,47 +29,6 @@ module IsoDoc
29
29
  def fileloc(loc)
30
30
  File.join(File.dirname(__FILE__), loc)
31
31
  end
32
-
33
- def std_docid_semantic(id)
34
- id.nil? and return nil
35
- ret = Nokogiri::XML.fragment(id)
36
- ret.traverse do |x|
37
- x.text? or next
38
- x.replace(std_docid_semantic1(x.text))
39
- end
40
- to_xml(ret)
41
- end
42
-
43
- def std_docid_semantic1(id)
44
- ids = id.split(/\p{Zs}/)
45
- agency?(ids[0].sub(%r{^([^/]+)/.*$}, "\\1")) or return id
46
- std_docid_semantic_full(id)
47
- end
48
-
49
- # AGENCY+ TYPE NUMBER YEAR
50
- def std_docid_semantic_full(ident)
51
- m = ident.match(%r{(?<text>[^0-9]+\p{Zs})
52
- (?<num>[0-9]+[^:]*)
53
- (?:[:](?<yr>(?:19|20)\d\d))?}x)
54
- m or return ident
55
- ret = std_docid_sdo(m[:text]) +
56
- "<span class='std_docNumber'>#{m[:num]}</span>"
57
- m[:yr] and ret += ":<span class='std_year'>#{m[:yr]}</span>"
58
- ret.gsub(%r{</span>(\p{Zs}+)<}, "\\1</span><")
59
- end
60
-
61
- def std_docid_sdo(text)
62
- found = false
63
- text.split(%r{([\p{Zs}|/]+)}).reverse.map do |x|
64
- if /[A-Za-z]/.match?(x)
65
- k = if found || agency?(x) then "std_publisher"
66
- else "std_documentType"
67
- end
68
- found = true
69
- "<span class='#{k}'>#{x}</span>"
70
- else x end
71
- end.reverse.join.gsub(%r{</span>(\p{Zs}+)<}, "\\1</span><")
72
- end
73
32
  end
74
33
  end
75
34
  end
@@ -1,3 +1,5 @@
1
+ require "pubid"
2
+
1
3
  module IsoDoc
2
4
  module Ieee
3
5
  class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
@@ -98,6 +100,18 @@ module IsoDoc
98
100
  std_docid_semantic(super)
99
101
  end
100
102
 
103
+ def annotate_docid?(_id)
104
+ true
105
+ end
106
+
107
+ def std_docid_span_classes(id)
108
+ id.gsub('class="publisher"', 'class="std_publisher"')
109
+ .gsub('class="doctype"', 'class="std_documentType"')
110
+ .gsub('class="docnumber"', 'class="std_docNumber"')
111
+ .gsub('class="part"', 'class="std_docNumber"')
112
+ .gsub('class="year"', 'class="std_year"')
113
+ end
114
+
101
115
  def eref_localities_conflated(refs, target, node)
102
116
  droploc = node["droploc"]
103
117
  node["droploc"] = true
@@ -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)
@@ -187,6 +187,15 @@ Applicable to modify and delete</a:documentation>
187
187
  <a:documentation>Optional caption of this block</a:documentation>
188
188
  </attribute>
189
189
  </optional>
190
+ <optional>
191
+ <attribute name="position">
192
+ <a:documentation>For an "add" change, whether the change is added before or after the location</a:documentation>
193
+ <choice>
194
+ <value>before</value>
195
+ <value>after</value>
196
+ </choice>
197
+ </attribute>
198
+ </optional>
190
199
  <optional>
191
200
  <element name="location">
192
201
  <a:documentation>The location(s) in the original document which have undergone the change described in this block</a:documentation>
@@ -1142,11 +1142,11 @@ NOTE: This should preferably be encoded as a URI or short identifier, rather th
1142
1142
  <a:documentation>Information about how long the current description of the bibliographic item is valid for</a:documentation>
1143
1143
  </ref>
1144
1144
  </optional>
1145
- <optional>
1145
+ <zeroOrMore>
1146
1146
  <ref name="depiction">
1147
1147
  <a:documentation>Depiction of the bibliographic item, typically an image</a:documentation>
1148
1148
  </ref>
1149
- </optional>
1149
+ </zeroOrMore>
1150
1150
  </define>
1151
1151
  <define name="ReducedBibliographicItem">
1152
1152
  <a:documentation>Reduced description of a bibliographic resource, without mandatory title and docidentifier, used for document relations
@@ -2015,15 +2015,11 @@ provided that it is not the entire bibliographic item that is so related</a:docu
2015
2015
  <a:documentation>A version of the bibliographic item (within an edition). Can be used for drafts</a:documentation>
2016
2016
  <element name="version">
2017
2017
  <optional>
2018
- <ref name="revision-date">
2019
- <a:documentation>The date at which the current version of the bibliographic item was produced</a:documentation>
2020
- </ref>
2021
- </optional>
2022
- <optional>
2023
- <ref name="draft">
2024
- <a:documentation>The identifier for the current draft of the bibliographic item</a:documentation>
2025
- </ref>
2018
+ <attribute name="type">
2019
+ <a:documentation>Versioning scheme, in case of multiple versioning schemes</a:documentation>
2020
+ </attribute>
2026
2021
  </optional>
2022
+ <text/>
2027
2023
  </element>
2028
2024
  </define>
2029
2025
  <define name="vedition">
@@ -2063,13 +2059,13 @@ provided that it is not the entire bibliographic item that is so related</a:docu
2063
2059
  <ref name="LocalizedString"/>
2064
2060
  </element>
2065
2061
  </optional>
2066
- <oneOrMore>
2062
+ <zeroOrMore>
2067
2063
  <element name="taxon">
2068
2064
  <a:documentation>The keywords as a hierarchical taxonomy. For example, the sequence of `taxon` elements
2069
2065
  `pump`, `centrifugal pump`, `line shaft pump` represents a taxonomic classification</a:documentation>
2070
2066
  <ref name="LocalizedString"/>
2071
2067
  </element>
2072
- </oneOrMore>
2068
+ </zeroOrMore>
2073
2069
  <zeroOrMore>
2074
2070
  <ref name="vocabid">
2075
2071
  <a:documentation>Identifiers for the keyword as a controlled vocabulary</a:documentation>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!-- VERSION v2.1.5 -->
3
+ <!-- VERSION v2.1.6 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -164,6 +164,9 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
164
164
  </choice>
165
165
  </attribute>
166
166
  </optional>
167
+ <optional>
168
+ <ref name="DisplayDirective"/>
169
+ </optional>
167
170
  </define>
168
171
  <define name="DlAttributes">
169
172
  <ref name="BlockAttributes"/>
@@ -210,6 +213,12 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
210
213
  <define name="ExampleAttributes">
211
214
  <ref name="NumberingAttributes"/>
212
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>
213
222
  </define>
214
223
  <define name="ExampleBody">
215
224
  <optional>
@@ -814,6 +823,9 @@ titlecase, or lowercase</a:documentation>
814
823
  </define>
815
824
  <define name="UlAttributes" combine="interleave">
816
825
  <ref name="BlockAttributes"/>
826
+ <optional>
827
+ <ref name="DisplayDirective"/>
828
+ </optional>
817
829
  </define>
818
830
  <define name="TableAttributes" combine="interleave">
819
831
  <optional>
@@ -1968,7 +1980,7 @@ used in document amendments</a:documentation>
1968
1980
  <a:documentation>Zero or more examples of how the term is to be used</a:documentation>
1969
1981
  </ref>
1970
1982
  </zeroOrMore>
1971
- <ref name="TermSource">
1983
+ <ref name="TermSources">
1972
1984
  <a:documentation>Bibliographic references for the managed term</a:documentation>
1973
1985
  </ref>
1974
1986
  </element>
@@ -2077,7 +2089,7 @@ used in document amendments</a:documentation>
2077
2089
  <a:documentation>Information about how the designation is to be used</a:documentation>
2078
2090
  </ref>
2079
2091
  </optional>
2080
- <ref name="TermSource">
2092
+ <ref name="TermSources">
2081
2093
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2082
2094
  </ref>
2083
2095
  </define>
@@ -2348,7 +2360,7 @@ used in document amendments</a:documentation>
2348
2360
  <ref name="formula"/>
2349
2361
  </choice>
2350
2362
  </oneOrMore>
2351
- <ref name="TermSource">
2363
+ <ref name="TermSources">
2352
2364
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2353
2365
  </ref>
2354
2366
  </element>
@@ -2365,7 +2377,7 @@ used in document amendments</a:documentation>
2365
2377
  <ref name="formula"/>
2366
2378
  </choice>
2367
2379
  </oneOrMore>
2368
- <ref name="TermSource">
2380
+ <ref name="TermSources">
2369
2381
  <a:documentation>Bibliographic references for this designation of the managed term</a:documentation>
2370
2382
  </ref>
2371
2383
  </element>
@@ -2788,6 +2800,26 @@ to span across both columns</a:documentation>
2788
2800
  </attribute>
2789
2801
  </optional>
2790
2802
  </define>
2803
+ <define name="DisplayDirective">
2804
+ <a:documentation>Directive on how to render a block in Presentation XML </a:documentation>
2805
+ <optional>
2806
+ <attribute name="display">
2807
+ <a:documentation>Display style for block.
2808
+ If the block is `ol` or `ul` and dispay is `table`,
2809
+ the list is to be rendered as a table, with a column for each nested level, and a row for each terminal sublist</a:documentation>
2810
+ </attribute>
2811
+ </optional>
2812
+ <optional>
2813
+ <attribute name="display-directives">
2814
+ <a:documentation>display-directives is a key-value set of attributes, guiding how the rendering of the block should happen.
2815
+ The key-value set is comma-delimited, and encoded as `key1='value1',key2='value'`,
2816
+ as with stem//mn/@data-metanorma-numberformat
2817
+ * If the block is `ol` or `ul` and dispay is `table`, display-directives can have the value `colgroup='col1,col2,...coln'`,
2818
+ where each col value is a percentage width of the column in the output table (with no % suffix).
2819
+ e.g. `colgroup='50,33.3,16.7'` </a:documentation>
2820
+ </attribute>
2821
+ </optional>
2822
+ </define>
2791
2823
  <define name="ReferencesAttributes">
2792
2824
  <optional>
2793
2825
  <attribute name="obligation">
@@ -2800,7 +2832,7 @@ Normative References contents contain normative references, but as a clause in t
2800
2832
  <data type="boolean"/>
2801
2833
  </attribute>
2802
2834
  </define>
2803
- <define name="TermSource">
2835
+ <define name="TermSources">
2804
2836
  <zeroOrMore>
2805
2837
  <ref name="termsource"/>
2806
2838
  </zeroOrMore>
@@ -47,7 +47,15 @@ the tag name of the top level containers</a:documentation>
47
47
  </optional>
48
48
  <optional>
49
49
  <attribute name="model">
50
- <a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec</a:documentation>
50
+ <a:documentation>Model of requirements realised by this requirement, e.g. "ogc" for Modspec.
51
+ Current legal values: ogc, default</a:documentation>
52
+ </attribute>
53
+ </optional>
54
+ <optional>
55
+ <attribute name="render">
56
+ <a:documentation>Rendering of requirements realised by this requirement. Current legal values:
57
+ default:: default, inline
58
+ ogc:: default</a:documentation>
51
59
  </attribute>
52
60
  </optional>
53
61
  <optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ieee
3
- VERSION = "1.6.10".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.10
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-13 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: []