Red Hat Bugzilla – Bug 454113
xsltproc fails with "failed to load external entity"
Last modified: 2008-07-08 09:56:06 EDT
Description of problem:
Our builds of XHTML documents from DocBook sources started failing recently
(last successful build was on Jul 1). We use xmlto to build these documents, but
I've made a very simple DocBook file which demonstrates the problem with
xsltproc, which appears to be the component that is failing. It is unable to
find the DocBook DTD, after which it is unable to process other entities in the
document, in this case χ
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Get test.xml (attachment)
xsltproc --nonet --xinclude
I/O error : Attempt to load network entity
test.xml:4: warning: failed to load external entity
test.xml:9: parser error : Entity 'chi' not defined
<para>The Greek letter chi is χ</para>
Writing ch01.html for chapter
Writing index.html for book
DocBook DTD is successfully read in from local disk (appears to be installed as
/usr/share/sgml/docbook/xml-dtd-4.2-1.0-35.fc9/docbookx.dtd). Prior to Jul 2,
xmlto builds of our documentation completed without errors.
I've also attached strace output from this command. It does appear to hit the
XML catalogs, but for some reason cannot deduce the location on disk of the DTD.
If xsltproc is run without the --nonet flag, everything works correctly: but 1)
I don't want to hit the network every time and 2) xmlto adds that flag anyway,
so removing it would be awkward.
I noticed that xml-common and sgml-common were updated around Jul 2, but
reverting to the older versions of these packages did not fix the problem.
P.S. xsltproc runs to completion even with these apparent errors. The only
reason we caught the failure in our build system was that for the full version
of the documentation, subsequent failures cause xsltproc to segfault. I am
currently trying to pare this down to a minimal testcase, and will open a
separate bug for that when I get it to work.
Created attachment 311052 [details]
Created attachment 311053 [details]
Never mind - I tracked this down to the docbook-dtds package. Removing it from
my system and then reinstalling it fixed the problem - I guess for some reason
it failed to register the XML catalogs correctly last time it was installed.