<[EMAIL PROTECTED]> wrote:
> I get a FOPException while processing a XSL-FO with Fop-0.20.3rc.
> For testing I'm transforming a xml document into xsl-fo ...

> javax.servlet.ServletException: FOPException: no protocol:
> <?xml version="1.0" encoding="iso-8859-1"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>

The message tells: You feed the result of the transformation
as a string to a place where the underlying mechanism expects
an URL.

> /** Durchführen der Transformation, Ergebnis in ein File wegschreiben.
>  */
> StringWriter sw = new StringWriter();
> transformer.transform(xmlStreamSource,new StreamResult(sw));

There is a blatant mismatch between the comment and the
code. The result is not written to a file but to a string
in memory...

>renderFO(new InputSource(sw.toString()),

...which in turn is passed to the InputSource where it expects
an URL.

Lesson: Have only programmers with a clue fiddle with the code.

Search the Web or better the mailing list archives for fop-user
and fop-dev for how to wire an XSL transformer properly to FOP.
Unfortunately, the Servlet example delivered with FOP is a bit
outdated.

J.Pietschmann

Reply via email to