&& tFactory.getFeature(SAXResult.FEATURE)) {
// Cast the TransformerFactory to SAXTransformerFactory.
SAXTransformerFactory saxTFactory =
((SAXTransformerFactory)tFactory);
// Create an XMLFilter for each stylesheet.
XMLFilter xmlfilter =
saxTFactory.newXMLFilter(xsltSource);
// Create an XMLReader.
XMLReader parser = createParser();
if (parser == null) {
throw new FOPException("Unable to create SAX parser");
}
// xmlFilter uses the XMLReader as its reader.
xmlfilter.setParent(parser);
return xmlfilter;
} else {
throw new FOPException("Your parser doesn't support the features SAXSource and SAXResult."
+ "\nMake sure you are using a xsl parser which supports TrAX");
}