Project

Profile

Help

Support #2459

closed

Having difficulty passing JSON to Saxon command line

Added by Jason Mihalick about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2015-09-25
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

sample.xml (40 Bytes) sample.xml Jason Mihalick, 2015-09-26 00:33
saxon-json.xslt (622 Bytes) saxon-json.xslt Jason Mihalick, 2015-09-26 00:33

Please register to edit this issue

Also available in: Atom PDF