On 16 Dec 2008, at 22:35, Patterson, Gregory Michael wrote:

Hi

Here’s how I’m calling the FOP process. Prior to this, I have a db call to grab the stylesheet, and then I pass something like this: FOPConverter.createPDF(dom, styles, response) and the code below executes. I’m running the stylesheet from a db call right now, but still pulling the actual xml file from my local machine (trying to take it 1 step at a time =] ). If you need more, let me know.

<snip />

Judging from the code, I can't see how that could lead to the earlier message:

Here is the error:
(Location of error unknown)org.apache.fop.fo.ValidationException: Error: First element must be the fo:root formatting object. Found (Namespace URI: "", Local Name: "stylesheet") instead.

This seems indicative of FOP being fed the stylesheet as its input, instead of the result of the transformation. Strange thing is that the XSLT namespace does not seem to be properly processed, which I'm assuming is somehow caused by the fact that you build up the stylesheet as a DOM (?) Can you find out which XML parser and XSLT processor are used at runtime?

You could also try eliminating the DOM-approach from the picture. It seems slightly redundant, since you can easily set it up like:

transformerFactory.newTransformer(new StreamSource(new StringReader(xsltStyle)));

No need to construct a Document, if you don't absolutely need it for other purposes.




HTH!

Cheers

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to