Method: IsoDoc::PresentationXMLConvert#quote1

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

#quote1(elem) ⇒ Object



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/isodoc/presentation_function/block.rb', line 232

def quote1(elem)
  author = elem.at(ns("./author"))
  source = elem.at(ns("./source"))
  author.nil? && source.nil? and return
  p = "— "
  p += to_xml(semx_fmt_dup(author)) if author
  p += ", " if author && source
  if source
    s = semx_fmt_dup(source)
e = Nokogiri::XML::Node.new("eref", elem.document)
e << s.children
s << e
source.attributes.each_key { |k| e[k] = source[k] }
e["deleteme"] = "true" # duplicate of source, will be duplicated in fmt-eref, need to delete after
    p += to_xml(s)
  end
  elem << "<attribution><p>#{l10n p}</p></attribution>"
end