isodoc 2.9.1 → 2.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0149f799d8ea0aa613aa3544453d23ddd0a0451a2b3e3efa047772e16cf2db46'
4
- data.tar.gz: 606b9ababc9d0ebb5b7c1b11d225a752440379ae093d09f208f45ec0f9d3f4b5
3
+ metadata.gz: 6490ec54ec083e91ab1ccc941676b95d52d3cef3f9b7675e2900e47c1763e47a
4
+ data.tar.gz: f5190668941e4f42990f024a3852007f3d2a6accfef80e6d242208c814ffe0d0
5
5
  SHA512:
6
- metadata.gz: 5aa94e7ae2178b5ae01b3f55a6f7209439fb6dc82b001531ccc799352e06d711fd63ee589a657e50022cde1b1b27ba8df857ef078ee2f187a41ad77f1abcca65
7
- data.tar.gz: 2922340ef73f00c1b5d48e45fd28371da9e10dc55d4e4858ea67db1ed01189c6f4555386ed8e26e8f1951e41504d1ec3da39b9aee1b154b4f99df617185152ea
6
+ metadata.gz: fb67b78f6de41bcf847ff4bf5846261b54dc9eed3e6ac755d2b13186ee70c4dc78a1c23f4804a47c147ffcc3076fd9845986043a242c3ad60194bd4c4c1435ca
7
+ data.tar.gz: 694543df44379a3fdde8eebbfefcf13a1d805ae0efbc02743219b7797ca2c5f81171667c3930549e4962fa149f5a8ac518475787489730fb1de3f39f27724abe
@@ -29,33 +29,16 @@ module IsoDoc
29
29
  SKIP_DOCID = <<~XPATH.strip.freeze
30
30
  @type = 'DOI' or @type = 'doi' or @type = 'ISSN' or @type = 'issn' or @type = 'ISBN' or @type = 'isbn' or starts-with(@type, 'ISSN.') or starts-with(@type, 'ISBN.') or starts-with(@type, 'issn.') or starts-with(@type, 'isbn.')
31
31
  XPATH
32
- =begin
33
- SKIP_DOC1 = <<~XPATH.strip.freeze
34
- #{SKIP_DOCID} or @type = 'metanorma-ordinal' or @type = 'metanorma'
35
- XPATH
36
32
 
37
- PRIMARY_ID = "docidentifier[@primary = 'true']".freeze
38
- =end
39
33
  def pref_ref_code(bib)
40
34
  bib["suppress_identifier"] == "true" and return nil
41
35
  @bibrenderer ||= bibrenderer
42
36
  data, = @bibrenderer.parse(bib)
43
- ret = data[:authoritative_identifier]
37
+ ret = data[:authoritative_identifier] or return nil
44
38
  ret.empty? and return nil
45
39
  ret
46
40
  end
47
- =begin
48
- def pref_ref_code1(bib)
49
- lang = "[@language = '#{@lang}']"
50
- ret = bib.xpath(ns("./#{PRIMARY_ID}[not(#{SKIP_DOCID})]#{lang}"))
51
- ret.empty? and
52
- ret = bib.xpath(ns("./#{PRIMARY_ID}[not(#{SKIP_DOCID})]"))
53
- ret.empty? and
54
- ret = bib.at(ns("./docidentifier[not(#{SKIP_DOC1})]#{lang}")) ||
55
- bib.at(ns("./docidentifier[not(#{SKIP_DOC1})]"))
56
- ret
57
- end
58
- =end
41
+
59
42
  # returns [metanorma, non-metanorma, DOI/ISSN/ISBN] identifiers
60
43
  def bibitem_ref_code(bib)
61
44
  id = bib.at(ns("./docidentifier[@type = 'metanorma']"))
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "2.9.1".freeze
2
+ VERSION = "2.9.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.1
4
+ version: 2.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.