logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: invoke xalan from the command line: msg#00031

Subject: Re: invoke xalan from the command line
/THUFIR HAWAT/:

[thufir@localhost xml]$ java -cp /usr/share/java/xalan-j2.jar org.apache.xalan.Version Xalan Java 2.7.0 [thufir@localhost xml]$ java -cp /usr/share/java/xalan-j2.jar org.apache.xalan.xslt.Process -IN foo.xhtml -XSL foo.xsl -OUT foo.out

(Location of error unknown)XSLT Error
(java.lang.NoClassDefFoundError): org/apache/xml/serializer/SerializerTrace Exception in thread "main" java.lang.RuntimeException: org/apache/xml/serializer/SerializerTrace
        at org.apache.xalan.xslt.Process.doExit(Process.java:1153)
        at org.apache.xalan.xslt.Process.main(Process.java:1126)
...
In any event, Xalan seems to be installed and thanks for the help with the classpath.

Just, it seems you have to add the Serializer library in addtion:

java -cp /usr/share/java/xalan-j2.jar;/usr/share/java/xalan-j2-serializer.jar org.apache.xalan.xslt.Process ...

You might consider setting up the CLASSPATH environment variable instead of specifying -cp command-line option with every command, or just create a script with a much shorter name.

--
Stanimir




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>