metanorma-iso 3.4.1 → 3.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 280ddeefbca35755cc0324649f4f554fca30120dcb8d901740d0dbd7baa0e0f8
4
- data.tar.gz: 81b5b54c4105074d822bced3f25d9a005c3f58c7ddeb47449184594605e57d47
3
+ metadata.gz: 9929b1cb4a3a27bc2d67e5cc35208ce6c0cde2edfcf610819b52431664a6d6e1
4
+ data.tar.gz: 1387bd4a7a70668aa172c398ef68e1ec7382742ae81d929e92925974be424526
5
5
  SHA512:
6
- metadata.gz: 1fda52f6d5031ee446362525af0de04ec2551375007a1a76b0e9226b41ad4b41fa216d113f80a9ed317c140fcc5a5a44323c23801a8608fe6847213f24df7829
7
- data.tar.gz: 15efc546555858005e2a4128244dce03bed7f93dc6aac9631e143e84269757f40ddc687be8c9b3c7322ebf112a5b96fee127252024a107a4aa096a351930dc31
6
+ metadata.gz: 39a5747db6618a81b7e0785edbf83c3e9bec40fdf11c7b51bf40eeb8f21e60a12acd50f6f1189eea94dd291b848174b83e354adeddc28d35b7c4bccbeb792f46
7
+ data.tar.gz: fc1a91e0703ecda60bf4e92b6528e5f6c1205675ad5b1b7daa20264154c4e0844c4ef53a141279b98e1bcad39e49eff22d481fffb6ff639889ce88989faea35e
@@ -99,20 +99,8 @@ module IsoDoc
99
99
  end
100
100
  end
101
101
 
102
- def table_parse(node, out)
103
- @in_table = true
104
- out.table(**table_attrs(node)) do |t|
105
- table_title_parse(node, t)
106
- table_parse_core(node, t)
107
- table_parse_tail(node, t)
108
- end
109
- @in_table = false
110
- end
111
-
112
102
  def table_title_parse(node, out)
113
- name = node.at(ns("./fmt-name"))
114
- summ = node["summary"]
115
- meas = node.at(ns("./note[@type = 'units']"))
103
+ name, summ, meas = table_title_parse_prep(node)
116
104
  name || summ || meas or return
117
105
  out.caption do |p|
118
106
  children_parse(name, p)
@@ -123,14 +111,16 @@ module IsoDoc
123
111
  end
124
112
  end
125
113
 
126
- def table_parse_tail(node, out)
127
- (key = node.at(ns("./key"))) && parse(key, out)
128
- node.xpath(ns("./fmt-source")).each { |n| parse(n, out) }
129
- node.xpath(ns("./note[not(@type = 'units')]")).each do |n|
130
- parse(n, out)
131
- end
132
- node.xpath(ns("./fmt-footnote-container/fmt-fn-body"))
133
- .each { |n| parse(n, out) }
114
+ def table_title_parse_prep(node)
115
+ name = node.at(ns("./fmt-name"))
116
+ summ = node["summary"]
117
+ meas = node.at(ns("./note[@type = 'units']"))
118
+ [name, summ, meas]
119
+ end
120
+
121
+ def table_parse_tail_elems
122
+ ["./key", "./fmt-source", "./note[not(@type = 'units')]",
123
+ "./fmt-footnote-container/fmt-fn-body"]
134
124
  end
135
125
 
136
126
  def figure_parse1(node, out)
@@ -5,7 +5,7 @@ module IsoDoc
5
5
  class Metadata < IsoDoc::Metadata
6
6
  def initialize(lang, script, locale, i18n)
7
7
  super
8
- DATETYPES.each { |w| @metadata["#{w.gsub(/-/, '_')}date".to_sym] = nil }
8
+ DATETYPES.each { |w| @metadata[:"#{w.gsub('-', '_')}date"] = nil }
9
9
  set(:obsoletes, nil)
10
10
  set(:obsoletes_part, nil)
11
11
  end
@@ -24,11 +24,12 @@ module IsoDoc
24
24
  def docstatus(isoxml, _out)
25
25
  docstatus = isoxml.at(ns("//bibdata/status/stage"))
26
26
  published = published_default(isoxml)
27
- revdate = isoxml.at(ns("//bibdata/version/revision-date"))
27
+ revdate = isoxml.at(ns("//bibdata/date[@type='updated']"))
28
28
  set(:revdate, revdate&.text)
29
29
  docstatus and docstatus1(isoxml, docstatus, published)
30
30
  docscheme = get[:"presentation_metadata_document-scheme"]
31
- docscheme && !docscheme.empty? and set(:document_scheme, docscheme.first)
31
+ docscheme && !docscheme.empty? and set(:document_scheme,
32
+ docscheme.first)
32
33
  end
33
34
 
34
35
  def docstatus1(isoxml, docstatus, published)
@@ -39,7 +40,7 @@ module IsoDoc
39
40
  status_abbrev(docstatus["abbreviation"] || "??",
40
41
  isoxml.at(ns("//bibdata/status/substage"))&.text,
41
42
  isoxml.at(ns("//bibdata/status/iteration"))&.text,
42
- isoxml.at(ns("//bibdata/version/draft"))&.text,
43
+ isoxml.at(ns("//bibdata/version"))&.text,
43
44
  isoxml.at(ns("//bibdata/ext/doctype"))&.text))
44
45
  !published and set(:stageabbr, docstatus["abbreviation"])
45
46
  end
@@ -67,8 +68,8 @@ module IsoDoc
67
68
  end
68
69
 
69
70
  def title_part_prefix(xml, part, lang)
70
- t = xml.at(ns("//bibdata/title[@language='#{lang}']"\
71
- "[@type='title-#{part}-prefix']")) or return
71
+ t = xml.at(ns("//bibdata/title[@language='#{lang}']" \
72
+ "[@type='title-#{part}-prefix']")) or return
72
73
  to_xml(t.children)
73
74
  end
74
75
 
@@ -97,7 +98,7 @@ module IsoDoc
97
98
  def title_parts(isoxml, lang)
98
99
  %w(intro main complementary part amd add).each_with_object({}) do |w, m|
99
100
  m[w.to_sym] = isoxml.at(ns("//bibdata/title[@type='title-#{w}' and " \
100
- "@language='#{lang}']"))
101
+ "@language='#{lang}']"))
101
102
  end
102
103
  end
103
104
 
@@ -164,7 +165,7 @@ module IsoDoc
164
165
  end
165
166
 
166
167
  COMMITTEE = "//bibdata/contributor[role/@type = 'author'] " \
167
- "[role/description = 'committee']/organization".freeze
168
+ "[role/description = 'committee']/organization".freeze
168
169
 
169
170
  def tc_base(xml, _grouptype)
170
171
  s = xml.at(ns("#{COMMITTEE}/subdivision[@type = 'Technical committee']"))
@@ -208,8 +209,8 @@ module IsoDoc
208
209
 
209
210
  def secretariat(xml)
210
211
  sec = xml.at(ns("//bibdata/contributor[role/@type = 'author']" \
211
- "[role/description = 'secretariat']/organization/subdivision" \
212
- "[@type = 'Secretariat']/name"))
212
+ "[role/description = 'secretariat']/organization/subdivision" \
213
+ "[@type = 'Secretariat']/name"))
213
214
  set(:secretariat, sec.text) if sec
214
215
  end
215
216
 
@@ -20,8 +20,7 @@ module IsoDoc
20
20
  docxml.at(ns("//bibdata//contributor/role[description = 'committee']")) or
21
21
  ret += "<p>Editorial groups are missing.</p>"
22
22
  docxml.at(ns("//bibdata/date[@type = 'published' or @type = 'issued' " \
23
- "or @type = 'created']")) ||
24
- docxml.at(ns("//bibdata/version/revision-date")) or
23
+ "or @type = 'created' or @type = 'updated']")) or
25
24
  ret += "<p>Document date is missing.</p>"
26
25
  ret
27
26
  end
@@ -234,15 +234,6 @@ module IsoDoc
234
234
  @in_table = false
235
235
  end
236
236
 
237
- def table_parse_tail(node, out)
238
- (key = node.at(ns("./key"))) && parse(key, out)
239
- node.xpath(ns("./fmt-source")).each { |n| parse(n, out) }
240
- node.xpath(ns("./note[not(@type = 'units')]"))
241
- .each { |n| parse(n, out) }
242
- node.xpath(ns("./fmt-footnote-container/fmt-fn-body"))
243
- .each { |n| parse(n, out) }
244
- end
245
-
246
237
  def admonition_class(node)
247
238
  if node["type"] == "editorial" then "zzHelp"
248
239
  else super
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "3.4.1".freeze
3
+ VERSION = "3.4.2".freeze
4
4
  end
5
5
  end
@@ -7,8 +7,10 @@ module Metanorma
7
7
  def create(type)
8
8
  case type
9
9
  when :modspec, :ogc
10
- ::Metanorma::Requirements::Modspec::Iso.new(parent: self)
11
- else ::Metanorma::Requirements::Default.new(parent: self)
10
+ ::Metanorma::Requirements::Modspec::Iso.new(parent: self,
11
+ isodoc: @isodoc)
12
+ else ::Metanorma::Requirements::Default.new(parent: self,
13
+ isodoc: @isodoc)
12
14
  end
13
15
  end
14
16
  end
@@ -32,13 +32,13 @@ Gem::Specification.new do |spec|
32
32
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
33
33
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
34
34
 
35
- spec.add_dependency "metanorma-standoc", "~> 3.4.0"
35
+ spec.add_dependency "metanorma-standoc", "~> 3.4.2"
36
36
  spec.add_dependency "mnconvert", "~> 1.14"
37
37
  spec.add_dependency "pubid"
38
38
  spec.add_dependency "tokenizer", "~> 0.3.0"
39
39
 
40
40
  spec.add_development_dependency "benchmark"
41
- spec.add_development_dependency "canon", "= 0.2.3"
41
+ spec.add_development_dependency "canon" #, "= 0.2.3"
42
42
  spec.add_development_dependency "debug"
43
43
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
44
44
  spec.add_development_dependency "guard", "~> 2.14"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-27 00:00:00.000000000 Z
11
+ date: 2026-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.0
19
+ version: 3.4.2
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.4.0
26
+ version: 3.4.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mnconvert
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: canon
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.2.3
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.2.3
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: debug
99
99
  requirement: !ruby/object:Gem::Requirement