Sha256: fee38f37536cfcd2a08d7235056fcf61c95c02aaf319adc263498d361335a580

Contents?: true

Size: 555 Bytes

Versions: 19

Compression:

Stored size: 555 Bytes

Contents

module Asciidoctor
  module Rsd
    class Converter < Standoc::Converter
      def content_validate(doc)
        super
        bibdata_validate(doc.root)
      end

      def bibdata_validate(doc)
        stage_validate(doc)
      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
          warn "Document Attributes: #{stage} is not a recognised status"
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
metanorma-rsd-1.4.2 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.4.1 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.4.0 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.11 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.10 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.9 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.8 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.7 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.6 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.5 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.4 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.3 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.2 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.1 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.3.0 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.2.3 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.2.2 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.2.1 lib/asciidoctor/rsd/validate.rb
metanorma-rsd-1.2.0 lib/asciidoctor/rsd/validate.rb