if (processXInclude) result.setHandler((ContentHandler)xinclude.getReceiver()); else result.setHandler((ContentHandler)receiver);
ReceiverToSAX filter; if (processXInclude) { filter = (ReceiverToSAX)xinclude.getReceiver(); } else { filter = (ReceiverToSAX) receiver; } result.setHandler(filter.getContentHandler()); result.setLexicalHandler(filter.getLexicalHandler()); filter.setLexicalHandler(xslHandler); filter.setContentHandler(xslHandler);
	protected void setXSLHandler() {		if (templates == null)			return;		if (xslHandler != null) {			SAXResult result = new SAXResult();			boolean processXInclude =				getProperty(					EXistOutputKeys.EXPAND_XINCLUDES,					"yes").equals(					"yes");			if (processXInclude)				result.setHandler((ContentHandler)xinclude.getReceiver());			else				result.setHandler((ContentHandler)receiver);			xslHandler.setResult(result);			if (processXInclude) {				xinclude.setReceiver(new ReceiverToSAX(xslHandler));				receiver = xinclude;			} else				receiver = new ReceiverToSAX(xslHandler);		}	}