metanorma-ribose 2.5.5 → 2.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/base_convert.rb +6 -2
- data/lib/isodoc/ribose/presentation_xml_convert.rb +16 -8
- data/lib/isodoc/ribose/ribose.standard.xsl +695 -183
- data/lib/isodoc/ribose/xref.rb +34 -3
- data/lib/metanorma/ribose/biblio.rng +13 -1
- data/lib/metanorma/ribose/isodoc.rng +6 -6
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +4 -4
data/lib/isodoc/ribose/xref.rb
CHANGED
@@ -6,7 +6,8 @@ module IsoDoc
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class Xref < IsoDoc::Generic::Xref
|
9
|
-
|
9
|
+
# KILL
|
10
|
+
def annex_name_lblx(clause, num)
|
10
11
|
obl = l10n("(#{@labels['inform_annex']})")
|
11
12
|
clause["obligation"] == "normative" and
|
12
13
|
obl = l10n("(#{@labels['norm_annex']})")
|
@@ -28,7 +29,8 @@ module IsoDoc
|
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
31
|
-
|
32
|
+
# KILL
|
33
|
+
def section_names1x(clause, num, level)
|
32
34
|
@anchors[clause["id"]] =
|
33
35
|
{ label: num, level: level, xref: num }
|
34
36
|
# subclauses are not prefixed with "Clause"
|
@@ -39,8 +41,25 @@ module IsoDoc
|
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
44
|
+
# subclauses are not prefixed with "Clause"
|
45
|
+
# retaining subtype for the semantics
|
46
|
+
def section_name_anchors(clause, num, level)
|
47
|
+
if clause["type"] == "section"
|
48
|
+
xref = labelled_autonum(@labels["section"], num)
|
49
|
+
label = labelled_autonum(@labels["section"], num)
|
50
|
+
@anchors[clause["id"]] =
|
51
|
+
{ label:, xref:, elem: @labels["section"],
|
52
|
+
title: clause_title(clause), level: level, type: "clause" }
|
53
|
+
elsif level > 1
|
54
|
+
#num = semx(clause, num)
|
55
|
+
@anchors[clause["id"]] =
|
56
|
+
{ label: num, level: level, xref: num, subtype: "clause" }
|
57
|
+
else super end
|
58
|
+
end
|
59
|
+
|
42
60
|
# we can reference 0-number clauses in introduction
|
43
|
-
|
61
|
+
# # KILL
|
62
|
+
def introduction_namesx(clause)
|
44
63
|
clause.nil? and return
|
45
64
|
clause.at(ns("./clause")) and
|
46
65
|
@anchors[clause["id"]] = { label: "0", level: 1, type: "clause",
|
@@ -49,6 +68,18 @@ module IsoDoc
|
|
49
68
|
clause.xpath(ns("./clause")).each do |c|
|
50
69
|
section_names1(c, i.increment(c).print, 2)
|
51
70
|
end
|
71
|
+
end
|
72
|
+
# we can reference 0-number clauses in introduction
|
73
|
+
def introduction_names(clause)
|
74
|
+
clause.nil? and return
|
75
|
+
clause.at(ns("./clause")) and
|
76
|
+
@anchors[clause["id"]] = { label: nil, level: 1, type: "clause",
|
77
|
+
xref: clause.at(ns("./title"))&.text }
|
78
|
+
#i = Counter.new(0, prefix: "0")
|
79
|
+
i = Counter.new(0)
|
80
|
+
clause.xpath(ns("./clause")).each do |c|
|
81
|
+
section_names1(c, semx(clause, "0"), i.increment(c).print, 2)
|
82
|
+
end
|
52
83
|
end
|
53
84
|
end
|
54
85
|
end
|
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
|
|
1783
1783
|
May be used to differentiate rendering of notes in bibliographies</a:documentation>
|
1784
1784
|
</attribute>
|
1785
1785
|
</optional>
|
1786
|
-
<ref name="
|
1786
|
+
<ref name="LocalizedStringAttributes">
|
1787
1787
|
<a:documentation>The content of the note</a:documentation>
|
1788
1788
|
</ref>
|
1789
|
+
<choice>
|
1790
|
+
<oneOrMore>
|
1791
|
+
<ref name="BasicBlockNoId">
|
1792
|
+
<a:documentation>Multiple blocks of content</a:documentation>
|
1793
|
+
</ref>
|
1794
|
+
</oneOrMore>
|
1795
|
+
<oneOrMore>
|
1796
|
+
<ref name="TextElement">
|
1797
|
+
<a:documentation>Single block of content</a:documentation>
|
1798
|
+
</ref>
|
1799
|
+
</oneOrMore>
|
1800
|
+
</choice>
|
1789
1801
|
</element>
|
1790
1802
|
</define>
|
1791
1803
|
<define name="bibabstract">
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.
|
20
|
+
<!-- VERSION v1.4.1 -->
|
21
21
|
<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">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
|
|
326
326
|
<a:documentation>Content of note</a:documentation>
|
327
327
|
<oneOrMore>
|
328
328
|
<choice>
|
329
|
-
<ref name="paragraph"/>
|
329
|
+
<ref name="paragraph-with-footnote"/>
|
330
330
|
<ref name="ul"/>
|
331
331
|
<ref name="ol"/>
|
332
332
|
<ref name="dl"/>
|
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
|
|
412
412
|
<element name="note">
|
413
413
|
<ref name="OptionalId"/>
|
414
414
|
<oneOrMore>
|
415
|
-
<ref name="paragraph"/>
|
415
|
+
<ref name="paragraph-with-footnote"/>
|
416
416
|
</oneOrMore>
|
417
417
|
</element>
|
418
418
|
</define>
|
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
|
|
1977
1977
|
<oneOrMore>
|
1978
1978
|
<choice>
|
1979
1979
|
<a:documentation>Content of the verbal representation of the term</a:documentation>
|
1980
|
-
<ref name="paragraph"/>
|
1980
|
+
<ref name="paragraph-with-footnote"/>
|
1981
1981
|
<ref name="dl"/>
|
1982
1982
|
<ref name="ol"/>
|
1983
1983
|
<ref name="ul"/>
|
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
|
|
2015
2015
|
<oneOrMore>
|
2016
2016
|
<choice>
|
2017
2017
|
<a:documentation>Content of the term note</a:documentation>
|
2018
|
-
<ref name="paragraph"/>
|
2018
|
+
<ref name="paragraph-with-footnote"/>
|
2019
2019
|
<ref name="ul"/>
|
2020
2020
|
<ref name="ol"/>
|
2021
2021
|
<ref name="dl"/>
|
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
|
|
2037
2037
|
<ref name="dl"/>
|
2038
2038
|
<ref name="quote"/>
|
2039
2039
|
<ref name="sourcecode"/>
|
2040
|
-
<ref name="paragraph"/>
|
2040
|
+
<ref name="paragraph-with-footnote"/>
|
2041
2041
|
<ref name="figure"/>
|
2042
2042
|
</choice>
|
2043
2043
|
</oneOrMore>
|
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", "~> 2.7.
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 2.7.4"
|
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.5.
|
4
|
+
version: 2.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10
|
11
|
+
date: 2024-12-10 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: 2.7.
|
19
|
+
version: 2.7.4
|
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: 2.7.
|
26
|
+
version: 2.7.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|