Method: IsoDoc::PresentationXMLConvert#variant
- Defined in:
- lib/isodoc/presentation_function/inline.rb
#variant(docxml) ⇒ Object
227 228 229 230 231 232 233 234 235 |
# File 'lib/isodoc/presentation_function/inline.rb', line 227 def variant(docxml) docxml.xpath(ns("//variant")).each { |f| variant1(f) } docxml.xpath(ns("//variant[@remove = 'true']")).each { |f| f.remove } docxml.xpath(ns("//variant")).each do |v| next unless v&.next&.name == "variant" v.next = "/" end docxml.xpath(ns("//variant")).each { |f| f.replace(f.children) } end |