Method: IsoDoc::PresentationXMLConvert#variant
- Defined in:
- lib/isodoc/presentation_function/inline.rb
#variant(docxml) ⇒ Object
164 165 166 167 168 169 170 171 172 173 |
# File 'lib/isodoc/presentation_function/inline.rb', line 164 def variant(docxml) docxml.xpath(ns("//variant")).each { |f| variant1(f) } docxml.xpath(ns("//variant[@remove = 'true']")).each(&: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 |