Sha256: d38c144ac456660ede81b43d43fc3d89cf7b356b26c544bf99866b9df18b2585

Contents?: true

Size: 935 Bytes

Versions: 20

Compression:

Stored size: 935 Bytes

Contents

require "isodoc"
require "fileutils"

module IsoDoc
  module Generic
    module BaseConvert
      def cleanup(docxml)
        super
        term_cleanup(docxml)
      end

      def term_cleanup(docxml)
        docxml.xpath("//p[@class = 'Terms']").each do |d|
          h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
          d["id"] = h2["id"]
          d.children.first.previous =
            "<strong>#{to_xml(h2.remove.children)}</strong>&#xa0;"
        end
        docxml
      end

      def make_body(xml, docxml)
        body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
                      "xml:lang": "EN-US", class: "container" }
        xml.body **body_attr do |body|
          make_body1(body, docxml)
          make_body2(body, docxml)
          make_body3(body, docxml)
        end
      end

      def info(isoxml, out)
        @meta.ext isoxml, out
        super
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
metanorma-generic-2.7.1 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.7.0 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.6.5 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.6.4 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.6.3 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.6.2 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.6.1 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.6.0 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.5.5 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.5.4 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.5.3 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.5.2 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.5.1 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.5.0 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.4.4 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.4.2 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.4.1 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.4.0 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.3.1 lib/isodoc/generic/base_convert.rb
metanorma-generic-2.3.0 lib/isodoc/generic/base_convert.rb