Method: IsoDoc::PresentationXMLConvert#citeas

Defined in:
lib/isodoc/presentation_function/erefs.rb

#citeas(xmldoc) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/isodoc/presentation_function/erefs.rb', line 5

def citeas(xmldoc)
  xmldoc.xpath(ns("//fmt-eref | //fmt-origin | //fmt-link"))
    .each do |e|
      sem_xml_descendant?(e) and next
    e["bibitemid"] && e["citeas"] or next
    a = @xrefs.anchor(e["bibitemid"], :xref, false) or next
    e["citeas"] = citeas_cleanup(a)
    # link generated in collection postprocessing from eref
    e.name == "fmt-link" && e.text.empty? and e.children = e["citeas"]
  end
end