Method: IsoDoc::Function::Utils#to_xhtml
- Defined in:
- lib/isodoc/function/utils.rb
#to_xhtml(xml) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/isodoc/function/utils.rb', line 44 def to_xhtml(xml) xml = to_xhtml_prep(xml) begin Nokogiri::XML.parse(xml, nil, nil, HUGESTRICT) rescue Nokogiri::XML::SyntaxError => e File.open("#{@filename}.#{@format}.err", "w:UTF-8") do |f| f.write xml end abort "Malformed Output XML for #{@format}: #{e} " \ "(see #{@filename}.#{@format}.err)" end end |