Method: IsoDoc::PresentationXMLConvert#missing_title

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

#missing_title(docxml) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/isodoc/presentation_function/title.rb', line 12

def missing_title(docxml)
  docxml.xpath(ns("//definitions[not(./title)]")).each do |d|
    # should only be happening for subclauses
    d.add_first_child "<title>#{@i18n.symbols}</title>"
  end
  docxml.xpath(ns("//foreword[not(./title)]")).each do |d|
    d.add_first_child "<title>#{@i18n.foreword}</title>"
  end
end