Method: IsoDoc::PresentationXMLConvert#index1

Defined in:
lib/isodoc/presentation_function/index.rb

#index1(docxml, indexsect, index) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/isodoc/presentation_function/index.rb', line 28

def index1(docxml, indexsect, index)
  c = indexsect.add_child("<ul></ul>").first
  index.keys.sort.each do |k|
    words = index[k].keys.each_with_object({}) do |w, v|
      v[sortable(w).downcase] = w
    end
    words.keys.localize(@lang.to_sym).sort.to_a.each do |w|
      c.add_child index_entries(words, index[k], w)
    end
  end
  index1_cleanup(docxml)
end