Method: IsoDoc::Convert#convert_init

Defined in:
lib/isodoc/convert.rb

#convert_init(file, filename, debug) ⇒ Object



160
161
162
163
164
165
166
167
168
169
# File 'lib/isodoc/convert.rb', line 160

def convert_init(file, filename, debug)
  docxml = Nokogiri::XML(file)
  filename, dir = init_file(filename, debug)
  docxml.root.default_namespace = ""
  lang = docxml&.at(ns("//bibdata/language"))&.text || @lang
  script = docxml&.at(ns("//bibdata/script"))&.text || @script
  i18n_init(lang, script)
  (lang, script, @labels)
  [docxml, filename, dir]
end