You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Zahidul Islam <fa...@yahoo.com> on 2003/05/19 09:12:04 UTC

How to change the Deprecated methods

Hello
        i am using the following code to (i got it from xml.apache.org) make a pdf output from an xml and xsl file using servlet:
 
XSLTInputHandler input
  =new XSLTInputHandler(new File("foo.xml"), new File("foo.xsl"));
Driver driver=new Driver();
driver.setOutputStream(response.getOutputStream());
driver.setRenderer(Driver.RENDER_PDF);
driver.render(input.getParser(), input.getInputSource());
 
But while compiling it shows warning for using deprecated methods. from documentation i come to know that i have to replace getParser() and getInputSource() with TraxInputHandler run(Driver) method. And i try that in this way :
 
TraxInputHandler input
  =new TraxInputHandler(new File("foo.xml"), new File("foo.xsl"));
Driver driver=new Driver();
driver.setOutputStream(response.getOutputStream());
driver.setRenderer(Driver.RENDER_PDF);
//driver.render(input.getParser(), input.getInputSource());
input.run(driver);
 
But it generate FOPException.
 
pls someone help me. very urgent.




S. M. Zahidul Islam
Software Engineer 
IECB


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

Re: How to change the Deprecated methods

Posted by Zahidul Islam <fa...@yahoo.com>.
Thanks for ur reply. i hope it will work.. i will test it after a while. again thanks for ur cooperation.

Jeremias Maerki <de...@greenmail.ch> wrote:Try this:
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-fop/examples/embedding/java/embedding/ExampleXML2PDF.java?rev=1.1.2.1

On 20.05.2003 11:58:25 Zahidul Islam wrote:
> thanks for ur reply. but i am afraid that i cant find anything new in
> ur given url. the url is showing the same code as i wrote in my request.
> so if u have another ide or code snippet pls help me.



Jeremias Maerki


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




S. M. Zahidul Islam
Software Engineer 
IECB


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

Re: How to change the Deprecated methods

Posted by Jeremias Maerki <de...@greenmail.ch>.
Try this:
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-fop/examples/embedding/java/embedding/ExampleXML2PDF.java?rev=1.1.2.1

On 20.05.2003 11:58:25 Zahidul Islam wrote:
> thanks for ur reply. but i am afraid that i cant find anything new in
> ur given url. the url is showing the same code as i wrote in my request.
> so if u have another ide or code snippet pls help me.



Jeremias Maerki


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


Re: How to change the Deprecated methods

Posted by Zahidul Islam <fa...@yahoo.com>.
thanks for ur reply. but i am afraid that i cant find anything new in ur given url. the url is showing the same code as i wrote in my request.
so if u have another ide or code snippet pls help me.

Jeremias Maerki <de...@greenmail.ch> wrote:
Please see the URL below for pointers to examples how it could/should be
done today. The examples there are using JAXP instead of InputHandlers.
Especially look at ExampleXML2PDF.java which does what you do now. The
examples are available if 0.20.5 release candidates or from CVS.

http://xml.apache.org/fop/embedding.html#examples

On 19.05.2003 09:12:04 Zahidul Islam wrote:
> Hello
> i am using the following code to (i got it from xml.apache.org) make a pdf output from an xml and xsl file using servlet:
> 
> XSLTInputHandler input
> =new XSLTInputHandler(new File("foo.xml"), new File("foo.xsl"));
> Driver driver=new Driver();
> driver.setOutputStream(response.getOutputStream());
> driver.setRenderer(Driver.RENDER_PDF);
> driver.render(input.getParser(), input.getInputSource());
> 
> But while compiling it shows warning for using deprecated methods. from documentation i come to know that i have to replace getParser() and getInputSource() with TraxInputHandler run(Driver) method. And i try that in this way :
> 
> TraxInputHandler input
> =new TraxInputHandler(new File("foo.xml"), new File("foo.xsl"));
> Driver driver=new Driver();
> driver.setOutputStream(response.getOutputStream());
> driver.setRenderer(Driver.RENDER_PDF);
> //driver.render(input.getParser(), input.getInputSource());
> input.run(driver);
> 
> But it generate FOPException.
> 
> pls someone help me. very urgent.


Jeremias Maerki


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



S. M. Zahidul Islam
Software Engineer 
IECB


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

Re: How to change the Deprecated methods

Posted by Jeremias Maerki <de...@greenmail.ch>.
Please see the URL below for pointers to examples how it could/should be
done today. The examples there are using JAXP instead of InputHandlers.
Especially look at ExampleXML2PDF.java which does what you do now. The
examples are available if 0.20.5 release candidates or from CVS.

http://xml.apache.org/fop/embedding.html#examples

On 19.05.2003 09:12:04 Zahidul Islam wrote:
> Hello
>         i am using the following code to (i got it from xml.apache.org) make a pdf output from an xml and xsl file using servlet:
>  
> XSLTInputHandler input
>   =new XSLTInputHandler(new File("foo.xml"), new File("foo.xsl"));
> Driver driver=new Driver();
> driver.setOutputStream(response.getOutputStream());
> driver.setRenderer(Driver.RENDER_PDF);
> driver.render(input.getParser(), input.getInputSource());
>  
> But while compiling it shows warning for using deprecated methods. from documentation i come to know that i have to replace getParser() and getInputSource() with TraxInputHandler run(Driver) method. And i try that in this way :
>  
> TraxInputHandler input
>   =new TraxInputHandler(new File("foo.xml"), new File("foo.xsl"));
> Driver driver=new Driver();
> driver.setOutputStream(response.getOutputStream());
> driver.setRenderer(Driver.RENDER_PDF);
> //driver.render(input.getParser(), input.getInputSource());
> input.run(driver);
>  
> But it generate FOPException.
>  
> pls someone help me. very urgent.


Jeremias Maerki


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