protected FormattingResults calcResults(FopFactory fopFactory, String outputFormat, Source foDocumentSrc, PlaceholderReplacementHandler.PlaceholderLookup placeholderLookup) throws Docx4JException {
Fop fop = null;
Result result = null;
try {
fop = fopFactory.newFop(outputFormat, new NullOutputStream());
result = new SAXResult(new PlaceholderReplacementHandler(fop.getDefaultHandler(), placeholderLookup));
} catch (FOPException e) {
throw new Docx4JException("Exception setting up result for fo transformation: " + e.getMessage(), e);
}
Transformer transformer;