Re: [xslt] hide "--debug" option when it's disabled



On Thu, Sep 18, 2003 at 12:22:57PM +0200, Le grande pinguin wrote:
> On Thu, Sep 18, 2003 at 06:01:30AM -0400, Daniel Veillard wrote:
> Sorry if i'm a bit slow on this, but as far as i understand the patch
> the following will happen:
> 
>  $ xsltproc --debug a.xslt b.xml
>  Unknown option --debug
>  Usage: xsltproc [options] stylesheet file [file ...]
> 
> which i would find confusing (if comming from an installation
> that has debugging enabled).
> I'd suggest something like:
> 
>  $ xsltproc --debug a.xslt b.xml
>  Option --debug not supported [recompile with ....]
>  aborting
> 
> I think there's a difference between an unknown option and an
> unsupported one.

  I think you're splitting hairs ...

> I'd also suggest the following:

  Which changes only the error message and is in general not useful
"by the version" what version, and how to fix it? and it actually takes 
a libxml2 and then a libxslt recompilation to get it in... How useful
is it really to an end-user ? If someone recompiles with non-standard
option there is probably a good reason for this.

> + #else
> +     printf("\t--debug: debugging not supported by the version\n");
> + #endif

  And this would require changing all the conditional sections of
xmllint.c xsltproc.c and various other tools code, doing this
on a single option in a single program is not usefule. If you
really care about it, then send a patch, but a complete one
for xmllint, xsltproc and covering all the options, both in
the usage() output and in the option parsing.
  If you want to make such a patch, then fine, but not a truncated
change for a single option on a single program, that doesn't work.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]