class IsoDoc::Ietf::Metadata
Constants
- TITLE_RFC
Public Instance Methods
areas(isoxml, _out)
click to toggle source
# File lib/isodoc/ietf/metadata.rb, line 22 def areas(isoxml, _out) ret = [] isoxml.xpath(ns("//bibdata/ext/area")).each do |kw| ret << kw.text end set(:areas, ret) end
docid(isoxml, _out)
click to toggle source
# File lib/isodoc/ietf/metadata.rb, line 30 def docid(isoxml, _out) dn = isoxml.at(ns("//bibdata/docnumber")) set(:docnumber, dn&.text&.sub(/^rfc-/, "")&.sub(/\.[a-z0-9]+$/i, "")) end
doctype(isoxml, _out)
click to toggle source
Calls superclass method
# File lib/isodoc/ietf/metadata.rb, line 48 def doctype(isoxml, _out) super set(:doctype, "Rfc") if get[:doctype].nil? end
relaton_relations()
click to toggle source
# File lib/isodoc/ietf/metadata.rb, line 17 def relaton_relations %w(included-in described-by derived-from instance) # = item describedby convertedfrom alternate end
title(isoxml, _out)
click to toggle source
# File lib/isodoc/ietf/metadata.rb, line 8 def title(isoxml, _out) t = isoxml.at(ns(TITLE_RFC)) and set(:doctitle, t.text) t = isoxml.at(ns(TITLE_RFC.sub(/main/, "abbrev"))) and set(:docabbrev, t.text) t = isoxml.at(ns(TITLE_RFC.sub(/main/, "ascii"))) and set(:docascii, t.text) end
wg(xml)
click to toggle source
# File lib/isodoc/ietf/metadata.rb, line 40 def wg(xml) workgroups = [] xml.xpath(ns("//bibdata/ext/editorialgroup/workgroup")).each do |wg| workgroups << wg.text end set(:wg, workgroups) end