Method: IsoDoc::PresentationXMLConvert#annotations

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

#annotations(elem, fmt_elem) ⇒ Object



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/isodoc/presentation_function/sourcecode.rb', line 85

def annotations(elem, fmt_elem)
  elem.at(ns("./annotation")) or return
  ret = ""
  elem.xpath(ns("./annotation")).each do |a|
    id = a['original-id']
    dd = semx_fmt_dup(a)
    dd["source"] = a["id"]
    ret += "      <dt id='\#{id}'><span class='c'>\#{@callouts[id]}</span></dt>\n      <dd>\#{to_xml dd}</dd>\n    OUT\n  end\n  fmt_elem.xpath(ns(\"./annotation\")).each(&:remove)\n  fmt_elem << \"<dl><name>\#{@i18n.key}</name>\#{ret}</dl>\"\nend\n"