Bug 454113 - xsltproc fails with "failed to load external entity"
xsltproc fails with "failed to load external entity"
Product: Fedora
Classification: Fedora
Component: libxslt (Show other bugs)
All Linux
low Severity high
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-07-04 14:52 EDT by Ben Webb
Modified: 2008-07-08 09:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-08 09:56:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test.xml (291 bytes, text/plain)
2008-07-04 14:52 EDT, Ben Webb
no flags Details
strace-out.gz (23.88 KB, application/x-gzip)
2008-07-04 14:52 EDT, Ben Webb
no flags Details

  None (edit)
Description Ben Webb 2008-07-04 14:52:19 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):

How reproducible:

Steps to Reproduce:
1. Get test.xml (attachment)
2. Run
xsltproc --nonet --xinclude
/usr/share/sgml/docbook/xsl-stylesheets-1.73.2/xhtml/chunk.xsl test.xml
Actual results:
xsltproc reports:
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 &chi;</para>
Writing ch01.html for chapter
Writing index.html for book

Expected results:
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.

Additional info:
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.
Comment 1 Ben Webb 2008-07-04 14:52:19 EDT
Created attachment 311052 [details]
Comment 2 Ben Webb 2008-07-04 14:52:50 EDT
Created attachment 311053 [details]
Comment 3 Ben Webb 2008-07-04 16:39:29 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.