metanorma-ribose 2.7.6 → 2.7.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: 38b190ae398a5e6724c9abc62418739045c05c00d5a5dcf1b9c1249077dd9885
4
- data.tar.gz: 07f2118fd348f5a6adc2fe5f70f5be9aad98d965bbebabac624cfae45807be6a
3
+ metadata.gz: 64014a9dc6ce1324ae1fb9aeffd03787de0cdcb3cda157646106ae60b68140a4
4
+ data.tar.gz: '0938e80f5ffc88f80c541ff37f6c9cfe827ef345ce0d096a508a8156ab089040'
5
5
  SHA512:
6
- metadata.gz: b4204c8891cd12fc5a63dacc28eee280f9f2ee36a7ede9708fc04c0ce74277b162df90ede83d8e096dea1264bdf7d25e11fa7c31897040eb7db6ea65a19676c1
7
- data.tar.gz: d70bb849797f7f7002f6e9a7840187e3d9b175960b77a2f93411df2f80fefd8341b92bbf25c42a0bc39d3cd6110b446c6c071e75fe7f4e4c4ea2810d14cafff5
6
+ metadata.gz: f918f729e8f4682329192f51f3f9f25f4231ab53e966ff8a4585de2e981ffa648b930636d0d49089b539987672368e6f7ab23736da2a93986b41fbf15d705b3b
7
+ data.tar.gz: f19affcdddf969452a379289d1f0f61d50eb6858c59c87758dddc9ba61700b0db9d93823db14021c05a1f572db12b60d4dd5f770f574cc81cbaf38a155879487
@@ -455,6 +455,10 @@ svg {
455
455
  border-bottom: solid 3px #2E382E;
456
456
  }
457
457
 
458
+ :root {
459
+ --ribose-primary-color: #1661AD;
460
+ }
461
+
458
462
  body {
459
463
  margin-left: auto;
460
464
  margin-right: auto;
@@ -506,8 +510,8 @@ main {
506
510
  padding-left: 110px;
507
511
  }
508
512
  #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
509
- background: #1661AD;
510
- box-shadow: inset -5px 0px 10px -5px #1661AD !important;
513
+ background: var(--ribose-primary-color);
514
+ box-shadow: inset -5px 0px 10px -5px var(--ribose-primary-color) !important;
511
515
  }
512
516
  #toc .toc-active a, #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
513
517
  color: #485094;
@@ -581,7 +585,7 @@ main {
581
585
  position: fixed;
582
586
  height: 100%;
583
587
  width: 30px;
584
- background-color: #1661AD;
588
+ background-color: var(--ribose-primary-color);
585
589
  color: white !important;
586
590
  cursor: pointer;
587
591
  z-index: 100;
@@ -865,7 +869,7 @@ h5,
865
869
  h6,
866
870
  .h1, .h2, .h3, .h4, .h5, .h6 {
867
871
  font-family: {{headerfont}};
868
- color: #1661AD;
872
+ color: var(--ribose-primary-color);
869
873
  font-weight: 300;
870
874
  margin-top: 1.6em;
871
875
  margin-bottom: 0.3em;
@@ -898,7 +902,7 @@ h3, .h3 {
898
902
  }
899
903
 
900
904
  .TermNum, .Terms, .AltTerms {
901
- color: #1661AD;
905
+ color: var(--ribose-primary-color);
902
906
  }
903
907
 
904
908
  h2.TermNum {
@@ -936,17 +940,17 @@ a, a:visited {
936
940
 
937
941
  a:hover {
938
942
  color: white;
939
- background: #1661AD;
940
- box-shadow: 3px 0 0 #1661AD, -3px 0 0 #1661AD;
943
+ background: var(--ribose-primary-color);
944
+ box-shadow: 3px 0 0 var(--ribose-primary-color), -3px 0 0 var(--ribose-primary-color);
941
945
  }
942
946
 
943
947
  *::selection {
944
- background: #1661AD;
948
+ background: var(--ribose-primary-color);
945
949
  color: white;
946
950
  }
947
951
 
948
952
  *::-moz-selection {
949
- background: #1661AD;
953
+ background: var(--ribose-primary-color);
950
954
  color: white;
951
955
  }
952
956
 
@@ -1192,14 +1196,14 @@ a.footnote-number {
1192
1196
  margin-top: 5em;
1193
1197
  width: 250px;
1194
1198
  text-align: left;
1195
- border: #1661AD solid 2px;
1196
- color: #1661AD !important;
1199
+ border: var(--ribose-primary-color) solid 2px;
1200
+ color: var(--ribose-primary-color) !important;
1197
1201
  border-radius: 25px;
1198
1202
  }
1199
1203
 
1200
1204
  .contact-info a,
1201
1205
  .contact-info a:hover {
1202
- color: #1661AD;
1206
+ color: var(--ribose-primary-color);
1203
1207
  }
1204
1208
 
1205
1209
  .contact-info p,
@@ -1252,7 +1256,7 @@ h2 p, .h2 p {
1252
1256
  }
1253
1257
 
1254
1258
  .wrapper-top {
1255
- background: linear-gradient(200deg, #0f365e, #1661AD);
1259
+ background: linear-gradient(200deg, #0f365e, var(--ribose-primary-color));
1256
1260
  color: #ffffff;
1257
1261
  padding: 2em 0;
1258
1262
  width: 100%;
@@ -1261,7 +1265,7 @@ h2 p, .h2 p {
1261
1265
  .wrapper-top-bottom {
1262
1266
  width: 0;
1263
1267
  height: 0;
1264
- border-top: 100px solid #1661AD;
1268
+ border-top: 100px solid var(--ribose-primary-color);
1265
1269
  border-right: 100px solid transparent;
1266
1270
  position: absolute;
1267
1271
  }
@@ -9,6 +9,10 @@
9
9
 
10
10
  @use 'base_style/all' as *;
11
11
 
12
+ :root {
13
+ --ribose-primary-color: #1661AD;
14
+ }
15
+
12
16
  body {
13
17
  @include bodyStyle1($normalfontsize, 1.4em, #1d1d1d, #ffffff, 300);
14
18
  // @include sidebarNavContainer(323px);
@@ -19,7 +23,7 @@ main {
19
23
  }
20
24
 
21
25
  #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
22
- @include toc(#485094, #1661AD, #485094);
26
+ @include toc(#485094, var(--ribose-primary-color), #485094);
23
27
  @include sidebarToc();
24
28
 
25
29
  .toc-active a {
@@ -49,7 +53,7 @@ nav {
49
53
  }
50
54
 
51
55
  #toggle {
52
- @include sidebarNavToggle(white, #1661AD)
56
+ @include sidebarNavToggle(white, var(--ribose-primary-color))
53
57
  }
54
58
 
55
59
  #myBtn {
@@ -217,7 +221,7 @@ h5,
217
221
  h6,
218
222
  .h1, .h2, .h3, .h4, .h5, .h6 {
219
223
  font-family: $headerfont;
220
- color: #1661AD;
224
+ color: var(--ribose-primary-color);
221
225
  font-weight: 300;
222
226
  margin-top: 1.6em;
223
227
  margin-bottom: 0.3em;
@@ -250,7 +254,7 @@ h3, .h3 {
250
254
  }
251
255
 
252
256
  .TermNum, .Terms, .AltTerms {
253
- color: #1661AD;
257
+ color: var(--ribose-primary-color);
254
258
  }
255
259
 
256
260
  h2.TermNum {
@@ -281,7 +285,7 @@ p.AltTerms {
281
285
  /*
282
286
  3.2 Links
283
287
  */
284
- @include elementStyles(#485094, #1661AD, white);
288
+ @include elementStyles(#485094, var(--ribose-primary-color), white);
285
289
 
286
290
  /*
287
291
  3.3 Lists
@@ -468,15 +472,15 @@ a.footnote-number {
468
472
  width: 250px;
469
473
 
470
474
  text-align: left;
471
- border: #1661AD solid 2px;
472
- color: #1661AD !important;
475
+ border: var(--ribose-primary-color) solid 2px;
476
+ color: var(--ribose-primary-color) !important;
473
477
  border-radius: 25px;
474
478
 
475
479
  }
476
480
 
477
481
  .contact-info a,
478
482
  .contact-info a:hover {
479
- color: #1661AD;
483
+ color: var(--ribose-primary-color);
480
484
  }
481
485
 
482
486
  .contact-info p,
@@ -533,7 +537,7 @@ h2 p, .h2 p {
533
537
  }
534
538
 
535
539
  .wrapper-top {
536
- background: linear-gradient(200deg, #0f365e, #1661AD);
540
+ background: linear-gradient(200deg, #0f365e, var(--ribose-primary-color));
537
541
  color: #ffffff;
538
542
  padding: 2em 0;
539
543
  width: 100%;
@@ -542,7 +546,7 @@ h2 p, .h2 p {
542
546
  .wrapper-top-bottom {
543
547
  width: 0;
544
548
  height: 0;
545
- border-top: 100px solid #1661AD;
549
+ border-top: 100px solid var(--ribose-primary-color);
546
550
  border-right: 100px solid transparent;
547
551
  position: absolute;
548
552
  }
@@ -16,8 +16,8 @@ module IsoDoc
16
16
 
17
17
  def i18n_init(lang, script, locale, i18nyaml = nil)
18
18
  @i18n = I18n.new(
19
- lang, script, locale: locale, i18nyaml: i18nyaml ||
20
- Metanorma::Ribose.configuration.i18nyaml || @i18nyaml
19
+ lang, script, locale: locale, i18nyaml: [i18nyaml,
20
+ Metanorma::Ribose.configuration.i18nyaml, @i18nyaml]
21
21
  )
22
22
  end
23
23
  end
@@ -35,24 +35,20 @@
35
35
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
36
36
 
37
37
  <xsl:variable name="docnumber_version">
38
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'rsd' or @type = 'Ribose']"/>
39
- <xsl:text>:</xsl:text>
40
- <xsl:value-of select="$copyright_year"/>
41
-
42
- <xsl:variable name="edition" select="normalize-space(/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = ''])"/>
43
- <xsl:if test="$edition != ''">
44
- <xsl:variable name="title-version">
45
- <xsl:call-template name="capitalize">
46
- <xsl:with-param name="str">
47
- <xsl:call-template name="getLocalizedString">
48
- <xsl:with-param name="key">version</xsl:with-param>
49
- </xsl:call-template>
50
- </xsl:with-param>
51
- </xsl:call-template>
52
- </xsl:variable>
53
- <xsl:text>, </xsl:text><xsl:value-of select="$title-version"/><xsl:text> </xsl:text><xsl:value-of select="$edition"/>
54
- </xsl:if>
55
-
38
+ <xsl:value-of select="concat(/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'rsd' or @type = 'Ribose' or @primary = 'true'], ':', $copyright_year)"/>
39
+ <xsl:variable name="edition" select="normalize-space(/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = ''])"/>
40
+ <xsl:if test="$edition != ''">
41
+ <xsl:variable name="title-version">
42
+ <xsl:call-template name="capitalize">
43
+ <xsl:with-param name="str">
44
+ <xsl:call-template name="getLocalizedString">
45
+ <xsl:with-param name="key">version</xsl:with-param>
46
+ </xsl:call-template>
47
+ </xsl:with-param>
48
+ </xsl:call-template>
49
+ </xsl:variable>
50
+ <xsl:value-of select="concat(', ', $title-version, ' ', $edition)"/>
51
+ </xsl:if>
56
52
  </xsl:variable>
57
53
 
58
54
  <xsl:template name="layout-master-set">
@@ -638,7 +634,7 @@
638
634
  <xsl:if test="$contents//mnx:item[@display = 'true']">
639
635
 
640
636
  <fo:block-container xsl:use-attribute-sets="toc-style">
641
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
637
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
642
638
  <xsl:for-each select="$contents//mnx:item[@display = 'true']">
643
639
  <fo:block xsl:use-attribute-sets="toc-item-style">
644
640
 
@@ -810,44 +806,6 @@
810
806
  <xsl:call-template name="getLevel"/>
811
807
  </xsl:variable>
812
808
 
813
- <xsl:variable name="font-size">
814
- <xsl:choose>
815
- <!-- <xsl:when test="ancestor::mn:preface and $level &gt;= 2">12pt</xsl:when>
816
- <xsl:when test="ancestor::mn:preface">13pt</xsl:when> -->
817
- <xsl:when test="$level = 1">22pt</xsl:when>
818
- <!-- <xsl:when test="$level = 2">13pt</xsl:when>
819
- <xsl:when test="$level &gt;= 3">11pt</xsl:when>
820
- <xsl:otherwise>16pt</xsl:otherwise> -->
821
- <xsl:when test="$level &gt;= 2">13pt</xsl:when>
822
- <xsl:otherwise>13pt</xsl:otherwise>
823
- </xsl:choose>
824
- </xsl:variable>
825
-
826
- <xsl:variable name="font-weight">
827
- <xsl:choose>
828
- <xsl:when test="$level &gt;= 4">normal</xsl:when>
829
- <xsl:otherwise>bold</xsl:otherwise> <!-- 600 - semibold-->
830
- </xsl:choose>
831
- </xsl:variable>
832
-
833
- <xsl:variable name="space-before">
834
- <xsl:choose>
835
- <xsl:when test="$level = 1">25mm</xsl:when>
836
- <xsl:when test="$level = 2">9mm</xsl:when>
837
- <xsl:when test="$level = 3">12pt</xsl:when>
838
- <xsl:when test="$level &gt;= 4">8pt</xsl:when>
839
- <xsl:otherwise>13.5pt</xsl:otherwise>
840
- </xsl:choose>
841
- </xsl:variable>
842
-
843
- <xsl:variable name="margin-bottom">
844
- <xsl:choose>
845
- <xsl:when test="$level = 1">12pt</xsl:when>
846
- <xsl:when test="$level &gt;= 4">4pt</xsl:when>
847
- <xsl:otherwise>12pt</xsl:otherwise>
848
- </xsl:choose>
849
- </xsl:variable>
850
-
851
809
  <xsl:variable name="element-name">
852
810
  <xsl:choose>
853
811
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -855,27 +813,17 @@
855
813
  </xsl:choose>
856
814
  </xsl:variable>
857
815
 
858
- <xsl:variable name="color">
859
- <xsl:choose>
860
- <xsl:when test="$level = 3"><xsl:value-of select="$color_blue"/></xsl:when>
861
- <xsl:otherwise>black</xsl:otherwise>
862
- </xsl:choose>
816
+ <xsl:variable name="title_styles">
817
+ <styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
863
818
  </xsl:variable>
864
819
 
865
820
  <xsl:element name="{$element-name}">
866
- <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
867
- <xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute>
868
- <xsl:attribute name="space-before"><xsl:value-of select="$space-before"/></xsl:attribute>
869
- <xsl:attribute name="margin-bottom"><xsl:value-of select="$margin-bottom"/></xsl:attribute>
870
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
871
- <xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
872
- <xsl:attribute name="line-height">125%</xsl:attribute>
873
- <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
821
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
874
822
 
875
823
  <xsl:choose>
876
824
  <xsl:when test="$level = 1">
877
825
  <fo:block-container margin-left="-15mm" role="SKIP">
878
- <fo:block-container margin-left="0mm" role="SKIP">
826
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
879
827
  <fo:table width="100%" table-layout="fixed" role="SKIP">
880
828
  <fo:table-column column-width="15mm"/>
881
829
  <fo:table-column column-width="150mm"/>
@@ -944,25 +892,16 @@
944
892
  </xsl:variable>
945
893
 
946
894
  <xsl:call-template name="setNamedDestination"/>
947
- <xsl:element name="{$element-name}">
948
- <xsl:attribute name="id">
949
- <xsl:value-of select="@id"/>
950
- </xsl:attribute>
951
895
 
952
- <xsl:call-template name="setBlockAttributes"/>
896
+ <xsl:variable name="p_styles">
897
+ <styles xsl:use-attribute-sets="p-style">
898
+ <xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
899
+ </styles>
900
+ </xsl:variable>
953
901
 
954
- <xsl:attribute name="space-after">
955
- <xsl:choose>
956
- <xsl:when test="ancestor::mn:li">6pt</xsl:when>
957
- <xsl:when test="ancestor::mn:feedback-statement and not(following-sibling::mn:p)">0pt</xsl:when>
958
- <xsl:otherwise>6pt</xsl:otherwise> <!-- 12pt-->
959
- </xsl:choose>
960
- </xsl:attribute>
961
- <xsl:if test="ancestor::mn:dl"> <!-- ancestor::mn:li or -->
962
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
963
- </xsl:if>
902
+ <xsl:element name="{$element-name}">
903
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
964
904
 
965
- <!-- <xsl:attribute name="line-height">155%</xsl:attribute> -->
966
905
  <xsl:apply-templates>
967
906
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
968
907
  </xsl:apply-templates>
@@ -982,7 +921,7 @@
982
921
 
983
922
  <xsl:template match="mn:ul | mn:ol" mode="list" priority="2">
984
923
  <fo:block-container role="SKIP">
985
- <fo:block-container margin-left="0mm" role="SKIP">
924
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
986
925
  <xsl:choose>
987
926
  <xsl:when test="not(ancestor::mn:ul) and not(ancestor::mn:ol)">
988
927
  <fo:block padding-bottom="12pt" padding-top="4pt" role="SKIP">
@@ -1070,7 +1009,8 @@
1070
1009
  <!-- repeat table header on each page -->
1071
1010
  <fo:table-row role="SKIP">
1072
1011
  <fo:table-cell text-align="left" role="SKIP">
1073
- <fo:block xsl:use-attribute-sets="references-non-normative-title-style"> <!-- Bibliography section title -->
1012
+ <fo:block xsl:use-attribute-sets="title-style"> <!-- Bibliography section title -->
1013
+ <xsl:call-template name="refine_title-style"/>
1074
1014
  <xsl:apply-templates select="mn:fmt-title/node()"/>
1075
1015
  </fo:block>
1076
1016
  </fo:table-cell>
@@ -1142,7 +1082,7 @@
1142
1082
  <fo:block-container xsl:use-attribute-sets="clause-style">
1143
1083
  <xsl:call-template name="refine_clause-style"/>
1144
1084
 
1145
- <fo:block-container margin-left="0mm" role="SKIP">
1085
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
1146
1086
  <xsl:call-template name="setNamedDestination"/>
1147
1087
  <fo:block role="SKIP">
1148
1088
  <xsl:call-template name="setId"/>
@@ -1273,7 +1213,8 @@
1273
1213
  <xsl:template name="insertFooter">
1274
1214
  <!-- <xsl:param name="invert"/> -->
1275
1215
  <xsl:variable name="footerText">
1276
- <xsl:text>Ribose</xsl:text>
1216
+ <!-- Ribose -->
1217
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role/@type = 'publisher']/mn:organization/mn:abbreviation"/>
1277
1218
  <xsl:text> </xsl:text>
1278
1219
  <xsl:call-template name="capitalizeWords">
1279
1220
  <xsl:with-param name="str">
@@ -3416,6 +3357,10 @@
3416
3357
  </xsl:element>
3417
3358
  </xsl:template>
3418
3359
 
3360
+ <!-- show sourcecode's name 'before' or 'after' source code -->
3361
+ <xsl:variable name="sourcecode-name-position"><xsl:text>before</xsl:text>
3362
+ </xsl:variable>
3363
+
3419
3364
  <xsl:template match="mn:sourcecode" name="sourcecode">
3420
3365
 
3421
3366
  <xsl:variable name="sourcecode_attributes">
@@ -3439,8 +3384,12 @@
3439
3384
 
3440
3385
  <xsl:call-template name="refine_sourcecode-container-style"/>
3441
3386
 
3442
- <fo:block-container margin-left="0mm" role="SKIP">
3443
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
3387
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
3388
+
3389
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
3390
+ <xsl:if test="$sourcecode-name-position = 'before'">
3391
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
3392
+ </xsl:if>
3444
3393
 
3445
3394
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3446
3395
 
@@ -3463,6 +3412,16 @@
3463
3412
 
3464
3413
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
3465
3414
 
3415
+ <!-- <xsl:choose>
3416
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
3417
+ <xsl:otherwise>
3418
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
3419
+ <!-- </xsl:otherwise>
3420
+ </xsl:choose> -->
3421
+ <xsl:if test="$sourcecode-name-position = 'after'">
3422
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
3423
+ </xsl:if>
3424
+
3466
3425
  </fo:block-container>
3467
3426
  </fo:block-container>
3468
3427
  </xsl:otherwise>
@@ -9313,6 +9272,10 @@
9313
9272
  <!-- image -->
9314
9273
  <!-- ====== -->
9315
9274
 
9275
+ <!-- show figure's name 'before' or 'after' image -->
9276
+ <xsl:variable name="figure-name-position"><xsl:text>before</xsl:text>
9277
+ </xsl:variable>
9278
+
9316
9279
  <xsl:template match="mn:figure" name="figure">
9317
9280
  <xsl:variable name="isAdded" select="@added"/>
9318
9281
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -9323,8 +9286,11 @@
9323
9286
  <xsl:call-template name="setTrackChangesStyles">
9324
9287
  <xsl:with-param name="isAdded" select="$isAdded"/>
9325
9288
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
9326
- </xsl:call-template> <!-- show figure's name BEFORE image -->
9327
- <xsl:apply-templates select="mn:fmt-name"/>
9289
+ </xsl:call-template>
9290
+
9291
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
9292
+ <xsl:apply-templates select="mn:fmt-name"/>
9293
+ </xsl:if>
9328
9294
 
9329
9295
  <!-- Example: Dimensions in millimeters -->
9330
9296
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
@@ -9347,6 +9313,16 @@
9347
9313
  <xsl:call-template name="showFigureKey"/>
9348
9314
  </xsl:if>
9349
9315
 
9316
+ <!-- <xsl:choose>
9317
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
9318
+ <xsl:otherwise>
9319
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
9320
+ <!-- </xsl:otherwise>
9321
+ </xsl:choose> -->
9322
+ <xsl:if test="$figure-name-position = 'after'">
9323
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
9324
+ </xsl:if>
9325
+
9350
9326
  </fo:block-container>
9351
9327
  </xsl:template>
9352
9328
 
@@ -11436,18 +11412,18 @@
11436
11412
  <!-- END Admonition -->
11437
11413
  <!-- ================ -->
11438
11414
 
11439
- <xsl:attribute-set name="references-non-normative-title-style">
11415
+ <xsl:attribute-set name="bibliography-title-style">
11440
11416
  <xsl:attribute name="margin-left">-15mm</xsl:attribute>
11441
11417
  <xsl:attribute name="role">H1</xsl:attribute>
11442
11418
  <xsl:attribute name="font-size">22pt</xsl:attribute>
11443
11419
  <xsl:attribute name="font-weight">bold</xsl:attribute>
11420
+ <xsl:attribute name="space-before">0pt</xsl:attribute>
11444
11421
  <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
11445
11422
  <xsl:attribute name="color">black</xsl:attribute>
11446
11423
  <xsl:attribute name="line-height">125%</xsl:attribute>
11447
11424
  </xsl:attribute-set>
11448
11425
 
11449
- <xsl:template name="refine_references-non-normative-title-style">
11450
-
11426
+ <xsl:template name="refine_bibliography-title-style">
11451
11427
  </xsl:template>
11452
11428
 
11453
11429
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -13577,7 +13553,8 @@
13577
13553
  <!-- ===================================== -->
13578
13554
 
13579
13555
  <xsl:attribute-set name="annex-title-style">
13580
- </xsl:attribute-set>
13556
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
13557
+ </xsl:attribute-set> <!-- annex-title-style -->
13581
13558
 
13582
13559
  <xsl:template name="refine_annex-title-style">
13583
13560
  </xsl:template>
@@ -13588,6 +13565,77 @@
13588
13565
  <xsl:template name="refine_p-zzSTDTitle1-style">
13589
13566
  </xsl:template>
13590
13567
 
13568
+ <xsl:attribute-set name="p-style">
13569
+ </xsl:attribute-set> <!-- p-style -->
13570
+
13571
+ <xsl:template name="refine_p-style">
13572
+ <xsl:param name="element-name"/>
13573
+ <xsl:param name="margin"/>
13574
+ <xsl:call-template name="setBlockAttributes"/>
13575
+
13576
+ <xsl:copy-of select="@id"/>
13577
+
13578
+ <xsl:attribute name="space-after">
13579
+ <xsl:choose>
13580
+ <xsl:when test="ancestor::mn:li">6pt</xsl:when>
13581
+ <xsl:when test="ancestor::mn:feedback-statement and not(following-sibling::mn:p)">0pt</xsl:when>
13582
+ <xsl:otherwise>6pt</xsl:otherwise>
13583
+ </xsl:choose>
13584
+ </xsl:attribute>
13585
+ <xsl:if test="ancestor::mn:dl">
13586
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
13587
+ </xsl:if>
13588
+ <!-- namespace = 'rsd' -->
13589
+
13590
+ </xsl:template> <!-- refine_p-style -->
13591
+
13592
+ <xsl:attribute-set name="title-style">
13593
+ <!-- Note: font-size for level 1 title -->
13594
+ <xsl:attribute name="font-size">22pt</xsl:attribute>
13595
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
13596
+ <xsl:attribute name="space-before">25mm</xsl:attribute>
13597
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13598
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
13599
+ <xsl:attribute name="color">black</xsl:attribute>
13600
+ <xsl:attribute name="line-height">125%</xsl:attribute>
13601
+ </xsl:attribute-set> <!-- title-style -->
13602
+
13603
+ <xsl:template name="refine_title-style">
13604
+ <xsl:param name="element-name"/>
13605
+ <xsl:variable name="level">
13606
+ <xsl:call-template name="getLevel"/>
13607
+ </xsl:variable>
13608
+ <xsl:if test="$level &gt;= 2">
13609
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
13610
+ </xsl:if>
13611
+ <xsl:if test="$level = 2">
13612
+ <xsl:attribute name="space-before">9mm</xsl:attribute>
13613
+ </xsl:if>
13614
+ <xsl:if test="$level = 3">
13615
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
13616
+ <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
13617
+ </xsl:if>
13618
+ <xsl:if test="$level &gt;= 4">
13619
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
13620
+ <xsl:attribute name="space-before">8pt</xsl:attribute>
13621
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
13622
+ </xsl:if>
13623
+ <xsl:if test="parent::mn:annex"><!-- Annex title -->
13624
+ <xsl:variable name="annex_title_styles">
13625
+ <styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
13626
+ </xsl:variable>
13627
+ <xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
13628
+ </xsl:if>
13629
+ <xsl:if test="self::mn:references[not(@normative='true')]">
13630
+ <xsl:variable name="bibliography_title_styles">
13631
+ <styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
13632
+ </xsl:variable>
13633
+ <xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
13634
+ </xsl:if>
13635
+ <!-- $namespace = 'rsd' -->
13636
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
13637
+ </xsl:template> <!-- refine_title-style -->
13638
+
13591
13639
  <xsl:template name="processPrefaceSectionsDefault">
13592
13640
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
13593
13641
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -13926,6 +13974,12 @@
13926
13974
  </xsl:choose>
13927
13975
  </xsl:template>
13928
13976
 
13977
+ <xsl:attribute-set name="reset-margins-style">
13978
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
13979
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
13980
+ <xsl:attribute name="role">SKIP</xsl:attribute>
13981
+ </xsl:attribute-set>
13982
+
13929
13983
  <xsl:attribute-set name="clause-style">
13930
13984
 
13931
13985
  </xsl:attribute-set>
@@ -14945,8 +14999,9 @@
14945
14999
 
14946
15000
  <xsl:template name="setTextAlignment">
14947
15001
  <xsl:param name="default">left</xsl:param>
15002
+ <xsl:param name="skip_default">false</xsl:param>
14948
15003
  <xsl:variable name="align" select="normalize-space(@align)"/>
14949
- <xsl:attribute name="text-align">
15004
+ <xsl:variable name="text_align">
14950
15005
  <xsl:choose>
14951
15006
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
14952
15007
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -14954,9 +15009,13 @@
14954
15009
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
14955
15010
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
14956
15011
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
15012
+ <xsl:when test="$skip_default = 'true'"/>
14957
15013
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
14958
15014
  </xsl:choose>
14959
- </xsl:attribute>
15015
+ </xsl:variable>
15016
+ <xsl:if test="normalize-space($text_align) != ''">
15017
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
15018
+ </xsl:if>
14960
15019
  <xsl:if test="$align = 'indent'">
14961
15020
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
14962
15021
  </xsl:if>
@@ -14964,8 +15023,10 @@
14964
15023
 
14965
15024
  <xsl:template name="setBlockAttributes">
14966
15025
  <xsl:param name="text_align_default">left</xsl:param>
15026
+ <xsl:param name="skip_text_align_default">false</xsl:param>
14967
15027
  <xsl:call-template name="setTextAlignment">
14968
15028
  <xsl:with-param name="default" select="$text_align_default"/>
15029
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
14969
15030
  </xsl:call-template>
14970
15031
  <xsl:call-template name="setKeepAttributes"/>
14971
15032
  <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
@@ -690,7 +690,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
690
690
  <define name="CitationType">
691
691
  <attribute name="bibitemid">
692
692
  <a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
693
- <data type="IDREF"/>
693
+ <ref name="IdRefType"/>
694
694
  </attribute>
695
695
  <choice>
696
696
  <zeroOrMore>
@@ -1296,17 +1296,17 @@ for which this claim of validity is made, if applicable</a:documentation>
1296
1296
  </define>
1297
1297
  <define name="validityBegins">
1298
1298
  <element name="validityBegins">
1299
- <ref name="ISO8601Date"/>
1299
+ <ref name="ISO8601DateTime"/>
1300
1300
  </element>
1301
1301
  </define>
1302
1302
  <define name="validityEnds">
1303
1303
  <element name="validityEnds">
1304
- <ref name="ISO8601Date"/>
1304
+ <ref name="ISO8601DateTime"/>
1305
1305
  </element>
1306
1306
  </define>
1307
1307
  <define name="validityRevision">
1308
1308
  <element name="revision">
1309
- <ref name="ISO8601Date"/>
1309
+ <ref name="ISO8601DateTime"/>
1310
1310
  </element>
1311
1311
  </define>
1312
1312
  <define name="TypedTitleString">
@@ -56,3 +56,5 @@ module Metanorma
56
56
  end
57
57
  end
58
58
  end
59
+
60
+ require_relative "log"
@@ -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.3 -->
3
+ <!-- VERSION v2.1.4 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -905,15 +905,32 @@ titlecase, or lowercase</a:documentation>
905
905
  </element>
906
906
  </define>
907
907
  <define name="image" combine="choice">
908
- <element name="svg">
909
- <a:documentation>Add svg mark up to image</a:documentation>
910
- <oneOrMore>
911
- <choice>
912
- <text/>
913
- <ref name="AnyElement"/>
914
- </choice>
915
- </oneOrMore>
916
- </element>
908
+ <choice>
909
+ <element name="image">
910
+ <ref name="RequiredId"/>
911
+ <ref name="ImageAttributes"/>
912
+ <optional>
913
+ <element name="svg">
914
+ <a:documentation>Allow svg in image/svg, for consistency</a:documentation>
915
+ <oneOrMore>
916
+ <choice>
917
+ <text/>
918
+ <ref name="AnyElement"/>
919
+ </choice>
920
+ </oneOrMore>
921
+ </element>
922
+ </optional>
923
+ </element>
924
+ <element name="svg">
925
+ <a:documentation>Add svg mark up to image</a:documentation>
926
+ <oneOrMore>
927
+ <choice>
928
+ <text/>
929
+ <ref name="AnyElement"/>
930
+ </choice>
931
+ </oneOrMore>
932
+ </element>
933
+ </choice>
917
934
  </define>
918
935
  <define name="ParagraphFnBody" combine="interleave">
919
936
  <ref name="BlockSource">
@@ -0,0 +1,15 @@
1
+ module Metanorma
2
+ module Ribose
3
+ class Converter
4
+ RIBOSE_LOG_MESSAGES = {
5
+ # rubocop:disable Naming/VariableNumber
6
+ # No gem-specific log messages currently defined
7
+ }.freeze
8
+ # rubocop:enable Naming/VariableNumber
9
+
10
+ def log_messages
11
+ super.merge(RIBOSE_LOG_MESSAGES)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.7.6".freeze
3
+ VERSION = "2.7.8".freeze
4
4
  end
5
5
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ["lib"]
30
30
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
31
31
 
32
- spec.add_dependency "metanorma-generic", "~> 3.1.0"
32
+ spec.add_dependency "metanorma-generic", "~> 3.2.0"
33
33
 
34
34
  spec.add_development_dependency "debug"
35
35
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
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.7.6
4
+ version: 2.7.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: 2025-10-13 00:00:00.000000000 Z
11
+ date: 2025-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.0
19
+ version: 3.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.1.0
26
+ version: 3.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -242,6 +242,7 @@ files:
242
242
  - lib/metanorma/ribose/boilerplate.adoc
243
243
  - lib/metanorma/ribose/converter.rb
244
244
  - lib/metanorma/ribose/isodoc.rng
245
+ - lib/metanorma/ribose/log.rb
245
246
  - lib/metanorma/ribose/processor.rb
246
247
  - lib/metanorma/ribose/relaton-ribose.rng
247
248
  - lib/metanorma/ribose/reqt.rng