metanorma-cc 2.7.5 → 2.7.7

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: 4ac3b3a75965dbdafd86766d5f51ade18833186845b3ae5933722adea6101811
4
- data.tar.gz: 1009119a627b80d955dfad8852d32000bf8bb3bff6e404cb5afc379955ffd508
3
+ metadata.gz: 39f7f56986336d5d0d1686b3d064a42fa036cfbcd3092f0754de1dad6ae6d6a2
4
+ data.tar.gz: 7b31ed6ca15cd68378dd6f86e9e5266371859b31e4fb937a2a41fed053f245de
5
5
  SHA512:
6
- metadata.gz: 4dfc2b6a15dc3ce85ee5a40d214a7fa6bbc99ebb044884c11d780b3b2e527b4e954509728553f280a6553e21b59e3220f58184df28efa9be7d71fe5a96c3a6e4
7
- data.tar.gz: febc6660d5f8cdfb58e84e9352ee83ae381bd29f45eea0b5708e150df2d749793e7e3fe98a2129eb22521d2dd70e0d0d7d8fd0aaede8e626febaa3428335ddf2
6
+ metadata.gz: 1264e161162c40337eb9a6297571c07a7b1e679e04097c48d57bcc83bd9c84684c42079f38ca926460205d8b6e46030b8ca3a6ef1fd8ea164ea59b4d66900a26
7
+ data.tar.gz: f593c52e867d623d558c45035fe757c195f31516873adac7783e6c337c63e4942d32649188d4c7f7e9d8ca1404bf2dc8299aedcb14f0c85fa3676d731dc8683b
@@ -270,69 +270,76 @@
270
270
 
271
271
  <xsl:template name="cover-page">
272
272
  <!-- Cover Page -->
273
- <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
274
- <xsl:call-template name="insertFootnoteSeparatorCommon"/>
273
+ <xsl:choose>
274
+ <xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image']/mn:value/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
275
+ <xsl:call-template name="insertCoverPageFullImage"/>
276
+ </xsl:when>
277
+ <xsl:otherwise>
278
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
279
+ <xsl:call-template name="insertFootnoteSeparatorCommon"/>
275
280
 
276
- <fo:static-content flow-name="cover-page-header" font-size="10pt">
277
- <fo:block-container height="23.5mm" display-align="before">
278
- <fo:block padding-top="12.5mm">
279
- <xsl:value-of select="$copyright"/>
280
- </fo:block>
281
- </fo:block-container>
282
- </fo:static-content>
281
+ <fo:static-content flow-name="cover-page-header" font-size="10pt">
282
+ <fo:block-container height="23.5mm" display-align="before">
283
+ <fo:block padding-top="12.5mm">
284
+ <xsl:value-of select="$copyright"/>
285
+ </fo:block>
286
+ </fo:block-container>
287
+ </fo:static-content>
283
288
 
284
- <fo:flow flow-name="xsl-region-body">
289
+ <fo:flow flow-name="xsl-region-body">
285
290
 
286
- <fo:block text-align="right">
287
- <!-- CC/FDS 18011:2018 -->
288
- <fo:block font-size="14pt" font-weight="bold" margin-bottom="10pt">
289
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'csd']"/><xsl:text> </xsl:text>
290
- </fo:block>
291
- <fo:block margin-bottom="12pt">
292
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:owner/mn:organization/mn:name"/>
293
- <xsl:text> TC </xsl:text>
294
- <!-- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/> -->
295
- <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Technical committee']/mn:name"/>
296
- <xsl:text> </xsl:text>
297
- </fo:block>
298
- </fo:block>
299
- <fo:block font-size="24pt" font-weight="bold" text-align="center" role="H1">
300
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']"/>
301
- <xsl:value-of select="$linebreak"/>
302
- </fo:block>
303
- <fo:block> </fo:block>
304
- <fo:block margin-bottom="12pt"> </fo:block>
305
- <fo:block-container font-size="16pt" text-align="center" border="0.5pt solid black" margin-bottom="12pt" margin-left="-1mm" margin-right="-1mm">
306
- <fo:block-container margin-left="0mm" margin-right="0mm">
307
- <fo:block padding-top="1mm">
308
- <xsl:call-template name="capitalizeWords">
309
- <!-- ex: final-draft -->
310
- <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage"/>
311
- </xsl:call-template>
312
- <xsl:text> </xsl:text>
313
- <xsl:call-template name="capitalizeWords">
314
- <!-- ex: standard -->
315
- <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
316
- </xsl:call-template>
291
+ <fo:block text-align="right">
292
+ <!-- CC/FDS 18011:2018 -->
293
+ <fo:block font-size="14pt" font-weight="bold" margin-bottom="10pt">
294
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'csd']"/><xsl:text> </xsl:text>
295
+ </fo:block>
296
+ <fo:block margin-bottom="12pt">
297
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:owner/mn:organization/mn:name"/>
298
+ <xsl:text> TC </xsl:text>
299
+ <!-- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/> -->
300
+ <xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Technical committee']/mn:name"/>
301
+ <xsl:text> </xsl:text>
302
+ </fo:block>
317
303
  </fo:block>
318
- </fo:block-container>
319
- </fo:block-container>
320
- <fo:block margin-bottom="10pt"> </fo:block>
321
- <fo:block-container font-size="10pt" border="0.5pt solid black" margin-bottom="12pt" margin-left="-1mm" margin-right="-1mm">
322
- <fo:block-container margin-left="0mm" margin-right="0mm">
323
- <fo:block text-align="center" font-weight="bold" padding-top="1mm" margin-bottom="6pt">Warning for drafts</fo:block>
324
- <fo:block margin-left="2mm" margin-right="2mm">
325
- <fo:block margin-bottom="6pt">This document is not a CalConnect Standard. It is distributed for review and comment, and is subject to change without notice and may not be referred to as a Standard. Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
326
- <fo:block margin-bottom="10pt">Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
304
+ <fo:block font-size="24pt" font-weight="bold" text-align="center" role="H1">
305
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:title[@language = 'en']"/>
306
+ <xsl:value-of select="$linebreak"/>
327
307
  </fo:block>
328
- </fo:block-container>
329
- </fo:block-container>
330
- <fo:block text-align="center">
331
- <xsl:text>The Calendaring and Scheduling Consortium, Inc.  </xsl:text>
332
- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:from"/>
333
- </fo:block>
334
- </fo:flow>
335
- </fo:page-sequence>
308
+ <fo:block> </fo:block>
309
+ <fo:block margin-bottom="12pt"> </fo:block>
310
+ <fo:block-container font-size="16pt" text-align="center" border="0.5pt solid black" margin-bottom="12pt" margin-left="-1mm" margin-right="-1mm">
311
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
312
+ <fo:block padding-top="1mm">
313
+ <xsl:call-template name="capitalizeWords">
314
+ <!-- ex: final-draft -->
315
+ <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:status/mn:stage"/>
316
+ </xsl:call-template>
317
+ <xsl:text> </xsl:text>
318
+ <xsl:call-template name="capitalizeWords">
319
+ <!-- ex: standard -->
320
+ <xsl:with-param name="str" select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype"/>
321
+ </xsl:call-template>
322
+ </fo:block>
323
+ </fo:block-container>
324
+ </fo:block-container>
325
+ <fo:block margin-bottom="10pt"> </fo:block>
326
+ <fo:block-container font-size="10pt" border="0.5pt solid black" margin-bottom="12pt" margin-left="-1mm" margin-right="-1mm">
327
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
328
+ <fo:block text-align="center" font-weight="bold" padding-top="1mm" margin-bottom="6pt">Warning for drafts</fo:block>
329
+ <fo:block margin-left="2mm" margin-right="2mm">
330
+ <fo:block margin-bottom="6pt">This document is not a CalConnect Standard. It is distributed for review and comment, and is subject to change without notice and may not be referred to as a Standard. Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
331
+ <fo:block margin-bottom="10pt">Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</fo:block>
332
+ </fo:block>
333
+ </fo:block-container>
334
+ </fo:block-container>
335
+ <fo:block text-align="center">
336
+ <xsl:text>The Calendaring and Scheduling Consortium, Inc.  </xsl:text>
337
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:from"/>
338
+ </fo:block>
339
+ </fo:flow>
340
+ </fo:page-sequence>
341
+ </xsl:otherwise>
342
+ </xsl:choose>
336
343
  </xsl:template> <!-- END: cover-page -->
337
344
 
338
345
  <xsl:template name="inner-cover-page">
@@ -543,16 +550,6 @@
543
550
  <xsl:call-template name="getLevel"/>
544
551
  </xsl:variable>
545
552
 
546
- <xsl:variable name="font-size">
547
- <xsl:choose>
548
- <xsl:when test="ancestor::mn:preface">13pt</xsl:when>
549
- <xsl:when test="$level = 1">13pt</xsl:when>
550
- <xsl:when test="$level = 2">12pt</xsl:when>
551
- <xsl:when test="$level &gt;= 3">11pt</xsl:when>
552
- <xsl:otherwise>16pt</xsl:otherwise>
553
- </xsl:choose>
554
- </xsl:variable>
555
-
556
553
  <xsl:variable name="element-name">
557
554
  <xsl:choose>
558
555
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -560,18 +557,13 @@
560
557
  </xsl:choose>
561
558
  </xsl:variable>
562
559
 
563
- <xsl:variable name="color" select="'rgb(14, 26, 133)'"/>
560
+ <xsl:variable name="title_styles">
561
+ <styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
562
+ </xsl:variable>
564
563
 
565
564
  <xsl:element name="{$element-name}">
566
- <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
567
- <xsl:attribute name="font-weight">bold</xsl:attribute>
568
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
569
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
570
- <xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
571
- <xsl:if test="ancestor::mn:sections">
572
- <xsl:attribute name="margin-top">13.5pt</xsl:attribute>
573
- </xsl:if>
574
- <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
565
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
566
+
575
567
  <xsl:apply-templates/>
576
568
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
577
569
  </xsl:element>
@@ -590,17 +582,16 @@
590
582
  <xsl:otherwise>fo:block</xsl:otherwise>
591
583
  </xsl:choose>
592
584
  </xsl:variable>
593
- <xsl:element name="{$element-name}">
594
585
 
595
- <xsl:call-template name="setBlockAttributes"/>
586
+ <xsl:variable name="p_styles">
587
+ <styles xsl:use-attribute-sets="p-style">
588
+ <xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
589
+ </styles>
590
+ </xsl:variable>
591
+
592
+ <xsl:element name="{$element-name}">
593
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
596
594
 
597
- <xsl:attribute name="margin-bottom">
598
- <xsl:choose>
599
- <xsl:when test="ancestor::mn:li">0pt</xsl:when>
600
- <xsl:otherwise>12pt</xsl:otherwise>
601
- </xsl:choose>
602
- </xsl:attribute>
603
- <xsl:attribute name="line-height">115%</xsl:attribute>
604
595
  <xsl:apply-templates>
605
596
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
606
597
  </xsl:apply-templates>
@@ -633,6 +624,11 @@
633
624
  </xsl:template>
634
625
 
635
626
  <xsl:template name="insertHeaderFooter">
627
+ <xsl:call-template name="insertHeader"/>
628
+ <xsl:call-template name="insertFooter"/>
629
+ </xsl:template>
630
+
631
+ <xsl:template name="insertHeader">
636
632
  <fo:static-content flow-name="header-even" role="artifact">
637
633
  <fo:block-container height="17mm" display-align="before">
638
634
  <fo:block padding-top="12.5mm">
@@ -640,6 +636,16 @@
640
636
  </fo:block>
641
637
  </fo:block-container>
642
638
  </fo:static-content>
639
+ <fo:static-content flow-name="header-odd" role="artifact">
640
+ <fo:block-container height="17mm" display-align="before">
641
+ <fo:block text-align="right" padding-top="12.5mm">
642
+ <xsl:value-of select="$header"/>
643
+ </fo:block>
644
+ </fo:block-container>
645
+ </fo:static-content>
646
+ </xsl:template>
647
+
648
+ <xsl:template name="insertFooter">
643
649
  <fo:static-content flow-name="footer-even" role="artifact">
644
650
  <fo:block-container font-size="10pt" height="100%" display-align="after">
645
651
  <fo:table table-layout="fixed" width="100%">
@@ -658,13 +664,6 @@
658
664
  </fo:table>
659
665
  </fo:block-container>
660
666
  </fo:static-content>
661
- <fo:static-content flow-name="header-odd" role="artifact">
662
- <fo:block-container height="17mm" display-align="before">
663
- <fo:block text-align="right" padding-top="12.5mm">
664
- <xsl:value-of select="$header"/>
665
- </fo:block>
666
- </fo:block-container>
667
- </fo:static-content>
668
667
  <fo:static-content flow-name="footer-odd" role="artifact">
669
668
  <fo:block-container font-size="10pt" height="100%" display-align="after">
670
669
  <fo:table table-layout="fixed" width="100%">
@@ -2640,6 +2639,10 @@
2640
2639
  </xsl:element>
2641
2640
  </xsl:template>
2642
2641
 
2642
+ <!-- show sourcecode's name 'before' or 'after' source code -->
2643
+ <xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
2644
+ </xsl:variable>
2645
+
2643
2646
  <xsl:template match="mn:sourcecode" name="sourcecode">
2644
2647
 
2645
2648
  <xsl:variable name="sourcecode_attributes">
@@ -2663,7 +2666,12 @@
2663
2666
 
2664
2667
  <xsl:call-template name="refine_sourcecode-container-style"/>
2665
2668
 
2666
- <fo:block-container margin-left="0mm" role="SKIP">
2669
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
2670
+
2671
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
2672
+ <xsl:if test="$sourcecode-name-position = 'before'">
2673
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
2674
+ </xsl:if>
2667
2675
 
2668
2676
  <fo:block xsl:use-attribute-sets="sourcecode-style">
2669
2677
 
@@ -2685,7 +2693,16 @@
2685
2693
  </fo:block>
2686
2694
 
2687
2695
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
2688
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
2696
+
2697
+ <!-- <xsl:choose>
2698
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
2699
+ <xsl:otherwise>
2700
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
2701
+ <!-- </xsl:otherwise>
2702
+ </xsl:choose> -->
2703
+ <xsl:if test="$sourcecode-name-position = 'after'">
2704
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
2705
+ </xsl:if>
2689
2706
 
2690
2707
  </fo:block-container>
2691
2708
  </fo:block-container>
@@ -3941,87 +3958,81 @@
3941
3958
  <xsl:template name="refine_term-style">
3942
3959
  </xsl:template>
3943
3960
 
3944
- <xsl:attribute-set name="term-name-style">
3961
+ <xsl:attribute-set name="term-number-style">
3945
3962
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3946
3963
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3947
3964
  </xsl:attribute-set> <!-- term-name-style -->
3948
3965
 
3949
- <xsl:template name="refine_term-name-style">
3966
+ <xsl:template name="refine_term-number-style">
3950
3967
  </xsl:template>
3951
3968
 
3952
- <xsl:attribute-set name="preferred-style">
3953
- </xsl:attribute-set> <!-- preferred-style -->
3954
-
3955
- <xsl:template name="refine_preferred-style">
3956
- </xsl:template>
3957
-
3958
- <xsl:attribute-set name="preferred-block-style">
3969
+ <xsl:attribute-set name="term-preferred-block-style">
3959
3970
  <xsl:attribute name="line-height">1.1</xsl:attribute>
3960
3971
  </xsl:attribute-set> <!-- preferred-block-style -->
3961
3972
 
3962
- <xsl:template name="refine_preferred-block-style">
3973
+ <xsl:template name="refine_term-preferred-block-style">
3963
3974
  </xsl:template>
3964
3975
 
3965
- <xsl:attribute-set name="preferred-term-style">
3976
+ <xsl:attribute-set name="term-preferred-style">
3966
3977
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3967
3978
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3968
3979
  </xsl:attribute-set> <!-- preferred-term-style -->
3969
3980
 
3970
- <xsl:template name="refine_preferred-term-style">
3981
+ <xsl:template name="refine_term-preferred-style">
3971
3982
  <xsl:if test="mn:strong">
3972
3983
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3973
3984
  </xsl:if>
3974
3985
  </xsl:template>
3975
3986
 
3976
- <xsl:attribute-set name="domain-style">
3977
- </xsl:attribute-set> <!-- domain-style -->
3987
+ <xsl:attribute-set name="term-domain-style">
3988
+ </xsl:attribute-set> <!-- term-domain-style -->
3978
3989
 
3979
- <xsl:template name="refine_domain-style">
3990
+ <xsl:template name="refine_term-domain-style">
3980
3991
  </xsl:template>
3981
3992
 
3982
- <xsl:attribute-set name="admitted-style">
3983
- </xsl:attribute-set> <!-- admitted-style -->
3993
+ <xsl:attribute-set name="term-admitted-style">
3994
+ </xsl:attribute-set> <!-- term-admitted-style -->
3984
3995
 
3985
- <xsl:template name="refine_admitted-style">
3996
+ <xsl:template name="refine_term-admitted-style">
3986
3997
  </xsl:template>
3987
3998
 
3988
- <xsl:attribute-set name="deprecates-style">
3989
- </xsl:attribute-set> <!-- deprecates-style -->
3999
+ <xsl:attribute-set name="term-deprecates-style">
4000
+ </xsl:attribute-set> <!-- term-deprecates-style -->
3990
4001
 
3991
- <xsl:template name="refine_deprecates-style">
4002
+ <xsl:template name="refine_term-deprecates-style">
3992
4003
  </xsl:template>
3993
4004
 
3994
- <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
4005
+ <xsl:attribute-set name="term-related-block-style" use-attribute-sets="term-preferred-block-style">
3995
4006
  </xsl:attribute-set>
3996
4007
 
3997
- <xsl:template name="refine_related-block-style">
4008
+ <xsl:template name="refine_term-related-block-style">
3998
4009
  </xsl:template>
3999
4010
 
4000
- <xsl:attribute-set name="definition-style">
4011
+ <xsl:attribute-set name="term-definition-style">
4001
4012
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4002
- </xsl:attribute-set> <!-- definition-style -->
4013
+ </xsl:attribute-set> <!-- term-definition-style -->
4003
4014
 
4004
- <xsl:template name="refine_definition-style">
4015
+ <xsl:template name="refine_term-definition-style">
4005
4016
  </xsl:template>
4006
4017
 
4007
- <xsl:attribute-set name="termsource-style">
4018
+ <xsl:attribute-set name="term-termsource-style">
4008
4019
  <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
4009
4020
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4010
- </xsl:attribute-set> <!-- termsource-style -->
4021
+ </xsl:attribute-set> <!-- term-termsource-style -->
4011
4022
 
4012
- <xsl:template name="refine_termsource-style">
4013
- </xsl:template> <!-- refine_termsource-style -->
4023
+ <xsl:template name="refine_term-termsource-style">
4024
+ </xsl:template> <!-- refine_term-termsource-style -->
4014
4025
 
4015
- <xsl:attribute-set name="termsource-text-style">
4016
- </xsl:attribute-set> <!-- termsource-text-style -->
4026
+ <xsl:attribute-set name="term-termsource-text-style">
4027
+ </xsl:attribute-set> <!-- term-termsource-text-style -->
4017
4028
 
4018
- <xsl:template name="refine_termsource-text-style">
4029
+ <xsl:template name="refine_term-termsource-text-style">
4019
4030
  </xsl:template>
4020
4031
 
4021
- <xsl:attribute-set name="origin-style">
4022
- </xsl:attribute-set> <!-- origin-style -->
4032
+ <xsl:attribute-set name="term-origin-style">
4033
+ </xsl:attribute-set> <!-- term-origin-style -->
4023
4034
 
4024
- <xsl:template name="refine_origin-style">
4035
+ <xsl:template name="refine_term-origin-style">
4025
4036
  </xsl:template>
4026
4037
 
4027
4038
  <!-- ====== -->
@@ -4065,9 +4076,9 @@
4065
4076
  <!-- modification -->
4066
4077
  <!-- ====== -->
4067
4078
  <xsl:template match="mn:fmt-termsource" name="termsource">
4068
- <fo:block xsl:use-attribute-sets="termsource-style">
4079
+ <fo:block xsl:use-attribute-sets="term-termsource-style">
4069
4080
 
4070
- <xsl:call-template name="refine_termsource-style"/>
4081
+ <xsl:call-template name="refine_term-termsource-style"/>
4071
4082
 
4072
4083
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4073
4084
  <xsl:variable name="termsource_text">
@@ -4115,8 +4126,8 @@
4115
4126
 
4116
4127
  <!-- text SOURCE: -->
4117
4128
  <xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
4118
- <fo:inline xsl:use-attribute-sets="termsource-text-style">
4119
- <xsl:call-template name="refine_termsource-text-style"/>
4129
+ <fo:inline xsl:use-attribute-sets="term-termsource-text-style">
4130
+ <xsl:call-template name="refine_term-termsource-text-style"/>
4120
4131
  <xsl:value-of select="."/>
4121
4132
  </fo:inline>
4122
4133
  </xsl:template>
@@ -4128,8 +4139,8 @@
4128
4139
  <xsl:if test="normalize-space(@citeas) = ''">
4129
4140
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
4130
4141
  </xsl:if>
4131
- <fo:inline xsl:use-attribute-sets="origin-style">
4132
- <xsl:call-template name="refine_origin-style"/>
4142
+ <fo:inline xsl:use-attribute-sets="term-origin-style">
4143
+ <xsl:call-template name="refine_term-origin-style"/>
4133
4144
  <xsl:apply-templates/>
4134
4145
  </fo:inline>
4135
4146
  </fo:basic-link>
@@ -4182,14 +4193,14 @@
4182
4193
  <xsl:variable name="levelTerm">
4183
4194
  <xsl:call-template name="getLevelTermName"/>
4184
4195
  </xsl:variable>
4185
- <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
4196
+ <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="term-preferred-block-style">
4186
4197
 
4187
- <xsl:call-template name="refine_preferred-block-style"/>
4198
+ <xsl:call-template name="refine_term-preferred-block-style"/>
4188
4199
 
4189
4200
  <xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
4190
4201
 
4191
- <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
4192
- <xsl:call-template name="refine_term-name-style"/>
4202
+ <fo:block xsl:use-attribute-sets="term-number-style" role="SKIP">
4203
+ <xsl:call-template name="refine_term-number-style"/>
4193
4204
 
4194
4205
  <xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
4195
4206
  <xsl:call-template name="setIDforNamedDestination"/>
@@ -4199,8 +4210,8 @@
4199
4210
  </fo:block>
4200
4211
  </xsl:if>
4201
4212
 
4202
- <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
4203
- <xsl:call-template name="refine_preferred-term-style"/>
4213
+ <fo:block xsl:use-attribute-sets="term-preferred-style" role="SKIP">
4214
+ <xsl:call-template name="refine_term-preferred-style"/>
4204
4215
 
4205
4216
  <xsl:apply-templates/>
4206
4217
  </fo:block>
@@ -4220,15 +4231,15 @@
4220
4231
  <xsl:template match="mn:domain"/>
4221
4232
 
4222
4233
  <xsl:template match="mn:fmt-admitted">
4223
- <fo:block xsl:use-attribute-sets="admitted-style">
4224
- <xsl:call-template name="refine_admitted-style"/>
4234
+ <fo:block xsl:use-attribute-sets="term-admitted-style">
4235
+ <xsl:call-template name="refine_term-admitted-style"/>
4225
4236
  <xsl:apply-templates/>
4226
4237
  </fo:block>
4227
4238
  </xsl:template>
4228
4239
 
4229
4240
  <xsl:template match="mn:fmt-deprecates">
4230
- <fo:block xsl:use-attribute-sets="deprecates-style">
4231
- <xsl:call-template name="refine_deprecates-style"/>
4241
+ <fo:block xsl:use-attribute-sets="term-deprecates-style">
4242
+ <xsl:call-template name="refine_term-deprecates-style"/>
4232
4243
  <xsl:apply-templates/>
4233
4244
  </fo:block>
4234
4245
  </xsl:template>
@@ -4241,8 +4252,8 @@
4241
4252
  <!-- End Preferred, admitted, deprecated -->
4242
4253
 
4243
4254
  <xsl:template match="mn:fmt-related">
4244
- <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
4245
- <xsl:call-template name="refine_related-block-style"/>
4255
+ <fo:block role="SKIP" xsl:use-attribute-sets="term-related-block-style">
4256
+ <xsl:call-template name="refine_term-related-block-style"/>
4246
4257
  <xsl:apply-templates/>
4247
4258
  </fo:block>
4248
4259
  </xsl:template>
@@ -4256,8 +4267,8 @@
4256
4267
  <!-- definition -->
4257
4268
  <!-- ========== -->
4258
4269
  <xsl:template match="mn:fmt-definition">
4259
- <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
4260
- <xsl:call-template name="refine_definition-style"/>
4270
+ <fo:block xsl:use-attribute-sets="term-definition-style" role="SKIP">
4271
+ <xsl:call-template name="refine_term-definition-style"/>
4261
4272
  <xsl:apply-templates/>
4262
4273
  </fo:block>
4263
4274
  </xsl:template>
@@ -8457,6 +8468,10 @@
8457
8468
  <!-- image -->
8458
8469
  <!-- ====== -->
8459
8470
 
8471
+ <!-- show figure's name 'before' or 'after' image -->
8472
+ <xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
8473
+ </xsl:variable>
8474
+
8460
8475
  <xsl:template match="mn:figure" name="figure">
8461
8476
  <xsl:variable name="isAdded" select="@added"/>
8462
8477
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -8469,6 +8484,10 @@
8469
8484
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
8470
8485
  </xsl:call-template>
8471
8486
 
8487
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
8488
+ <xsl:apply-templates select="mn:fmt-name"/>
8489
+ </xsl:if>
8490
+
8472
8491
  <!-- Example: Dimensions in millimeters -->
8473
8492
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
8474
8493
 
@@ -8489,7 +8508,16 @@
8489
8508
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
8490
8509
  <xsl:call-template name="showFigureKey"/>
8491
8510
  </xsl:if>
8492
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
8511
+
8512
+ <!-- <xsl:choose>
8513
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
8514
+ <xsl:otherwise>
8515
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
8516
+ <!-- </xsl:otherwise>
8517
+ </xsl:choose> -->
8518
+ <xsl:if test="$figure-name-position = 'after'">
8519
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
8520
+ </xsl:if>
8493
8521
 
8494
8522
  </fo:block-container>
8495
8523
  </xsl:template>
@@ -10568,7 +10596,6 @@
10568
10596
  </xsl:attribute-set>
10569
10597
 
10570
10598
  <xsl:template name="refine_references-non-normative-title-style">
10571
-
10572
10599
  </xsl:template>
10573
10600
 
10574
10601
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -12631,7 +12658,7 @@
12631
12658
  <!-- ===================================== -->
12632
12659
 
12633
12660
  <xsl:attribute-set name="annex-title-style">
12634
- </xsl:attribute-set>
12661
+ </xsl:attribute-set> <!-- annex-title-style -->
12635
12662
 
12636
12663
  <xsl:template name="refine_annex-title-style">
12637
12664
  </xsl:template>
@@ -12642,6 +12669,53 @@
12642
12669
  <xsl:template name="refine_p-zzSTDTitle1-style">
12643
12670
  </xsl:template>
12644
12671
 
12672
+ <xsl:attribute-set name="p-style">
12673
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
12674
+ <xsl:attribute name="line-height">115%</xsl:attribute>
12675
+ </xsl:attribute-set> <!-- p-style -->
12676
+
12677
+ <xsl:template name="refine_p-style">
12678
+ <xsl:param name="element-name"/>
12679
+ <xsl:param name="margin"/>
12680
+ <xsl:call-template name="setBlockAttributes"/>
12681
+
12682
+ <xsl:if test="ancestor::mn:li">
12683
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
12684
+ </xsl:if>
12685
+ <!-- $namespace = 'csd' -->
12686
+
12687
+ </xsl:template> <!-- refine_p-style -->
12688
+
12689
+ <xsl:attribute-set name="title-style">
12690
+ <!-- Note: font-size for level 1 title -->
12691
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
12692
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
12693
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
12694
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
12695
+ <xsl:attribute name="color">rgb(14, 26, 133)</xsl:attribute>
12696
+ </xsl:attribute-set> <!-- title-style -->
12697
+
12698
+ <xsl:template name="refine_title-style">
12699
+ <xsl:param name="element-name"/>
12700
+ <xsl:variable name="level">
12701
+ <xsl:call-template name="getLevel"/>
12702
+ </xsl:variable>
12703
+ <xsl:if test="$level = 2">
12704
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
12705
+ </xsl:if>
12706
+ <xsl:if test="$level &gt;= 3">
12707
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
12708
+ </xsl:if>
12709
+ <xsl:if test="ancestor::mn:preface">
12710
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
12711
+ </xsl:if>
12712
+ <xsl:if test="ancestor::mn:sections">
12713
+ <xsl:attribute name="margin-top">13.5pt</xsl:attribute>
12714
+ </xsl:if>
12715
+ <!-- $namespace = 'csd' -->
12716
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
12717
+ </xsl:template> <!-- refine_title-style -->
12718
+
12645
12719
  <xsl:template name="processPrefaceSectionsDefault">
12646
12720
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
12647
12721
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -12980,6 +13054,12 @@
12980
13054
  </xsl:choose>
12981
13055
  </xsl:template>
12982
13056
 
13057
+ <xsl:attribute-set name="reset-margins-style">
13058
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
13059
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
13060
+ <xsl:attribute name="role">SKIP</xsl:attribute>
13061
+ </xsl:attribute-set>
13062
+
12983
13063
  <xsl:attribute-set name="clause-style">
12984
13064
 
12985
13065
  </xsl:attribute-set>
@@ -13995,8 +14075,9 @@
13995
14075
 
13996
14076
  <xsl:template name="setTextAlignment">
13997
14077
  <xsl:param name="default">left</xsl:param>
14078
+ <xsl:param name="skip_default">false</xsl:param>
13998
14079
  <xsl:variable name="align" select="normalize-space(@align)"/>
13999
- <xsl:attribute name="text-align">
14080
+ <xsl:variable name="text_align">
14000
14081
  <xsl:choose>
14001
14082
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
14002
14083
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -14004,9 +14085,13 @@
14004
14085
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
14005
14086
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
14006
14087
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
14088
+ <xsl:when test="$skip_default = 'true'"/>
14007
14089
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
14008
14090
  </xsl:choose>
14009
- </xsl:attribute>
14091
+ </xsl:variable>
14092
+ <xsl:if test="normalize-space($text_align) != ''">
14093
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
14094
+ </xsl:if>
14010
14095
  <xsl:if test="$align = 'indent'">
14011
14096
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
14012
14097
  </xsl:if>
@@ -14014,8 +14099,10 @@
14014
14099
 
14015
14100
  <xsl:template name="setBlockAttributes">
14016
14101
  <xsl:param name="text_align_default">left</xsl:param>
14102
+ <xsl:param name="skip_text_align_default">false</xsl:param>
14017
14103
  <xsl:call-template name="setTextAlignment">
14018
14104
  <xsl:with-param name="default" select="$text_align_default"/>
14105
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
14019
14106
  </xsl:call-template>
14020
14107
  <xsl:call-template name="setKeepAttributes"/>
14021
14108
  <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
@@ -14058,6 +14145,20 @@
14058
14145
  </fo:block-container>
14059
14146
  </xsl:template>
14060
14147
 
14148
+ <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
14149
+ <xsl:template name="insertCoverPageFullImage">
14150
+ <xsl:param name="name">coverpage-image</xsl:param>
14151
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image">
14152
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
14153
+ <fo:flow flow-name="xsl-region-body">
14154
+ <xsl:call-template name="insertBackgroundPageImage">
14155
+ <xsl:with-param name="number" select="position()"/>
14156
+ </xsl:call-template>
14157
+ </fo:flow>
14158
+ </fo:page-sequence>
14159
+ </xsl:for-each>
14160
+ </xsl:template>
14161
+
14061
14162
  <xsl:template name="insertPageImage">
14062
14163
  <xsl:param name="svg_content_height" select="$pageHeight"/>
14063
14164
  <xsl:param name="bitmap_width" select="$pageWidth"/>
@@ -17,7 +17,8 @@ module IsoDoc
17
17
 
18
18
  def i18n_init(lang, script, locale, i18nyaml = nil)
19
19
  @i18n = I18n.new(lang, script, locale: locale,
20
- i18nyaml: i18nyaml || @i18nyaml)
20
+ i18nyaml: [i18nyaml,
21
+ Metanorma::Cc.configuration.i18nyaml, @i18nyaml])
21
22
  end
22
23
  end
23
24
  end
@@ -869,7 +869,7 @@ depending on whether the items exist as independent documents, or are parts of a
869
869
  </zeroOrMore>
870
870
  </element>
871
871
  </define>
872
- <define name="BibItemType" combine="choice">
872
+ <define name="BibItemType">
873
873
  <a:documentation>Type of bibliographic item.
874
874
  The value list complies with the types provided in ISO 690:2021.
875
875
  NOTE: These values represent a strict superset to BibTeX
@@ -49,3 +49,5 @@ module Metanorma
49
49
  end
50
50
  end
51
51
  end
52
+
53
+ require_relative "log"
@@ -311,17 +311,28 @@ and is intended to be referenced by a callout within the source code</a:document
311
311
  </ref>
312
312
  </optional>
313
313
  <choice>
314
- <a:documentation>Content of the figure</a:documentation>
315
- <ref name="image"/>
314
+ <a:documentation>Content of the figure </a:documentation>
315
+ <ref name="image">
316
+ <a:documentation>by default the content of a figure is a media file</a:documentation>
317
+ </ref>
316
318
  <ref name="video"/>
317
319
  <ref name="audio"/>
318
- <ref name="pre"/>
320
+ <ref name="pre">
321
+ <a:documentation>figures can contain ASCII art</a:documentation>
322
+ </ref>
319
323
  <oneOrMore>
320
- <ref name="paragraph-with-footnote"/>
324
+ <ref name="paragraph-with-footnote">
325
+ <a:documentation>figures can contain discursive art</a:documentation>
326
+ </ref>
321
327
  </oneOrMore>
322
328
  <zeroOrMore>
323
- <ref name="figure"/>
329
+ <ref name="figure">
330
+ <a:documentation>subfigures, nested directly within a figure</a:documentation>
331
+ </ref>
324
332
  </zeroOrMore>
333
+ <ref name="table">
334
+ <a:documentation>Table is understood in this context to be a tabular arrangement of subfigures</a:documentation>
335
+ </ref>
325
336
  </choice>
326
337
  <zeroOrMore>
327
338
  <ref name="fn">
@@ -354,17 +365,28 @@ and is intended to be referenced by a callout within the source code</a:document
354
365
  </ref>
355
366
  </optional>
356
367
  <choice>
357
- <a:documentation>Content of the figure</a:documentation>
358
- <ref name="image-no-id"/>
368
+ <a:documentation>Content of the figure </a:documentation>
369
+ <ref name="image-no-id">
370
+ <a:documentation>by default the content of a figure is a media file</a:documentation>
371
+ </ref>
359
372
  <ref name="video-no-id"/>
360
373
  <ref name="audio-no-id"/>
361
- <ref name="pre-no-id"/>
374
+ <ref name="pre-no-id">
375
+ <a:documentation>figures can contain ASCII art</a:documentation>
376
+ </ref>
362
377
  <oneOrMore>
363
- <ref name="paragraph-with-footnote-no-id"/>
378
+ <ref name="paragraph-with-footnote-no-id">
379
+ <a:documentation>figures can contain discursive art</a:documentation>
380
+ </ref>
364
381
  </oneOrMore>
365
382
  <zeroOrMore>
366
- <ref name="figure-no-id"/>
383
+ <ref name="figure-no-id">
384
+ <a:documentation>subfigures, nested directly within a figure</a:documentation>
385
+ </ref>
367
386
  </zeroOrMore>
387
+ <ref name="table-no-id">
388
+ <a:documentation>Table is understood in this context to be a tabular arrangement of subfigures</a:documentation>
389
+ </ref>
368
390
  </choice>
369
391
  <zeroOrMore>
370
392
  <ref name="fn">
@@ -876,6 +898,9 @@ titlecase, or lowercase</a:documentation>
876
898
  <data type="boolean"/>
877
899
  </attribute>
878
900
  </optional>
901
+ <ref name="LocalizedStringAttributes">
902
+ <a:documentation>Specify language of bibitem, can be used to render it with language-specific bibliographic style</a:documentation>
903
+ </ref>
879
904
  <ref name="ReducedBibliographicItem"/>
880
905
  </element>
881
906
  </define>
@@ -0,0 +1,45 @@
1
+ module Metanorma
2
+ module Cc
3
+ class Converter
4
+ CC_LOG_MESSAGES = {
5
+ # rubocop:disable Naming/VariableNumber
6
+ "CC_1": { category: "Style",
7
+ error: "Only one Symbols and Abbreviated Terms section in the standard",
8
+ severity: 2 },
9
+ "CC_2": { category: "Style",
10
+ error: "Symbols and Abbreviated Terms can only contain a definition list",
11
+ severity: 2 },
12
+ "CC_3": { category: "Style",
13
+ error: "(section sequencing) %s",
14
+ severity: 2 },
15
+ "CC_4": { category: "Style",
16
+ error: "Document must contain at least one clause",
17
+ severity: 2 },
18
+ "CC_5": { category: "Style",
19
+ error: "Document must contain clause after Terms and Definitions",
20
+ severity: 2 },
21
+ "CC_6": { category: "Style",
22
+ error: "Scope must occur before Terms and Definitions",
23
+ severity: 2 },
24
+ "CC_8": { category: "Style",
25
+ error: "Only annexes and references can follow clauses",
26
+ severity: 2 },
27
+ "CC_9": { category: "Style",
28
+ error: "Document must include (references) Normative References",
29
+ severity: 2 },
30
+ "CC_11": { category: "Style",
31
+ error: "Final section must be (references) Bibliography",
32
+ severity: 2 },
33
+ "CC_12": { category: "Style",
34
+ error: "There are sections after the final Bibliography",
35
+ severity: 2 },
36
+
37
+ }.freeze
38
+ # rubocop:enable Naming/VariableNumber
39
+
40
+ def log_messages
41
+ super.merge(CC_LOG_MESSAGES)
42
+ end
43
+ end
44
+ end
45
+ end
@@ -11,19 +11,13 @@ module Metanorma
11
11
  super
12
12
  end
13
13
 
14
- ONE_SYMBOLS_WARNING = "Only one Symbols and Abbreviated "\
15
- "Terms section in the standard".freeze
16
-
17
- NON_DL_SYMBOLS_WARNING = "Symbols and Abbreviated Terms can "\
18
- "only contain a definition list".freeze
19
-
20
14
  def symbols_validate(root)
21
15
  f = root.xpath("//definitions")
22
16
  f.empty? && return
23
- (f.size == 1) || @log.add("Style", f.first, ONE_SYMBOLS_WARNING)
17
+ f.size == 1 or @log.add("CC_1", f.first)
24
18
  f.first.elements.each do |e|
25
19
  unless e.name == "dl"
26
- @log.add("Style", f.first, NON_DL_SYMBOLS_WARNING)
20
+ @log.add("CC_2", f.first)
27
21
  return
28
22
  end
29
23
  end
@@ -35,7 +29,7 @@ module Metanorma
35
29
 
36
30
  test = accepted.map { |a| n.at(a) }
37
31
  if test.all?(&:nil?)
38
- @log.add("Style", nil, msg)
32
+ @log.add("CC_3", nil, params: [msg])
39
33
  end
40
34
  names
41
35
  end
@@ -83,42 +77,35 @@ module Metanorma
83
77
  n = names.shift
84
78
  end
85
79
  if n.nil? || n.name != "clause"
86
- @log.add("Style", nil, "Document must contain at least one clause")
80
+ @log.add("CC_4", nil)
87
81
  end
88
82
  n&.at("./self::clause") ||
89
- @log.add("Style", nil, "Document must contain clause after "\
90
- "Terms and Definitions")
83
+ @log.add("CC_5", nil)
91
84
  n&.at("./self::clause[@type = 'scope']") &&
92
- @log.add("Style", nil,
93
- "Scope must occur before Terms and Definitions")
85
+ @log.add("CC_6", nil)
94
86
  n = names.shift
95
87
  while n&.name == "clause"
96
88
  n&.at("./self::clause[@type = 'scope']")
97
- @log.add("Style", nil,
98
- "Scope must occur before Terms and Definitions")
89
+ @log.add("CC_6", nil)
99
90
  n = names.shift
100
91
  end
101
92
  unless %w(annex references).include? n&.name
102
- @log.add("Style", nil,
103
- "Only annexes and references can follow clauses")
93
+ @log.add("CC_8", nil)
104
94
  end
105
95
  while n&.name == "annex"
106
96
  n = names.shift
107
97
  if n.nil?
108
- @log.add("Style", nil, "Document must include (references) "\
109
- "Normative References")
98
+ @log.add("CC_9", nil)
99
+
110
100
  end
111
101
  end
112
102
  n&.at("./self::references[@normative = 'true']") ||
113
- @log.add("Style", nil, "Document must include (references) "\
114
- "Normative References")
103
+ @log.add("CC_9", nil)
115
104
  n = names&.shift
116
105
  n&.at("./self::references[@normative = 'false']") ||
117
- @log.add("Style", nil,
118
- "Final section must be (references) Bibliography")
106
+ @log.add("CC_11", nil)
119
107
  names.empty? ||
120
- @log.add("Style", nil,
121
- "There are sections after the final Bibliography")
108
+ @log.add("CC_12", nil)
122
109
  end
123
110
 
124
111
  def style_warning(node, msg, text = nil)
@@ -126,7 +113,7 @@ module Metanorma
126
113
 
127
114
  w = msg
128
115
  w += ": #{text}" if text
129
- @log.add("Style", node, w)
116
+ @log.add("STANDOC_48", node, params: [w])
130
117
  end
131
118
  end
132
119
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cc
3
- VERSION = "2.7.5".freeze
3
+ VERSION = "2.7.7".freeze
4
4
  end
5
5
  end
data/metanorma-cc.gemspec CHANGED
@@ -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"
@@ -42,5 +42,5 @@ spec.add_development_dependency "rubocop-performance"
42
42
  spec.add_development_dependency "sassc-embedded", "~> 1"
43
43
  spec.add_development_dependency "simplecov", "~> 0.15"
44
44
  spec.add_development_dependency "timecop", "~> 0.9"
45
- spec.add_development_dependency "canon"
45
+ spec.add_development_dependency "canon", "= 0.1.3"
46
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.5
4
+ version: 2.7.7
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-09-29 00:00:00.000000000 Z
11
+ date: 2025-11-03 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
@@ -182,16 +182,16 @@ dependencies:
182
182
  name: canon
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - '='
186
186
  - !ruby/object:Gem::Version
187
- version: '0'
187
+ version: 0.1.3
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - '='
193
193
  - !ruby/object:Gem::Version
194
- version: '0'
194
+ version: 0.1.3
195
195
  description: |
196
196
  metanorma-cc lets you write CalConnect standards in AsciiDoc syntax.
197
197
 
@@ -246,6 +246,7 @@ files:
246
246
  - lib/metanorma/cc/cc.rng
247
247
  - lib/metanorma/cc/converter.rb
248
248
  - lib/metanorma/cc/isodoc.rng
249
+ - lib/metanorma/cc/log.rb
249
250
  - lib/metanorma/cc/processor.rb
250
251
  - lib/metanorma/cc/relaton-cc.rng
251
252
  - lib/metanorma/cc/reqt.rng