After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 501735 - xmllint reports failure to load (external) dtds when --nonet specified
xmllint reports failure to load (external) dtds when --nonet specified
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-05 13:27 UTC by Pavol Rusnak
Modified: 2021-07-05 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pavol Rusnak 2007-12-05 13:27:09 UTC
The same problem as bug#301600, but in libxml2 (I would add it there, but bug is reported against different product):

Suppose we have file test.xml:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>.</title></head><body><p>.</p></body>
</html>

"xmllint --noout --valid test.html" runs with no problem, "xmllint --nonet --noout --valid test.html" fails:

I/O error : Attempt to load network entity http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
test.html:1: warning: failed to load external entity "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
UBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
                                                                               ^
test.html:2: validity error : Validation failed: no DTD found !
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

By looking into strace xmllint correctly finds /etc/xml/xhtml.xml, opens it and one line reads:

<public publicId="-//W3C//DTD XHTML 1.1//EN" uri="file:///usr/share/xml/xhtml/schema/dtd/1.1/xhtml11-flat.dtd"/>

But this file is not used, xmllint calls stat("http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd", 0x7fff46ed7190), which of course fails, because http://... is not local file.
Comment 1 Pavol Rusnak 2008-07-23 14:01:35 UTC
downstream bugzilla:
https://bugzilla.novell.com/show_bug.cgi?id=344795
Comment 2 GNOME Infrastructure Team 2021-07-05 13:21:32 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.