Sha256: c390375cb39f0e406344f7ed7998359375a3eafff1770e53b283b6fae382e05e

Contents?: true

Size: 1.26 KB

Versions: 14

Compression:

Stored size: 1.26 KB

Contents

require "fileutils"

module IsoDoc
  module UN
    module BaseConvert
      def middle_clause(_docxml)
        "//clause[parent::sections]"
      end

      def norm_ref_xpath
        "//null"
      end

      def bibliography_xpath
        "//bibliography/clause[.//references] | " \
          "//bibliography/references"
      end

      def admonition_parse(node, out)
        name = node.at(ns("./name"))
        out.div **admonition_attrs(node) do |t|
          admonition_name_parse(node, t, name) if name
          node.children.each do |n|
            parse(n, t) unless n.name == "name"
          end
        end
      end

      def inline_header_title(out, _node, title)
        out.span class: "zzMoveToFollowing" do |s|
          title&.children&.each { |c2| parse(c2, s) }
          clausedelimspace(_node, out) if /\S/.match?(title&.text)
        end
      end

      def is_plenary?(docxml)
        return true if %w(plenary agenda budgetary).include?(@doctype)
        return true if docxml&.at(ns("//bibdata/ext/session/*"))

        false
      end

      def norm_ref(node, out)
        bibliography(node, out)
      end

      def convert_i18n_init1(docxml)
        super
        docxml.xpath(ns("//bibdata/language")).size > 1 and @lang = "en"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
metanorma-un-0.12.8 lib/isodoc/un/base_convert.rb
metanorma-un-0.12.7 lib/isodoc/un/base_convert.rb
metanorma-un-0.12.6 lib/isodoc/un/base_convert.rb
metanorma-un-0.12.5 lib/isodoc/un/base_convert.rb
metanorma-un-0.12.4 lib/isodoc/un/base_convert.rb
metanorma-un-0.12.3 lib/isodoc/un/base_convert.rb
metanorma-un-0.12.1 lib/isodoc/un/base_convert.rb
metanorma-un-0.12.0 lib/isodoc/un/base_convert.rb
metanorma-un-0.11.8 lib/isodoc/un/base_convert.rb
metanorma-un-0.11.6 lib/isodoc/un/base_convert.rb
metanorma-un-0.11.5 lib/isodoc/un/base_convert.rb
metanorma-un-0.11.4 lib/isodoc/un/base_convert.rb
metanorma-un-0.11.3 lib/isodoc/un/base_convert.rb
metanorma-un-0.11.2 lib/isodoc/un/base_convert.rb