class IsoDoc::M3d::Metadata

A {Converter} implementation that generates CSAND output, and a document schema encapsulation of the document for validation

Public Class Methods

new(lang, script, labels) click to toggle source
Calls superclass method
# File lib/isodoc/m3d/metadata.rb, line 8
def initialize(lang, script, labels)
  super
  here = File.dirname(__FILE__)
  set(:logo_html,
      File.expand_path(File.join(here, "html", "m3-logo.png")))
  set(:logo_word,
      File.expand_path(File.join(here, "html", "logo.jpg")))
end

Public Instance Methods

author(isoxml, _out) click to toggle source
Calls superclass method
# File lib/isodoc/m3d/metadata.rb, line 26
def author(isoxml, _out)
  set(:tc, nil)
  tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee"))
  set(:tc, tc.text) if tc
  super
end
docid(isoxml, _out) click to toggle source
# File lib/isodoc/m3d/metadata.rb, line 33
def docid(isoxml, _out)
  docnumber = isoxml.at(ns("//bibdata/docidentifier"))
  set(:docnumber, docnumber&.text)
end
stage_abbr(status) click to toggle source
# File lib/isodoc/m3d/metadata.rb, line 38
def stage_abbr(status)
  case status
  when "working-draft" then "wd"
  when "committee-draft" then "cd"
  when "draft-standard" then "d"
  else
    ""
  end
end
subtitle(_isoxml, _out) click to toggle source
# File lib/isodoc/m3d/metadata.rb, line 22
def subtitle(_isoxml, _out)
  nil
end
title(isoxml, _out) click to toggle source
# File lib/isodoc/m3d/metadata.rb, line 17
def title(isoxml, _out)
  main = isoxml&.at(ns("//bibdata/title[@language='en']"))&.text
  set(:doctitle, main)
end
unpublished(status) click to toggle source
# File lib/isodoc/m3d/metadata.rb, line 48
def unpublished(status)
  !%w(published withdrawn).include? status.downcase
end