metanorma-iso 3.5.1.pre.alpha.3 → 3.5.1.pre.alpha.4

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: 1306f4c805082722af45637dbd1a6810fd28182faa12083cbeed2cce4d8612dd
4
- data.tar.gz: 78c9aee60860105683e44db5106d86af7346ffb8d02930fbbcad49f075718d0d
3
+ metadata.gz: 743661292939ee8527d318189cc5078605b168f5320358d7648b10c9c730fda4
4
+ data.tar.gz: 648a0397c58c6106979298e2cb7e19b23314ec5bab76b36ece1ba6b8cc5e5649
5
5
  SHA512:
6
- metadata.gz: 045073eba878008f3b53f3b4e6bba9e4e3580a99b5d5cadd77e29b0fd9f36cf5ade6c21e8055c3c9f32c14f0be7bfb7134a6389da867fec44cdb30e75d1bbb24
7
- data.tar.gz: 68c3c2381ef72fe534d95e29172a3c369dc3d38af884f88987fef3919bf0f0cb7cef22fe6825daab011a9eea7185a2b2d3b46716da2571f3c3bfaa5e3da87a86
6
+ metadata.gz: 8ef7060608d4b3459fb57d6cca90612de8fb5f045372aee9c4d1a104f12fab29567c5604f3d0b46c2364814fe6301a1ce9bb0bcf20728c02960c79f650732a53
7
+ data.tar.gz: 87032d0839ea375fef716993c732db6aa15e26716f05de2a739859b1a6425009e6d0dc858502398b3504f86c78305f3d51fdee77ee4e9a1b53c47ca96f1237ea
data/Gemfile CHANGED
@@ -2,27 +2,16 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
  gem "metanorma-mirror", "~> 1.0", github: "metanorma/metanorma-mirror", branch: "main"
5
- # The family prerelease the CitationStyle port targets; the floor pin
6
- # names it for resolution (isodoc's range alone is prerelease-blind).
7
- gem "relaton", "~> 3.0.0.pre.alpha"
5
+ gem "relaton", "~> 3.0"
8
6
 
9
7
  gem "canon"
10
- # isodoc main carries the relaton-render >= 1.3.0, < 1.5.0 range (#846)
11
- # that the relaton 3 prerelease chain co-resolves with; the released
12
- # 3.7.3 still pins ~> 1.3.0 and conflicts. Revert to the gem once an
13
- # isodoc release carries #846.
14
- gem "isodoc", github: "metanorma/isodoc", branch: "main"
8
+ gem "isodoc", "~> 3.7.4.pre.alpha" # carries the relaton-render range #846
15
9
  # plugin-lutaml main carries LutamlDataPreprocessor (registered by
16
10
  # standoc main's converter); released 0.7.53 does not define it yet.
17
11
  gem "metanorma-plugin-lutaml", github: "metanorma/metanorma-plugin-lutaml", branch: "main"
18
- gem "metanorma-utils", "~> 2.0.8" # GcBudget + the array-join table cell buffer, released in 2.0.8, github: "metanorma/metanorma-utils", branch: "main"
19
- # standoc main carries the Metanorma::Standoc::Document split and the
20
- # pubid-dispatch refs world (1251/1252/1267/1268); the released 3.5.0
21
- # gem does not define Standoc::Document yet. Revert to the gem once a
22
- # standoc release carries it.
23
- gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"# metanorma-document main carries the relaton-bib 2.2.0.pre allowance;
24
- # the released 0.5.1 does not yet, so the pin stays until that release.
25
- gem "metanorma-document", github: "metanorma/metanorma-document", branch: "main"
12
+ gem "metanorma-utils", "~> 2.0" # GcBudget + the array-join table cell buffer
13
+ gem "metanorma-standoc", "~> 3.5.1.pre.alpha" # Standoc::Document split + the pubid-dispatch refs world
14
+ gem "metanorma-document", "~> 0.5.2.pre.alpha" # relaton-bib 2.2.0.pre allowance
26
15
  gem "rake"
27
16
  # relaton-bib 2.2.0.pre is the pubid-2-native line required by
28
17
  # metanorma-document 0.4.0.
@@ -33,7 +22,7 @@ gem "simplecov"
33
22
  gem "timecop"
34
23
  gem "webmock"
35
24
  gem "uniword", path: "../uniword" if File.exist?(File.expand_path("../uniword/Gemfile", __dir__))
36
- gem "lutaml-model", path: "../../lutaml/lutaml-model" if File.exist?(File.expand_path("../../lutaml/lutaml-model/Gemfile", __dir__))
25
+ gem "lutaml-model", "~> 0.8"
37
26
  # html2doc >= 1.12 is required for correct OMML math handling in Word output
38
27
  # (isodoc main also pins ~> 1.12).
39
28
  gem "html2doc", "~> 1.12.0"
@@ -11,7 +11,7 @@ module IsoDoc
11
11
  concept_term(docxml)
12
12
  (docxml.xpath(ns("//concept")) - docxml.xpath(ns("//term//concept")))
13
13
  .each do |node|
14
- node.ancestors("definition, source, related").empty? and
14
+ in_concept_container?(node) and
15
15
  concept_render(node, ital: "false", ref: "false",
16
16
  linkref: "true", linkmention: "false")
17
17
  end
@@ -22,12 +22,25 @@ module IsoDoc
22
22
  m = {}
23
23
  (f.xpath(ns(".//concept")) - f.xpath(ns(".//term//concept")))
24
24
  .each do |c|
25
- c.ancestors("definition, source, related").empty? and
25
+ in_concept_container?(c) and
26
26
  concept_term1(c, m)
27
27
  end
28
28
  end
29
29
  end
30
30
 
31
+ # Node#ancestors(selector) runs an XPath match per ancestor; with
32
+ # this called per concept on deeply nested terms it is quadratic on
33
+ # large vocabularies. Walk parents directly instead.
34
+ def in_concept_container?(node)
35
+ parent = node.parent
36
+ while parent.is_a?(Nokogiri::XML::Element)
37
+ return true if %w[definition source related].include?(parent.name)
38
+
39
+ parent = parent.parent
40
+ end
41
+ false
42
+ end
43
+
31
44
  def concept_term1(node, seen)
32
45
  term = to_xml(node.at(ns("./refterm")))
33
46
  if term && seen[term]
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "3.5.1.pre.alpha.3".freeze
3
+ VERSION = "3.5.1.pre.alpha.4".freeze
4
4
  end
5
5
  end
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.5.1.pre.alpha.3
4
+ version: 3.5.1.pre.alpha.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-27 00:00:00.000000000 Z
11
+ date: 2026-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-document