Skip to content

Commit

Permalink
Merge pull request #547 from metanorma/fix/xslt-memory
Browse files Browse the repository at this point in the history
XSLT preprocessing memory leak: https://github.com/metanorma/isodoc/i…
  • Loading branch information
opoudjis authored Nov 27, 2023
2 parents d5df72d + bfe93c9 commit fc12fd1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/isodoc/convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def convert_init(file, input_filename, debug)
end

def preprocess_xslt(docxml)
extract_preprocess_xslt(docxml).each do |x|
sheets = extract_preprocess_xslt(docxml)
warn "Preprocessing XSLT: #{@format}..."
sheets.each do |x|
docxml = Nokogiri::XSLT(x).transform(docxml)
end
docxml
Expand All @@ -131,8 +133,9 @@ def convert_i18n_init(docxml)
convert_i18n_init1(docxml)
i18n_init(@lang, @script, @locale)
@reqt_models = requirements_processor
.new({ default: "default", lang: @lang, script: @script, locale: @locale,
labels: @i18n.get, modspecidentifierbase: @modspecidentifierbase })
.new({ default: "default", lang: @lang, script: @script,
locale: @locale, labels: @i18n.get,
modspecidentifierbase: @modspecidentifierbase })
end

def convert_i18n_init1(docxml)
Expand Down

0 comments on commit fc12fd1

Please sign in to comment.