class Asciidoctor::Ribose::Converter
A {Converter} implementation that generates RSD output, and a document schema encapsulation of the document for validation
Constants
- XML_NAMESPACE
- XML_ROOT_TAG
Public Instance Methods
clause_parse(attrs, xml, node)
click to toggle source
Calls superclass method
# File lib/asciidoctor/ribose/converter.rb, line 40 def clause_parse(attrs, xml, node) sectiontype1(node) == "executive summary" and return executivesummary_parse(attrs, xml, node) super end
configuration()
click to toggle source
# File lib/asciidoctor/ribose/converter.rb, line 54 def configuration Metanorma::Ribose.configuration end
doc_converter(node)
click to toggle source
# File lib/asciidoctor/ribose/converter.rb, line 73 def doc_converter(node) IsoDoc::Ribose::WordConvert.new(doc_extract_attributes(node)) end
executivesummary_parse(attrs, xml, node)
click to toggle source
# File lib/asciidoctor/ribose/converter.rb, line 46 def executivesummary_parse(attrs, xml, node) xml.executivesummary **attr_code(attrs) do |xml_section| xml_section.title { |t| t << node.title || "Executive Summary" } content = node.content xml_section << content end end
html_converter(node)
click to toggle source
# File lib/asciidoctor/ribose/converter.rb, line 63 def html_converter(node) IsoDoc::Ribose::HtmlConvert.new(html_extract_attributes(node)) end
make_preface(xml, sect)
click to toggle source
# File lib/asciidoctor/ribose/converter.rb, line 27 def make_preface(xml, sect) if xml.at("//foreword | //introduction | //acknowledgements | "\ "//clause[@preface] | //executivesummary") preface = sect.add_previous_sibling("<preface/>").first f = xml.at("//foreword") and preface.add_child f.remove f = xml.at("//executivesummary") and preface.add_child f.remove f = xml.at("//introduction") and preface.add_child f.remove move_clauses_into_preface(xml, preface) f = xml.at("//acknowledgements") and preface.add_child f.remove end make_abstract(xml, sect) end
pdf_converter(node)
click to toggle source
# File lib/asciidoctor/ribose/converter.rb, line 67 def pdf_converter(node) return nil if node.attr("no-pdf") IsoDoc::Ribose::PdfConvert.new(html_extract_attributes(node)) end
presentation_xml_converter(node)
click to toggle source
# File lib/asciidoctor/ribose/converter.rb, line 58 def presentation_xml_converter(node) IsoDoc::Ribose::PresentationXMLConvert .new(html_extract_attributes(node)) end
sectiontype(node, level = true)
click to toggle source
# File lib/asciidoctor/ribose/converter.rb, line 15 def sectiontype(node, level = true) ret = sectiontype1(node) ret1 = sectiontype_streamline(ret) return ret1 if ret1 == "symbols and abbreviated terms" return ret1 if ret1 == "executive summary" return nil unless !level || node.level == 1 return nil if @seen_headers.include? ret @seen_headers << ret ret1 end