Пример #1
0
 public void parse(InputSource input) throws IOException, SAXException {
   try {
     LocationFilter handler =
         new LocationFilter(new ErrorFilter(contentHandler, ceh, localizer), systemId);
     transformer.transform(transformSource, new SAXResult(handler));
     SAXException exception = handler.getException();
     if (exception != null) throw exception;
   } catch (TransformerException e) {
     if (e.getException() instanceof IOException) throw (IOException) e.getException();
     throw ValidatorImpl.toSAXException(e);
   }
   if (ceh.getHadErrorOrFatalError()) throw new SAXException(new IncorrectSchemaException());
 }
Пример #2
0
 public Schema getSchema() throws IncorrectSchemaException, SAXException {
   if (validator == null || ceh.getHadErrorOrFatalError())
     throw new IncorrectSchemaException();
   for (Enumeration enum = modeMap.keys(); enum.hasMoreElements();) {
Пример #3
0
 public void parse(InputSource input) throws SAXException, IOException {
   reader.parse(input);
   if (ceh.getHadErrorOrFatalError()) throw new SAXException(new IncorrectSchemaException());
 }