// Parse the input document and construct DOM object
// Trust the DTMManager to pick the right parser and
// set up the DOM correctly.
XSLTCDTMManager dtmManager = (XSLTCDTMManager)multiplexer
.getDTMManager();
DOMEnhancedForDTM enhancedDOM =
(DOMEnhancedForDTM) dtmManager.getDTM(new StreamSource(uri),
false, null, true, false,
translet.hasIdCall(), cacheDOM);
newdom = enhancedDOM;
// Cache the stylesheet DOM in the Templates object
if (cacheDOM) {
TemplatesImpl templates = (TemplatesImpl)translet.getTemplates();
if (templates != null) {
templates.setStylesheetDOM(enhancedDOM);
}
}
translet.prepassDocument(enhancedDOM);
enhancedDOM.setDocumentURI(uri);
}
// Wrap the DOM object in a DOM adapter and add to multiplexer
final DOMAdapter domAdapter = translet.makeDOMAdapter(newdom);
multiplexer.addDOMAdapter(domAdapter);