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 125670 - "filename" in warning on read error
"filename" in warning on read error
Status: RESOLVED OBSOLETE
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks: 124539
 
 
Reported: 2003-10-28 09:36 UTC by Roumen Petrov
Modified: 2021-07-05 11:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (979 bytes, application/x-gzip)
2003-10-28 09:37 UTC, Roumen Petrov
Details
testcase with relative paths (1.27 KB, application/x-gzip)
2003-10-29 15:05 UTC, Roumen Petrov
Details

Description Roumen Petrov 2003-10-28 09:36:14 UTC
When xsltproc cannot read external entity print a warning like this:
warning: failed to load external entity "[<PATH>]foofile.xml"
where <PATH> is path to xml file from command line.

When we use --path command line options "external entity" can be in other
dir. usualy not in <PATH>.

It will be good xsltproc never to print <PATH>, but with -v options to show
failed read.
Comment 1 Roumen Petrov 2003-10-28 09:37:19 UTC
Created attachment 20991 [details]
testcase
Comment 2 Daniel Veillard 2003-10-28 13:02:29 UTC
The error MUST be reported. Sorry this is not optionnal, and should not.
Catch the errors in your code if you don't want ot print them but the
default behaviour is definitely not a bug !

Daniel
Comment 3 Roumen Petrov 2003-10-29 11:12:57 UTC
Daniel, I would like to reopen bug, because:

Let we look output (warnings!) carefully :
=======================================================
$ /opt/libxslt/20031027/bin/xsltproc -o test.out --path deny_read
xsl/test.xsl xml/test_bad.xml

I/O error : Permission denied
warning: failed to load external entity "xml/foofile.xml"
warning: failed to load external entity "xml/foo_file.xml"

$ ls -l deny_read/
total 4.0k
--w--w----    1 ........... foofile.xml
=======================================================

Take care about "--path" command line option": xsltproc cannot read
"deny_read/foofile.xml" (!) but report "xml/foofile.xml" - that is bug.

I don't complain against warning. Wrong is reported "file_name"
(exactly "file_path" component of name) in warning !

Might the simplest fix is warning to contain only basename, i.e.
file_name without path.

====
Other correct message is like this:
warning: failed to load external entity "foofile.xml" from paths
"deny_read:xml"

====
I would like to explain my idea for output messages with samples:
1.) verbose mode is off
$ .../xsltproc -o test.out --path deny_read xsl/test.xsl xml/test_bad.xml
....
warning: failed to load external entity "foofile.xml"
.....
2.) verbose mode is on
$ .../xsltproc -v -o test.out --path deny_read xsl/test.xsl
xml/test_bad.xml
....
I/O error for 'deny_read/foofile.xml': Permission denied
warning: failed to load external entity "foofile.xml"
....

Comment 4 Roumen Petrov 2003-10-29 15:05:56 UTC
Created attachment 21040 [details]
testcase with relative paths
Comment 5 Roumen Petrov 2003-10-29 15:15:04 UTC
Output for test with xml/test_bad1.xml is confusing:
I/O error : Permission denied
I/O error : Permission denied
warning: failed to load external entity "data/foofile.xml"
Comment 6 GNOME Infrastructure Team 2021-07-05 11:00:01 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/libxslt/-/issues/

Thank you for your understanding and your help.