metanorma-ribose 2.5.6 → 2.5.9
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 +615 -193
- data/lib/isodoc/ribose/xref.rb +34 -3
- data/lib/metanorma/ribose/isodoc.rng +1 -1
- 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
|
@@ -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.4.
|
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">
|
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.9
|
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-
|
11
|
+
date: 2024-12-23 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
|