metanorma-ribose 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1bbd030e33fe7a12a2a2ca6c14cec0adbdff9033c66b57428bfaeae6970b82d
4
- data.tar.gz: f0acb7f86fb7973434f9be2bab217bba9fc07eb0e1695133643319855694cc77
3
+ metadata.gz: 8480f32efd17d0b5c2d9148d66bc0b48aedf3e5e043f2a4dcef6dccfab5b6480
4
+ data.tar.gz: 014e2b6af3a65e8592116e9f95f83af48045d0a35158d5d240dff8d42e029ab2
5
5
  SHA512:
6
- metadata.gz: 4539903e8e6d624f91b6d567349ba36936b3c923ea7f3ba85e29e0f18d2956d14822c62c5fd68e41deb8cab77d27adc0a585f4aac19ae86c3193d26f004f66c5
7
- data.tar.gz: 8580a2b564f1e515e3eefc271b39cdb216fec936e56f34289f6a68342b57d1f8543fb85e168240b2e2a68eff617773dc942fb7dbf6de1e559916692ca4b7c923
6
+ metadata.gz: '062922a281b836eadefd56cb767f03b124e5b6576044970dbc9d2365a0362ee6e781a089a2a076b567937a0d8d94275e7b1e1323138addc4ded8d08853ab9fc1'
7
+ data.tar.gz: b80840c6465ce0656ee6c3d1012c3b1bc5f5c234ceabe6c1e2b093b43329f249bfd1a6d11765afb3de31a326c2dadadb444262e833a4218821fb18dfcb660d22
@@ -248,54 +248,55 @@ body {
248
248
  main {
249
249
  margin: 0 3em 0 6em; }
250
250
 
251
- #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
251
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
252
252
  font-family: {{bodyfont}};
253
253
  font-weight: 400; }
254
- #toc ul, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
254
+ #toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
255
255
  margin: 0;
256
256
  padding: 0;
257
257
  list-style: none; }
258
- #toc ul li a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
258
+ #toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
259
259
  padding: 5px 10px; }
260
- #toc ul a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
260
+ #toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
261
261
  color: #485094;
262
262
  text-decoration: none;
263
263
  display: block; }
264
- #toc ul a:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
264
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
265
265
  box-shadow: none;
266
266
  color: #485094; }
267
- #toc .h2, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
267
+ #toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
268
268
  padding-left: 30px; }
269
- #toc .h3, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
269
+ #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
270
270
  padding-left: 50px; }
271
- #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 {
271
+ #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 {
272
272
  background: #1661AD;
273
273
  box-shadow: inset -5px 0px 10px -5px #1661AD !important; }
274
- #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 {
274
+ #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 {
275
275
  color: #485094; }
276
276
  @media print {
277
- #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 {
277
+ #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 {
278
278
  background: white;
279
279
  box-shadow: none !important; }
280
- #toc .toc-active a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
280
+ #toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
281
281
  color: #485094; }
282
- #toc li:hover a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
282
+ #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
283
283
  color: black; } }
284
284
  @media screen and (max-width: 768px) {
285
- #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
285
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
286
286
  padding: 0 1.5em;
287
287
  overflow: visible; } }
288
- #toc .toc-active a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
288
+ #toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
289
289
  color: white; }
290
- #toc li a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li a {
290
+ #toc li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li a {
291
291
  text-transform: uppercase; }
292
- #toc ul a:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
292
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
293
293
  box-shadow: none;
294
294
  color: white; }
295
295
 
296
- #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
296
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
297
297
  margin-top: 0;
298
- margin-bottom: 0; }
298
+ margin-bottom: 0;
299
+ font-size: 100%; }
299
300
 
300
301
  @media screen and (min-width: 768px) {
301
302
  nav {
@@ -18,7 +18,7 @@ main {
18
18
  margin: 0 3em 0 6em;
19
19
  }
20
20
 
21
- #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
21
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
22
22
  @include toc(#485094, #1661AD, #485094);
23
23
  @include sidebarToc();
24
24
 
@@ -38,9 +38,10 @@ main {
38
38
  }
39
39
  }
40
40
 
41
- #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
41
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
42
42
  margin-top: 0;
43
43
  margin-bottom: 0;
44
+ font-size: 100%;
44
45
  }
45
46
 
46
47
  nav {
@@ -8,9 +8,7 @@
8
8
  <xsl:param name="basepath"/>
9
9
 
10
10
  <xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
11
-
12
- <xsl:variable name="pageWidth" select="215.9"/>
13
- <xsl:variable name="pageHeight" select="279.4"/>
11
+
14
12
  <xsl:variable name="marginLeftRight1" select="29"/>
15
13
  <xsl:variable name="marginLeftRight2" select="29"/>
16
14
  <xsl:variable name="marginTop" select="14"/>
@@ -589,67 +587,19 @@
589
587
  </fo:block>
590
588
  </xsl:template>
591
589
 
592
- <xsl:template match="rsd:license-statement//rsd:title">
593
- <xsl:variable name="level">
594
- <xsl:call-template name="getLevel"/>
595
- </xsl:variable>
596
- <fo:block text-align="center" font-weight="normal" margin-top="4pt" role="H{$level}">
597
- <xsl:apply-templates/>
598
- </fo:block>
599
- </xsl:template>
600
-
601
- <xsl:template match="rsd:license-statement//rsd:p">
602
- <fo:block font-size="8pt" margin-top="14pt" line-height="115%">
603
- <xsl:if test="following-sibling::rsd:p">
604
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
605
- </xsl:if>
606
- <xsl:apply-templates/>
607
- </fo:block>
608
- </xsl:template>
609
590
 
610
- <xsl:template match="rsd:feedback-statement">
591
+ <xsl:template match="rsd:feedback-statement" priority="2">
611
592
  <fo:block-container border="1pt solid black" padding="1mm" padding-left="2mm">
612
593
  <fo:block>
613
594
  <xsl:apply-templates/>
614
595
  </fo:block>
615
596
  </fo:block-container>
616
597
  </xsl:template>
617
-
618
- <xsl:template match="rsd:copyright-statement//rsd:title">
619
- <xsl:variable name="level">
620
- <xsl:call-template name="getLevel"/>
621
- </xsl:variable>
622
- <fo:block font-weight="normal" text-align="center" role="H{$level}">
623
- <xsl:apply-templates/>
624
- </fo:block>
625
- </xsl:template>
626
- <xsl:template match="rsd:copyright-statement//rsd:p">
627
- <fo:block margin-bottom="12pt">
628
- <xsl:if test="not(following-sibling::p)">
629
- <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
630
- </xsl:if>
631
- <xsl:attribute name="text-align">
632
- <xsl:choose>
633
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
634
- <xsl:otherwise>left</xsl:otherwise>
635
- </xsl:choose>
636
- </xsl:attribute>
637
- <xsl:apply-templates/>
638
- </fo:block>
639
- </xsl:template>
598
+
640
599
 
641
- <xsl:template match="rsd:legal-statement">
600
+ <xsl:template match="rsd:legal-statement" priority="2">
642
601
  <xsl:apply-templates/>
643
602
  </xsl:template>
644
-
645
- <xsl:template match="rsd:legal-statement//rsd:title">
646
- <xsl:variable name="level">
647
- <xsl:call-template name="getLevel"/>
648
- </xsl:variable>
649
- <fo:block font-weight="normal" padding-top="2mm" margin-bottom="6pt" role="H{$level}">
650
- <xsl:apply-templates/>
651
- </fo:block>
652
- </xsl:template>
653
603
 
654
604
 
655
605
  <!-- ====== -->
@@ -792,7 +742,7 @@
792
742
  </fo:block>
793
743
  </xsl:template>
794
744
 
795
- <xsl:template match="rsd:p">
745
+ <xsl:template match="rsd:p" name="paragraph">
796
746
  <xsl:param name="inline" select="'false'"/>
797
747
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
798
748
  <xsl:variable name="element-name">
@@ -1058,11 +1008,6 @@
1058
1008
  </fo:block>
1059
1009
  </xsl:template>
1060
1010
 
1061
- <xsl:template match="rsd:pagebreak">
1062
- <fo:block break-after="page"/>
1063
- <fo:block> </fo:block>
1064
- <fo:block break-after="page"/>
1065
- </xsl:template>
1066
1011
 
1067
1012
  <xsl:template match="*[local-name()='table' or local-name()='figure' or local-name()='sourcecode']/*[local-name() = 'name']/node()[1][self::text()]" priority="2">
1068
1013
  <xsl:choose>
@@ -1312,7 +1257,11 @@
1312
1257
 
1313
1258
 
1314
1259
 
1315
- <xsl:variable name="titles_">
1260
+ <xsl:variable name="pageWidth_">
1261
+ 215.9
1262
+ </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
1263
+ 279.4
1264
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
1316
1265
 
1317
1266
  <title-edition lang="en">
1318
1267
 
@@ -1417,6 +1366,57 @@
1417
1366
  <xsl:attribute name="color">rgb(88, 88, 90)</xsl:attribute>
1418
1367
 
1419
1368
 
1369
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
1370
+
1371
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
1372
+
1373
+
1374
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
1375
+
1376
+
1377
+
1378
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-style">
1379
+
1380
+
1381
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
1382
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+
1389
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
1390
+
1391
+
1392
+
1393
+
1394
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
1395
+
1396
+
1397
+
1398
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
1399
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1400
+
1401
+
1402
+
1403
+
1404
+
1405
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1406
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
1407
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1408
+
1409
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
1410
+
1411
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
1412
+
1413
+
1414
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
1415
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1416
+
1417
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
1418
+
1419
+
1420
1420
  </xsl:attribute-set><xsl:attribute-set name="link-style">
1421
1421
 
1422
1422
 
@@ -2322,6 +2322,7 @@
2322
2322
  </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
2323
2323
 
2324
2324
 
2325
+
2325
2326
  </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
2326
2327
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2327
2328
  <xsl:attribute name="font-size">65%</xsl:attribute>
@@ -2431,6 +2432,69 @@
2431
2432
  <xsl:value-of select="."/>
2432
2433
  </xsl:template><xsl:template match="*[local-name()='br']">
2433
2434
  <xsl:value-of select="$linebreak"/>
2435
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
2436
+ <fo:block xsl:use-attribute-sets="copyright-statement-style">
2437
+ <xsl:apply-templates/>
2438
+ </fo:block>
2439
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
2440
+
2441
+ <!-- process in the template 'title' -->
2442
+ <xsl:call-template name="title"/>
2443
+
2444
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
2445
+
2446
+
2447
+ <!-- process in the template 'paragraph' -->
2448
+ <xsl:call-template name="paragraph"/>
2449
+
2450
+ </xsl:template><xsl:template match="*[local-name()='license-statement']">
2451
+ <fo:block xsl:use-attribute-sets="license-statement-style">
2452
+ <xsl:apply-templates/>
2453
+ </fo:block>
2454
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
2455
+
2456
+ <!-- process in the template 'title' -->
2457
+ <xsl:call-template name="title"/>
2458
+
2459
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
2460
+
2461
+ <!-- process in the template 'paragraph' -->
2462
+ <xsl:call-template name="paragraph"/>
2463
+
2464
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']">
2465
+ <fo:block xsl:use-attribute-sets="legal-statement-style">
2466
+ <xsl:apply-templates/>
2467
+ </fo:block>
2468
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
2469
+
2470
+ <!-- ogc-white-paper rsd -->
2471
+ <xsl:variable name="level">
2472
+ <xsl:call-template name="getLevel"/>
2473
+ </xsl:variable>
2474
+ <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
2475
+ <xsl:apply-templates/>
2476
+ </fo:block>
2477
+
2478
+
2479
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
2480
+
2481
+ <!-- process in the template 'paragraph' -->
2482
+ <xsl:call-template name="paragraph"/>
2483
+
2484
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']">
2485
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
2486
+ <xsl:apply-templates/>
2487
+ </fo:block>
2488
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
2489
+
2490
+ <!-- process in the template 'title' -->
2491
+ <xsl:call-template name="title"/>
2492
+
2493
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
2494
+
2495
+ <!-- process in the template 'paragraph' -->
2496
+ <xsl:call-template name="paragraph"/>
2497
+
2434
2498
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
2435
2499
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
2436
2500
  <xsl:call-template name="add-zero-spaces-java"/>
@@ -2567,7 +2631,7 @@
2567
2631
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2568
2632
  </xsl:when>
2569
2633
  <xsl:otherwise>
2570
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
2634
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
2571
2635
  </xsl:otherwise>
2572
2636
  </xsl:choose>
2573
2637
 
@@ -2784,7 +2848,7 @@
2784
2848
 
2785
2849
  <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
2786
2850
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2787
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
2851
+ </xsl:template><xsl:template match="*[local-name()='thead']">
2788
2852
  <xsl:param name="cols-count"/>
2789
2853
  <fo:table-header>
2790
2854
 
@@ -2809,13 +2873,13 @@
2809
2873
  <fo:table-body>
2810
2874
  <xsl:apply-templates/>
2811
2875
  </fo:table-body>
2812
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
2876
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
2813
2877
  <xsl:apply-templates/>
2814
2878
  </xsl:template><xsl:template name="insertTableFooter">
2815
2879
  <xsl:param name="cols-count"/>
2816
2880
  <xsl:if test="../*[local-name()='tfoot']">
2817
2881
  <fo:table-footer>
2818
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
2882
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
2819
2883
  </fo:table-footer>
2820
2884
  </xsl:if>
2821
2885
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
@@ -2901,7 +2965,7 @@
2901
2965
 
2902
2966
  <!-- except gb and bsi -->
2903
2967
 
2904
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2968
+ <xsl:apply-templates select="../*[local-name()='note']"/>
2905
2969
 
2906
2970
 
2907
2971
 
@@ -2939,7 +3003,7 @@
2939
3003
 
2940
3004
 
2941
3005
 
2942
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
3006
+ <xsl:apply-templates select="../*[local-name()='thead']">
2943
3007
  <xsl:with-param name="cols-count" select="$cols-count"/>
2944
3008
  </xsl:apply-templates>
2945
3009
 
@@ -3086,7 +3150,7 @@
3086
3150
  <xsl:apply-templates/>
3087
3151
  </fo:block>
3088
3152
  </fo:table-cell>
3089
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
3153
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
3090
3154
 
3091
3155
  <fo:block xsl:use-attribute-sets="table-note-style">
3092
3156
 
@@ -3109,10 +3173,10 @@
3109
3173
 
3110
3174
 
3111
3175
 
3112
- <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
3176
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3113
3177
  </fo:block>
3114
3178
 
3115
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
3179
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
3116
3180
  <xsl:apply-templates/>
3117
3181
  </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
3118
3182
 
@@ -3644,7 +3708,9 @@
3644
3708
  </td>
3645
3709
  <td>
3646
3710
 
3647
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3711
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3712
+ <xsl:with-param name="process">true</xsl:with-param>
3713
+ </xsl:apply-templates>
3648
3714
 
3649
3715
  </td>
3650
3716
  </tr>
@@ -3671,15 +3737,20 @@
3671
3737
  <fo:block>
3672
3738
 
3673
3739
 
3674
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
3740
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
3741
+ <xsl:with-param name="process">true</xsl:with-param>
3742
+ </xsl:apply-templates>
3675
3743
  </fo:block>
3676
3744
  </fo:table-cell>
3677
3745
  </fo:table-row>
3678
3746
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
3679
3747
  <xsl:apply-templates/>
3680
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
3681
- <xsl:apply-templates select="@language"/>
3682
- <xsl:apply-templates/>
3748
+ </xsl:template><xsl:template match="*[local-name()='dd']">
3749
+ <xsl:param name="process">false</xsl:param>
3750
+ <xsl:if test="$process = 'true'">
3751
+ <xsl:apply-templates select="@language"/>
3752
+ <xsl:apply-templates/>
3753
+ </xsl:if>
3683
3754
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
3684
3755
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
3685
3756
  </xsl:template><xsl:template match="*[local-name()='em']">
@@ -3864,7 +3935,11 @@
3864
3935
  <xsl:with-param name="text" select="substring($text,2)"/>
3865
3936
  </xsl:call-template>
3866
3937
  </xsl:if>
3867
- </xsl:template><xsl:template name="tokenize">
3938
+ </xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
3939
+ <fo:block break-after="page"/>
3940
+ <fo:block> </fo:block>
3941
+ <fo:block break-after="page"/>
3942
+ </xsl:template><xsl:template name="tokenize">
3868
3943
  <xsl:param name="text"/>
3869
3944
  <xsl:param name="separator" select="' '"/>
3870
3945
  <xsl:choose>
@@ -4302,10 +4377,10 @@
4302
4377
  </fo:inline>
4303
4378
  </xsl:template><xsl:template match="*[local-name()='appendix']">
4304
4379
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
4305
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
4380
+ <xsl:apply-templates select="*[local-name()='title']"/>
4306
4381
  </fo:block>
4307
- <xsl:apply-templates/>
4308
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
4382
+ <xsl:apply-templates select="node()[not(local-name()='title')]"/>
4383
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
4309
4384
  <xsl:variable name="level">
4310
4385
  <xsl:call-template name="getLevel"/>
4311
4386
  </xsl:variable>
@@ -4932,7 +5007,7 @@
4932
5007
  <xsl:value-of select="."/>
4933
5008
  </xsl:template><xsl:template match="node()" mode="contents">
4934
5009
  <xsl:apply-templates mode="contents"/>
4935
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
5010
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4936
5011
  <xsl:variable name="level">
4937
5012
  <xsl:call-template name="getLevel">
4938
5013
  <xsl:with-param name="depth" select="@depth"/>
@@ -4940,10 +5015,15 @@
4940
5015
  </xsl:variable>
4941
5016
 
4942
5017
  <xsl:variable name="section">
4943
- <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5018
+ <xsl:choose>
5019
+ <xsl:when test="@type = 'section-title'"/>
5020
+ <xsl:otherwise>
5021
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5022
+ </xsl:otherwise>
5023
+ </xsl:choose>
4944
5024
  </xsl:variable>
4945
5025
 
4946
- <xsl:variable name="type">floating-title</xsl:variable>
5026
+ <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
4947
5027
 
4948
5028
  <xsl:variable name="display">
4949
5029
  <xsl:choose>
@@ -4960,7 +5040,16 @@
4960
5040
  <xsl:variable name="title">
4961
5041
  <xsl:choose>
4962
5042
  <xsl:when test="*[local-name() = 'tab']">
4963
- <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
5043
+ <xsl:choose>
5044
+ <xsl:when test="@type = 'section-title'">
5045
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5046
+ <xsl:text>: </xsl:text>
5047
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
5048
+ </xsl:when>
5049
+ <xsl:otherwise>
5050
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
5051
+ </xsl:otherwise>
5052
+ </xsl:choose>
4964
5053
  </xsl:when>
4965
5054
  <xsl:otherwise>
4966
5055
  <xsl:copy-of select="node()"/>
@@ -6580,7 +6669,7 @@
6580
6669
  </fo:inline>
6581
6670
  </xsl:template><xsl:template match="@language">
6582
6671
  <xsl:copy-of select="."/>
6583
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
6672
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
6584
6673
  <xsl:call-template name="title"/>
6585
6674
  </xsl:template><xsl:template match="*[local-name() = 'admonition']">
6586
6675
 
@@ -6645,27 +6734,17 @@
6645
6734
  <xsl:variable name="month" select="substring($date, 6, 2)"/>
6646
6735
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
6647
6736
  <xsl:variable name="monthStr">
6648
- <xsl:choose>
6649
- <xsl:when test="$month = '01'">january</xsl:when>
6650
- <xsl:when test="$month = '02'">february</xsl:when>
6651
- <xsl:when test="$month = '03'">march</xsl:when>
6652
- <xsl:when test="$month = '04'">april</xsl:when>
6653
- <xsl:when test="$month = '05'">may</xsl:when>
6654
- <xsl:when test="$month = '06'">june</xsl:when>
6655
- <xsl:when test="$month = '07'">july</xsl:when>
6656
- <xsl:when test="$month = '08'">august</xsl:when>
6657
- <xsl:when test="$month = '09'">september</xsl:when>
6658
- <xsl:when test="$month = '10'">october</xsl:when>
6659
- <xsl:when test="$month = '11'">november</xsl:when>
6660
- <xsl:when test="$month = '12'">december</xsl:when>
6661
- </xsl:choose>
6737
+ <xsl:call-template name="getMonthByNum">
6738
+ <xsl:with-param name="num" select="$month"/>
6739
+ <xsl:with-param name="lowercase" select="'true'"/>
6740
+ </xsl:call-template>
6662
6741
  </xsl:variable>
6663
6742
  <xsl:variable name="monthStr_localized">
6664
6743
  <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
6665
6744
  </xsl:variable>
6666
6745
  <xsl:variable name="result">
6667
6746
  <xsl:choose>
6668
- <xsl:when test="$format = 'ddMMyyyy'">
6747
+ <xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
6669
6748
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
6670
6749
  <xsl:text> </xsl:text>
6671
6750
  <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
@@ -6678,11 +6757,57 @@
6678
6757
  <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
6679
6758
  </xsl:when>
6680
6759
  <xsl:otherwise>
6681
- <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
6760
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
6682
6761
  </xsl:otherwise>
6683
6762
  </xsl:choose>
6684
6763
  </xsl:variable>
6685
6764
  <xsl:value-of select="$result"/>
6765
+ </xsl:template><xsl:template name="getMonthByNum">
6766
+ <xsl:param name="num"/>
6767
+ <xsl:param name="lang">en</xsl:param>
6768
+ <xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
6769
+ <xsl:variable name="monthStr_">
6770
+ <xsl:choose>
6771
+ <xsl:when test="$lang = 'fr'">
6772
+ <xsl:choose>
6773
+ <xsl:when test="$num = '01'">Janvier</xsl:when>
6774
+ <xsl:when test="$num = '02'">Février</xsl:when>
6775
+ <xsl:when test="$num = '03'">Mars</xsl:when>
6776
+ <xsl:when test="$num = '04'">Avril</xsl:when>
6777
+ <xsl:when test="$num = '05'">Mai</xsl:when>
6778
+ <xsl:when test="$num = '06'">Juin</xsl:when>
6779
+ <xsl:when test="$num = '07'">Juillet</xsl:when>
6780
+ <xsl:when test="$num = '08'">Août</xsl:when>
6781
+ <xsl:when test="$num = '09'">Septembre</xsl:when>
6782
+ <xsl:when test="$num = '10'">Octobre</xsl:when>
6783
+ <xsl:when test="$num = '11'">Novembre</xsl:when>
6784
+ <xsl:when test="$num = '12'">Décembre</xsl:when>
6785
+ </xsl:choose>
6786
+ </xsl:when>
6787
+ <xsl:otherwise>
6788
+ <xsl:choose>
6789
+ <xsl:when test="$num = '01'">January</xsl:when>
6790
+ <xsl:when test="$num = '02'">February</xsl:when>
6791
+ <xsl:when test="$num = '03'">March</xsl:when>
6792
+ <xsl:when test="$num = '04'">April</xsl:when>
6793
+ <xsl:when test="$num = '05'">May</xsl:when>
6794
+ <xsl:when test="$num = '06'">June</xsl:when>
6795
+ <xsl:when test="$num = '07'">July</xsl:when>
6796
+ <xsl:when test="$num = '08'">August</xsl:when>
6797
+ <xsl:when test="$num = '09'">September</xsl:when>
6798
+ <xsl:when test="$num = '10'">October</xsl:when>
6799
+ <xsl:when test="$num = '11'">November</xsl:when>
6800
+ <xsl:when test="$num = '12'">December</xsl:when>
6801
+ </xsl:choose>
6802
+ </xsl:otherwise>
6803
+ </xsl:choose>
6804
+ </xsl:variable>
6805
+ <xsl:choose>
6806
+ <xsl:when test="normalize-space($lowercase) = 'true'">
6807
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
6808
+ </xsl:when>
6809
+ <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
6810
+ </xsl:choose>
6686
6811
  </xsl:template><xsl:template name="insertKeywords">
6687
6812
  <xsl:param name="sorting" select="'true'"/>
6688
6813
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -7143,6 +7268,25 @@
7143
7268
  </xsl:otherwise>
7144
7269
  </xsl:choose>
7145
7270
  </xsl:if>
7271
+ </xsl:template><xsl:template name="number-to-ordinal">
7272
+ <xsl:param name="number"/>
7273
+ <xsl:param name="curr_lang"/>
7274
+ <xsl:choose>
7275
+ <xsl:when test="$curr_lang = 'fr'">
7276
+ <xsl:choose>
7277
+ <xsl:when test="$number = '1'">re</xsl:when>
7278
+ <xsl:otherwise>e</xsl:otherwise>
7279
+ </xsl:choose>
7280
+ </xsl:when>
7281
+ <xsl:otherwise>
7282
+ <xsl:choose>
7283
+ <xsl:when test="$number = 1">st</xsl:when>
7284
+ <xsl:when test="$number = 2">nd</xsl:when>
7285
+ <xsl:when test="$number = 3">rd</xsl:when>
7286
+ <xsl:otherwise>th</xsl:otherwise>
7287
+ </xsl:choose>
7288
+ </xsl:otherwise>
7289
+ </xsl:choose>
7146
7290
  </xsl:template><xsl:template name="setAltText">
7147
7291
  <xsl:param name="value"/>
7148
7292
  <xsl:attribute name="fox:alt-text">
@@ -401,9 +401,9 @@
401
401
  <choice>
402
402
  <!-- iso191606 TODO -->
403
403
  <group>
404
- <oneOrMore>
404
+ <zeroOrMore>
405
405
  <ref name="street"/>
406
- </oneOrMore>
406
+ </zeroOrMore>
407
407
  <ref name="city"/>
408
408
  <optional>
409
409
  <ref name="state"/>
@@ -32,6 +32,56 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="index">
36
+ <element name="index">
37
+ <optional>
38
+ <attribute name="to">
39
+ <data type="IDREF"/>
40
+ </attribute>
41
+ </optional>
42
+ <element name="primary">
43
+ <oneOrMore>
44
+ <choice>
45
+ <ref name="PureTextElement"/>
46
+ <ref name="stem"/>
47
+ </choice>
48
+ </oneOrMore>
49
+ </element>
50
+ <optional>
51
+ <element name="secondary">
52
+ <oneOrMore>
53
+ <choice>
54
+ <ref name="PureTextElement"/>
55
+ <ref name="stem"/>
56
+ </choice>
57
+ </oneOrMore>
58
+ </element>
59
+ </optional>
60
+ <optional>
61
+ <element name="tertiary">
62
+ <oneOrMore>
63
+ <choice>
64
+ <ref name="PureTextElement"/>
65
+ <ref name="stem"/>
66
+ </choice>
67
+ </oneOrMore>
68
+ </element>
69
+ </optional>
70
+ </element>
71
+ </define>
72
+ <define name="bibitem">
73
+ <element name="bibitem">
74
+ <attribute name="id">
75
+ <data type="ID"/>
76
+ </attribute>
77
+ <optional>
78
+ <attribute name="hidden">
79
+ <data type="boolean"/>
80
+ </attribute>
81
+ </optional>
82
+ <ref name="BibliographicItem"/>
83
+ </element>
84
+ </define>
35
85
  <define name="section-title">
36
86
  <element name="title">
37
87
  <zeroOrMore>
@@ -690,6 +740,7 @@
690
740
  <ref name="terms"/>
691
741
  <ref name="term-clause"/>
692
742
  <ref name="definitions"/>
743
+ <ref name="floating-title"/>
693
744
  </choice>
694
745
  </oneOrMore>
695
746
  </element>
@@ -1013,6 +1064,26 @@
1013
1064
  </zeroOrMore>
1014
1065
  </element>
1015
1066
  </define>
1067
+ <define name="sub">
1068
+ <element name="sub">
1069
+ <zeroOrMore>
1070
+ <choice>
1071
+ <ref name="PureTextElement"/>
1072
+ <ref name="stem"/>
1073
+ </choice>
1074
+ </zeroOrMore>
1075
+ </element>
1076
+ </define>
1077
+ <define name="sup">
1078
+ <element name="sup">
1079
+ <zeroOrMore>
1080
+ <choice>
1081
+ <ref name="PureTextElement"/>
1082
+ <ref name="stem"/>
1083
+ </choice>
1084
+ </zeroOrMore>
1085
+ </element>
1086
+ </define>
1016
1087
  <define name="pagebreak">
1017
1088
  <element name="pagebreak">
1018
1089
  <optional>
@@ -1680,6 +1751,7 @@
1680
1751
  <ref name="clause-subsection"/>
1681
1752
  <ref name="terms"/>
1682
1753
  <ref name="definitions"/>
1754
+ <ref name="floating-title"/>
1683
1755
  </choice>
1684
1756
  </oneOrMore>
1685
1757
  </choice>
@@ -1722,6 +1794,7 @@
1722
1794
  <ref name="terms"/>
1723
1795
  <ref name="definitions"/>
1724
1796
  <ref name="references"/>
1797
+ <ref name="floating-title"/>
1725
1798
  </choice>
1726
1799
  </zeroOrMore>
1727
1800
  </group>
@@ -2200,7 +2273,18 @@
2200
2273
  <ref name="MultilingualRenderingType"/>
2201
2274
  </attribute>
2202
2275
  </optional>
2203
- <ref name="paragraph"/>
2276
+ <oneOrMore>
2277
+ <choice>
2278
+ <ref name="formula"/>
2279
+ <ref name="ul"/>
2280
+ <ref name="ol"/>
2281
+ <ref name="dl"/>
2282
+ <ref name="quote"/>
2283
+ <ref name="sourcecode"/>
2284
+ <ref name="paragraph"/>
2285
+ <ref name="figure"/>
2286
+ </choice>
2287
+ </oneOrMore>
2204
2288
  </element>
2205
2289
  </define>
2206
2290
  <define name="termsource">
@@ -2534,4 +2618,17 @@
2534
2618
  </oneOrMore>
2535
2619
  </element>
2536
2620
  </define>
2621
+ <define name="floating-title">
2622
+ <element name="floating-title">
2623
+ <attribute name="id">
2624
+ <data type="ID"/>
2625
+ </attribute>
2626
+ <attribute name="depth">
2627
+ <data type="int"/>
2628
+ </attribute>
2629
+ <zeroOrMore>
2630
+ <ref name="TextElement"/>
2631
+ </zeroOrMore>
2632
+ </element>
2633
+ </define>
2537
2634
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.0.1".freeze
3
+ VERSION = "2.0.2".freeze
4
4
  end
5
5
  end
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.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic