return dtm;
}else if ((null != source) && source instanceof DOMSource) {
final DOMSource domsrc = (DOMSource) source;
final org.w3c.dom.Node node = domsrc.getNode();
final DOM2SAX dom2sax = new DOM2SAX(node);
SAXImpl dtm;
if (size <= 0) {
dtm = new SAXImpl(this, source, documentID,
whiteSpaceFilter, null, doIndexing,
DTMDefaultBase.DEFAULT_BLOCKSIZE,
buildIdIndex, newNameTable);
} else {
dtm = new SAXImpl(this, source, documentID,
whiteSpaceFilter, null, doIndexing,
size, buildIdIndex, newNameTable);
}
dtm.setDocumentURI(source.getSystemId());
addDTM(dtm, dtmPos, 0);
dom2sax.setContentHandler(dtm);
try {
dom2sax.parse();
}
catch (RuntimeException re) {
throw re;
}
catch (Exception e) {