How can I use XSLTC in Java 5.0 to test a transformation?
Posted: Fri Aug 06, 2004 11:47 pm
I have a style sheet and a document that is transforming properly when I test in oXygen, but in my application the transformation doesn't work quite right.
I'm not sure if I am doing anything illegal, but since oXygen didn't complain I assumed not.
As part of my testing I wanted to try to force oXygen to use the same version of the transformer that is included with Java 1.4.2_05 or Java 5.0 - both have the same problem in my program. I know that Java 5.0 uses XSLTC, and 1.4.2 uses a version of Xalan, but I suspect not the same version that oXygen uses.
I tried forcing the use of the XSLTC transformer (I run oXygen under the latest Java 5 snapshot) by specifying the class to use for JAXP as com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl which seems to be how it is included in the JRE 5.0.
When I try this I get an error setting up the transfromer. the error details are the class name and nothing more (i.e. NOT class not found).
Has anyone tried this and gotten it to work?
This may not help with my problem anyway of course... the original problem qith my transform not working is related to namespaces I think. Something I haven't done much with, since I just know enough about XSLT/XML to hack together the transformation I have. But I thought I had the namespace issues licked when I finally got the transformation working within oXygen, only to be surprized when my application had trouble using the same data.
I'm not sure if I am doing anything illegal, but since oXygen didn't complain I assumed not.
As part of my testing I wanted to try to force oXygen to use the same version of the transformer that is included with Java 1.4.2_05 or Java 5.0 - both have the same problem in my program. I know that Java 5.0 uses XSLTC, and 1.4.2 uses a version of Xalan, but I suspect not the same version that oXygen uses.
I tried forcing the use of the XSLTC transformer (I run oXygen under the latest Java 5 snapshot) by specifying the class to use for JAXP as com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl which seems to be how it is included in the JRE 5.0.
When I try this I get an error setting up the transfromer. the error details are the class name and nothing more (i.e. NOT class not found).
Has anyone tried this and gotten it to work?
This may not help with my problem anyway of course... the original problem qith my transform not working is related to namespaces I think. Something I haven't done much with, since I just know enough about XSLT/XML to hack together the transformation I have. But I thought I had the namespace issues licked when I finally got the transformation working within oXygen, only to be surprized when my application had trouble using the same data.