metanorma-ribose 2.6.10 → 2.7.0
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/ribose/ribose.standard.xsl +128 -33
- data/lib/metanorma/ribose/basicdoc.rng +5 -5
- data/lib/metanorma/ribose/isodoc.rng +7 -1
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14223ba25e706195f60416f533a50e86ec510ff74db6dc4b807115f5f1cb02cc
|
4
|
+
data.tar.gz: 8a4b720f59f63107da309a47997647172d46b05b73648b946a6b974195ddb684
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f46b34703e14c86b00f65bde81efd97a985d0ddf26774791e8ea86d2e06fb8af8ff209f2f0f43ef8e7b3c212109cbb1f4c617d1209058d1a0f85e4e1aacd0e1
|
7
|
+
data.tar.gz: d4cab6ffac3ebd3f40a6755d9e7c6a0981913f131ccef2e1cb62b9689371d19c15cfb18c89869b882dc4b1a7e8b88977611e3bbde5d0fe8f427932051140617a
|
@@ -379,12 +379,9 @@
|
|
379
379
|
|
380
380
|
<xsl:for-each select=".//mn:page_sequence[normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
381
381
|
|
382
|
-
<
|
382
|
+
<xsl:variable name="page_orientation"><xsl:call-template name="getPageSequenceOrientation"/></xsl:variable>
|
383
383
|
|
384
|
-
|
385
|
-
<xsl:text>document</xsl:text>
|
386
|
-
<xsl:call-template name="getPageSequenceOrientation"/>
|
387
|
-
</xsl:attribute>
|
384
|
+
<fo:page-sequence master-reference="document{$page_orientation}" force-page-count="no-force">
|
388
385
|
|
389
386
|
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
390
387
|
|
@@ -577,13 +574,13 @@
|
|
577
574
|
|
578
575
|
<xsl:template name="insertListOf_Title">
|
579
576
|
<xsl:param name="title"/>
|
580
|
-
<fo:block
|
577
|
+
<fo:block xsl:use-attribute-sets="toc-listof-title-style">
|
581
578
|
<xsl:value-of select="$title"/>
|
582
579
|
</fo:block>
|
583
580
|
</xsl:template>
|
584
581
|
|
585
582
|
<xsl:template name="insertListOf_Item">
|
586
|
-
<fo:block
|
583
|
+
<fo:block xsl:use-attribute-sets="toc-listof-item-style">
|
587
584
|
<fo:block text-align-last="justify">
|
588
585
|
<fo:basic-link internal-destination="{@id}">
|
589
586
|
<xsl:call-template name="setAltText">
|
@@ -592,8 +589,8 @@
|
|
592
589
|
<xsl:apply-templates select="." mode="contents"/>
|
593
590
|
<xsl:text> </xsl:text>
|
594
591
|
<fo:inline>
|
595
|
-
<fo:leader
|
596
|
-
<fo:inline
|
592
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
593
|
+
<fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
597
594
|
</fo:inline>
|
598
595
|
</fo:basic-link>
|
599
596
|
</fo:block>
|
@@ -604,7 +601,7 @@
|
|
604
601
|
<xsl:apply-templates/>
|
605
602
|
</xsl:template>
|
606
603
|
|
607
|
-
<xsl:template match="mn:preface/mn:clause[@type = 'toc']" priority="3">
|
604
|
+
<xsl:template match="mn:preface/mn:clause[@type = 'toc']" name="toc" priority="3">
|
608
605
|
<fo:block role="TOC">
|
609
606
|
<xsl:apply-templates/>
|
610
607
|
|
@@ -612,24 +609,13 @@
|
|
612
609
|
|
613
610
|
<xsl:if test="$contents//mnx:item[@display = 'true']">
|
614
611
|
|
615
|
-
<fo:block-container
|
612
|
+
<fo:block-container xsl:use-attribute-sets="toc-style">
|
616
613
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
617
614
|
<xsl:for-each select="$contents//mnx:item[@display = 'true']">
|
618
|
-
<fo:block
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
</xsl:if>
|
623
|
-
<xsl:attribute name="space-after">4pt</xsl:attribute>
|
624
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
625
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
626
|
-
<xsl:attribute name="color">black</xsl:attribute>
|
627
|
-
</xsl:if>
|
628
|
-
<xsl:if test="@level >= 2">
|
629
|
-
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * 16.5"/>mm</xsl:attribute>
|
630
|
-
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
631
|
-
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
632
|
-
</xsl:if>
|
615
|
+
<fo:block xsl:use-attribute-sets="toc-item-style">
|
616
|
+
|
617
|
+
<xsl:call-template name="refine_toc-item-style"/>
|
618
|
+
|
633
619
|
<fo:block text-align-last="justify">
|
634
620
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
|
635
621
|
<xsl:value-of select="@section"/>
|
@@ -637,8 +623,8 @@
|
|
637
623
|
<xsl:apply-templates select="mnx:title"/>
|
638
624
|
<xsl:text> </xsl:text>
|
639
625
|
<fo:inline>
|
640
|
-
<fo:leader
|
641
|
-
<fo:inline
|
626
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
627
|
+
<fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
642
628
|
</fo:inline>
|
643
629
|
</fo:basic-link>
|
644
630
|
</fo:block>
|
@@ -676,7 +662,7 @@
|
|
676
662
|
</xsl:template>
|
677
663
|
|
678
664
|
<xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
679
|
-
<fo:block
|
665
|
+
<fo:block xsl:use-attribute-sets="toc-title-style">
|
680
666
|
<!-- <xsl:call-template name="getLocalizedString">
|
681
667
|
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
682
668
|
</xsl:call-template> -->
|
@@ -6366,6 +6352,16 @@
|
|
6366
6352
|
</xsl:variable>
|
6367
6353
|
<xsl:variable name="quot">"</xsl:variable>
|
6368
6354
|
<xsl:variable name="styles_">
|
6355
|
+
<!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
|
6356
|
+
<xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
|
6357
|
+
<style name="border-top">none</style>
|
6358
|
+
<style name="border-right">none</style>
|
6359
|
+
<style name="border-left">none</style>
|
6360
|
+
<style name="border-bottom">none</style>
|
6361
|
+
<style name="color">inherit</style>
|
6362
|
+
<style name="background-color">transparent</style>
|
6363
|
+
</xsl:if>
|
6364
|
+
|
6369
6365
|
<xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
|
6370
6366
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
6371
6367
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
@@ -8372,7 +8368,10 @@
|
|
8372
8368
|
|
8373
8369
|
<xsl:call-template name="setNamedDestination"/>
|
8374
8370
|
|
8375
|
-
<fo:block-container
|
8371
|
+
<fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
|
8372
|
+
<xsl:if test="not(parent::mn:references)">
|
8373
|
+
<xsl:copy-of select="@id"/>
|
8374
|
+
</xsl:if>
|
8376
8375
|
|
8377
8376
|
<xsl:call-template name="setBlockSpanAll"/>
|
8378
8377
|
|
@@ -11072,8 +11071,8 @@
|
|
11072
11071
|
</xsl:template> <!-- bibitem -->
|
11073
11072
|
|
11074
11073
|
<!-- Bibliography (non-normative references) -->
|
11075
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
11076
|
-
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11074
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
|
11075
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11077
11076
|
<xsl:call-template name="setNamedDestination"/>
|
11078
11077
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
11079
11078
|
<fo:list-item>
|
@@ -11090,6 +11089,7 @@
|
|
11090
11089
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
11091
11090
|
</xsl:apply-templates>
|
11092
11091
|
<xsl:apply-templates select="mn:formattedref"/>
|
11092
|
+
<xsl:call-template name="processBibliographyNote"/>
|
11093
11093
|
</fo:block>
|
11094
11094
|
</fo:list-item-body>
|
11095
11095
|
</fo:list-item>
|
@@ -11123,7 +11123,7 @@
|
|
11123
11123
|
</fo:list-item>
|
11124
11124
|
</xsl:otherwise>
|
11125
11125
|
</xsl:choose>
|
11126
|
-
<xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]
|
11126
|
+
<xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
|
11127
11127
|
<xsl:with-param name="skip">false</xsl:with-param>
|
11128
11128
|
</xsl:apply-templates>
|
11129
11129
|
</xsl:template>
|
@@ -11140,8 +11140,26 @@
|
|
11140
11140
|
</xsl:apply-templates>
|
11141
11141
|
<xsl:apply-templates select="mn:formattedref"/>
|
11142
11142
|
<!-- end bibitem processing -->
|
11143
|
+
|
11144
|
+
<xsl:call-template name="processBibliographyNote"/>
|
11143
11145
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
11144
11146
|
|
11147
|
+
<xsl:template name="processBibliographyNote">
|
11148
|
+
<xsl:if test="self::mn:note">
|
11149
|
+
<xsl:variable name="note_node">
|
11150
|
+
<xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
|
11151
|
+
<xsl:copy> <!-- skip @id -->
|
11152
|
+
<xsl:copy-of select="node()"/>
|
11153
|
+
</xsl:copy>
|
11154
|
+
</xsl:element>
|
11155
|
+
</xsl:variable>
|
11156
|
+
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
11157
|
+
<xsl:call-template name="note"/>
|
11158
|
+
</xsl:for-each> -->
|
11159
|
+
<xsl:call-template name="note"/>
|
11160
|
+
</xsl:if>
|
11161
|
+
</xsl:template>
|
11162
|
+
|
11145
11163
|
<xsl:template match="mn:title" mode="title">
|
11146
11164
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
11147
11165
|
</xsl:template>
|
@@ -11687,6 +11705,83 @@
|
|
11687
11705
|
<!-- End Form's elements processing -->
|
11688
11706
|
<!-- =================== -->
|
11689
11707
|
|
11708
|
+
<xsl:attribute-set name="toc-style">
|
11709
|
+
<xsl:attribute name="margin-left">32mm</xsl:attribute>
|
11710
|
+
<xsl:attribute name="margin-right">-17mm</xsl:attribute>
|
11711
|
+
</xsl:attribute-set>
|
11712
|
+
|
11713
|
+
<xsl:template name="refine_toc-style">
|
11714
|
+
</xsl:template>
|
11715
|
+
|
11716
|
+
<xsl:attribute-set name="toc-title-style">
|
11717
|
+
<xsl:attribute name="role">H1</xsl:attribute>
|
11718
|
+
<xsl:attribute name="font-size">27pt</xsl:attribute>
|
11719
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11720
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
11721
|
+
<xsl:attribute name="margin-left">-15mm</xsl:attribute>
|
11722
|
+
<xsl:attribute name="margin-bottom">13mm</xsl:attribute>
|
11723
|
+
</xsl:attribute-set>
|
11724
|
+
|
11725
|
+
<xsl:attribute-set name="toc-title-page-style">
|
11726
|
+
</xsl:attribute-set> <!-- toc-title-page-style -->
|
11727
|
+
|
11728
|
+
<xsl:attribute-set name="toc-item-block-style">
|
11729
|
+
</xsl:attribute-set>
|
11730
|
+
|
11731
|
+
<xsl:template name="refine_toc-item-block-style">
|
11732
|
+
</xsl:template>
|
11733
|
+
|
11734
|
+
<xsl:attribute-set name="toc-item-style">
|
11735
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11736
|
+
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
11737
|
+
</xsl:attribute-set> <!-- END: toc-item-style -->
|
11738
|
+
|
11739
|
+
<xsl:template name="refine_toc-item-style">
|
11740
|
+
<xsl:if test="@level = 1">
|
11741
|
+
<xsl:if test="preceding-sibling::mnx:item[@display = 'true' and @level = 1]">
|
11742
|
+
<xsl:attribute name="space-before">16pt</xsl:attribute>
|
11743
|
+
</xsl:if>
|
11744
|
+
<xsl:attribute name="space-after">4pt</xsl:attribute>
|
11745
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11746
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11747
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
11748
|
+
</xsl:if>
|
11749
|
+
<xsl:if test="@level >= 2">
|
11750
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * 16.5"/>mm</xsl:attribute>
|
11751
|
+
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
11752
|
+
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
11753
|
+
</xsl:if>
|
11754
|
+
</xsl:template> <!-- END: refine_toc-item-style -->
|
11755
|
+
|
11756
|
+
<xsl:attribute-set name="toc-leader-style">
|
11757
|
+
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
11758
|
+
<xsl:attribute name="rule-thickness">0.2mm</xsl:attribute>
|
11759
|
+
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
11760
|
+
|
11761
|
+
<xsl:attribute-set name="toc-pagenumber-style">
|
11762
|
+
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
11763
|
+
</xsl:attribute-set>
|
11764
|
+
|
11765
|
+
<!-- List of Figures, Tables -->
|
11766
|
+
<xsl:attribute-set name="toc-listof-title-style">
|
11767
|
+
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
11768
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11769
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
11770
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
11771
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
11772
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11773
|
+
</xsl:attribute-set>
|
11774
|
+
|
11775
|
+
<xsl:attribute-set name="toc-listof-item-block-style">
|
11776
|
+
</xsl:attribute-set>
|
11777
|
+
|
11778
|
+
<xsl:attribute-set name="toc-listof-item-style">
|
11779
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11780
|
+
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
11781
|
+
<xsl:attribute name="margin-left">16.5mm</xsl:attribute>
|
11782
|
+
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
11783
|
+
</xsl:attribute-set>
|
11784
|
+
|
11690
11785
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
11691
11786
|
<xsl:variable name="nodes_preface_">
|
11692
11787
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -198,14 +198,14 @@ Applicable to modify and delete</a:documentation>
|
|
198
198
|
</zeroOrMore>
|
199
199
|
</element>
|
200
200
|
</optional>
|
201
|
-
<
|
201
|
+
<zeroOrMore>
|
202
202
|
<element name="description">
|
203
|
-
<a:documentation>Description of the change described in this block</a:documentation>
|
204
|
-
<
|
203
|
+
<a:documentation>Description(s) of the change described in this block</a:documentation>
|
204
|
+
<oneOrMore>
|
205
205
|
<ref name="BasicBlock"/>
|
206
|
-
</
|
206
|
+
</oneOrMore>
|
207
207
|
</element>
|
208
|
-
</
|
208
|
+
</zeroOrMore>
|
209
209
|
<optional>
|
210
210
|
<element name="newcontent">
|
211
211
|
<a:documentation>New content to be added to the document; applicable to add and modify</a:documentation>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- VERSION v2.0
|
3
|
+
<!-- VERSION v2.1.0 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -735,6 +735,12 @@ titlecase, or lowercase</a:documentation>
|
|
735
735
|
<ref name="BlockAttributes"/>
|
736
736
|
</define>
|
737
737
|
<define name="TableAttributes" combine="interleave">
|
738
|
+
<optional>
|
739
|
+
<attribute name="plain">
|
740
|
+
<a:documentation>Render as a plain attribute, with no shading or borders</a:documentation>
|
741
|
+
<data type="boolean"/>
|
742
|
+
</attribute>
|
743
|
+
</optional>
|
738
744
|
<optional>
|
739
745
|
<attribute name="width">
|
740
746
|
<a:documentation>Width of the table block in rendering</a:documentation>
|
data/metanorma-ribose.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.0
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 3.1.0"
|
33
33
|
|
34
34
|
spec.add_development_dependency "debug"
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ribose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
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-07-
|
11
|
+
date: 2025-07-21 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.0
|
19
|
+
version: 3.1.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.0
|
26
|
+
version: 3.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|