You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Gustafsson <gu...@telia.com> on 2005/02/01 16:02:52 UTC

Trouble getting fop to work with cocoon CLI

Hi.

I have this strange problem with fop in combination with cocoon.

What I try to do is to make a offline archive of my cocoon pdf files. I use
the cocoon command line interface (CLI) to accomplish this. The problem
however is that fop fail's to render images. It prints out the error message
shown below and omits the image from the output, hence the pdf is rendered
without the image.

"
ERROR   2005-02-01 07:33:01.749 [manager.] (): Unsupported element
encountered: external-graphic (Namespace: default). Source context:
file:/C:/software/tomcat/webapps/cocoon/index.fo (line: 1, col: 1)
ERROR   2005-02-01 07:33:01.759 [manager.] (): Expected XSL-FO (root,
page-sequence, etc.), SVG (svg, rect, etc.) or elements from another
supported language.
ERROR   2005-02-01 07:33:01.829 [manager.] (): no handler defined for
external-graphic foreign xml
"

If I render the pdf the normal way, using cocoon as a servlet the result is
as desired, the same is true when I use the CLI to generate the xsl-fo xml
and after that uses fop.bat on the xml.

My first thought was that my java environment used the wrong Xerces or Xalan
files. However the problem persisted even after placing the same Xalan and
Xerces files found in my tomcat endorsed folder in the jre endorsed folder.

The error message indicate that the namespace of the external-graphic
element is omitted for some reason. When trying to use a none existing fo
element such as <fo:blablabla /> the same error message is shown. However
the Namespace : default is change to Namespace:
http://www.w3.org/1999/XSL/Format) for the blablabla object.

I run Cocoon 2.0 binary version. and fop 0.20.5. I have tried to do a
complete reinstall of cocoon (only updating the batik.jar so that cocoon
will start on tomcat5). In this test environment I used a minimal sitemap
and a static xsl:fo file. The result is the same. The pdf is generated as it
should when called through the cocoon servlet but fails when called through
the CLI.

If anyone has had this problem I would be very happy to find a solution. I
have no problem making some adjustments to cocoon or fop source files but as
it is now I don't know where to start looking for the problem.

Best regards
Peter Gustafsson




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org