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 331779 - --path option does not support space separated list of paths
--path option does not support space separated list of paths
Status: VERIFIED NOTABUG
Product: libxslt
Classification: Platform
Component: general
1.1.15
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-19 14:57 UTC by Daniel Leidert
Modified: 2006-02-19 21:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for the xsltproc manpage (18.33 KB, patch)
2006-02-19 18:33 UTC, Daniel Leidert
committed Details | Review

Description Daniel Leidert 2006-02-19 14:57:43 UTC
In the manpage it is written, that --path accepts a space or column separated list of filesystem paths to load DTDs, entities or documents. But using a space separated list results in an error:

xsltproc --path .. ../.. test.xsl test.xml
I/O error : Is a directory
../..:1: parser error : Document is empty

^
../..:1: parser error : Start tag expected, '<' not found

^
I/O error : Is a directory
cannot parse ../..
Comment 1 Daniel Leidert 2006-02-19 15:02:03 UTC
A usecase, where it would be important that a space separated list works are e.g. Makefiles. An example, which will fail atm:

VPATH += $(dir1) $(dir2)

target:
  xsltproc ... --path $(VPATH) foo.xslbar.xml
Comment 2 Daniel Veillard 2006-02-19 15:24:59 UTC
Not a bug. You are passing .. as the argument, not ".. ../..", as
a result next argument tries to be parsed as XML. There is no way
the program can "guess" you meant the next arguments to be part of the
same option !
Seems you forgot to thing about the bug before posting the bug, really
as reported it can't be considered as a bug !

Daniel
Comment 3 Daniel Leidert 2006-02-19 15:49:15 UTC
Thanks for pointing this out.

> Not a bug. You are passing .. as the argument, not ".. ../..", as
> a result next argument tries to be parsed as XML. There is no way
> the program can "guess" you meant the next arguments to be part of the
> same option !

Nowhere it is written, that a list of arguments must be enclosed to double or single quotation marks. Even the manpage only states, that --path accepts a list .

> Seems you forgot to thing about the bug before posting the bug,

You should better backspace.

> really as reported it can't be considered as a bug !

Really? A possibility, how it could work without quotation marks: Test all arguments following --path to be a directory and not an option nor a file. Then stop. All arguments until you found a file or a new option are (possible) valid arguments. So this is at least a missing information in the manpage.
Comment 4 Daniel Veillard 2006-02-19 16:19:49 UTC
> Nowhere it is written, that a list of arguments must be enclosed to double or
> single quotation marks.

  it is ONE argument value containing ONE list of paths.
The arguments are described one by one, arguments may take one extra value.
This really should not come as a surprize, this is really the classic way 
multiple path are passed as argument values at the shell level, I just can't
understand the mess you're generating about this !

  The algorightm you suggest sounds extremely fragile I won't implement it.
Your initial report was that xsltproc worked for you and not xmllint, they
both function in the *exact* same way.
  If you want to improve the man pages, I certainly take patches, see
doc/xmllint.xml in libxml2 tree, and doc/xsltproc.xml in libxslt tree.

Daniel
Comment 5 Daniel Leidert 2006-02-19 16:30:42 UTC
I did not suggest a new algorithm. It should only show, that it's not clear by default, that the argument must be enclosed by quotation marks. I don't see a reason to affront a bug-reporter. The easiest solution is to change the manpage to state '--path "paths"'. So it's clear. And ok, I will send you a patch soon.
Comment 6 Daniel Leidert 2006-02-19 18:33:22 UTC
Created attachment 59723 [details] [review]
Patch for the xsltproc manpage

Patch for the xsltproc manpage. It also fixes/changes:

- explanation of --path option
- markup and compatibility with the manpage howto

Have a look at it. The ENVIRONMENT section is not complete.
Comment 7 Daniel Veillard 2006-02-19 21:42:49 UTC
Applied, thanks a lot !

Daniel