question: public static void transform ( StreamSource src , StreamSource stylesheet , Fop fop ) throws FOPException { Result res = new SAXResult ( fop . getDefaultHandler ( ) ) ; try { TransformerFactory factory = TransformerFactory . newInstance ( ) ; Transformer transformer ; if ( stylesheet == null ) { transformer = factory . newTransformer ( ) ; } else { transformer = factory . newTransformer ( stylesheet ) ; } transformer . setURIResolver ( new LocalResolver ( transformer . getURIResolver ( ) ) ) ; transformer . transform ( src , res ) ; } catch ( Exception e ) { throw new FOPException ( e ) ; } }
target:  Transform an xsl-fo StreamSource to the specified output format.