public void transform ( Source xmlSource , URIResolver uriResolver , ErrorListener errorListener , Result outputTarget ) throws TransformerException { if ( xmlSource == null ) { throw new IllegalArgumentException ( "xmlSource is null" ) ; } if ( outputTarget == null ) { throw new IllegalArgumentException ( "outputTarget is null" ) ; } transformerImpl . reset ( ) ; transformerImpl . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; transformerImpl . setOutputProperty ( "{http://xml.apache.org/xslt}indent-amount" , "4" ) ; transformerImpl . setURIResolver ( uriResolver ) ; transformerImpl . setErrorListener ( errorListener ) ; // Feature: Add parameters, if required. transformerImpl . transform ( xmlSource , outputTarget ) ; }
Transform XML source using the wrapped XSL transformer of this instance and output to supplied target .