metanorma-cc 2.8.0 → 2.8.2

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: 7c80db3e135f995e13f7459b98f7085de83e185636f0986326bb5fe4fca86692
4
- data.tar.gz: 62ed996afcb67f966a34632724c388ba0bed95177643a76cc01c49442faffb0b
3
+ metadata.gz: 92b75430711039a12ea6f8907c406e7cfc01a5169e4f31f643ee0aaeb542954e
4
+ data.tar.gz: 1bcd9bfcdfaab4918a83c9c1968b6cd9b2cd51369adc03ad905d01e12fa71070
5
5
  SHA512:
6
- metadata.gz: 66312c95c05747bdc27817346a75529cfed5b90b70cde5552fbd569630ed0f18347aa8aad4fac406fb51c33cb43d58d7bd5f7c20cd70aeaf0b27e9e9abaf5f89
7
- data.tar.gz: 7007fd2f5181ea82e72a2114050ecb884053b7c9fc8729b062ef645f401fc7a8afe06a919ff2d9c6c59f357be2538cff6cbc0f0fb771f7be649a17f50275ec33
6
+ metadata.gz: 06a496b5fc95f4450c0b4673e81430b16d20dfbee0294abe6052a999b09403fbd598b68107fe3667376d81962f7de807f9ace6b5b608dc14cb77a078889c7c4c
7
+ data.tar.gz: 6fb8e7bda62fdb553c61a0740202ffc4039f0f4ea14b7927d6ab22705b508c24ca9ae605ab87eb9607382d767daf152c27750f332918a823a6f3f2f7a50d4eb2
@@ -23,6 +23,7 @@
23
23
  <mnx:contents>
24
24
  <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
25
25
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
26
+ <xsl:apply-templates select="//mn:indexsect" mode="contents"/>
26
27
  <xsl:call-template name="processTablesFigures_Contents"/>
27
28
  </mnx:contents>
28
29
  </xsl:variable>
@@ -117,7 +118,7 @@
117
118
  <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
118
119
  <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
119
120
  </fo:simple-page-master>
120
- <!-- Preface even pages -->
121
+ <!-- Document even pages -->
121
122
  <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
122
123
  <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
123
124
  <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
@@ -147,6 +148,27 @@
147
148
  </fo:repeatable-page-master-alternatives>
148
149
  </fo:page-sequence-master>
149
150
 
151
+ <!-- Index pages (two columns) -->
152
+ <fo:simple-page-master master-name="index-odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
153
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm" xsl:use-attribute-sets="indexsect-region-body-style"/>
154
+ <fo:region-before region-name="header-odd" extent="{$marginTop}mm"/>
155
+ <fo:region-after region-name="footer-odd" extent="{$marginBottom}mm"/>
156
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
157
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
158
+ </fo:simple-page-master>
159
+ <fo:simple-page-master master-name="index-even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
160
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm" xsl:use-attribute-sets="indexsect-region-body-style"/>
161
+ <fo:region-before region-name="header-even" extent="{$marginTop}mm"/>
162
+ <fo:region-after region-name="footer-even" extent="{$marginBottom}mm"/>
163
+ <fo:region-start region-name="left-region" extent="{$marginLeftRight1}mm"/>
164
+ <fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
165
+ </fo:simple-page-master>
166
+ <fo:page-sequence-master master-name="index">
167
+ <fo:repeatable-page-master-alternatives>
168
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="index-even"/>
169
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="index-odd"/>
170
+ </fo:repeatable-page-master-alternatives>
171
+ </fo:page-sequence-master>
150
172
  </fo:layout-master-set>
151
173
  </xsl:template> <!-- END: layout-master-set -->
152
174
 
@@ -206,16 +228,8 @@
206
228
  <xsl:for-each select=".//mn:page_sequence[parent::mn:preface][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
207
229
 
208
230
  <!-- Copyright, Content, Foreword, etc. pages -->
209
- <fo:page-sequence master-reference="preface" format="i">
210
-
211
- <xsl:attribute name="master-reference">
212
- <xsl:text>preface</xsl:text>
213
- <xsl:call-template name="getPageSequenceOrientation"/>
214
- </xsl:attribute>
215
-
216
- <xsl:if test="position() = last()">
217
- <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
218
- </xsl:if>
231
+ <fo:page-sequence xsl:use-attribute-sets="page-sequence-preface">
232
+ <xsl:call-template name="refine_page-sequence-preface"/>
219
233
 
220
234
  <xsl:call-template name="insertFootnoteSeparatorCommon"/>
221
235
  <xsl:call-template name="insertHeaderFooter"/>
@@ -233,16 +247,8 @@
233
247
  <xsl:for-each select=".//mn:page_sequence[not(parent::mn:preface)][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
234
248
 
235
249
  <!-- Document Pages -->
236
- <fo:page-sequence master-reference="document" format="1" force-page-count="no-force">
237
-
238
- <xsl:attribute name="master-reference">
239
- <xsl:text>document</xsl:text>
240
- <xsl:call-template name="getPageSequenceOrientation"/>
241
- </xsl:attribute>
242
-
243
- <xsl:if test="position() = 1">
244
- <xsl:attribute name="initial-page-number">1</xsl:attribute>
245
- </xsl:if>
250
+ <fo:page-sequence xsl:use-attribute-sets="page-sequence-main">
251
+ <xsl:call-template name="refine_page-sequence-main"/>
246
252
 
247
253
  <xsl:call-template name="insertFootnoteSeparatorCommon"/>
248
254
  <xsl:call-template name="insertHeaderFooter"/>
@@ -261,6 +267,8 @@
261
267
  </xsl:for-each>
262
268
  </xsl:for-each>
263
269
 
270
+ <xsl:call-template name="index-pages"/>
271
+
264
272
  </xsl:for-each>
265
273
 
266
274
  <xsl:call-template name="back-page"/>
@@ -343,7 +351,11 @@
343
351
  </xsl:template> <!-- END: cover-page -->
344
352
 
345
353
  <xsl:template name="inner-cover-page">
346
- <fo:page-sequence master-reference="preface" format="i" initial-page-number="2">
354
+ <fo:page-sequence initial-page-number="2" xsl:use-attribute-sets="page-sequence-preface">
355
+ <xsl:call-template name="refine_page-sequence-preface">
356
+ <xsl:with-param name="skip_force_page_count">true</xsl:with-param>
357
+ </xsl:call-template>
358
+
347
359
  <xsl:call-template name="insertFootnoteSeparatorCommon"/>
348
360
  <xsl:call-template name="insertHeaderFooter"/>
349
361
  <fo:flow flow-name="xsl-region-body">
@@ -394,7 +406,7 @@
394
406
  </xsl:call-template>
395
407
  <xsl:apply-templates select="." mode="contents"/>
396
408
  <fo:inline keep-together.within-line="always" role="SKIP">
397
- <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
409
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
398
410
  <fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
399
411
  </fo:inline>
400
412
  </fo:basic-link>
@@ -441,7 +453,7 @@
441
453
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}" role="SKIP">
442
454
  <xsl:apply-templates select="mnx:title"/>
443
455
  <fo:inline keep-together.within-line="always" role="SKIP">
444
- <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
456
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
445
457
  <fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
446
458
  </fo:inline>
447
459
  </fo:basic-link>
@@ -499,6 +511,8 @@
499
511
  </xsl:call-template>
500
512
  </xsl:variable>
501
513
 
514
+ <xsl:variable name="type" select="local-name()"/>
515
+
502
516
  <xsl:variable name="display">
503
517
  <xsl:choose>
504
518
  <xsl:when test="$level &gt; $toc_level">false</xsl:when>
@@ -526,10 +540,15 @@
526
540
  </xsl:variable>
527
541
 
528
542
  <mnx:item id="{@id}" level="{$level}" section="{$section}" display="{$display}">
543
+ <xsl:if test="$type = 'indexsect'">
544
+ <xsl:attribute name="level">1</xsl:attribute>
545
+ </xsl:if>
529
546
  <mnx:title>
530
547
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
531
548
  </mnx:title>
532
- <xsl:apply-templates mode="contents"/>
549
+ <xsl:if test="$type != 'indexsect'">
550
+ <xsl:apply-templates mode="contents"/>
551
+ </xsl:if>
533
552
  </mnx:item>
534
553
  </xsl:if>
535
554
 
@@ -609,20 +628,6 @@
609
628
  </xsl:if>
610
629
  </xsl:template>
611
630
 
612
- <xsl:template match="mn:fmt-xref" priority="2">
613
- <xsl:call-template name="insert_basic_link">
614
- <xsl:with-param name="element">
615
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
616
- <xsl:if test="not(starts-with(text(), 'Figure') or starts-with(text(), 'Table'))">
617
- <xsl:attribute name="color">blue</xsl:attribute>
618
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
619
- </xsl:if>
620
- <xsl:apply-templates/>
621
- </fo:basic-link>
622
- </xsl:with-param>
623
- </xsl:call-template>
624
- </xsl:template>
625
-
626
631
  <xsl:template name="insertHeaderFooter">
627
632
  <xsl:call-template name="insertHeader"/>
628
633
  <xsl:call-template name="insertFooter"/>
@@ -956,20 +961,41 @@
956
961
  </xsl:variable>
957
962
 
958
963
  <xsl:attribute-set name="page-sequence-preface">
964
+ <xsl:attribute name="master-reference">preface</xsl:attribute>
959
965
  <xsl:attribute name="format">i</xsl:attribute>
960
- </xsl:attribute-set>
966
+ </xsl:attribute-set> <!-- page-sequence-preface -->
961
967
 
962
968
  <xsl:template name="refine_page-sequence-preface">
963
969
  <xsl:param name="layoutVersion"/>
964
- </xsl:template>
970
+ <xsl:param name="doctype"/>
971
+ <xsl:param name="num"/>
972
+ <xsl:param name="skip_force_page_count">false</xsl:param>
973
+ <xsl:attribute name="master-reference">
974
+ <xsl:text>preface</xsl:text>
975
+ <xsl:call-template name="getPageSequenceOrientation"/>
976
+ </xsl:attribute>
977
+ <xsl:if test="$skip_force_page_count = 'false' and position() = last()">
978
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
979
+ </xsl:if>
980
+ </xsl:template> <!-- refine_page-sequence-preface -->
965
981
 
966
982
  <xsl:attribute-set name="page-sequence-main">
967
-
968
- </xsl:attribute-set>
983
+ <xsl:attribute name="format">1</xsl:attribute>
984
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
985
+ <xsl:attribute name="master-reference">document</xsl:attribute>
986
+ </xsl:attribute-set> <!-- page-sequence-main -->
969
987
 
970
988
  <xsl:template name="refine_page-sequence-main">
971
989
  <xsl:param name="layoutVersion"/>
972
- </xsl:template>
990
+ <xsl:param name="doctype"/>
991
+ <xsl:attribute name="master-reference">
992
+ <xsl:text>document</xsl:text>
993
+ <xsl:call-template name="getPageSequenceOrientation"/>
994
+ </xsl:attribute>
995
+ <xsl:if test="position() = 1">
996
+ <xsl:attribute name="initial-page-number">1</xsl:attribute>
997
+ </xsl:if>
998
+ </xsl:template> <!-- refine_page-sequence-main -->
973
999
 
974
1000
  <xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
975
1001
  <xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
@@ -2148,7 +2174,23 @@
2148
2174
  <xsl:sort select="@displayorder" data-type="number"/>
2149
2175
  <xsl:element name="page_sequence" namespace="{$namespace_full}">
2150
2176
  <xsl:attribute name="main_page_sequence"/>
2151
- <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2177
+
2178
+ <!-- from common <xsl:template name="index-pages"> -->
2179
+ <xsl:variable name="docid">
2180
+ <xsl:call-template name="getDocumentId"/>
2181
+ </xsl:variable>
2182
+
2183
+ <xsl:variable name="current_document_index_id">
2184
+ <xsl:apply-templates select="." mode="index_add_id">
2185
+ <xsl:with-param name="docid" select="$docid"/>
2186
+ </xsl:apply-templates>
2187
+ </xsl:variable>
2188
+ <xsl:variable name="current_document_index">
2189
+ <xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
2190
+ </xsl:variable>
2191
+
2192
+ <!-- xalan:nodeset($current_document_index) -->
2193
+ <xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="update_xml_step_move_pagebreak"/>
2152
2194
  </xsl:element>
2153
2195
  </xsl:for-each>
2154
2196
  </xsl:template>
@@ -3186,6 +3228,7 @@
3186
3228
  </xsl:template>
3187
3229
 
3188
3230
  <xsl:attribute-set name="tt-style">
3231
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3189
3232
  <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3190
3233
  </xsl:attribute-set>
3191
3234
 
@@ -4916,6 +4959,11 @@
4916
4959
  <!-- Display table's name before table as standalone block -->
4917
4960
  <!-- $namespace = 'iso' or -->
4918
4961
  <xsl:apply-templates select="mn:fmt-name"/> <!-- table's title rendered before table -->
4962
+ <xsl:if test="not(mn:fmt-name)"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
4963
+ <xsl:apply-templates select="mn:name">
4964
+ <xsl:with-param name="process">true</xsl:with-param>
4965
+ </xsl:apply-templates>
4966
+ </xsl:if>
4919
4967
  <xsl:call-template name="table_name_fn_display"/>
4920
4968
 
4921
4969
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/mn:tr[1]/mn:td)"/>
@@ -5164,7 +5212,13 @@
5164
5212
  </xsl:template>
5165
5213
 
5166
5214
  <!-- table/name-->
5167
- <xsl:template match="*[local-name()='table']/mn:fmt-name">
5215
+ <xsl:template match="mn:table[not(mn:fmt-name)]/mn:name"> <!-- for https://github.com/metanorma/mn-samples-jis/issues/75#issuecomment-3922169930 -->
5216
+ <xsl:param name="process">false</xsl:param>
5217
+ <xsl:if test="$process = 'true'">
5218
+ <xsl:call-template name="table_name"/>
5219
+ </xsl:if>
5220
+ </xsl:template>
5221
+ <xsl:template match="*[local-name()='table']/mn:fmt-name" name="table_name">
5168
5222
  <xsl:param name="continued"/>
5169
5223
  <xsl:param name="cols-count"/>
5170
5224
  <xsl:if test="normalize-space() != ''">
@@ -5640,12 +5694,14 @@
5640
5694
  <xsl:param name="colwidths"/>
5641
5695
  <xsl:param name="colgroup"/>
5642
5696
 
5643
- <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
5697
+ <xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or (..//mn:fn[not(parent::mn:fmt-name)] and not(ancestor::mn:table[1]//mn:tfoot//mn:fmt-footnote-container)) or ../mn:fmt-source or ../mn:p"/>
5698
+ <!-- in JIS fmt-footnote-container renders in tfoot, so no need render fn in the separate table -->
5644
5699
 
5645
- <xsl:variable name="isNoteOrFnExistShowAfterTable">
5700
+ <xsl:variable name="isNoteOrFnExistShowAfterTable_">
5646
5701
  </xsl:variable>
5702
+ <xsl:variable name="isNoteOrFnExistShowAfterTable" select="normalize-space($isNoteOrFnExistShowAfterTable_)"/>
5647
5703
 
5648
- <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
5704
+ <xsl:if test="$isNoteOrFnExist = 'true' or $isNoteOrFnExistShowAfterTable = 'true'">
5649
5705
 
5650
5706
  <xsl:variable name="cols-count">
5651
5707
  <xsl:choose>
@@ -7862,6 +7918,10 @@
7862
7918
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
7863
7919
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7864
7920
  </xsl:if>
7921
+ <xsl:if test="not(starts-with(text(), 'Figure') or starts-with(text(), 'Table'))">
7922
+ <xsl:attribute name="color">blue</xsl:attribute>
7923
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
7924
+ </xsl:if>
7865
7925
  <xsl:if test="parent::mn:add">
7866
7926
  <xsl:call-template name="append_add-style"/>
7867
7927
  </xsl:if>
@@ -7881,6 +7941,18 @@
7881
7941
  </xsl:with-param>
7882
7942
  </xsl:call-template>
7883
7943
  </xsl:template> <!-- xref -->
7944
+ <xsl:template match="mn:indexsect//mn:fmt-xref[@pagenumber = 'true']" priority="2">
7945
+ <xsl:call-template name="insert_basic_link">
7946
+ <xsl:with-param name="element">
7947
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7948
+ <fo:inline>
7949
+ <xsl:copy-of select="@id"/>
7950
+ <fo:page-number-citation ref-id="{@target}"/>
7951
+ </fo:inline>
7952
+ </fo:basic-link>
7953
+ </xsl:with-param>
7954
+ </xsl:call-template>
7955
+ </xsl:template>
7884
7956
 
7885
7957
  <!-- command between two xref points to non-standard bibitem -->
7886
7958
  <xsl:template match="text()[. = ','][preceding-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']] and following-sibling::node()[1][self::mn:sup][mn:fmt-xref[@type = 'footnote']]]"><xsl:value-of select="."/>
@@ -11183,8 +11255,24 @@
11183
11255
  <!-- End Highlight syntax styles -->
11184
11256
 
11185
11257
  <!-- Index section styles -->
11258
+
11259
+ <xsl:attribute-set name="indexsect-region-body-style">
11260
+ <xsl:attribute name="column-count">2</xsl:attribute>
11261
+ <xsl:attribute name="column-gap">10mm</xsl:attribute>
11262
+ </xsl:attribute-set>
11263
+
11264
+ <xsl:attribute-set name="indexsect-title-block-style">
11265
+ <xsl:attribute name="role">SKIP</xsl:attribute>
11266
+ <xsl:attribute name="span">all</xsl:attribute>
11267
+ </xsl:attribute-set>
11268
+
11186
11269
  <xsl:attribute-set name="indexsect-title-style">
11187
11270
  <xsl:attribute name="role">H1</xsl:attribute>
11271
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
11272
+ <xsl:attribute name="margin-bottom">24pt</xsl:attribute>
11273
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
11274
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
11275
+ <xsl:attribute name="color">rgb(14, 26, 133)</xsl:attribute>
11188
11276
  </xsl:attribute-set> <!-- indexsect-title-style -->
11189
11277
 
11190
11278
  <xsl:template name="refine_indexsect-title-style">
@@ -11210,6 +11298,44 @@
11210
11298
  </xsl:for-each>
11211
11299
  </xsl:variable>
11212
11300
 
11301
+ <xsl:template name="index-pages">
11302
+ <xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
11303
+
11304
+ <xsl:variable name="docid">
11305
+ <xsl:call-template name="getDocumentId"/>
11306
+ </xsl:variable>
11307
+
11308
+ <xsl:variable name="current_document_index_id">
11309
+ <xsl:apply-templates select="//mn:indexsect" mode="index_add_id">
11310
+ <xsl:with-param name="docid" select="$docid"/>
11311
+ </xsl:apply-templates>
11312
+ </xsl:variable>
11313
+ <xsl:variable name="current_document_index">
11314
+ <xsl:apply-templates select="xalan:nodeset($current_document_index_id)" mode="index_update"/>
11315
+ </xsl:variable>
11316
+
11317
+ <xsl:apply-templates select="xalan:nodeset($current_document_index)" mode="index">
11318
+ <xsl:with-param name="num" select="$num"/>
11319
+ </xsl:apply-templates>
11320
+ </xsl:template>
11321
+ <xsl:template match="mn:indexsect"/>
11322
+ <xsl:template match="mn:indexsect" mode="index">
11323
+ <xsl:param name="num"/>
11324
+ <fo:page-sequence master-reference="index" force-page-count="no-force">
11325
+ <xsl:call-template name="insertHeaderFooter">
11326
+ <xsl:with-param name="section">main</xsl:with-param>
11327
+ </xsl:call-template>
11328
+ <fo:flow flow-name="xsl-region-body">
11329
+ <fo:block id="{@id}" xsl:use-attribute-sets="indexsect-title-block-style">
11330
+ <xsl:apply-templates select="mn:fmt-title"/>
11331
+ </fo:block>
11332
+ <fo:block role="Index">
11333
+ <xsl:apply-templates select="*[not(self::mn:fmt-title)]"/>
11334
+ </fo:block>
11335
+ </fo:flow>
11336
+ </fo:page-sequence>
11337
+ </xsl:template>
11338
+
11213
11339
  <xsl:template match="@*|node()" mode="index_add_id">
11214
11340
  <xsl:param name="docid"/>
11215
11341
  <xsl:copy>
@@ -11262,7 +11388,7 @@
11262
11388
  <xsl:template match="mn:indexsect//mn:li" mode="index_update">
11263
11389
  <xsl:copy>
11264
11390
  <xsl:apply-templates select="@*" mode="index_update"/>
11265
- <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
11391
+ <xsl:apply-templates select="node()[not(self::mn:fmt-name)][1]" mode="process_li_element"/>
11266
11392
  </xsl:copy>
11267
11393
  </xsl:template>
11268
11394
 
@@ -11470,11 +11596,24 @@
11470
11596
  <!-- End of Index processing -->
11471
11597
  <!-- =================== -->
11472
11598
 
11473
- <!-- =================== -->
11599
+ <xsl:attribute-set name="form-checkbox-style">
11600
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
11601
+ <xsl:attribute name="background-color">yellow</xsl:attribute>
11602
+ </xsl:attribute-set>
11603
+
11604
+ <xsl:variable name="METANORMA_FORM_START_PREFIX">_metanorma_form_start</xsl:variable>
11605
+ <xsl:variable name="METANORMA_FORM_ITEM_PREFIX">_metanorma_form_item_</xsl:variable>
11606
+ <xsl:variable name="METANORMA_FORM_ITEM_BORDER">1pt solid black</xsl:variable>
11607
+
11608
+ <!-- =================== -->
11474
11609
  <!-- Form's elements processing -->
11475
11610
  <!-- =================== -->
11476
11611
  <xsl:template match="mn:form">
11477
11612
  <fo:block>
11613
+ <fo:inline>
11614
+ <xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_START_PREFIX, '___', @id, '___', @name)"/></xsl:attribute>
11615
+ <xsl:value-of select="$hair_space"/>
11616
+ </fo:inline>
11478
11617
  <xsl:apply-templates/>
11479
11618
  </fo:block>
11480
11619
  </xsl:template>
@@ -11483,7 +11622,23 @@
11483
11622
  <fo:inline><xsl:apply-templates/></fo:inline>
11484
11623
  </xsl:template>
11485
11624
 
11486
- <xsl:template match="mn:form//mn:input[@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
11625
+ <xsl:template match="mn:form//mn:input[@type = 'text']">
11626
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
11627
+ <fo:inline>
11628
+ <xsl:call-template name="set_id_metanorma_form_item">
11629
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
11630
+ </xsl:call-template>
11631
+ <xsl:value-of select="$hair_space"/>
11632
+ </fo:inline>
11633
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove, this border needs for mn2pdf FOPIFFormsHandler -->
11634
+ <fo:inline>
11635
+ <xsl:call-template name="set_id_metanorma_form_item"/>
11636
+ <xsl:call-template name="text_input"/>
11637
+ </fo:inline>
11638
+ </fo:inline>
11639
+ </xsl:template>
11640
+
11641
+ <xsl:template match="mn:form//mn:input[@type = 'date' or @type = 'file' or @type = 'password']">
11487
11642
  <fo:inline>
11488
11643
  <xsl:call-template name="text_input"/>
11489
11644
  </fo:inline>
@@ -11515,7 +11670,20 @@
11515
11670
  </xsl:template>
11516
11671
 
11517
11672
  <xsl:template match="mn:form//mn:input[@type = 'checkbox']">
11518
- <fo:inline padding-right="1mm">
11673
+ <xsl:variable name="form_item_type">checkbox</xsl:variable>
11674
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
11675
+ <fo:inline>
11676
+ <xsl:call-template name="set_id_metanorma_form_item">
11677
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
11678
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
11679
+ </xsl:call-template>
11680
+ <xsl:value-of select="$hair_space"/>
11681
+ </fo:inline>
11682
+
11683
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
11684
+ <xsl:call-template name="set_id_metanorma_form_item">
11685
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
11686
+ </xsl:call-template>
11519
11687
  <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
11520
11688
  <xsl:attribute name="height">3.5mm</xsl:attribute>
11521
11689
  <xsl:attribute name="content-width">100%</xsl:attribute>
@@ -11525,11 +11693,24 @@
11525
11693
  <polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
11526
11694
  </svg>
11527
11695
  </fo:instream-foreign-object>
11528
- </fo:inline>
11696
+ </fo:inline><fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
11529
11697
  </xsl:template>
11530
11698
 
11531
11699
  <xsl:template match="mn:form//mn:input[@type = 'radio']">
11532
- <fo:inline padding-right="1mm">
11700
+ <xsl:variable name="form_item_type">radiobutton</xsl:variable>
11701
+ <!-- add helper id for mn2pdf class FOPIFFormsHandler (_metanorma_form_item_border_) -->
11702
+ <fo:inline>
11703
+ <xsl:call-template name="set_id_metanorma_form_item">
11704
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
11705
+ <xsl:with-param name="add_border_prefix">true</xsl:with-param>
11706
+ </xsl:call-template>
11707
+ <xsl:value-of select="$hair_space"/>
11708
+ </fo:inline>
11709
+
11710
+ <fo:inline border="{$METANORMA_FORM_ITEM_BORDER}"><!-- don't remove 'border', this border needs for mn2pdf FOPIFFormsHandler -->
11711
+ <xsl:call-template name="set_id_metanorma_form_item">
11712
+ <xsl:with-param name="form_item_type" select="$form_item_type"/>
11713
+ </xsl:call-template>
11533
11714
  <fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
11534
11715
  <xsl:attribute name="height">3.5mm</xsl:attribute>
11535
11716
  <xsl:attribute name="content-width">100%</xsl:attribute>
@@ -11541,6 +11722,7 @@
11541
11722
  </svg>
11542
11723
  </fo:instream-foreign-object>
11543
11724
  </fo:inline>
11725
+ <fo:inline padding-right="1mm"><xsl:value-of select="$zero_width_space"/></fo:inline>
11544
11726
  </xsl:template>
11545
11727
 
11546
11728
  <xsl:template match="mn:form//mn:select">
@@ -11550,11 +11732,28 @@
11550
11732
  </xsl:template>
11551
11733
 
11552
11734
  <xsl:template match="mn:form//mn:textarea">
11553
- <fo:block-container border="1pt solid black" width="50%">
11735
+ <fo:block-container border="{$METANORMA_FORM_ITEM_BORDER}" width="50%">
11554
11736
  <fo:block> </fo:block>
11555
11737
  </fo:block-container>
11556
11738
  </xsl:template>
11557
11739
 
11740
+ <xsl:template name="set_id_metanorma_form_item">
11741
+ <xsl:param name="form_item_type">textfield</xsl:param>
11742
+ <xsl:param name="add_border_prefix">false</xsl:param>
11743
+ <xsl:variable name="border_prefix"><xsl:if test="normalize-space($add_border_prefix) = 'true'">border_</xsl:if></xsl:variable>
11744
+ <xsl:if test="@id">
11745
+ <!-- _metanorma_form_item_border____form_item_type___id___name___value -->
11746
+ <!-- split by '___': [2] - form_item_type, [3] - id, [4] - name, [5] - value -->
11747
+ <xsl:variable name="value">
11748
+ <xsl:choose>
11749
+ <xsl:when test="@type = 'checkbox'"><xsl:value-of select="normalize-space(@checked = 'true')"/><!-- true or false --></xsl:when>
11750
+ <xsl:otherwise><xsl:value-of select="@value"/></xsl:otherwise>
11751
+ </xsl:choose>
11752
+ </xsl:variable>
11753
+ <xsl:attribute name="id"><xsl:value-of select="concat($METANORMA_FORM_ITEM_PREFIX, $border_prefix, '___', $form_item_type, '___', @id, '___', @name, '___', $value)"/></xsl:attribute>
11754
+ </xsl:if>
11755
+ </xsl:template>
11756
+
11558
11757
  <!-- =================== -->
11559
11758
  <!-- End Form's elements processing -->
11560
11759
  <!-- =================== -->
@@ -11566,6 +11765,7 @@
11566
11765
  </xsl:attribute-set>
11567
11766
 
11568
11767
  <xsl:template name="refine_toc-style">
11768
+ <xsl:copy-of select="@id"/>
11569
11769
  </xsl:template>
11570
11770
 
11571
11771
  <xsl:attribute-set name="toc-title-style">
@@ -11607,6 +11807,7 @@
11607
11807
  </xsl:template>
11608
11808
 
11609
11809
  <xsl:attribute-set name="toc-pagenumber-style">
11810
+ <xsl:attribute name="role">SKIP</xsl:attribute>
11610
11811
  </xsl:attribute-set>
11611
11812
 
11612
11813
  <xsl:template name="refine_toc-pagenumber-style">
@@ -11643,13 +11844,13 @@
11643
11844
 
11644
11845
  <xsl:template name="processPrefaceSectionsDefault_Contents">
11645
11846
  <xsl:variable name="nodes_preface_">
11646
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
11847
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
11647
11848
  <node id="{@id}"/>
11648
11849
  </xsl:for-each>
11649
11850
  </xsl:variable>
11650
11851
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
11651
11852
 
11652
- <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
11853
+ <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]"> <!-- or @type = 'toc' -->
11653
11854
  <xsl:sort select="@displayorder" data-type="number"/>
11654
11855
 
11655
11856
  <!-- process Section's title -->
@@ -11662,6 +11863,23 @@
11662
11863
  </xsl:for-each>
11663
11864
  </xsl:template>
11664
11865
 
11866
+ <xsl:template match="*[@type = 'toc'][mn:title or mn:fmt-title]" mode="contents" priority="2">
11867
+ <xsl:variable name="title">
11868
+ <xsl:call-template name="getName"/>
11869
+ </xsl:variable>
11870
+ <xsl:variable name="root">
11871
+ <xsl:if test="ancestor-or-self::mn:preface">preface</xsl:if>
11872
+ <xsl:if test="ancestor-or-self::mn:annex">annex</xsl:if>
11873
+ </xsl:variable>
11874
+ <mnx:item id="{@id}" level="1" section="" type="toc" root="{$root}" display="false">
11875
+ <mnx:title>
11876
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item">
11877
+ <xsl:with-param name="element" select="$root"/>
11878
+ </xsl:apply-templates>
11879
+ </mnx:title>
11880
+ </mnx:item>
11881
+ </xsl:template>
11882
+
11665
11883
  <xsl:template name="processMainSectionsDefault_Contents">
11666
11884
 
11667
11885
  <xsl:variable name="nodes_sections_">
@@ -13440,11 +13658,17 @@
13440
13658
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
13441
13659
  <xsl:template name="insert_basic_link">
13442
13660
  <xsl:param name="element"/>
13661
+ <xsl:param name="wrapper">true</xsl:param>
13443
13662
  <xsl:variable name="element_node" select="xalan:nodeset($element)"/>
13444
13663
  <xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
13445
13664
  <xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
13446
13665
  <xsl:choose>
13447
- <xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
13666
+ <xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
13667
+ <fo:wrapper role="Reference">
13668
+ <xsl:copy-of select="$element_node"/>
13669
+ </fo:wrapper>
13670
+ </xsl:when>
13671
+ <xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
13448
13672
  <xsl:copy-of select="$element_node"/>
13449
13673
  </xsl:when>
13450
13674
  <xsl:otherwise>
@@ -312,6 +312,11 @@ svg {
312
312
  display: block; /* ← removes unwanted inline spacing */
313
313
  }
314
314
 
315
+ /* style dfn by override in flavor */
316
+ dfn {
317
+ font-style: inherit;
318
+ }
319
+
315
320
  #standard-band {
316
321
  background-color: #0AC442;
317
322
  }
@@ -312,6 +312,11 @@ svg {
312
312
  display: block; /* ← removes unwanted inline spacing */
313
313
  }
314
314
 
315
+ /* style dfn by override in flavor */
316
+ dfn {
317
+ font-style: inherit;
318
+ }
319
+
315
320
  #standard-band {
316
321
  background-color: #0AC442;
317
322
  }
@@ -920,20 +925,24 @@ p.Biblio::before, p.NormRef::before {
920
925
  padding-right: 1em;
921
926
  }
922
927
 
928
+ .Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
929
+ margin-left: 2em;
930
+ }
931
+
923
932
  /* Blocks */
924
- .figure .FigureTitle, .figure .figure-title {
933
+ figure figcaption {
925
934
  font-weight: 700;
926
935
  font-size: 1em;
927
936
  text-align: center;
928
937
  }
929
- .figure > img, .figure > svg {
938
+ figure > img, figure > svg {
930
939
  margin-left: auto;
931
940
  margin-right: auto;
932
941
  display: block;
933
942
  max-width: 100%;
934
943
  height: auto;
935
944
  }
936
- .figure {
945
+ figure {
937
946
  line-height: 1.6em;
938
947
  padding: 1.5em;
939
948
  margin: 2em 0 1em 0;
@@ -942,7 +951,7 @@ p.Biblio::before, p.NormRef::before {
942
951
  font-variant-ligatures: none;
943
952
  }
944
953
 
945
- table div.figure {
954
+ table figure {
946
955
  padding: 0;
947
956
  margin: 0;
948
957
  }
@@ -1105,7 +1114,7 @@ table table.plain, table table.plain th, table table.plain td {
1105
1114
  font-size: 0.95em;
1106
1115
  }
1107
1116
 
1108
- p.TableTitle {
1117
+ table > caption {
1109
1118
  text-align: center;
1110
1119
  margin-top: 2.5em;
1111
1120
  font-weight: 400;
@@ -207,15 +207,19 @@ p.Biblio::before, p.NormRef::before {
207
207
  padding-right: 1em;
208
208
  }
209
209
 
210
+ .Biblio.note, .Biblio.Note, .NormRef.note, .NormRef.Note {
211
+ margin-left: 2em;
212
+ }
213
+
210
214
 
211
215
  /* Blocks */
212
216
 
213
- .figure {
217
+ figure {
214
218
  @include figureBlock();
215
219
  @include monospaceBlockStyle();
216
220
  }
217
221
 
218
- table div.figure {
222
+ table figure {
219
223
  padding: 0;
220
224
  margin: 0;
221
225
  }
@@ -322,7 +326,7 @@ table {
322
326
  @include table($border: 1px solid black);
323
327
  }
324
328
 
325
- p.TableTitle {
329
+ table > caption {
326
330
  text-align: center;
327
331
  margin-top: 2.5em;
328
332
  font-weight: 400;
@@ -208,11 +208,15 @@ Applicable to modify and delete</a:documentation>
208
208
  </zeroOrMore>
209
209
  <optional>
210
210
  <element name="newcontent">
211
- <a:documentation>New content to be added to the document; applicable to add and modify</a:documentation>
211
+ <a:documentation>New content to be added to the document; applicable to add and modify.
212
+ Can be blocks and/or sections</a:documentation>
212
213
  <ref name="OptionalId"/>
213
214
  <zeroOrMore>
214
215
  <ref name="BasicBlock"/>
215
216
  </zeroOrMore>
217
+ <zeroOrMore>
218
+ <ref name="section"/>
219
+ </zeroOrMore>
216
220
  </element>
217
221
  </optional>
218
222
  <zeroOrMore>
@@ -1939,10 +1939,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
1939
1939
  <value>hasAnnotation</value>
1940
1940
  <value>draftOf</value>
1941
1941
  <value>hasDraft</value>
1942
- <value>preliminaryDraftOf</value>
1943
- <value>hasPreliminaryDraft</value>
1944
- <value>revisionDraftOf</value>
1945
- <value>hasRevisionDraft</value>
1942
+ <value>predecessorDraftOf</value>
1943
+ <value>hasPredecessorDraft</value>
1944
+ <value>successorDraftOf</value>
1945
+ <value>hasSuccessorDraft</value>
1946
1946
  <value>editionOf</value>
1947
1947
  <value>hasEdition</value>
1948
1948
  <value>updates</value>
@@ -0,0 +1,7 @@
1
+ module Metanorma
2
+ module Cc
3
+ class Cleanup < Metanorma::Generic::Cleanup
4
+ extend Forwardable
5
+ end
6
+ end
7
+ end
@@ -3,9 +3,8 @@ require "isodoc/cc/html_convert"
3
3
  require "isodoc/cc/word_convert"
4
4
  require "isodoc/cc/presentation_xml_convert"
5
5
  require "metanorma/cc"
6
- require "metanorma/standoc/converter"
6
+ require "metanorma-standoc"
7
7
  require "metanorma/generic/converter"
8
- require_relative "validate_section"
9
8
 
10
9
  module Metanorma
11
10
  module Cc
@@ -641,8 +641,85 @@ This is done if the footnote reference is already presented in some other form,
641
641
  </ref>
642
642
  </zeroOrMore>
643
643
  </define>
644
+ <define name="altsource">
645
+ <a:documentation>Alternative file to use as media</a:documentation>
646
+ <element name="altsource">
647
+ <ref name="MediaAttributes"/>
648
+ <optional>
649
+ <attribute name="tag">
650
+ <a:documentation>Comma-delimited tag to indicate when the alternate file is to be used,
651
+ at minimum allows contain `html`, `doc`, `pdf` as the main target formats of Metanorma,
652
+ and `default` for the fallback. The presence of an altsource tagged `default` is required</a:documentation>
653
+ </attribute>
654
+ </optional>
655
+ <optional>
656
+ <attribute name="media">
657
+ <a:documentation>CSS media query to indicate when the alternate file is to be used</a:documentation>
658
+ </attribute>
659
+ </optional>
660
+ </element>
661
+ </define>
662
+ <define name="image">
663
+ <a:documentation>Container for image content</a:documentation>
664
+ <choice>
665
+ <element name="image">
666
+ <ref name="RequiredId"/>
667
+ <ref name="ImageAttributes">
668
+ <a:documentation>When specified along with altsource, ImageAttributes give the default image to be rendered</a:documentation>
669
+ </ref>
670
+ <ref name="ImageBody"/>
671
+ </element>
672
+ <element name="svg">
673
+ <a:documentation>Add svg mark up to image</a:documentation>
674
+ <oneOrMore>
675
+ <choice>
676
+ <text/>
677
+ <ref name="AnyElement"/>
678
+ </choice>
679
+ </oneOrMore>
680
+ </element>
681
+ </choice>
682
+ </define>
683
+ <define name="ImageAttributes">
684
+ <optional>
685
+ <ref name="MediaAttributes">
686
+ <a:documentation>If the image contains altsource, the media attributes are given on each of the altsource elements instead of the root node</a:documentation>
687
+ </ref>
688
+ </optional>
689
+ <ref name="MediaAccessibilityAttributes"/>
690
+ <optional>
691
+ <attribute name="width">
692
+ <a:documentation>Height of image</a:documentation>
693
+ <ref name="ImageSize"/>
694
+ </attribute>
695
+ </optional>
696
+ <optional>
697
+ <attribute name="height">
698
+ <a:documentation>Width of image</a:documentation>
699
+ <ref name="ImageSize"/>
700
+ </attribute>
701
+ </optional>
702
+ </define>
644
703
  </include>
645
704
  <!-- end overrides -->
705
+ <define name="ImageBody">
706
+ <optional>
707
+ <element name="svg">
708
+ <a:documentation>image can contain SVG XML, which is used to access its identifiers within the Metanorma XML</a:documentation>
709
+ <oneOrMore>
710
+ <choice>
711
+ <text/>
712
+ <ref name="AnyElement"/>
713
+ </choice>
714
+ </oneOrMore>
715
+ </element>
716
+ </optional>
717
+ <zeroOrMore>
718
+ <ref name="altsource">
719
+ <a:documentation>Alternative files to use as media</a:documentation>
720
+ </ref>
721
+ </zeroOrMore>
722
+ </define>
646
723
  <define name="key">
647
724
  <a:documentation>Key to a table, figure, or formula</a:documentation>
648
725
  <element name="key">
@@ -930,34 +1007,6 @@ titlecase, or lowercase</a:documentation>
930
1007
  <ref name="ReducedBibliographicItem"/>
931
1008
  </element>
932
1009
  </define>
933
- <define name="image" combine="choice">
934
- <choice>
935
- <element name="image">
936
- <ref name="RequiredId"/>
937
- <ref name="ImageAttributes"/>
938
- <optional>
939
- <element name="svg">
940
- <a:documentation>Allow svg in image/svg, for consistency</a:documentation>
941
- <oneOrMore>
942
- <choice>
943
- <text/>
944
- <ref name="AnyElement"/>
945
- </choice>
946
- </oneOrMore>
947
- </element>
948
- </optional>
949
- </element>
950
- <element name="svg">
951
- <a:documentation>Add svg mark up to image</a:documentation>
952
- <oneOrMore>
953
- <choice>
954
- <text/>
955
- <ref name="AnyElement"/>
956
- </choice>
957
- </oneOrMore>
958
- </element>
959
- </choice>
960
- </define>
961
1010
  <define name="ParagraphFnBody" combine="interleave">
962
1011
  <ref name="BlockSource">
963
1012
  <a:documentation>Bibliographic source for the information in the paragraph
@@ -3,7 +3,7 @@ require "metanorma-generic"
3
3
 
4
4
  module Metanorma
5
5
  module Cc
6
- class Converter < Metanorma::Generic::Converter
6
+ class Validate < Metanorma::Generic::Validate
7
7
  def section_validate(doc)
8
8
  advisory = doc.root.at("//bibdata/ext[doctype = 'advisory']")
9
9
  symbols_validate(doc.root) unless advisory
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cc
3
- VERSION = "2.8.0".freeze
3
+ VERSION = "2.8.2".freeze
4
4
  end
5
5
  end
data/lib/metanorma-cc.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require "asciidoctor" unless defined? Asciidoctor::Converter
2
2
  require_relative "metanorma/cc/converter"
3
+ require_relative "metanorma/cc/cleanup"
4
+ require_relative "metanorma/cc/validate"
3
5
  require_relative "isodoc/cc/html_convert"
4
6
  require_relative "isodoc/cc/word_convert"
5
7
  require_relative "isodoc/cc/pdf_convert"
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.2.3"
32
+ spec.add_dependency "metanorma-generic", "~> 3.3.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-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.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: 2026-02-16 00:00:00.000000000 Z
11
+ date: 2026-03-16 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.2.3
19
+ version: 3.3.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.2.3
26
+ version: 3.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -244,13 +244,14 @@ files:
244
244
  - lib/metanorma/cc/biblio.rng
245
245
  - lib/metanorma/cc/boilerplate.adoc
246
246
  - lib/metanorma/cc/cc.rng
247
+ - lib/metanorma/cc/cleanup.rb
247
248
  - lib/metanorma/cc/converter.rb
248
249
  - lib/metanorma/cc/isodoc.rng
249
250
  - lib/metanorma/cc/log.rb
250
251
  - lib/metanorma/cc/processor.rb
251
252
  - lib/metanorma/cc/relaton-cc.rng
252
253
  - lib/metanorma/cc/reqt.rng
253
- - lib/metanorma/cc/validate_section.rb
254
+ - lib/metanorma/cc/validate.rb
254
255
  - lib/metanorma/cc/version.rb
255
256
  - metanorma-cc.gemspec
256
257
  - metanorma.yml