86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/isodoc/metadata_contributor.rb', line 86
def agency_addr(xml)
a = xml.at(ns("//bibdata/contributor[xmlns:role/@type = 'publisher'][1]/" \
"organization")) or return
{ subdivision: "./subdivision", pub_phone: "./phone[not(@type = 'fax')]",
pub_fax: "./phone[@type = 'fax']", pub_email: "./email",
pub_uri: "./uri" }.each do |k, v|
n = a.at(ns(v)) and set(k, n.text)
end
n = a.at(ns("./address/formattedAddress")) and
set(:pub_address, n.children.to_xml)
end
|