StyleNodeFactory snFactory = new StyleNodeFactory(config, getPreparedStylesheet().getErrorListener());
includedDoc = PreparedStylesheet.loadStylesheetModule(source, config, getNamePool(), snFactory);
// allow the included document to use "Literal Result Element as Stylesheet" syntax
ElementImpl outermost = includedDoc.getDocumentElement();
if (outermost instanceof LiteralResultElement) {
includedDoc = ((LiteralResultElement)outermost)
.makeStylesheet(getPreparedStylesheet(), snFactory);
outermost = includedDoc.getDocumentElement();