Thanks for your help. We tried your code (using FOP 0.20.3) and got the 
message: TTURIResolver not found, is that your own class?
MAVI.


Am Freitag, 5. April 2002 12:36 schrieben Sie:
> what version of FOP do you use?
> try this code.
> it works perfectly with 0.20.3 FOP
>
>   public static void execWFop(String xmlFile, String xslFile, String
> outputFile){
>    try{
>
>     try {
>       javax.xml.transform.stream.StreamSource xmlSource=new
> javax.xml.transform.stream.StreamSource(new java.io.File(xmlFile));
>       javax.xml.transform.stream.StreamSource xslSource=new
> javax.xml.transform.stream.StreamSource(new java.io.File(xslFile));
>       javax.xml.transform.Transformer
> transformer=javax.xml.transform.TransformerFactory.newInstance()
>         .newTransformer(xslSource);
>       transformer.setURIResolver(new TTURIResolver());
>       org.apache.fop.apps.Driver driver=new org.apache.fop.apps.Driver();
>       driver.setOutputStream(new java.io.FileOutputStream(outputFile));
>       driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);
>       transformer.transform(xmlSource,
>         new javax.xml.transform.sax.SAXResult(driver.getContentHandler()));
>
>       System.exit(2);
>      }
>     catch( Exception e ) {
>       e.printStackTrace(System.out);
>     }
> }
>
> BR,
> Fishy

Reply via email to