def collapse_docbook
collapsed_file = File.join(File.dirname(@docbook_file),
'.collapsed.' + File.basename(@docbook_file))
- entity_collapse_command = "xmllint --noent -o '#{collapsed_file}' '#{@docbook_file}'"
+ entity_collapse_command = "xmllint --loaddtd --noent -o '#{collapsed_file}' '#{@docbook_file}'"
entity_success = system(entity_collapse_command)
raise "Could not collapse named entites in #{@docbook_file}" unless entity_success
xincludeents_epubfile.should be_valid_epub
end
+ it "should not warn about named &entity;s" do
+ ents_epub = DocBook::Epub.new(File.join(@filedir, "entity.xml"), @tmpdir)
+ ents_epubfile = File.join(@tmpdir, "entsepub.epub")
+ ents_epub.render_to_file(ents_epubfile, $DEBUG)
+ ents_epubfile.should be_valid_epub
+ end
after(:all) do
FileUtils.rm_r(@tmpdir, :force => true)
--- /dev/null
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+
+<article>
+ <section>
+ <title>Title</title>
+ <para>©</para>
+ </section>
+</article>
<sect1>
<title>The stamp image</title>
+
<para>The stamp image has a natural size of 200x128 pixels.</para>
<para>The stamp image.</para>
<para>The small duck.</para>
+<para>Include a copy entity to trigger a bug in entity collapsing
+ following <ulink url="https://sourceforge.net/tracker/?func=detail&aid=2750442&group_id=21935&atid=373747">Bug #2750442</ulink>'s resolution.
+To that end: ©.
+Reported by Michael Wiedmann.</para>
+
<mediaobject>
<imageobject role="webhires">
<imagedata format="PNG" fileref="graphics/duck-small.png"/>