The screenshots might be a little confusing, since I'm passing Switch variables %1 and %2 to Saxon.cmd, which catches these and use it otherwise.
The command I'm executing is Saxon.cmd, and this batch file holds this:
Code: Select all
C:\ProgramData\Oracle\Java\javapath\java.exe -jar "D:\Scripts\Saxon\build\saxon9he.jar" -s:%1 -xsl:%2 -o:%3 >> "D:\Scripts\Saxon\SaxonError.log" 2>&1
" >> "D:\Scripts\Saxon\SaxonError.log" 2>&1" is logging for batch files in Windows, you can ignore that.
Switch argument input:
Code: Select all
"%1" "D:\Scripts\Saxon\[Job.JobState].xsl" "%2\output.xml"
So my batch file catches the input this way:
Batch %1 catches "%1"
Batch %2 catches "D:\Scripts\Saxon\[Job.JobState].xsl"
Batch %3 catches "%2\output.xml"
Hmm, too much information how my setup works! Let's go find a Mac solution, I'm not that experienced with Mac's but let's give it a try.
In your Command or Path you can try to specify your path to java with the Saxon jar:
path/to/java -jar path/to/saxon9he.jar
Your arguments need something like this:
-s:%1 -xsl:path/to/stylesheet.xsl -o:%2\output.xml
Notice the %2 at the end, it's not %3 like in my batch file!
Actually output.xml is not necessary since the XLS stylesheet does the file naming, however I couldn't get Saxon to work without specifying the output file.
I hope you can get it to work this way, else we need a way to 'translate' my Saxon.cmd to a Mac version, I hope some other forum member can join in to help us with that!