xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwi...@apache.org
Subject cvs commit: xml-xerces/java/src/org/apache/xerces/jaxp DocumentBuilderImpl.java
Date Wed, 07 Feb 2001 01:56:09 GMT
edwingo     01/02/06 17:56:08

  Modified:    java/src/org/apache/xerces/jaxp DocumentBuilderImpl.java
  Log:
  Make db.setErrorHandler(null) ignore errors and warnings.
  Minor update to sync up with crimson version.
  
  Revision  Changes    Path
  1.6       +7 -6      xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java
  
  Index: DocumentBuilderImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DocumentBuilderImpl.java	2001/02/05 14:33:43	1.5
  +++ DocumentBuilderImpl.java	2001/02/07 01:56:06	1.6
  @@ -1,5 +1,5 @@
   /*
  - * $Id: DocumentBuilderImpl.java,v 1.5 2001/02/05 14:33:43 elena Exp $
  + * $Id: DocumentBuilderImpl.java,v 1.6 2001/02/07 01:56:06 edwingo Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -82,7 +82,7 @@
   /**
    * @author Rajiv Mordani
    * @author Edwin Goei
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public class DocumentBuilderImpl extends DocumentBuilder {
       /** Xerces features */
  @@ -113,15 +113,14 @@
               // Validation
               validating = dbf.isValidating();
               String validation = "http://xml.org/sax/features/validation";
  +            domParser.setFeature(validation, validating);
   
               // If validating, provide a default ErrorHandler that prints
               // validation errors with a warning telling the user to set an
               // ErrorHandler
               if (validating) {
  -                domParser.setErrorHandler(new DefaultValidationErrorHandler());
  +                setErrorHandler(new DefaultValidationErrorHandler());
               }
  -            // Allow parser to use a different ErrorHandler if it wants to
  -            domParser.setFeature(validation, validating);
   
               // XXX Ignore unimplemented features for now
               try {
  @@ -188,6 +187,8 @@
       }
   
       public void setErrorHandler(org.xml.sax.ErrorHandler eh) {
  -        this.eh = eh; 
  +        // If app passes in a ErrorHandler of null, then ignore all errors
  +        // and warnings
  +        this.eh = (eh == null) ? new DefaultHandler() : eh;
       }
   }
  
  
  

Mime
View raw message