On 17.Feb.2002 -- 06:21 AM, Stephen Clarke wrote:
> So I've been thinking, the thing to do is to figure out how to run xerces at
> the command line in order to test my code that way and check error messages.
This is what I do to run xalan (the XSLT processor) from command line (in a script):
C2_HOME=/path/to/xml-cocoon2
export
CLASSPATH=$CLASSPATH:$C2_HOME/lib/core/xalan-2.2.0.jar:$C2_HOME/lib/core/xerces-1.4.4.jar:$C2_HOME/lib/core/xml-apis.jar
java org.apache.xalan.xslt.Process -IN $1 -XSL $2 $@
putting this into a .bat, replace "export" with "set" and "$C2_HOME" with "%C2_HOME%"
and all ":" with ";", set C2_HOME correctly and it should work on Windows.
Well, you get the idea: You need to include the three jars in your classpath
and then you can start Xalan by pointing java to the above class. Use -IN for
your XML, -XSL for your XSL and -OUT if you want the result saved to a file.
There are some debug switches which are quite useful, too:
-TT trace templates
-TG trace result element generation
-TS trace selection events
-TTC trace template children
HTH,
Chris.
--
C h r i s t i a n H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>