/** * @see org.apache.xerces.xni.parser.XMLParserConfiguration#setDTDHandler(org.apache.xerces.xni.XMLDTDHandler) */ @Override public void setDTDHandler(XMLDTDHandler dtdHandler) { config.setDTDHandler(dtdHandler); }
/** Default constructor. */ public SchemaDOMParser(XMLParserConfiguration config) { this.config = config; config.setDocumentHandler(this); config.setDTDHandler(this); config.setDTDContentModelHandler(this); }
/** * Constructs a document parser using the default symbol table * and grammar pool. */ protected AbstractXMLDocumentParser(XMLParserConfiguration config) { super(config); // set handlers config.setDocumentHandler(this); config.setDTDHandler(this); config.setDTDContentModelHandler(this); } // <init>(XMLParserConfiguration)
private void restoreHandlers() { fConfiguration.setDocumentHandler(this); fConfiguration.setDTDHandler(this); fConfiguration.setDTDContentModelHandler(this); }
/** * @see org.w3c.dom.ls.LSParser#abort() */ public void abort () { // If parse operation is in progress then reset it if (fBusy) { fBusy = false; if (currentThread != null) { abortNow = true; if (abortHandler == null) { abortHandler = new AbortHandler(); } fConfiguration.setDocumentHandler(abortHandler); fConfiguration.setDTDHandler(abortHandler); fConfiguration.setDTDContentModelHandler(abortHandler); if (currentThread == Thread.currentThread()) { throw Abort.INSTANCE; } currentThread.interrupt(); } } return; // If not busy then this is noop }
fSchemaValidationManager = new ValidationManager(); fUnparsedEntityHandler = new UnparsedEntityHandler(fSchemaValidationManager); config.setDTDHandler(fUnparsedEntityHandler); fUnparsedEntityHandler.setDTDHandler(xmlReader); xmlReader.setDTDSource(fUnparsedEntityHandler);
fSchemaValidationManager = new ValidationManager(); fUnparsedEntityHandler = new UnparsedEntityHandler(fSchemaValidationManager); config.setDTDHandler(fUnparsedEntityHandler); fUnparsedEntityHandler.setDTDHandler(domParser); domParser.setDTDSource(fUnparsedEntityHandler);