[jdom-interest] Virus

Olivier Coppel olivier.coppel at akazi.com
Tue Nov 12 05:42:18 PST 2002


Don't open my mail with subject "you have a greeting card from Olivier".

it's a virus !!!!!!!!!!!

It's the W32.friendgreet virus.

Sorry !!! my norton antivirus has just detected it !


Olivier Coppel
Akazi Technologies
6a chemin des Pres - F-38240 Meylan


	www.akazi.com <http://www.akazi.com>  - tel +33 (0)4 56 38 2000 - fax +33
(0)4 56 38 2001






> -----Message d'origine-----
> De : jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]De la part de Laurent Bihanic
> Envoye : mardi 5 novembre 2002 10:22
> A : pdlnhrd at yahoo.com
> Cc : jdom-interest at jdom.org
> Objet : Re: [jdom-interest] jdom and fop
>
>
>
> Hi,
>
> pdlnhrd at yahoo.com wrote:
>
> > here is the error I am getting:
> >  pdfDriver.setInputSource(xmlResult);
> >         <--------------------------------->
> > *** Error: No match was found for method
> > "setInputSource(org.jdom.transform.JDOMResult)".
>
> You get this error because JDOMResult is not a SAX InputSource;
> it extends
> javax.xml.transform.sax.SAXResult. So, you can not use JDOMResult
> to interface
> the XSLT processor with FOP. Anyway, this would only lead to poor
> performances
> as FOP expects a SAX event flow as input and the XSLT processor
> can't directly
> generate it, thus avoiding the overhead (CPU, memory + GC) of creating a
> temporary JDOM document and firing the SAX events from it.
>
> > 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.
>
> The best way to interface the XSLT processor and FOP is to use a
> SAX pipeline.
> The FOP Driver class provides specific methods to ease this, the
> input of your
> XSL transformation can still be a JDOM document (using JDOMSource).
> Here's an example (using FOP 0.20.3 API):
>
>     ByteArrayOutputStream output = new ByteArrayOutputStream();
>
>     // Get a FOP rendering engine.
>     Driver pdfDriver = new Driver();
>     pdfDriver.setRenderer(Driver.RENDER_PDF);
>     pdfDriver.setOutputStream(output);
>
>     // Get a JAXP TrAX Transformer (please use Templates to cache
> stylesheets).
>     Transformer transformer = ...;
>
>     // Apply XSL Transformation on the JDOM Document, redirecting the
>     // result to the FOP rendering engine.
>     transformer.transform(new JDOMSource(doc),
>                           new SAXResult(pdfDriver.getContentHandler()));
>
>     // Send result to navigator.
>     byte[] content = output.toByteArray();
>     ...
>
> That's it. No need to call Driver.run(), etc.
>
> Hope this helps,
>
> Laurent
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yourad
dr at yourhost.com




More information about the jdom-interest mailing list