lib/metanorma/compile.rb in metanorma-1.0.3 vs lib/metanorma/compile.rb in metanorma-1.0.4
- old
+ new
@@ -30,10 +30,11 @@
def xml_options_extract(file)
xml = Nokogiri::XML(file)
if xml.root
@registry.root_tags.each do |k, v|
+ STDERR.puts "k(#{k}), v(#{v})"
return { type: k } if v == xml.root.name
end
end
{}
end
@@ -203,10 +204,14 @@
outfilename = options[:filename].sub(/\.[^.]+$/, ".#{file_extension}")
if ext == :rxl
options[:relaton] = outfilename
relaton_export(isodoc, options)
else
+ begin
@processor.output(isodoc, outfilename, ext, isodoc_options)
+ rescue StandardError => e
+ puts e.message
+ end
end
if options[:wrapper] and /html$/.match file_extension
outfilename = outfilename.sub(/\.html$/, "")
FileUtils.mkdir_p outfilename
FileUtils.mv "#{outfilename}.html", outfilename