metanorma-standoc 3.5.2 → 3.5.3

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: 7b54f086d63d7b8347f096a85f3fbeb80d3f8ac020361e5a76a24021477a19bb
4
- data.tar.gz: c692f65b9e5502326a88df11aeec4ff2f9a472252f58066d0895c71ed735c26b
3
+ metadata.gz: 8808acd759aa7b130b2afb79e10a7299f28ac19ee9049f4f85ccf564a6658f39
4
+ data.tar.gz: 916fee107a523cf51a52145ba024471d6556d8eb4e721165ce5965295414199f
5
5
  SHA512:
6
- metadata.gz: 8bddb1e65d7ee8f3fd9a45743893bab9d0aed3fe3f86037d7b3bd78372d9e393b41c1872e1a31d69c593c255c4e5f94caa61f66abe4c8eb34291ec58c6202791
7
- data.tar.gz: be777df6d608783776b699bbe53567d076197c04a5d217df3e2fe2bc7322c54627700e5d5618e2bedc3e7a0fa82138af0b121fcbd52313f312d3b94659ff3b27
6
+ metadata.gz: 55f619f67cd98e47a859a0b82a1215639a517288a25f89d09369ac8bef187b86ad13bebbe98443f9d79b646cad0fece4568a286ee35d4df5399c4a259ea6a264
7
+ data.tar.gz: 2dacb944bce0af6d09f0fdea02c23664e859e6ddf8afa49295fe88f2b3ca72babf53aedea99218e678191f79d8ef32c471ac685e1e3f4e7f9cf2746b55558356
@@ -8,7 +8,7 @@ module Metanorma
8
8
  class StructuredIdentifierType < Lutaml::Model::Serializable
9
9
  attribute :type, :string
10
10
  attribute :agency, :string, collection: true
11
- attribute :class, :string
11
+ attribute :identifier_class, :string
12
12
  attribute :docnumber, :string
13
13
  attribute :partnumber, :string
14
14
  attribute :edition, :string
@@ -27,7 +27,7 @@ module Metanorma
27
27
  element "structuredidentifier"
28
28
  map_attribute "type", to: :type
29
29
  map_element "agency", to: :agency
30
- map_attribute "class", to: :class
30
+ map_attribute "class", to: :identifier_class
31
31
  map_attribute "docnumber", to: :docnumber
32
32
  map_attribute "partnumber", to: :partnumber
33
33
  map_attribute "edition", to: :edition
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "3.5.2".freeze
22
+ VERSION = "3.5.3".freeze
23
23
  end
24
24
  end
@@ -92,7 +92,7 @@ module Metanorma
92
92
  ret = doc.xpath("//term").each_with_object({}) do |t, m|
93
93
  prefix = t.at("./domain")&.text
94
94
  t.xpath("./preferred//name").each do |n|
95
- ret = n.text
95
+ ret = designation_text(n)
96
96
  prefix and ret = "<#{prefix}> #{ret}"
97
97
  m[ret] ||= []
98
98
  m[ret] << t
@@ -101,6 +101,16 @@ module Metanorma
101
101
  preferred_validate_report(ret)
102
102
  end
103
103
 
104
+ # The designation text excludes nested index entries: <name> carries
105
+ # an <index><primary> duplicate of its own text, and counting that
106
+ # text doubled every designation ("Term abstract test methodabstract
107
+ # test method occurs twice...", metanorma-iso#1681).
108
+ def designation_text(name)
109
+ name = name.dup
110
+ name.xpath("./index").each(&:remove)
111
+ name.text
112
+ end
113
+
104
114
  def preferred_validate_report(terms)
105
115
  terms.each do |k, v|
106
116
  v.size > 1 or next
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-standoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.2
4
+ version: 3.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.