0

I want to run an XSLT transformation from the command line, using the Saxon processor that comes bundled with the Oxygen XML editor. I tried the following, but got the error message "Failed to load Main-Class manifest attribute". I realize that I need to create and then invoke a manifest file, but I'm not sure how to do this.

C:\>java -jar "C:\Program Files\Oxygen XML 
Editor 18\frameworks\docbook\xsl\extensions\saxon65.jar" -s:"C:\test.xml" 
-o:"C:\output.xhtml" -xsl:"C:\test.xslt"

Failed to load Main-Class manifest attribute from
C:\Program Files\Oxygen XML Editor
18\frameworks\docbook\xsl\extensions\saxon65.jar
b00kgrrl
  • 559
  • 2
  • 9
  • 30

2 Answers2

0

! I doubt you need a manifest if you take the correct jar.

Take the JARs from S:\Program Files\Oxygen XML Developer 17\lib (similiar path at your system).

Documentation for Saxon 6.5.5 command line:

http://saxon.sourceforge.net/saxon6.5.5/using-xsl.html

java  -jar dir/saxon.jar   [options]   source-document   stylesheet   [ params…]

While in Folder lib of Oxygen via command line:

java -jar saxon.jar -o C:\output.xml C:\input.xml C:\stylesheet.xsl

Documentation for Saxon 9.6 command line:

http://www.saxonica.com/html/documentation9.6/using-xsl/commandline.html

uL1
  • 2,117
  • 2
  • 17
  • 28
0

Why are you trying to do this? If you want to run Saxon from the command line, download the appropriate Saxon release from http://saxon.sf.net/ or http://www.saxonica.com/, rather than trying to extract the right libraries from the oXygen distribution, which may well have been adapted to oXygen's requirements.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • That did occur to me, but I wasn't sure if I could have two instances of Saxon installed at the same time. In the end, I was able to run Saxon from the command line using the Oxygen version of Saxon, albeit with a couple of warning messages. – b00kgrrl Oct 04 '16 at 13:08