lib/asciidoctor/nist/boilerplate.rb in metanorma-nist-0.2.12 vs lib/asciidoctor/nist/boilerplate.rb in metanorma-nist-0.2.13

- old
+ new

@@ -90,22 +90,18 @@ <p>As of the date of publication and following call(s) for the identification of patent claims whose use may be required for compliance with the guidance or requirements of this publication, no such patent claims have been identified to ITL.</p> <p>No representation is made or implied by ITL that licenses are not required to avoid patent infringement in the use of this publication.</p> </clause> END - def boilerplate(x_orig) - x = x_orig.dup - x.root.add_namespace(nil, EXAMPLE_NAMESPACE) - x = Nokogiri::XML(x.to_xml) - conv = IsoDoc::NIST::HtmlConvert.new({}) - conv.i18n_init("en", "Latn") - conv.metadata_init("en", "Latn", {}) - conv.info(x, nil) + def boilerplate_isodoc(xmldoc) + conv = super conv.labels = conv.labels.merge({nist_division: @nistdivision, nist_division_address: @nistdivisionaddress}) - file = @boilerplateauthority ? "#{@localdir}/#{@boilerplateauthority}" : - File.join(File.dirname(__FILE__), @series == "nist-cswp" ? "nist_intro_cswp.xml" : "nist_intro.xml") - conv.populate_template((File.read(file, encoding: "UTF-8")), nil) + conv + end + + def boilerplate_file(xmldoc) + File.join(@libdir, @series == "nist-cswp" ? "nist_intro_cswp.xml" : "nist_intro.xml") end end end end