metanorma-cc 2.8.6 → 2.8.8

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: f3e9f5bae22206d0db12163f07417c17e905aade5df44414e2092a6ee191f899
4
- data.tar.gz: e2381884adcd8cfd53dedcd6d4d7265edbba37800fb4ed643a094849e9d0349e
3
+ metadata.gz: d08eb6240ef93dc1396e0aa9aea97a5444b4b26b633952fc80bb965376c62d9b
4
+ data.tar.gz: 87cfb3d514c5230accaf71a2ce90c30805ab5b8fa982b37d41d9304fab799949
5
5
  SHA512:
6
- metadata.gz: 9cfb30c409a3920e2bdc4801f59f7163f9c7b17e18e7985636f951afaed05aaf07b1002f3617a919e38a5f11410bfdb6b04da1a884b9fe34e22af7e9164e37fc
7
- data.tar.gz: 171636abaedcdb32674dab8a5b438754a5202790dfc217d6f800babdb52518aecf270244fe925beb2720b5e73e12f08f1e58eb40f40b325286abcd46526df606
6
+ metadata.gz: 1dd9f674434b6a4cbe7289db8d3c531716ddcf159c1d9d2f17f10f41faa6374318e39982106b890be7d03cd1cc2e61ade6e193261e7ef5d02b5a8ac0247e15bb
7
+ data.tar.gz: f4ac1c0a925d9c587591888c7bdb2ea77a8d560763abdcd48cae9e37a1996b4627be7b87c33d3d519f5782619af0851b19bb98dbfb811d1fb4fef9fdf2127aba
data/.rubocop.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  # Auto-generated by Cimas: Do not edit it manually!
2
2
  # See https://github.com/metanorma/cimas
3
3
  inherit_from:
4
- - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
4
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
5
 
6
6
  # local repo-specific modifications
7
7
  # ...
8
8
 
9
9
  AllCops:
10
- TargetRubyVersion: 2.5
10
+ TargetRubyVersion: 3.4
@@ -535,6 +535,18 @@
535
535
  </xsl:for-each>
536
536
  </fo:block>
537
537
  </xsl:if>
538
+
539
+ <!-- List of Examples -->
540
+ <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
541
+ <xsl:call-template name="insertListOf_Title">
542
+ <xsl:with-param name="title" select="$title-list-examples"/>
543
+ </xsl:call-template>
544
+ <fo:block role="TOC">
545
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
546
+ <xsl:call-template name="insertListOf_Item"/>
547
+ </xsl:for-each>
548
+ </fo:block>
549
+ </xsl:if>
538
550
  </xsl:if>
539
551
  </fo:block>
540
552
  </fo:block-container>
@@ -542,6 +554,7 @@
542
554
 
543
555
  <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
544
556
  <fo:block xsl:use-attribute-sets="toc-title-style">
557
+ <xsl:call-template name="refine_toc-title-style"/>
545
558
  <xsl:apply-templates/>
546
559
  </fo:block>
547
560
  </xsl:template>
@@ -933,6 +946,16 @@
933
946
  </xsl:if>
934
947
  </xsl:variable>
935
948
 
949
+ <xsl:variable name="title-list-examples">
950
+ <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
951
+ <xsl:value-of select="$toc_example_title"/>
952
+ <xsl:if test="normalize-space($toc_example_title) = ''">
953
+ <xsl:call-template name="getLocalizedString">
954
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
955
+ </xsl:call-template>
956
+ </xsl:if>
957
+ </xsl:variable>
958
+
936
959
  <xsl:variable name="title-list-recommendations">
937
960
  <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
938
961
  <xsl:value-of select="$toc_requirement_title"/>
@@ -1814,6 +1837,14 @@
1814
1837
 
1815
1838
  <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
1816
1839
 
1840
+ <xsl:template match="mn:pagebreak" mode="update_xml_step1">
1841
+ <xsl:copy>
1842
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
1843
+ <xsl:attribute name="from_source_xml">true</xsl:attribute>
1844
+ <xsl:apply-templates select="node()" mode="update_xml_step1"/>
1845
+ </xsl:copy>
1846
+ </xsl:template>
1847
+
1817
1848
  <!-- END: update new Presentation XML -->
1818
1849
 
1819
1850
  <!-- =========================================================================== -->
@@ -1851,6 +1882,7 @@
1851
1882
  <xsl:for-each select="ancestor-or-self::*[ancestor::mn:preface or ancestor::mn:sections or ancestor-or-self::mn:annex]">
1852
1883
  <xsl:if test="following-sibling::*">false</xsl:if>
1853
1884
  </xsl:for-each>
1885
+ <xsl:if test="@from_source_xml = 'true'">false</xsl:if>
1854
1886
  </xsl:variable>
1855
1887
 
1856
1888
  <xsl:if test="contains($isLast, 'false')">
@@ -2748,6 +2780,7 @@
2748
2780
  </xsl:attribute-set> <!-- sourcecode-style -->
2749
2781
 
2750
2782
  <xsl:template name="refine_sourcecode-style">
2783
+ <xsl:call-template name="setKeepAttributes"/>
2751
2784
  </xsl:template> <!-- refine_sourcecode-style -->
2752
2785
 
2753
2786
  <xsl:attribute-set name="sourcecode-number-style">
@@ -3485,10 +3518,38 @@
3485
3518
  <xsl:template name="refine_strike-style">
3486
3519
  </xsl:template>
3487
3520
 
3521
+ <xsl:attribute-set name="hr-block-style">
3522
+ <xsl:attribute name="font-size">1pt</xsl:attribute>
3523
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
3524
+ <xsl:attribute name="role">SKIP</xsl:attribute>
3525
+ <xsl:attribute name="padding-top">-2pt</xsl:attribute>
3526
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
3527
+ </xsl:attribute-set>
3528
+
3529
+ <xsl:template name="refine_hr-block-style">
3530
+ </xsl:template>
3531
+
3532
+ <xsl:attribute-set name="hr-style">
3533
+ <xsl:attribute name="leader-pattern">rule</xsl:attribute>
3534
+ <xsl:attribute name="leader-length">100%</xsl:attribute>
3535
+ </xsl:attribute-set>
3536
+
3537
+ <xsl:template name="refine_hr-style">
3538
+ </xsl:template>
3539
+
3488
3540
  <xsl:template match="mn:br">
3489
3541
  <xsl:value-of select="$linebreak"/>
3490
3542
  </xsl:template>
3491
3543
 
3544
+ <xsl:template match="mn:hr">
3545
+ <fo:block xsl:use-attribute-sets="hr-block-style">
3546
+ <xsl:call-template name="refine_hr-block-style"/>
3547
+ <fo:leader xsl:use-attribute-sets="hr-style">
3548
+ <xsl:call-template name="refine_hr-style"/>
3549
+ </fo:leader>
3550
+ </fo:block>
3551
+ </xsl:template>
3552
+
3492
3553
  <xsl:template match="mn:em">
3493
3554
  <fo:inline xsl:use-attribute-sets="em-style">
3494
3555
  <xsl:call-template name="refine_em_style"/>
@@ -4718,6 +4779,7 @@
4718
4779
  text line 1
4719
4780
  text line 2
4720
4781
  -->
4782
+ <xsl:variable name="example_display_in"><!-- don't change here, only for override xsl --></xsl:variable> <!-- block or inline -->
4721
4783
  <xsl:template match="mn:example" name="example">
4722
4784
  <xsl:call-template name="setNamedDestination"/>
4723
4785
  <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
@@ -4727,7 +4789,8 @@
4727
4789
  <xsl:call-template name="refine_example-style"/>
4728
4790
 
4729
4791
  <xsl:variable name="fo_element">
4730
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>block
4792
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
4793
+ <xsl:if test="normalize-space($example_display_in) != ''"><xsl:value-of select="$example_display_in"/></xsl:if>block
4731
4794
  </xsl:variable>
4732
4795
 
4733
4796
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -12016,7 +12079,7 @@
12016
12079
  <xsl:template name="refine_toc-pagenumber-style">
12017
12080
  </xsl:template>
12018
12081
 
12019
- <!-- List of Figures, Tables -->
12082
+ <!-- List of Figures, Tables, Examples -->
12020
12083
  <xsl:attribute-set name="toc-listof-title-style">
12021
12084
  <xsl:attribute name="role">TOCI</xsl:attribute>
12022
12085
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -12123,6 +12186,9 @@
12123
12186
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
12124
12187
  <xsl:call-template name="processFigures_Contents"/>
12125
12188
  </xsl:if>
12189
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
12190
+ <xsl:call-template name="processExamples_Contents"/>
12191
+ </xsl:if>
12126
12192
  </xsl:template>
12127
12193
 
12128
12194
  <xsl:template name="processTables_Contents">
@@ -12169,7 +12235,29 @@
12169
12235
  </mnx:figures>
12170
12236
  </xsl:template>
12171
12237
 
12172
- <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">
12238
+ <xsl:template name="processExamples_Contents">
12239
+ <mnx:examples>
12240
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
12241
+ <xsl:choose>
12242
+ <xsl:when test="mn:fmt-name">
12243
+ <xsl:variable name="fmt_name">
12244
+ <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
12245
+ </xsl:variable>
12246
+ <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
12247
+ <xsl:copy-of select="$fmt_name"/>
12248
+ </mnx:example>
12249
+ </xsl:when>
12250
+ <xsl:otherwise>
12251
+ <mnx:example id="{@id}" alt-text="{mn:name}">
12252
+ <xsl:copy-of select="mn:name"/>
12253
+ </mnx:example>
12254
+ </xsl:otherwise>
12255
+ </xsl:choose>
12256
+ </xsl:for-each>
12257
+ </mnx:examples>
12258
+ </xsl:template>
12259
+
12260
+ <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">
12173
12261
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
12174
12262
  <xsl:apply-templates mode="contents"/>
12175
12263
  <xsl:text> </xsl:text>
@@ -12178,40 +12266,40 @@
12178
12266
 
12179
12267
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
12180
12268
 
12181
- <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">
12269
+ <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">
12182
12270
  <xsl:apply-templates mode="contents"/>
12183
12271
  <xsl:text> </xsl:text>
12184
12272
  </xsl:template>
12185
12273
 
12186
- <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">
12274
+ <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">
12187
12275
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
12188
12276
  <xsl:apply-templates mode="bookmarks"/>
12189
12277
  <xsl:text> </xsl:text>
12190
12278
  </xsl:if>
12191
12279
  </xsl:template>
12192
12280
 
12193
- <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">
12281
+ <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">
12194
12282
  <xsl:apply-templates mode="bookmarks"/>
12195
12283
  <xsl:text> </xsl:text>
12196
12284
  </xsl:template>
12197
12285
 
12198
- <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">
12286
+ <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">
12199
12287
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
12200
12288
  <xsl:value-of select="."/>
12201
12289
  </xsl:if>
12202
12290
  </xsl:template>
12203
12291
 
12204
- <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">
12292
+ <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">
12205
12293
  <xsl:value-of select="."/>
12206
12294
  </xsl:template>
12207
12295
 
12208
- <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">
12296
+ <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">
12209
12297
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
12210
12298
  <xsl:value-of select="."/>
12211
12299
  </xsl:if>
12212
12300
  </xsl:template>
12213
12301
 
12214
- <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">
12302
+ <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">
12215
12303
  <xsl:value-of select="."/>
12216
12304
  </xsl:template>
12217
12305
 
@@ -12444,6 +12532,11 @@
12444
12532
  <xsl:with-param name="lang" select="@lang"/>
12445
12533
  </xsl:call-template>
12446
12534
 
12535
+ <xsl:call-template name="insertExampleBookmarks">
12536
+ <xsl:with-param name="contents" select="mnx:contents"/>
12537
+ <xsl:with-param name="lang" select="@lang"/>
12538
+ </xsl:call-template>
12539
+
12447
12540
  </fo:bookmark>
12448
12541
 
12449
12542
  </xsl:for-each>
@@ -12462,6 +12555,11 @@
12462
12555
  <xsl:with-param name="lang" select="@lang"/>
12463
12556
  </xsl:call-template>
12464
12557
 
12558
+ <xsl:call-template name="insertExampleBookmarks">
12559
+ <xsl:with-param name="contents" select="mnx:contents"/>
12560
+ <xsl:with-param name="lang" select="@lang"/>
12561
+ </xsl:call-template>
12562
+
12465
12563
  </xsl:for-each>
12466
12564
  </xsl:otherwise>
12467
12565
  </xsl:choose>
@@ -12478,6 +12576,11 @@
12478
12576
  <xsl:with-param name="lang" select="@lang"/>
12479
12577
  </xsl:call-template>
12480
12578
 
12579
+ <xsl:call-template name="insertExampleBookmarks">
12580
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
12581
+ <xsl:with-param name="lang" select="@lang"/>
12582
+ </xsl:call-template>
12583
+
12481
12584
  </xsl:otherwise>
12482
12585
  </xsl:choose>
12483
12586
 
@@ -12558,6 +12661,46 @@
12558
12661
  </fo:bookmark>
12559
12662
  </xsl:if>
12560
12663
  </xsl:template> <!-- insertTableBookmarks -->
12664
+
12665
+ <xsl:template name="insertExampleBookmarks">
12666
+ <xsl:param name="contents"/>
12667
+ <xsl:param name="lang"/>
12668
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
12669
+ <xsl:if test="$contents_nodes/mnx:example">
12670
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
12671
+ <fo:bookmark-title>
12672
+ <xsl:choose>
12673
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
12674
+ <xsl:otherwise>Examples</xsl:otherwise>
12675
+ </xsl:choose>
12676
+ </fo:bookmark-title>
12677
+ <xsl:for-each select="$contents_nodes/mnx:example">
12678
+ <fo:bookmark internal-destination="{@id}">
12679
+ <fo:bookmark-title>
12680
+ <xsl:value-of select="normalize-space(mnx:title)"/>
12681
+ </fo:bookmark-title>
12682
+ </fo:bookmark>
12683
+ </xsl:for-each>
12684
+ </fo:bookmark>
12685
+ </xsl:if>
12686
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
12687
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
12688
+
12689
+ <xsl:variable name="bookmark-title">
12690
+ <xsl:value-of select="$title-list-examples"/>
12691
+ </xsl:variable>
12692
+
12693
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
12694
+
12695
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
12696
+ <fo:bookmark internal-destination="{@id}">
12697
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
12698
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
12699
+ </fo:bookmark>
12700
+ </xsl:for-each>
12701
+ </fo:bookmark>
12702
+ </xsl:if>
12703
+ </xsl:template> <!-- insertExampleBookmarks -->
12561
12704
  <!-- End Bookmarks -->
12562
12705
 
12563
12706
  <!-- ============================ -->
@@ -641,7 +641,9 @@ nav #toc {
641
641
  background-color: #1d1d1d;
642
642
  color: white !important;
643
643
  cursor: pointer;
644
- z-index: 100;
644
+ left: 0;
645
+ top: 0;
646
+ z-index: 103;
645
647
  }
646
648
  #toggle span {
647
649
  text-align: center;
@@ -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 Cc
3
- VERSION = "2.8.6".freeze
3
+ VERSION = "2.8.8".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.6
4
+ version: 2.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-13 00:00:00.000000000 Z
11
+ date: 2026-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic