Method: IsoDoc::PresentationXMLConvert#address_precompose1

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

#address_precompose1(addr) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/isodoc/presentation_function/bibdata.rb', line 20

def address_precompose1(addr)
  ret = []
  addr.xpath(ns("./street")).each { |s| ret << to_xml(s.children) }
  a = addr.at(ns("./city")) and ret << to_xml(a.children)
  addr.xpath(ns("./state")).each { |s| ret << to_xml(s.children) }
  a = addr.at(ns("./country")) and ret << to_xml(a.children)
  a = addr.at(ns("./postcode")) and ret[-1] += " #{to_xml a.children}"
  ret.join("<br/>")
end