]> granicus.if.org Git - docbook-dsssl/commitdiff
Tweaking solution to Bug #2750442 following regression reported by Michael Wiedmann.
authorKeith Fahlgren <abdelazer@users.sourceforge.net>
Fri, 8 May 2009 20:34:05 +0000 (20:34 +0000)
committerKeith Fahlgren <abdelazer@users.sourceforge.net>
Fri, 8 May 2009 20:34:05 +0000 (20:34 +0000)
xsl/epub/bin/lib/docbook.rb

index a5006f6db2091d2fc374a71c0ccda8640f8aaad1..bbe1d271b2a177b071fda9d6dbe27844a0814d66 100755 (executable)
@@ -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