Package org.xml.sax

Examples of org.xml.sax.ErrorHandler.error()


          } else {
            if (!internalPath.equals(ROOT_DOCUMENT_PATH)) {
              baseURI = "/" + internalPath;
            }
          }
          errorHandler.error(new OdfValidationException(OdfSchemaConstraint.DOCUMENT_WITHOUT_CONTENT_NOR_STYLES_XML, baseURI));
        } catch (SAXException ex) {
          Logger.getLogger(OdfPackage.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
      InputStream mimetypeStream = pkg.getInputStream(OdfPackage.OdfFile.MEDIA_TYPE.getPath(), true);
View Full Code Here


        }
      }
      InputStream mimetypeStream = pkg.getInputStream(OdfPackage.OdfFile.MEDIA_TYPE.getPath(), true);
      if (internalPath.equals(ROOT_DOCUMENT_PATH) && mimetypeStream == null) {
        try {
          errorHandler.error(new OdfValidationException(OdfSchemaConstraint.PACKAGE_SHALL_CONTAIN_MIMETYPE, pkg.getBaseURI()));
        } catch (SAXException ex) {
          Logger.getLogger(OdfPackage.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
    }
View Full Code Here

    }
  }
  public void error(SAXParseException ex) throws SAXException {
    ErrorHandler eh = getErrorHandler();
    if (eh != null) {
      eh.error(ex);
    } else {
      log.error(ex.getMessage() + SimpleLocator.toString(_loc));
      throw ex;
    }
  }
View Full Code Here

                        erh.warning(e);
                    }
                } else if (ERROR.equals(type)) {
                    if(erh!=null) {
                        e=(SAXParseException) args.nextElement();
                        erh.error(e);
                    }
                } else if (FATALERROR.equals(type)) {
                    if(erh!=null) {
                        e=(SAXParseException) args.nextElement();
                        erh.fatalError(e);
View Full Code Here

                    if(null == errorHandler) {
                        throw e;
                    } else {
                        try {
                            MarshalSAXParseException saxParseException = new MarshalSAXParseException(null, null, null, -1, -1, e, child);
                            errorHandler.error(saxParseException);
                        } catch(SAXException saxParseException) {
                            throw e;
                        }
                    }
                }
View Full Code Here

                    if(null == errorHandler) {
                        throw e;
                    } else {
                        try {
                            MarshalSAXParseException saxParseException = new MarshalSAXParseException(null, null, null, -1, -1, e, child);
                            errorHandler.error(saxParseException);
                        } catch(SAXException saxParseException) {
                            throw e;
                        }
                    }
                }
View Full Code Here

          } else {
            if (!internalPath.equals(ROOT_DOCUMENT_PATH)) {
              baseURI = "/" + internalPath;
            }
          }
          errorHandler.error(new OdfValidationException(OdfSchemaConstraint.DOCUMENT_WITHOUT_CONTENT_NOR_STYLES_XML, baseURI));
        } catch (SAXException ex) {
          Logger.getLogger(OdfPackage.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
      InputStream mimetypeStream = pkg.getInputStream(OdfPackage.OdfFile.MEDIA_TYPE.getPath(), true);
View Full Code Here

        }
      }
      InputStream mimetypeStream = pkg.getInputStream(OdfPackage.OdfFile.MEDIA_TYPE.getPath(), true);
      if (internalPath.equals(ROOT_DOCUMENT_PATH) && mimetypeStream == null) {
        try {
          errorHandler.error(new OdfValidationException(OdfSchemaConstraint.PACKAGE_SHALL_CONTAIN_MIMETYPE, pkg.getBaseURI()));
        } catch (SAXException ex) {
          Logger.getLogger(OdfPackage.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
    }
View Full Code Here

        }
        if (eh == null) {
            return;
        }
        SAXParseException spe = new SAXParseException(message, this);
        eh.error(spe);
    }

    /**
     * Reports a warning
     *
 
View Full Code Here

        }
        if (eh == null) {
            return;
        }
        SAXParseException spe = new SAXParseException(message, this);
        eh.error(spe);
    }

    /**
     * Reports a warning
     *
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.