Method: IsoDoc::Function::References#pref_ref_code
- Defined in:
- lib/isodoc/function/references.rb
#pref_ref_code(bib) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/isodoc/function/references.rb', line 33 def pref_ref_code(bib) bib["suppress_identifier"] == "true" and return nil ret = bib.xpath(ns("./docidentifier[@scope = 'biblio-tag']")) ret.empty? or return ret.map(&:text) ret = pref_ref_code_parse(bib) or return nil ins = bib.at(ns("./docidentifier[last()]")) ret.reverse.each do |r| ins.next = "<docidentifier scope='biblio-tag'>#{docid_l10n(r)}</docidentifier>" end ret end |