You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Mikael St�ldal <mi...@home.se> on 2001/08/19 14:24:25 UTC

SAX

My application which used FOP by fiering SAX event on it stopped working 
when I updated from FOP 0.19 to FOP 0.20.

I used the following code for FOP 0.19:

	Driver driver = new Driver();
	driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",
			   Version.getVersion());
	driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
	driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
           driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
           driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
	driver.setOutputStream(myOutputStream);

	ContentHandler ch =  driver.getContentHandler();
	// Fire SAX events on ch

	driver.format();
     	driver.render();

How do I change this for FOP 0.20?


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: SAX

Posted by Michel Lehon <Mi...@Outwares.com>.
Mikael,

sadly the ContentHandler returned by driver.getContentHandler() is broken...
and the driver.format() and driver.render() methods do not exist anymore.

You should take a look at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3143
which gives a clean solution for the broken ContentHandler (but requires you
to rebuild FOP)
and remove the calls to driver.format and driver.render.

Could any of the commiter look into this broken ContentHandler issue, as it
is a huge problem
for many people (and it will need to be fixed if Cocoon2 is to use FOP).

Michel.

> -----Original Message-----
> From: Mikael Steldal [mailto:mikael.staldal@home.se]
> Sent: Sunday, 19 August, 2001 14:24
> To: fop-dev@xml.apache.org
> Subject: SAX
>
>
> My application which used FOP by fiering SAX event on it stopped working
> when I updated from FOP 0.19 to FOP 0.20.
>
> I used the following code for FOP 0.19:
>
> 	Driver driver = new Driver();
> 	driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",
> 			   Version.getVersion());
>
> driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
> 	driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
>
> driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping");
>
> driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping");
> 	driver.setOutputStream(myOutputStream);
>
> 	ContentHandler ch =  driver.getContentHandler();
> 	// Fire SAX events on ch
>
> 	driver.format();
>      	driver.render();
>
> How do I change this for FOP 0.20?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org