getConfiguration().getDocumentPool().add(rawDoc, key);
DocumentImpl includedDoc = pss.loadStylesheetModule(rawDoc);
// 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());
outermost = includedDoc.getDocumentElement();