Class: IsoDoc::Ribose::PresentationXMLConvert

Inherits:
Generic::PresentationXMLConvert
  • Object
show all
Includes:
Init
Defined in:
lib/isodoc/ribose/presentation_xml_convert.rb

Instance Method Summary collapse

Methods included from Init

#i18n_init, #metadata_init, #xref_init

Instance Method Details

#annex1x(elem) ⇒ Object

KILL



9
10
11
12
# File 'lib/isodoc/ribose/presentation_xml_convert.rb', line 9

def annex1x(elem)
  lbl = @xrefs.anchor(elem["id"], :label)
  prefix_name(elem, "<br/><br/>", lbl, "title")
end

#annex_delim(_elem) ⇒ Object



14
15
16
# File 'lib/isodoc/ribose/presentation_xml_convert.rb', line 14

def annex_delim(_elem)
  "<br/><br/>"
end

#clause(docxml) ⇒ Object



46
47
48
49
# File 'lib/isodoc/ribose/presentation_xml_convert.rb', line 46

def clause(docxml)
  super
  docxml.xpath(ns("//executivesummary | //appendix")).each { |x| clause1(x) }
end

#designation_boldface(desgn) ⇒ Object



31
# File 'lib/isodoc/ribose/presentation_xml_convert.rb', line 31

def designation_boldface(desgn); end

#middle_title(docxml) ⇒ Object



18
# File 'lib/isodoc/ribose/presentation_xml_convert.rb', line 18

def middle_title(docxml); end

#preface_rearrange(doc) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/isodoc/ribose/presentation_xml_convert.rb', line 33

def preface_rearrange(doc)
  preface_move(doc.xpath(ns("//preface/abstract")),
               %w(foreword executivesummary introduction clause acknowledgements), doc)
  preface_move(doc.xpath(ns("//preface/foreword")),
               %w(executivesummary introduction clause acknowledgements), doc)
  preface_move(doc.xpath(ns("//preface/executivesummary")),
               %w(introduction clause acknowledgements), doc)
  preface_move(doc.xpath(ns("//preface/introduction")),
               %w(clause acknowledgements), doc)
  preface_move(doc.xpath(ns("//preface/acknowledgements")),
               %w(), doc)
end

#termsource1xx(elem) ⇒ Object

KILL



21
22
23
24
25
# File 'lib/isodoc/ribose/presentation_xml_convert.rb', line 21

def termsource1xx(elem)
  elem.children = l10n("<strong>#{@i18n.source}:</strong> " \
                       "#{to_xml(elem.children).strip}")
  elem&.next_element&.name == "termsource" and elem.next = "; "
end

#termsource_label(elem, sources) ⇒ Object



27
28
29
# File 'lib/isodoc/ribose/presentation_xml_convert.rb', line 27

def termsource_label(elem, sources)
     elem.replace(l10n("<strong>#{@i18n.source}</strong>: #{sources}"))
end