metanorma-ribose 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: 2571d1ca01b6acf476e35f899955ec7e081f3ea4df7197ea9145bff49f827979
4
- data.tar.gz: 6e2ebbb436ad464296d0bc6cf4e4bb4df472ac25d2bb7cea5fc59f3d357debf8
3
+ metadata.gz: a0887874c8da1fdaad14237c7d276c9bacc9e70810b22643a8a55c0c1e6faf11
4
+ data.tar.gz: e10f79053574542c01ddb2227721e23225bc164c4ace08959ddc31375953a496
5
5
  SHA512:
6
- metadata.gz: ed2af4162cf2ba0e7cb9e8242faa6be31dc820921b3d0e3c7e9908354b1c7d996812dce82a53d96f57d4db891f694215d8e6b94e68850dc3abc5ac610fec2a88
7
- data.tar.gz: 525a4c589e82c122986564d5d9b11f43fffe0c7fa5358df1e1e6e906d94699422cdb01afc0d40101bcd4f731ff58aecdd4930d5c9191c52314d5b91afe3f07a2
6
+ metadata.gz: a69e2e5713e8783b64feca74bec961a6dedfdcbcbbd6426a6a2416957241da984146ebb4eb9de579250d298af3cae8c21664a33590477d7fe8986317446a8e0c
7
+ data.tar.gz: f84a0bb9555af59e75254643cf12a1d24e1f5b0bedbbdfcb62e4031c2ef69b98b659d59302589a027a0bb065ec2d36c95ddd080151d74e53e5804c2aef7baa19
@@ -593,7 +593,9 @@ main {
593
593
  background-color: var(--ribose-primary-color);
594
594
  color: white !important;
595
595
  cursor: pointer;
596
- z-index: 100;
596
+ left: 0;
597
+ top: 0;
598
+ z-index: 103;
597
599
  }
598
600
  #toggle span {
599
601
  text-align: center;
@@ -906,6 +908,10 @@ h3, .h3 {
906
908
  font-weight: 100;
907
909
  }
908
910
 
911
+ span.TermNum {
912
+ font-weight: bold;
913
+ }
914
+
909
915
  .TermNum, .Terms, .AltTerms {
910
916
  color: var(--ribose-primary-color);
911
917
  }
@@ -253,6 +253,10 @@ h3, .h3 {
253
253
  font-weight: 100;
254
254
  }
255
255
 
256
+ span.TermNum {
257
+ font-weight: bold;
258
+ }
259
+
256
260
  .TermNum, .Terms, .AltTerms {
257
261
  color: var(--ribose-primary-color);
258
262
  }
@@ -255,19 +255,11 @@
255
255
 
256
256
  <xsl:call-template name="inner-cover-page"/>
257
257
 
258
- <!-- ToC pages -->
258
+ <!-- ToC and boilerplate pages -->
259
259
  <xsl:variable name="toc_and_boilerplate">
260
- <xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[@type = 'toc']">
260
+ <xsl:call-template name="toc_and_boilerplate">
261
261
  <xsl:with-param name="num" select="$num"/>
262
- </xsl:apply-templates>
263
-
264
- <!-- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement"/>
265
-
266
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement"/>
267
-
268
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/> -->
269
-
270
- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*"/>
262
+ </xsl:call-template>
271
263
  </xsl:variable>
272
264
 
273
265
  <xsl:if test="normalize-space($toc_and_boilerplate) != ''">
@@ -476,6 +468,21 @@
476
468
  <xsl:template name="inner-cover-page">
477
469
  </xsl:template>
478
470
 
471
+ <xsl:template name="toc_and_boilerplate">
472
+ <xsl:param name="num"/>
473
+ <xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[@type = 'toc']">
474
+ <xsl:with-param name="num" select="$num"/>
475
+ </xsl:apply-templates>
476
+ <fo:block break-after="page"/>
477
+
478
+ <!-- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement"/>
479
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement"/>
480
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/> -->
481
+
482
+ <fo:block margin-bottom="12pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
483
+ <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*"/>
484
+ </xsl:template>
485
+
479
486
  <xsl:template name="back-page">
480
487
  </xsl:template>
481
488
 
@@ -630,18 +637,29 @@
630
637
  </fo:block>
631
638
  </xsl:if>
632
639
 
640
+ <!-- List of Examples -->
641
+ <xsl:if test="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
642
+ <xsl:call-template name="insertListOf_Title">
643
+ <xsl:with-param name="title" select="$title-list-examples"/>
644
+ </xsl:call-template>
645
+ <fo:block role="TOC">
646
+ <xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
647
+ <xsl:call-template name="insertListOf_Item"/>
648
+ </xsl:for-each>
649
+ </fo:block>
650
+ </xsl:if>
651
+
633
652
  </fo:block-container>
634
653
  </fo:block-container>
635
654
 
636
- <fo:block break-after="page"/>
637
655
  </xsl:if>
638
656
  </xsl:if>
639
- <fo:block margin-bottom="12pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
640
657
  </fo:block>
641
658
  </xsl:template>
642
659
 
643
660
  <xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
644
661
  <fo:block xsl:use-attribute-sets="toc-title-style">
662
+ <xsl:call-template name="refine_toc-title-style"/>
645
663
  <!-- <xsl:call-template name="getLocalizedString">
646
664
  <xsl:with-param name="key">table_of_contents</xsl:with-param>
647
665
  </xsl:call-template> -->
@@ -941,34 +959,43 @@
941
959
 
942
960
  <fo:inline xsl:use-attribute-sets="term-preferred-style"><xsl:call-template name="refine_term-preferred-style"/><xsl:apply-templates/></fo:inline>
943
961
 
944
- <xsl:variable name="term_kind">
962
+ <xsl:call-template name="display_term_kind"/>
963
+
964
+ </fo:block>
965
+ </xsl:template>
966
+
967
+ <xsl:template name="display_term_kind">
968
+ <xsl:call-template name="term_kind"/>
969
+ </xsl:template>
970
+
971
+ <xsl:template name="term_kind">
972
+ <xsl:variable name="kind" select="substring-after(local-name(), 'fmt-')"/>
973
+
974
+ <fo:inline-container text-align="center" width="29mm">
975
+ <xsl:attribute name="background-color">
945
976
  <xsl:choose>
946
- <xsl:when test="self::mn:fmt-deprecates">
947
- <xsl:call-template name="getLocalizedString">
948
- <xsl:with-param name="key">deprecated</xsl:with-param>
949
- </xsl:call-template>
950
- </xsl:when>
951
- <xsl:otherwise><xsl:value-of select="substring-after(local-name(), 'fmt-')"/></xsl:otherwise>
977
+ <xsl:when test="$kind = 'preferred'">rgb(255, 240, 198)</xsl:when>
978
+ <xsl:when test="$kind = 'deprecates'">rgb(252, 221, 194)</xsl:when>
979
+ <xsl:when test="$kind = 'admitted'">rgb(208, 223, 239)</xsl:when>
952
980
  </xsl:choose>
953
- </xsl:variable>
954
- <xsl:variable name="kind" select="local-name()"/>
955
-
956
- <fo:inline-container text-align="center" width="29mm">
957
- <xsl:attribute name="background-color">
981
+ </xsl:attribute>
982
+ <fo:block padding-top="1mm" padding-bottom="0.5mm">
983
+ <fo:inline xsl:use-attribute-sets="term-kind-style">
984
+ <xsl:call-template name="refine_term-kind-style"/>
985
+ <xsl:variable name="term_kind_display">
958
986
  <xsl:choose>
959
- <xsl:when test="$kind = 'fmt-preferred'">rgb(255, 240, 198)</xsl:when>
960
- <xsl:when test="$kind = 'fmt-deprecates'">rgb(252, 221, 194)</xsl:when>
961
- <xsl:when test="$kind = 'fmt-admitted'">rgb(208, 223, 239)</xsl:when>
987
+ <xsl:when test="self::mn:fmt-deprecates">
988
+ <xsl:call-template name="getLocalizedString">
989
+ <xsl:with-param name="key">deprecated</xsl:with-param>
990
+ </xsl:call-template>
991
+ </xsl:when>
992
+ <xsl:otherwise><xsl:value-of select="substring-after(local-name(), 'fmt-')"/></xsl:otherwise>
962
993
  </xsl:choose>
963
- </xsl:attribute>
964
- <fo:block padding-top="1mm" padding-bottom="0.5mm">
965
- <fo:inline xsl:use-attribute-sets="term-kind-style">
966
- <xsl:call-template name="refine_term-kind-style"/>
967
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($term_kind))"/>
968
- </fo:inline>
969
- </fo:block>
970
- </fo:inline-container>
971
- </fo:block>
994
+ </xsl:variable>
995
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($term_kind_display))"/>
996
+ </fo:inline>
997
+ </fo:block>
998
+ </fo:inline-container>
972
999
  </xsl:template>
973
1000
 
974
1001
  <xsl:template match="mn:references[not(@normative='true')]" priority="3">
@@ -1479,6 +1506,16 @@
1479
1506
  </xsl:if>
1480
1507
  </xsl:variable>
1481
1508
 
1509
+ <xsl:variable name="title-list-examples">
1510
+ <xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
1511
+ <xsl:value-of select="$toc_example_title"/>
1512
+ <xsl:if test="normalize-space($toc_example_title) = ''">
1513
+ <xsl:call-template name="getLocalizedString">
1514
+ <xsl:with-param name="key">toc_examples</xsl:with-param>
1515
+ </xsl:call-template>
1516
+ </xsl:if>
1517
+ </xsl:variable>
1518
+
1482
1519
  <xsl:variable name="title-list-recommendations">
1483
1520
  <xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
1484
1521
  <xsl:value-of select="$toc_requirement_title"/>
@@ -2357,6 +2394,14 @@
2357
2394
 
2358
2395
  <xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
2359
2396
 
2397
+ <xsl:template match="mn:pagebreak" mode="update_xml_step1">
2398
+ <xsl:copy>
2399
+ <xsl:apply-templates select="@*" mode="update_xml_step1"/>
2400
+ <xsl:attribute name="from_source_xml">true</xsl:attribute>
2401
+ <xsl:apply-templates select="node()" mode="update_xml_step1"/>
2402
+ </xsl:copy>
2403
+ </xsl:template>
2404
+
2360
2405
  <!-- END: update new Presentation XML -->
2361
2406
 
2362
2407
  <!-- =========================================================================== -->
@@ -2394,6 +2439,7 @@
2394
2439
  <xsl:for-each select="ancestor-or-self::*[ancestor::mn:preface or ancestor::mn:sections or ancestor-or-self::mn:annex]">
2395
2440
  <xsl:if test="following-sibling::*">false</xsl:if>
2396
2441
  </xsl:for-each>
2442
+ <xsl:if test="@from_source_xml = 'true'">false</xsl:if>
2397
2443
  </xsl:variable>
2398
2444
 
2399
2445
  <xsl:if test="contains($isLast, 'false')">
@@ -3308,7 +3354,8 @@
3308
3354
  <xsl:attribute name="line-height">113%</xsl:attribute>
3309
3355
  </xsl:attribute-set> <!-- sourcecode-style -->
3310
3356
 
3311
- <xsl:template name="refine_sourcecode-style"> <!-- background for image -->
3357
+ <xsl:template name="refine_sourcecode-style">
3358
+ <xsl:call-template name="setKeepAttributes"/> <!-- background for image -->
3312
3359
  <xsl:if test="starts-with((mn:fmt-name//text())[1], 'Figure ')">
3313
3360
  <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
3314
3361
  <xsl:attribute name="padding-left">11mm</xsl:attribute>
@@ -4083,10 +4130,38 @@
4083
4130
  <xsl:template name="refine_strike-style">
4084
4131
  </xsl:template>
4085
4132
 
4133
+ <xsl:attribute-set name="hr-block-style">
4134
+ <xsl:attribute name="font-size">1pt</xsl:attribute>
4135
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4136
+ <xsl:attribute name="role">SKIP</xsl:attribute>
4137
+ <xsl:attribute name="padding-top">-2pt</xsl:attribute>
4138
+ <xsl:attribute name="space-after">4pt</xsl:attribute>
4139
+ </xsl:attribute-set>
4140
+
4141
+ <xsl:template name="refine_hr-block-style">
4142
+ </xsl:template>
4143
+
4144
+ <xsl:attribute-set name="hr-style">
4145
+ <xsl:attribute name="leader-pattern">rule</xsl:attribute>
4146
+ <xsl:attribute name="leader-length">100%</xsl:attribute>
4147
+ </xsl:attribute-set>
4148
+
4149
+ <xsl:template name="refine_hr-style">
4150
+ </xsl:template>
4151
+
4086
4152
  <xsl:template match="mn:br">
4087
4153
  <xsl:value-of select="$linebreak"/>
4088
4154
  </xsl:template>
4089
4155
 
4156
+ <xsl:template match="mn:hr">
4157
+ <fo:block xsl:use-attribute-sets="hr-block-style">
4158
+ <xsl:call-template name="refine_hr-block-style"/>
4159
+ <fo:leader xsl:use-attribute-sets="hr-style">
4160
+ <xsl:call-template name="refine_hr-style"/>
4161
+ </fo:leader>
4162
+ </fo:block>
4163
+ </xsl:template>
4164
+
4090
4165
  <xsl:template match="mn:em">
4091
4166
  <fo:inline xsl:use-attribute-sets="em-style">
4092
4167
  <xsl:call-template name="refine_em_style"/>
@@ -5348,6 +5423,7 @@
5348
5423
  text line 1
5349
5424
  text line 2
5350
5425
  -->
5426
+ <xsl:variable name="example_display_in"><!-- don't change here, only for override xsl --></xsl:variable> <!-- block or inline -->
5351
5427
  <xsl:template match="mn:example" name="example">
5352
5428
  <xsl:call-template name="setNamedDestination"/>
5353
5429
  <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
@@ -5357,7 +5433,8 @@
5357
5433
  <xsl:call-template name="refine_example-style"/>
5358
5434
 
5359
5435
  <xsl:variable name="fo_element">
5360
- <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>inline
5436
+ <xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
5437
+ <xsl:if test="normalize-space($example_display_in) != ''"><xsl:value-of select="$example_display_in"/></xsl:if>inline
5361
5438
  </xsl:variable>
5362
5439
 
5363
5440
  <fo:block-container margin-left="0mm" role="SKIP">
@@ -12798,7 +12875,7 @@
12798
12875
  <xsl:template name="refine_toc-pagenumber-style">
12799
12876
  </xsl:template>
12800
12877
 
12801
- <!-- List of Figures, Tables -->
12878
+ <!-- List of Figures, Tables, Examples -->
12802
12879
  <xsl:attribute-set name="toc-listof-title-style">
12803
12880
  <!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
12804
12881
  <xsl:attribute name="role">H2</xsl:attribute> <!-- TOCI -->
@@ -12906,6 +12983,9 @@
12906
12983
  <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
12907
12984
  <xsl:call-template name="processFigures_Contents"/>
12908
12985
  </xsl:if>
12986
+ <xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
12987
+ <xsl:call-template name="processExamples_Contents"/>
12988
+ </xsl:if>
12909
12989
  </xsl:template>
12910
12990
 
12911
12991
  <xsl:template name="processTables_Contents">
@@ -12952,7 +13032,29 @@
12952
13032
  </mnx:figures>
12953
13033
  </xsl:template>
12954
13034
 
12955
- <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">
13035
+ <xsl:template name="processExamples_Contents">
13036
+ <mnx:examples>
13037
+ <xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
13038
+ <xsl:choose>
13039
+ <xsl:when test="mn:fmt-name">
13040
+ <xsl:variable name="fmt_name">
13041
+ <xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
13042
+ </xsl:variable>
13043
+ <mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
13044
+ <xsl:copy-of select="$fmt_name"/>
13045
+ </mnx:example>
13046
+ </xsl:when>
13047
+ <xsl:otherwise>
13048
+ <mnx:example id="{@id}" alt-text="{mn:name}">
13049
+ <xsl:copy-of select="mn:name"/>
13050
+ </mnx:example>
13051
+ </xsl:otherwise>
13052
+ </xsl:choose>
13053
+ </xsl:for-each>
13054
+ </mnx:examples>
13055
+ </xsl:template>
13056
+
13057
+ <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">
12956
13058
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
12957
13059
  <xsl:apply-templates mode="contents"/>
12958
13060
  <xsl:text> </xsl:text>
@@ -12961,40 +13063,40 @@
12961
13063
 
12962
13064
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
12963
13065
 
12964
- <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">
13066
+ <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">
12965
13067
  <xsl:apply-templates mode="contents"/>
12966
13068
  <xsl:text> </xsl:text>
12967
13069
  </xsl:template>
12968
13070
 
12969
- <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">
13071
+ <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">
12970
13072
  <xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
12971
13073
  <xsl:apply-templates mode="bookmarks"/>
12972
13074
  <xsl:text> </xsl:text>
12973
13075
  </xsl:if>
12974
13076
  </xsl:template>
12975
13077
 
12976
- <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">
13078
+ <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">
12977
13079
  <xsl:apply-templates mode="bookmarks"/>
12978
13080
  <xsl:text> </xsl:text>
12979
13081
  </xsl:template>
12980
13082
 
12981
- <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">
13083
+ <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">
12982
13084
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
12983
13085
  <xsl:value-of select="."/>
12984
13086
  </xsl:if>
12985
13087
  </xsl:template>
12986
13088
 
12987
- <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">
13089
+ <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">
12988
13090
  <xsl:value-of select="."/>
12989
13091
  </xsl:template>
12990
13092
 
12991
- <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">
13093
+ <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">
12992
13094
  <xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
12993
13095
  <xsl:value-of select="."/>
12994
13096
  </xsl:if>
12995
13097
  </xsl:template>
12996
13098
 
12997
- <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">
13099
+ <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">
12998
13100
  <xsl:value-of select="."/>
12999
13101
  </xsl:template>
13000
13102
 
@@ -13227,6 +13329,11 @@
13227
13329
  <xsl:with-param name="lang" select="@lang"/>
13228
13330
  </xsl:call-template>
13229
13331
 
13332
+ <xsl:call-template name="insertExampleBookmarks">
13333
+ <xsl:with-param name="contents" select="mnx:contents"/>
13334
+ <xsl:with-param name="lang" select="@lang"/>
13335
+ </xsl:call-template>
13336
+
13230
13337
  </fo:bookmark>
13231
13338
 
13232
13339
  </xsl:for-each>
@@ -13245,6 +13352,11 @@
13245
13352
  <xsl:with-param name="lang" select="@lang"/>
13246
13353
  </xsl:call-template>
13247
13354
 
13355
+ <xsl:call-template name="insertExampleBookmarks">
13356
+ <xsl:with-param name="contents" select="mnx:contents"/>
13357
+ <xsl:with-param name="lang" select="@lang"/>
13358
+ </xsl:call-template>
13359
+
13248
13360
  </xsl:for-each>
13249
13361
  </xsl:otherwise>
13250
13362
  </xsl:choose>
@@ -13261,6 +13373,11 @@
13261
13373
  <xsl:with-param name="lang" select="@lang"/>
13262
13374
  </xsl:call-template>
13263
13375
 
13376
+ <xsl:call-template name="insertExampleBookmarks">
13377
+ <xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
13378
+ <xsl:with-param name="lang" select="@lang"/>
13379
+ </xsl:call-template>
13380
+
13264
13381
  </xsl:otherwise>
13265
13382
  </xsl:choose>
13266
13383
 
@@ -13341,6 +13458,46 @@
13341
13458
  </fo:bookmark>
13342
13459
  </xsl:if>
13343
13460
  </xsl:template> <!-- insertTableBookmarks -->
13461
+
13462
+ <xsl:template name="insertExampleBookmarks">
13463
+ <xsl:param name="contents"/>
13464
+ <xsl:param name="lang"/>
13465
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
13466
+ <xsl:if test="$contents_nodes/mnx:example">
13467
+ <fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
13468
+ <fo:bookmark-title>
13469
+ <xsl:choose>
13470
+ <xsl:when test="$lang = 'fr'">Exemples</xsl:when>
13471
+ <xsl:otherwise>Examples</xsl:otherwise>
13472
+ </xsl:choose>
13473
+ </fo:bookmark-title>
13474
+ <xsl:for-each select="$contents_nodes/mnx:example">
13475
+ <fo:bookmark internal-destination="{@id}">
13476
+ <fo:bookmark-title>
13477
+ <xsl:value-of select="normalize-space(mnx:title)"/>
13478
+ </fo:bookmark-title>
13479
+ </fo:bookmark>
13480
+ </xsl:for-each>
13481
+ </fo:bookmark>
13482
+ </xsl:if>
13483
+ <xsl:if test="$contents_nodes//mnx:examples/mnx:example">
13484
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
13485
+
13486
+ <xsl:variable name="bookmark-title">
13487
+ <xsl:value-of select="$title-list-examples"/>
13488
+ </xsl:variable>
13489
+
13490
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
13491
+
13492
+ <xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
13493
+ <fo:bookmark internal-destination="{@id}">
13494
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
13495
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
13496
+ </fo:bookmark>
13497
+ </xsl:for-each>
13498
+ </fo:bookmark>
13499
+ </xsl:if>
13500
+ </xsl:template> <!-- insertExampleBookmarks -->
13344
13501
  <!-- End Bookmarks -->
13345
13502
 
13346
13503
  <!-- ============================ -->
@@ -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 Ribose
3
- VERSION = "2.8.6".freeze
3
+ VERSION = "2.8.8".freeze
4
4
  end
5
5
  end
data/metanorma.yml CHANGED
@@ -14,7 +14,7 @@ html_headerfont: '"Source Sans Pro",sans-serif'
14
14
  html_monospacefont: '"Source Code Pro",monospace'
15
15
  html_normalfontsize: "15px"
16
16
  html_footnotefontsize: "0.9em"
17
- html_monospacefontsize: "12px"
17
+ html_monospacefontsize: "0.8em"
18
18
  boilerplate: lib/metanorma/ribose/boilerplate.adoc
19
19
  standardstylesheet: lib/isodoc/ribose/html/rsd.scss
20
20
  header: lib/isodoc/ribose/html/header.html
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
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