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.
@@ -6,7 +6,8 @@ module IsoDoc
6
6
  end
7
7
 
8
8
  class Xref < IsoDoc::Generic::Xref
9
- def annex_name_lbl(clause, num)
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
- def section_names1(clause, num, level)
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
- def introduction_names(clause)
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.0 -->
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">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.5.6".freeze
3
+ VERSION = "2.5.9".freeze
4
4
  end
5
5
  end
@@ -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.2"
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.6
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-11 00:00:00.000000000 Z
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.2
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.2
26
+ version: 2.7.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement