Exemplo n.º 1
0
 public void endDocument() throws SAXException {
   fSAXLocatorWrapper.setLocator(null);
   try {
     fSchemaValidator.endDocument(null);
   } catch (XMLParseException e) {
     throw Util.toSAXParseException(e);
   } catch (XNIException e) {
     throw Util.toSAXException(e);
   }
 }
Exemplo n.º 2
0
 public void startDocument() throws SAXException {
   fComponentManager.reset();
   fSchemaValidator.setDocumentHandler(this);
   fValidationManager.setEntityState(this);
   fTypeInfoProvider.finishStartElement(); // cleans up TypeInfoProvider
   fNeedPushNSContext = true;
   if (fUnparsedEntities != null && !fUnparsedEntities.isEmpty()) {
     // should only clear this if the last document contained unparsed entities
     fUnparsedEntities.clear();
   }
   fErrorReporter.setDocumentLocator(fSAXLocatorWrapper);
   try {
     fSchemaValidator.startDocument(
         fSAXLocatorWrapper, fSAXLocatorWrapper.getEncoding(), fNamespaceContext, null);
   } catch (XMLParseException e) {
     throw Util.toSAXParseException(e);
   } catch (XNIException e) {
     throw Util.toSAXException(e);
   }
 }
Exemplo n.º 3
0
 public void setDocumentLocator(Locator locator) {
   fSAXLocatorWrapper.setLocator(locator);
   if (fContentHandler != null) {
     fContentHandler.setDocumentLocator(locator);
   }
 }