.NET 2.0 XSLT command line utility, version 2.3.0 An error occurred while parsing command line. XmlLab.nxslt.NXsltCommandLineParsingException: Unrecognized option : 'printLegend'. at XmlLab.nxslt.NXsltArgumentsParser.ParseArguments(String[] args, NXsltOptions options) at XmlLab.nxslt.NXsltMain.Main(String[] args)
An error occured: System.ArgumentOutOfRangeException: Non-negative number required. Parameter name: capacity at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.Queue`1..ctor(Int32 capacity) at XmlLab.nxslt.NXsltArgumentsParser.ParseArguments(String[] args, NXsltOptions options) at XmlLab.nxslt.NXsltArgumentsParser.ParseArguments(String[] args, NXsltOptions options) at XmlLab.nxslt.NXsltMain.Main(String[] args)
I cannot reproduce the first problem, it works for me. Make sure there is no space after printLegend parameter name, I mean you put exactly param=value or param="long value" with no spaces before or affer equal sign.
Second issue is a nasty bug. I'll fix it asap. Thanks for reporting it.
I cannot reproduce the first problem, it works for me. Make sure there is no space after printLegend parameter name
Hmmm, that's weird. Unrecognized option : 'printLegend' means nxslt received command line argument 'printLegend', while it should be 'printLegend=false'.
It might be Windows command line somehow screwing up with command line arguments. Try to put quotes around your parameter:
nxslt2 ... "printLegend=false"
Options file format follows the same rules as normal command line and you can put one or more options per line.
from documentation:
Options file (@file) The @ option lets you specify a file that contains more options. The options in the specified file will be processed just as if they had been specified on the command line. In an options file, multiple options can appear on one line. A single option specification must appear on one line (cannot span multiple lines). Options files can have comments that begin with the # symbol.
The @ option lets you specify a file that contains more options. The options in the specified file will be processed just as if they had been specified on the command line.
In an options file, multiple options can appear on one line. A single option specification must appear on one line (cannot span multiple lines). Options files can have comments that begin with the # symbol.
Because of thtebug options file only works when either it's used along with normal param, e.g. "param=value @foo.opt" or first line in first options file contains at least 2 options.
You can debug your problem (and fix second bug youself if you want), just download sources. The bug is in NXsltArgumentsParser.cs, line 350:
paramQueue = new Queue<string>(args.Length - 2);
it should be just
paramQueue = new Queue<string>();