Sha256: 2a5066efcac13de3c8b78279826540b0ac16a0c80d5bd00b40feb9eed268d651
Contents?: true
Size: 936 Bytes
Versions: 16
Compression:
Stored size: 936 Bytes
Contents
module Asciidoctor module CC class Converter < Standoc::Converter def content_validate(doc) super bibdata_validate(doc.root) end def bibdata_validate(doc) doctype_validate(doc) stage_validate(doc) end def doctype_validate(xmldoc) doctype = xmldoc&.at("//bibdata/ext/doctype")&.text %w(directive guide specification standard report administrative amendment technical-corrigendum advisory).include?(doctype) or @log.add("Document Attributes", nil, "#{doctype} is not a recognised document type") end def stage_validate(xmldoc) stage = xmldoc&.at("//bibdata/status/stage")&.text %w(proposal working-draft committee-draft draft-standard final-draft published withdrawn).include?(stage) or @log.add("Document Attributes", nil, "#{stage} is not a recognised status") end end end end
Version data entries
16 entries across 13 versions & 2 rubygems