I've generated a translet using the command line utility:
java -classpath org.apache.xalan.xsltc.cmdline.Compile -o
GeneratedTranslet -p test.xsl -j xsl.
jar test.xsl

I then try to run the following code to perform my transformation:
System.setProperty("javax.xml.transform.TransformerFactory","org.apache.
xalan.xsltc.trax.TransformerFactoryImpl");
TransformerFactory tf = TransformerFactory.newInstance();
try
{
        tf.setAttribute("use-classpath", Boolean.TRUE);
}
catch (IllegalArgumentException iae)
{
        System.err.println("Could not set XSLTC-specific
TransformerFactory attributes.  Transformation failed.");
}
Transformer t = tf.newTransformer(new
StreamSource(GeneratedTranslet.class.getName()));//Fails here
t.transform(new JDOMSource(xml), new StreamResult(System.out));

This produces the following error:
javax.xml.transform.TransformerConfigurationException: Cannot find class
'test_xsl'.
        at
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(Transfor
merFactoryImpl.java:596)
        at
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTransformer(Transf
ormerFactoryImpl.java:520)
        at
test.xsl.GeneratedTransletTest.testTranslet(GeneratedTransletTest.java:1
71)

Is there something underlying that I am missing?  Also, why would it
tell me that it could not find the class test.xml, when I'm specifying
test.xml.GeneratedTranslet?

_________________________________
Jeremy Nix
Southwest Financial Services, LTD.
[EMAIL PROTECTED]
(513) 621-6699 ext.1158

Reply via email to