Sha256: e7624ccb404347e386f9ab518d5593536b01a9e4d350942a1145bdb2f00d0c42
Contents?: true
Size: 711 Bytes
Versions: 1
Compression:
Stored size: 711 Bytes
Contents
module RelatonW3c class XMLParser < RelatonBib::XMLParser class << self private # Override RelatonBib::XMLParser.item_data method. # @param item [Nokogiri::XML::Element] # @returtn [Hash] def item_data(item) data = super # ext = item.at "./ext" # return data unless ext # data[:doctype] = ext.at("./doctype")&.text data end # @param item_hash [Hash] # @return [RelatonBib::BibliographicItem] def bib_item(item_hash) W3cBibliographicItem.new(**item_hash) end def create_doctype(type) DocumentType.new type: type.text, abbreviation: type[:abbreviation] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
relaton-w3c-1.19.0 | lib/relaton_w3c/xml_parser.rb |