/** * Sets the input source. * * @param inputSource The input source. * * @throws IOException Thrown on i/o error. */ public void setInputSource(XMLInputSource inputSource) throws IOException { fEntityManager.setEntityHandler(this); fEntityManager.startEntity("$fragment$", inputSource, false, true); //fDocumentSystemId = fEntityManager.expandSystemId(inputSource.getSystemId()); } // setInputSource(XMLInputSource)
/** * Sets the input source. * * @param inputSource The input source. * * @throws IOException Thrown on i/o error. */ public void setInputSource(XMLInputSource inputSource) throws IOException { fEntityManager.setEntityHandler(this); fEntityManager.startDocumentEntity(inputSource); //fDocumentSystemId = fEntityManager.expandSystemId(inputSource.getSystemId()); } // setInputSource(XMLInputSource)
public TeedaXMLConfiguration() { XMLNSDocumentScannerImpl scanner = new TeedaXMLDocumentScannerImpl(); setProperty(DOCUMENT_SCANNER, scanner); addComponent(scanner); fEntityManager.setEntityHandler(scanner); fNamespaceScanner = scanner; }
/** * Scans a document. * * @param complete True if the scanner should scan the document * completely, pushing all events to the registered * document handler. A value of false indicates that * that the scanner should only scan the next portion * of the document and return. A scanner instance is * permitted to completely scan a document if it does * not support this "pull" scanning model. * * @return True if there is more to scan, false otherwise. */ public boolean scanDocument(boolean complete) throws IOException, XNIException { // reset entity scanner fEntityScanner = fEntityManager.getEntityScanner(); // keep dispatching "events" fEntityManager.setEntityHandler(this); do { if (!fDispatcher.dispatch(complete)) { return false; } } while (complete); // return success return true; } // scanDocument(boolean):boolean
/** * Sets the input source. * * @param inputSource The input source or null. * * @throws IOException Thrown on i/o error. */ public void setInputSource(XMLInputSource inputSource) throws IOException { if (inputSource == null) { // no system id was available if (fDTDHandler != null) { fDTDHandler.startDTD(null, null); fDTDHandler.endDTD(null); } return; } fEntityManager.setEntityHandler(this); fEntityManager.startDTDEntity(inputSource); } // setInputSource(XMLInputSource)
throws IOException, XNIException { fEntityManager.setEntityHandler(this); if (fScannerState == SCANNER_STATE_TEXT_DECL) { fSeenExternalDTD = true;
/** * Reset the reference to the appropriate scanner given the version of the * document and start document scanning. * @param scanner - the scanner to use * @param version - the version of the document (XML 1.1 or XML 1.0). */ public void startDocumentParsing(XMLEntityHandler scanner, short version){ if (version == Constants.XML_VERSION_1_0){ fEntityManager.setScannerVersion(Constants.XML_VERSION_1_0); } else { fEntityManager.setScannerVersion(Constants.XML_VERSION_1_1); } // Make sure the locator used by the error reporter is the current entity scanner. fErrorReporter.setDocumentLocator(fEntityManager.getEntityScanner()); // Note: above we reset fEntityScanner in the entity manager, thus in startEntity // in each scanner fEntityScanner field must be reset to reflect the change. // fEntityManager.setEntityHandler(scanner); scanner.startEntity(fXMLSymbol, fEntityManager.getCurrentResourceIdentifier(), fEncoding, null); }
fEntityManager.setEntityHandler(this); fStandalone = standalone; if (fScannerState == SCANNER_STATE_TEXT_DECL) {
fEntityManager.setEntityHandler(null); try { boolean again; fEntityManager.setEntityHandler(XMLDocumentScannerImpl.this); return true; setScannerState(SCANNER_STATE_PROLOG); setDispatcher(fPrologDispatcher); fEntityManager.setEntityHandler(XMLDocumentScannerImpl.this); return true; fEntityManager.setEntityHandler(XMLDocumentScannerImpl.this);
fEntityManager.setEntityHandler(XMLDocumentScannerImpl.this);