xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ozhan Hassan <oz...@io.mds.rmit.edu.au>
Subject Re: Class Transformer not found
Date Fri, 02 May 2003 06:25:29 GMT
On Fri, 2 May 2003, Jeremias Maerki wrote:

> "Class Transformer not found" simply means that JAXP is not in your
> classpath during compilation. You need to make sure that xml-apis.jar 
> (which contains JAXP) is also in your classpath.

I already have xml-apis.jar in my classpath. Basically, I include all the
jar files from the /lib directory in my class path. Which libraries do I
need to import to use the Transformer object? Is there anything else which 
I am missing?

Kind Regards,
Ozhan

> 
> On 02.05.2003 05:34:30 Ozhan Hassan wrote:
> > Hi hope I am sending this to the correct user mailing list. 
> 
> You are.
> 
> > I am trying to write a simple application to read in an xml file and and
> > xslt style sheet, then produce a PDF. Below is a snippet of the main code
> > which does this:
> > 
> > Driver driver = new Driver();
> > driver.setOutputStream(new FileOutputStream(outFileName));
> > Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
> > MessageHandler.setScreenLogger(logger);
> > driver.setLogger(logger);
> > driver.setRenderer(Driver.RENDER_PDF);
> > 
> > Transformer transformer = TransformerFactory.newInstance()
> > 	.newTransformer(new StreamSource(INPUT_DIR + INPUT_XSLT));
> > transformer.transform(new InputSource(INPUT_DIR + INPUT_XML),
> > 	new SAXResult(driver.getContentHandler()));
> > 
> > However, I am getting the following error:
> > 
> >  [javac]
> > /home/server/test/RendingEngines/FOP/source/fop-0.20.4/build/src/RenderingEngineXslt.java:60:
> > Class Transformer not found.
> >     [javac] Transformer transformer = TransformerFactory.newInstance()
> >     [javac]                 ^
> >     [javac] /home/server/test/RendingEngines/FOP/source/fop-0.20.4/build/src/RenderingEngineXslt.java:61:
> > Class StreamSource not found.
> >     [javac]                .newTransformer(new StreamSource(INPUT_DIR + INPUT_XSLT));
> >     [javac]                                    ^
> >     [javac] 2 errors, 1 warning
> > 
> > I have the xalan_2.3.1.jar file in my class path. I also import the
> > following, where the 2nd import isn't found:
> > 
> > import javax.xml.transform.TransformerFactory; 
> > import org.apache.xalan.xsltc.trax.TransformerFactoryImpl; 
> > 
> > Can anyone help me out?
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Mime
View raw message