[jdom-interest] jdom and fop

Malachi de AElfweald malachi at tremerechantry.com
Wed Oct 30 17:43:56 PST 2002

I can't seem to find the API for the FO stuff....
what are the allowed parameters for setInputSource?


10/30/2002 4:55:53 PM, <pdlnhrd at yahoo.com> wrote:

>I am completely new to using xml in java and doing transformations. 
>After a bit of research I concluded that JDOM was the way to go for
>createing XML documents, but transforming them is something I haven't
>figured out yet.  This is what I am tyring to do:  Create an XML
>object in memory, transform object into a fo object using xsl, than
>render object into pdf.  
>I have about 95% of it working, here is the code that I have so far:
>Element root = new Element("users");
>while (rset.next ()){
>        Element user = new Element("user");
>		user.addContent((new Element("firstname")).setText(rset.getString
>("firstname") ));
>		user.addContent((new Element("lastname")).setText(rset.getString
>		root.addContent(user);
>Document doc = new Document(root);
>XMLOutputter xmlout = new XMLOutputter();
>ByteArrayOutputStream output = new ByteArrayOutputStream();
>Transformer transformer =
>JDOMResult xmlResult = new JDOMResult();
>transformer.transform(new JDOMSource(doc), xmlResult);
>doc = xmlResult.getDocument();
>org.apache.fop.apps.Driver pdfDriver = new
>byte[] content = output.toByteArray();
>here is the error I am getting:
> pdfDriver.setInputSource(xmlResult);
>        <--------------------------------->
>*** Error: No match was found for method
>from the api:
>setInputSource(org.xml.sax.InputSource source)
>          Set the source for the FO document.
>like I said, i am completely new to this and I am trying to make this
>work by piecing bits of information that I have found all over the
>place, there might be and easier way to do this... any information
>would be helpfull or maybe even a tutorial taht someone knows of.  
>Do you Yahoo!?
>HotJobs - Search new jobs daily now
>To control your jdom-interest membership:

More information about the jdom-interest mailing list