Title: Unknown formatting object
Sounds like you are taking a .xsl file and doing xsl-><output format here>.  FOP only understands FO.  You have to translate all your xsl files to xml(fo) before trying to translate it to your output format.
 
fop -xsl xslfile.xsl -xml xmlfile.xml pdf.pdf
 
Your xsl file is not to output anythign except fo.  Try using the xslt processor to translate your xml/xsl to fo and review it to make sure that no xsl elements are left.
 
-Adam
 
-----Original Message-----
From: Willis, Matthew [mailto:[EMAIL PROTECTED]
Sent: April 25, 2003 12:28 PM
To: '[EMAIL PROTECTED]'
Cc: Willis, Matthew
Subject: Unknown formatting object

Hi,

I'm getting the following exception:

WARNING: Unknown formatting object http://www.w3.org/1999/XSL/Transform^stylesheet
org.apache.fop.apps.FOPException

when running the following code snippet to set up an embedded FOP:

Driver fopDriver = new Driver(new InputSource(XSL_FO_FILE_PATH), new FileOutputStream(OBI_PDF_PO_FILE_PATH));
fopDriver.setRenderer(Driver.RENDER_PDF);
fopDriver.run();

While researching the problem, I found in one of the FOP FAQ's that receiving something like this error means that I need to check that the xsl namespace is set to http://www.w3.org/1999/XSL/Transform.  I've double-checked this and it appears to be set correctly (see below).

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format">

Anyone have any clues?

Here are the versions I'm using for the various jars:

xalan 2.0.0
xerces 1.2.3
fop 0.18 DEV

Running fop at the command line works fine with these.  Running it embedded on the other hand...

Regards,
Matt


Reply via email to