Method: IsoDoc::Function::References#bibitem_ref_code
- Defined in:
- lib/isodoc/function/references.rb
#bibitem_ref_code(bib) ⇒ Object
returns [metanorma, non-metanorma, DOI/ISSN/ISBN] identifiers
| 53 54 55 56 57 58 59 60 61 62 63 64 | # File 'lib/isodoc/function/references.rb', line 53 def bibitem_ref_code(bib) id = bib.at(ns("./docidentifier[@type = 'metanorma']")) id1 = pref_ref_code(bib) id2 = bib.at(ns("./docidentifier[#{SKIP_DOCID}]")) id3 = bib.at(ns("./docidentifier[@type = 'metanorma-ordinal']")) return [id, id1, id2, id3] if id || id1 || id2 || id3 return [nil, nil, nil, nil] if bib["suppress_identifier"] == "true" id = Nokogiri::XML::Node.new("docidentifier", bib.document) id << "(NO ID)" [nil, id, nil, nil] end |