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



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'd also suggest the following:

*** xsltproc.old.c      Thu Sep 18 12:58:13 2003
--- xsltproc.c  Thu Sep 18 12:58:50 2003
***************
*** 481,487 ****
--- 481,489 ----
      printf("\t--output file or -o file: save to a given file\n");
      printf("\t--timing: display the time used\n");
      printf("\t--repeat: run the transformation 20 times\n");
+ #ifdef LIBXML_DEBUG_ENABLED
      printf("\t--debug: dump the tree of the result instead\n");
+ #else
+     printf("\t--debug: debugging not supported by the version\n");
+ #endif
      printf("\t--dumpextensions: dump the registered extension elements and functions to
+stdout\n");
      printf("\t--novalid skip the Dtd loading phase\n");
      printf("\t--noout: do not dump the result\n");


Greetings  Ralf Mattes

> 
>   Sigh ... check before objecting, you just misunderstood what
> the patch does !!!
> 
> paphio:~/XSLT -> xsltproc --dbug
> Unknown option --dbug
> Usage: xsltproc [options] stylesheet file [file ...]
> 
> 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/
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt



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