Method: IsoDoc::PresentationXMLConvert#concept_dup

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

#concept_dup(node, ret) ⇒ Object



33
34
35
36
37
38
39
40
41
42
# File 'lib/isodoc/presentation_function/concepts.rb', line 33

def concept_dup(node, ret)
  node.xpath(".//xmlns:semx[xmlns:fmt-xref | xmlns:fmt-eref | xmlns:fmt-origin | xmlns:fmt-link]").each(&:remove)
  ret.xpath(ns(".//xref | .//eref | .//origin | .//link")).each(&:remove)
  ret.xpath(ns(".//semx")).each do |s|
    s.children.empty? and s.remove
  end
  f = Nokogiri::XML::Node.new("fmt-concept", node.document)
  f << ret
  node.next = f
end