Method: IsoDoc::Convert#convert_init

Defined in:
lib/isodoc/convert.rb

#convert_init(file, filename, debug) ⇒ Object



134
135
136
137
138
139
140
141
142
143
# File 'lib/isodoc/convert.rb', line 134

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