From cc230bdac7493c5329ba2c56ffce8651c1c4664a Mon Sep 17 00:00:00 2001 From: Keith Fahlgren Date: Fri, 8 May 2009 20:34:05 +0000 Subject: [PATCH] Tweaking solution to Bug #2750442 following regression reported by Michael Wiedmann. --- xsl/epub/bin/lib/docbook.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xsl/epub/bin/lib/docbook.rb b/xsl/epub/bin/lib/docbook.rb index a5006f6db..bbe1d271b 100755 --- a/xsl/epub/bin/lib/docbook.rb +++ b/xsl/epub/bin/lib/docbook.rb @@ -117,9 +117,14 @@ module DocBook def collapse_docbook collapsed_file = File.join(File.dirname(@docbook_file), '.collapsed.' + File.basename(@docbook_file)) - collapse_command = "xmllint --noent --xinclude -o '#{collapsed_file}' '#{@docbook_file}'" - success = system(collapse_command) - raise "Could not collapse XIncludes and/or entites in #{@docbook_file}" unless success + entity_collapse_command = "xmllint --noent -o '#{collapsed_file}' '#{@docbook_file}'" + entity_success = system(entity_collapse_command) + raise "Could not collapse named entites in #{@docbook_file}" unless entity_success + + xinclude_collapse_command = "xmllint --xinclude -o '#{collapsed_file}' '#{collapsed_file}'" + xinclude_success = system(xinclude_collapse_command) + raise "Could not collapse XIncludes in #{@docbook_file}" unless xinclude_success + @to_delete << collapsed_file return collapsed_file end -- 2.50.1