metanorma-cc 2.8.1 → 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 +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +60 -32
- data/lib/isodoc/cc/html/_coverpage.css +5 -0
- data/lib/isodoc/cc/html/htmlstyle.css +5 -0
- data/lib/metanorma/cc/biblio.rng +4 -4
- data/lib/metanorma/cc/isodoc.rng +77 -28
- data/lib/metanorma/cc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92b75430711039a12ea6f8907c406e7cfc01a5169e4f31f643ee0aaeb542954e
|
|
4
|
+
data.tar.gz: 1bcd9bfcdfaab4918a83c9c1968b6cd9b2cd51369adc03ad905d01e12fa71070
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06a496b5fc95f4450c0b4673e81430b16d20dfbee0294abe6052a999b09403fbd598b68107fe3667376d81962f7de807f9ace6b5b608dc14cb77a078889c7c4c
|
|
7
|
+
data.tar.gz: 6fb8e7bda62fdb553c61a0740202ffc4039f0f4ea14b7927d6ab22705b508c24ca9ae605ab87eb9607382d767daf152c27750f332918a823a6f3f2f7a50d4eb2
|
|
@@ -228,16 +228,8 @@
|
|
|
228
228
|
<xsl:for-each select=".//mn:page_sequence[parent::mn:preface][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
|
229
229
|
|
|
230
230
|
<!-- Copyright, Content, Foreword, etc. pages -->
|
|
231
|
-
<fo:page-sequence
|
|
232
|
-
|
|
233
|
-
<xsl:attribute name="master-reference">
|
|
234
|
-
<xsl:text>preface</xsl:text>
|
|
235
|
-
<xsl:call-template name="getPageSequenceOrientation"/>
|
|
236
|
-
</xsl:attribute>
|
|
237
|
-
|
|
238
|
-
<xsl:if test="position() = last()">
|
|
239
|
-
<xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
|
|
240
|
-
</xsl:if>
|
|
231
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-preface">
|
|
232
|
+
<xsl:call-template name="refine_page-sequence-preface"/>
|
|
241
233
|
|
|
242
234
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
243
235
|
<xsl:call-template name="insertHeaderFooter"/>
|
|
@@ -255,16 +247,8 @@
|
|
|
255
247
|
<xsl:for-each select=".//mn:page_sequence[not(parent::mn:preface)][normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
|
256
248
|
|
|
257
249
|
<!-- Document Pages -->
|
|
258
|
-
<fo:page-sequence
|
|
259
|
-
|
|
260
|
-
<xsl:attribute name="master-reference">
|
|
261
|
-
<xsl:text>document</xsl:text>
|
|
262
|
-
<xsl:call-template name="getPageSequenceOrientation"/>
|
|
263
|
-
</xsl:attribute>
|
|
264
|
-
|
|
265
|
-
<xsl:if test="position() = 1">
|
|
266
|
-
<xsl:attribute name="initial-page-number">1</xsl:attribute>
|
|
267
|
-
</xsl:if>
|
|
250
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-main">
|
|
251
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
268
252
|
|
|
269
253
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
270
254
|
<xsl:call-template name="insertHeaderFooter"/>
|
|
@@ -367,7 +351,11 @@
|
|
|
367
351
|
</xsl:template> <!-- END: cover-page -->
|
|
368
352
|
|
|
369
353
|
<xsl:template name="inner-cover-page">
|
|
370
|
-
<fo:page-sequence
|
|
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
|
+
|
|
371
359
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
372
360
|
<xsl:call-template name="insertHeaderFooter"/>
|
|
373
361
|
<fo:flow flow-name="xsl-region-body">
|
|
@@ -418,7 +406,7 @@
|
|
|
418
406
|
</xsl:call-template>
|
|
419
407
|
<xsl:apply-templates select="." mode="contents"/>
|
|
420
408
|
<fo:inline keep-together.within-line="always" role="SKIP">
|
|
421
|
-
<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>
|
|
422
410
|
<fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
|
|
423
411
|
</fo:inline>
|
|
424
412
|
</fo:basic-link>
|
|
@@ -465,7 +453,7 @@
|
|
|
465
453
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}" role="SKIP">
|
|
466
454
|
<xsl:apply-templates select="mnx:title"/>
|
|
467
455
|
<fo:inline keep-together.within-line="always" role="SKIP">
|
|
468
|
-
<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>
|
|
469
457
|
<fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
|
|
470
458
|
</fo:inline>
|
|
471
459
|
</fo:basic-link>
|
|
@@ -973,20 +961,41 @@
|
|
|
973
961
|
</xsl:variable>
|
|
974
962
|
|
|
975
963
|
<xsl:attribute-set name="page-sequence-preface">
|
|
964
|
+
<xsl:attribute name="master-reference">preface</xsl:attribute>
|
|
976
965
|
<xsl:attribute name="format">i</xsl:attribute>
|
|
977
|
-
</xsl:attribute-set>
|
|
966
|
+
</xsl:attribute-set> <!-- page-sequence-preface -->
|
|
978
967
|
|
|
979
968
|
<xsl:template name="refine_page-sequence-preface">
|
|
980
969
|
<xsl:param name="layoutVersion"/>
|
|
981
|
-
|
|
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 -->
|
|
982
981
|
|
|
983
982
|
<xsl:attribute-set name="page-sequence-main">
|
|
984
|
-
|
|
985
|
-
|
|
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 -->
|
|
986
987
|
|
|
987
988
|
<xsl:template name="refine_page-sequence-main">
|
|
988
989
|
<xsl:param name="layoutVersion"/>
|
|
989
|
-
|
|
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 -->
|
|
990
999
|
|
|
991
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>
|
|
992
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>
|
|
@@ -11756,6 +11765,7 @@
|
|
|
11756
11765
|
</xsl:attribute-set>
|
|
11757
11766
|
|
|
11758
11767
|
<xsl:template name="refine_toc-style">
|
|
11768
|
+
<xsl:copy-of select="@id"/>
|
|
11759
11769
|
</xsl:template>
|
|
11760
11770
|
|
|
11761
11771
|
<xsl:attribute-set name="toc-title-style">
|
|
@@ -11834,13 +11844,13 @@
|
|
|
11834
11844
|
|
|
11835
11845
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
11836
11846
|
<xsl:variable name="nodes_preface_">
|
|
11837
|
-
<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' -->
|
|
11838
11848
|
<node id="{@id}"/>
|
|
11839
11849
|
</xsl:for-each>
|
|
11840
11850
|
</xsl:variable>
|
|
11841
11851
|
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
|
11842
11852
|
|
|
11843
|
-
<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' -->
|
|
11844
11854
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
11845
11855
|
|
|
11846
11856
|
<!-- process Section's title -->
|
|
@@ -11853,6 +11863,23 @@
|
|
|
11853
11863
|
</xsl:for-each>
|
|
11854
11864
|
</xsl:template>
|
|
11855
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
|
+
|
|
11856
11883
|
<xsl:template name="processMainSectionsDefault_Contents">
|
|
11857
11884
|
|
|
11858
11885
|
<xsl:variable name="nodes_sections_">
|
|
@@ -13631,16 +13658,17 @@
|
|
|
13631
13658
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
|
13632
13659
|
<xsl:template name="insert_basic_link">
|
|
13633
13660
|
<xsl:param name="element"/>
|
|
13661
|
+
<xsl:param name="wrapper">true</xsl:param>
|
|
13634
13662
|
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
|
13635
13663
|
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
13636
13664
|
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
13637
13665
|
<xsl:choose>
|
|
13638
|
-
<xsl:when test="$internal-destination = 'true'">
|
|
13666
|
+
<xsl:when test="$internal-destination = 'true' and $wrapper = 'true'">
|
|
13639
13667
|
<fo:wrapper role="Reference">
|
|
13640
13668
|
<xsl:copy-of select="$element_node"/>
|
|
13641
13669
|
</fo:wrapper>
|
|
13642
13670
|
</xsl:when>
|
|
13643
|
-
<xsl:when test="$external-destination = 'true'">
|
|
13671
|
+
<xsl:when test="$internal-destination = 'true' or $external-destination = 'true'">
|
|
13644
13672
|
<xsl:copy-of select="$element_node"/>
|
|
13645
13673
|
</xsl:when>
|
|
13646
13674
|
<xsl:otherwise>
|
data/lib/metanorma/cc/biblio.rng
CHANGED
|
@@ -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>
|
|
1943
|
-
<value>
|
|
1944
|
-
<value>
|
|
1945
|
-
<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>
|
data/lib/metanorma/cc/isodoc.rng
CHANGED
|
@@ -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
|
data/lib/metanorma/cc/version.rb
CHANGED
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.
|
|
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-03-
|
|
11
|
+
date: 2026-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|