text: Actually the problem is quite simple.
  Batik writes the output to a stream and then immediately closes it.
  When that stream is inside cocoon it tries to do things with the stream later on
  causing problems. Usually when viewing with "forrest run" it works but not
  always.
  Look at this bug:
  > I'd like to follow up on the problem Anders Nilsson reported on Jan 04.
  >
  >
  >
  > I wanted to extend the FOP website a bit adding a few SVG graphics. I'm
  > experiencing exactly the same problem as Anders. PNGs generated are 0
  > bytes.
  >
  > And I can answer Jeff's questions:
  > - If I run Forrest using "forrest run" the SVGs don't render. I get the
  > following error message on the console output from forrest:
  <snip>
  > The above looks correct although the last two lines are suspect.
  >
  > As for Bernhard Huber's idea: My SVGs don't contain a namespace
  > declaration.
  >
  > I hope this helps in finding the problem. In the meantime I'll dig
  > around in the code and ML archives a little more. Thanks in advance for
  > any ideas and your help.
  >
  > Sorry for the lengthy post.
  >
  > Jeremias Maerki
  > FOP committer