try {
if (styleDoc == null) {
throw new Exception("Stylesheet for transform is null");
}
docFetchRequired = inSourceDoc != null;
CompilerInfo info = config.getDefaultXsltCompilerInfo();
info.setErrorListener(new StandardErrorListener());
String asyncSourceURI = null;
// for now - don't use aync when using the JavaScript API calls that return a result
if (docFetchRequired &&