isodoc 2.9.0 → 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: d2ba62816edc84d73b7df065ac30ea42ac43a02bfa1bba0cc345f06f9c1044f2
4
- data.tar.gz: 5bb7cb021f6619b23888d2b7c8bb7f9b6aae42c3469884b05059256876675d23
3
+ metadata.gz: 6490ec54ec083e91ab1ccc941676b95d52d3cef3f9b7675e2900e47c1763e47a
4
+ data.tar.gz: f5190668941e4f42990f024a3852007f3d2a6accfef80e6d242208c814ffe0d0
5
5
  SHA512:
6
- metadata.gz: 62a3f5375280faeabd71fc2abdc4f4335dd8f89ab7a5c7162a18ba6c19fb1d8d94136523032e6d04cf3abadb51c73bec23e2d93bb96461642834f989a8bfb285
7
- data.tar.gz: 233e3f7252e9e3c4d946bfc3921b89a7d776786177cd37c823b8451c2cd3fd190893eb7da290bbc10fab8e4b9f84083530ab3a1c53c8bf3a518e14000bfc9f7a
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']"))
@@ -37,7 +37,7 @@ module IsoDoc
37
37
  prep_for_rendering(b)
38
38
  m << to_xml(b)
39
39
  end.join
40
- bibrenderer.render_all("<references>#{refs}</references>",
40
+ @xrefs.klass.bibrenderer.render_all("<references>#{refs}</references>",
41
41
  type: citestyle)
42
42
  end
43
43
 
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "2.9.0".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.0
4
+ version: 2.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.