Sha256: c39654f4d63804b354497cc32a1e90c7cc9c0c5ffb8bffa6e1ab9a9352a93a55
Contents?: true
Size: 862 Bytes
Versions: 10
Compression:
Stored size: 862 Bytes
Contents
module Metanorma module JIS class Converter < ISO::Converter def doctype_validate(xmldoc) doctype = xmldoc&.at("//bibdata/ext/doctype")&.text %w(japanese-industrial-standard technical-report technical-specification amendment).include? doctype or @log.add("Document Attributes", nil, "#{doctype} is not a recognised document type") end def script_validate(xmldoc) script = xmldoc&.at("//bibdata/script")&.text %w(Jpan Latn).include?(script) or @log.add("Document Attributes", nil, "#{script} is not a recognised script") end def validate(doc) content_validate(doc) schema_validate(formattedstr_strip(doc.dup), File.join(File.dirname(__FILE__), "jis.rng")) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems