Whole cmd
java -cp "c:\Program Files\Stylus Studio 2008 XML Enterprise Suite Release 2\Components\DataDirect XQuery\lib\ddxq.jar";"c:\Program Files\Stylus Studio 2008 XML Enterprise Suite Release 2\Components\XML Converters for Java\lib\XMLConverters.jar";"c:/PROGRA~1/STYLUS~1/Components/XML Converters for Java/lib/codehaus/wstx-asl.jar" com.ddtek.xquery.Query -s converter:CSV?file:///C:/MA540CSV.20080708 -o output.xml MA540to810.xquery
Subject:Running xquery with a source conversion from command line Author:Minollo I. Date:04 Aug 2008 12:42 PM
You won't be able to use the -s argument to specify an XML converters URI (even if that's a very good topic for an enhancement request in the command line utlity).
You can achieve a similar result using declaring an external variable in your XQuery...
declare variable $input as xs:string external;
...and then using the fn:doc() function to navigate the content of the input file; so, instead of ...
/table/...
...you would do...
fn:doc($input)/table/...
Then your cmdline can become:
java -cp "c:\Program Files\Stylus Studio 2008 XML Enterprise Suite Release 2\Components\DataDirect XQuery\lib\ddxq.jar";"c:\Program Files\Stylus Studio 2008 XML Enterprise Suite Release 2\Components\XML Converters for Java\lib\XMLConverters.jar";"c:/PROGRA~1/STYLUS~1/Components/XML Converters for Java/lib/codehaus/wstx-asl.jar" com.ddtek.xquery.Query -o output.xml MA540to810.xquery input="converter:CSV?file:///C:/MA540CSV.20080708"