Support #2459
closedHaving difficulty passing JSON to Saxon command line
0%
Description
It appears that I cannot pass JSON to a Saxon transform on the command line using an XSLT parameter IF the JSON has any spaces in it? Example:
@
$ JSON='{foo bar"}'; java -cp $PUBSLIB/saxon-ee-bundle.jar:$PUBSLIB/Saxon-EE.jar net.sf.saxon.Transform -s:sample.xml -xsl:saxon-json.xslt -o:output.xml json=${JSON}
Unrecognized option: bar"}
Saxon-EE 9.5.1.8J from Saxonica
Usage: see http://saxonica.com/documentation/html/using-xsl/commandline.html
Format: net.sf.saxon.Transform options params
Options available: -? -a -catalog -config -cr -dtd -expand -explain -ext -im -init -it -l -m -now -o -opt -or -outval -p -quit -r -repeat -s -sa -strip -t -T -threads -TJ -TP -traceout -tree -u -val -versionmsg -warnings -x -xi -xmlversion -xsd -xsdversion -xsiloc -xsl -xsltversion -y
Use -XYZ:? for details of option XYZ
Params:
param=value Set stylesheet string parameter
+param=filename Set stylesheet document parameter
?param=expression Set stylesheet parameter using XPath
!param=value Set serialization parameter
@
See attached sample.xml and saxon-json.xslt if you want to reproduce the sample command that I have included.
Is there a trick to getting this to work? Thanks for the help.
Files
Please register to edit this issue