Method: IsoDoc::PresentationXMLConvert#eref2link
- Defined in:
- lib/isodoc/presentation_function/erefs.rb
#eref2link(docxml) ⇒ Object
197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/isodoc/presentation_function/erefs.rb', line 197 def eref2link(docxml) docxml.xpath(ns("//display-text")).each { |f| f.replace(f.children) } docxml.xpath(ns("//fmt-eref | //fmt-origin[not(.//termref)]")) .each do |e| sem_xml_descendant?(e) and next href = eref_target(e) or next e.xpath(ns("./locality | ./localityStack")).each(&:remove) if href[:type] == :anchor then eref2xref(e) else eref2link1(e, href) end end end |