GNOME Bugzilla – Bug 331779
--path option does not support space separated list of paths
Last modified: 2006-02-19 21:42:49 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 ../..
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
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
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.
> 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
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.
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.
Applied, thanks a lot ! Daniel