}
fRealDTDScanner = fXML11DTDScanner;
// is there a dtd validator in the pipeline?
// if so, it'll be XML 1.0; need to replace
// it...
XMLDocumentFilter val = null;
if((val = (XMLDocumentFilter )fComponentManager.getProperty(DTD_VALIDATOR_PROPERTY)) != null) {
// do we need to new up a replacement?
if(fXML11DTDValidator == null) {
fXML11DTDValidator = new XML11DTDValidator();
}
fXML11DTDValidator.reset(fComponentManager);
// now take val out of the picture...
if(val.getDocumentSource() != null) {
val.getDocumentSource().setDocumentHandler(fXML11DTDValidator);
fXML11DTDValidator.setDocumentSource(val.getDocumentSource());
}
if(val.getDocumentHandler() != null) {
val.getDocumentHandler().setDocumentSource(fXML11DTDValidator);
fXML11DTDValidator.setDocumentHandler(val.getDocumentHandler());
}
}
// is there a namespace binder in the pipeline?
// if so, it'll be XML 1.0; need to replace
// it... (REVISIT: does it make more sense here just to
// have a feature???)
XMLDocumentFilter nsb = null;
if((nsb = (XMLDocumentFilter )fComponentManager.getProperty(NAMESPACE_BINDER_PROPERTY)) != null) {
// do we need to new up a replacement?
if(fXML11NamespaceBinder == null) {
fXML11NamespaceBinder = new XML11NamespaceBinder();
}
fXML11NamespaceBinder.reset(fComponentManager);
// now take nsb out of the picture...
if(nsb.getDocumentSource() != null) {
nsb.getDocumentSource().setDocumentHandler(fXML11NamespaceBinder);
fXML11NamespaceBinder.setDocumentSource(nsb.getDocumentSource());
}
if(nsb.getDocumentHandler() != null) {
nsb.getDocumentHandler().setDocumentSource(fXML11NamespaceBinder);
fXML11NamespaceBinder.setDocumentHandler(nsb.getDocumentHandler());
}
}
// now do the same to the DTD pipeline.
// Since a full-featured DTD processor will always
// be an XMLDTDFilter and an XMLDTDContentModelFilter,