public static Transformer newTransformer ( Source source , JstlUriResolver uriResolver ) throws TransformerConfigurationException { TRANSFORMER_FACTORY . setURIResolver ( uriResolver ) ; Transformer transformer = TRANSFORMER_FACTORY . newTransformer ( source ) ; // Although newTansformer() is not allowed to return null, Xalan does. // Trap that here by throwing the expected TransformerConfigurationException. if ( transformer == null ) { throw new TransformerConfigurationException ( "newTransformer returned null. XSLT may be invalid." ) ; } return transformer ; }
Create a new Transformer from an XSLT .