Code example for SAXTransformerFactory

Methods: getErrorListenernewTemplatessetErrorListenersetURIResolver

0
	throws TransformerConfigurationException { 
        if (_xsltcFactory == null) {
            createXSLTCTransformerFactory(); 
        } 
	if (_errorlistener != null) {
	    _xsltcFactory.setErrorListener(_errorlistener);	    
	} 
	if (_uriresolver != null) {
	    _xsltcFactory.setURIResolver(_uriresolver);
	} 
	Templates templates = _xsltcFactory.newTemplates(src);
	if (templates == null ) return null;
	return newXMLFilter(templates); 
    } 
 
    /* 
     * Create an XMLFilter that uses the given source as the 
     * transformation instructions. Uses 
     * org.apache.xalan.xsltc.trax.TransformerFactory. 
     */ 
    public XMLFilter newXMLFilter(Templates templates) 
	throws TransformerConfigurationException { 
	try { 
            return new org.apache.xalan.xsltc.trax.TrAXFilter(templates);
        } 
        catch(TransformerConfigurationException e1) {
            if (_xsltcFactory == null) {
                createXSLTCTransformerFactory(); 
            } 
	    ErrorListener errorListener = _xsltcFactory.getErrorListener();
            if(errorListener != null) {
                try { 
                    errorListener.fatalError(e1);
                    return null; 
                }