Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 454113 - xsltproc fails with "failed to load external entity"
Summary: xsltproc fails with "failed to load external entity"
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: libxslt
Version: 9
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-04 18:52 UTC by Ben Webb
Modified: 2008-07-08 13:56 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-07-08 13:56:06 UTC


Attachments (Terms of Use)
test.xml (deleted)
2008-07-04 18:52 UTC, Ben Webb
no flags Details
strace-out.gz (deleted)
2008-07-04 18:52 UTC, Ben Webb
no flags Details

Description Ben Webb 2008-07-04 18:52:19 UTC
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):
libxslt-1.1.24-1.fc9.i386

How reproducible:
Always.

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
http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
test.xml:4: warning: failed to load external entity
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
]>
  ^
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 18:52:19 UTC
Created attachment 311052 [details]
test.xml

Comment 2 Ben Webb 2008-07-04 18:52:50 UTC
Created attachment 311053 [details]
strace-out.gz

Comment 3 Ben Webb 2008-07-04 20:39:29 UTC
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.