Project

Profile

Help

Bad param=value pair on command line

Added by Anonymous over 15 years ago

Legacy ID: #6124975 Legacy Poster: NickDiamond (nickdiamond_80)

Hi, I have problem using XQuery with simple "for"-instructions (there isno problem with "normal" instructions). Here the copied text of my command-line : C:\XQuery\XQueryTEST>java net.sf.saxon.Query -t -s parameter.xml {for $r:=//region return $r} Saxon 8.8J from Saxonica Java version 1.6.0_11 Bad param=value pair on command line: return Saxon 8.8J from Saxonica Usage: java net.sf.saxon.Query [options] query {param=value}... Options: -cr classname Use specified CollectionURIResolver class -ds Use linked tree data structure -dt Use tiny tree data structure (default) -e Explain optimized query expression -mr classname Use specified ModuleURIResolver class -noext Disallow calls to Java methods -o filename Send output to named file -p Recognize Saxon file extensions and query parameters -pull Run query in pull mode -r classname Use specified URIResolver class -s file|URI Provide initial context document -sa Schema-aware query (requires Saxon-SA) -sall Strip all whitespace text nodes -signorable Strip ignorable whitespace text nodes (default) -snone Strip no whitespace text nodes -t Display version and timing information -T Trace query execution -TJ Trace calls to external Java functions -TL classname Trace query execution to user-defined trace listener -u Names are URLs not filenames -v Validate source documents using DTD -val Validate source documents using schema -vlax Lax validation of source documents using schema -vw Treat validation errors on result document as warnings -wrap Wrap result sequence in XML elements -1.1 Allow XML 1.1 documents -? Display this message param=value Set query string parameter +param=value Set query document parameter !option=value Set serialization option Why is that instruction wrong ? (I tried serveral variants with brackets, no brackets, another (x)path, ...) please help ! the parameter.xml looks like this (but the error is not to find in the xml, I think its a mistake in the instruction (wrong syntax?): <?xml version="1.0"?> <params>     <fileinput> <!-- ... -->       <region regionname='data' omit='true' skip='false' fielddelimiter=';'>                 <regionname>header</regionname>                 <comment>no_comment</comment>                <!-- ... -->             </region>             <region regionname='data' omit='false' skip='false' fielddelimiter=';'>                 <comment>no_comment</comment>                           <!-- ... -->             </region>              </fileinput> </params>


Replies (1)

RE: Bad param=value pair on command line - Added by Anonymous over 15 years ago

Legacy ID: #6125188 Legacy Poster: Michael Kay (mhkay)

Firstly, 8.8 is a rather old release - you ought to move forward if you want any technical support. Secondly, remember that the command line is parsed by your operating system, not by Saxon. If you use the option to enter the query directly on the command line, then you have to follow the rule imposed by the command line processor that any option/parameter containing a space needs to be in quotes. Write java net.sf.saxon.Query -t -s parameter.xml "{for $r:=//region return $r}" Of course, the query for $x in EXP return $x can always be simplified to EXP.

    (1-1/1)

    Please register to reply