Cathy Wilbur
Well Known Member
Want to write a command line to call Saxon processor from a unix script line. Am using Saxon-HE from Unix command line to convert my XML file into a CSV file so it can be uploaded into a DB Table. We are using the DB table as input into our AP interface in ERP E1. Had to switch to Saxon processor because xsltproc does not work with xsl 2.0.
In the command line call I need to specify two classpaths (Classpath for JAVA, Classpath for SAXON jar files)
How would I call the saxon processor in a unix script and pass it the following information
JavaClassPath, SaxonJarClassPath, InputFile, StylesheetFile, OutputFile
So far this is the unix command line I came across on the web. Where would I find all the Saxon command line options to call from a unix shell script.
We have Java on Unix box. Loaded Saxon jar files in a different directory on unix box. Loaded stylesheet on unix box. Loaded InputFile on unix box.
Is this the correct command line to use in my Unix shell Script? Can I specifiy jar file for saxon plus class path. Also, is this how saxon is called from the command line
saxon –jar:saxonjarclasspath/saxon9he.jar -m:javaclasspath??? -s:Input_File -xsl:Stylesheet_File –o:Output_File
java -jar:</path/to/saxon.jar> -s:</path/to/input.xml> -xsl:</path/to/stylesheet> -o:</path/to/outputfile.csv>
In the command line call I need to specify two classpaths (Classpath for JAVA, Classpath for SAXON jar files)
How would I call the saxon processor in a unix script and pass it the following information
JavaClassPath, SaxonJarClassPath, InputFile, StylesheetFile, OutputFile
So far this is the unix command line I came across on the web. Where would I find all the Saxon command line options to call from a unix shell script.
We have Java on Unix box. Loaded Saxon jar files in a different directory on unix box. Loaded stylesheet on unix box. Loaded InputFile on unix box.
Is this the correct command line to use in my Unix shell Script? Can I specifiy jar file for saxon plus class path. Also, is this how saxon is called from the command line
saxon –jar:saxonjarclasspath/saxon9he.jar -m:javaclasspath??? -s:Input_File -xsl:Stylesheet_File –o:Output_File
java -jar:</path/to/saxon.jar> -s:</path/to/input.xml> -xsl:</path/to/stylesheet> -o:</path/to/outputfile.csv>
Last edited: