protected void resolveExternalSubsetAndRead()
throws IOException, XNIException {
fDTDDescription.setValues(null, null, fEntityManager.getCurrentResourceIdentifier().getExpandedSystemId(), null);
fDTDDescription.setRootName(fElementQName.rawname);
XMLInputSource src = fExternalSubsetResolver.getExternalSubset(fDTDDescription);
if (src != null) {
fDoctypeName = fElementQName.rawname;
fDoctypePublicId = src.getPublicId();
fDoctypeSystemId = src.getSystemId();
// call document handler
if (fDocumentHandler != null) {
// This inserts a doctypeDecl event into the stream though no
// DOCTYPE existed in the instance document.
fDocumentHandler.doctypeDecl(fDoctypeName, fDoctypePublicId, fDoctypeSystemId, null);