You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2002/05/28 01:07:15 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl XMLErrorReporter.java

neilg       02/05/27 16:07:15

  Modified:    java/src/org/apache/xerces/impl XMLErrorReporter.java
  Log:
  add a convenience method to our internal ErrorReporter to make XMLSchemaLoader have a happier life.
  
  Revision  Changes    Path
  1.7       +24 -1     xml-xerces/java/src/org/apache/xerces/impl/XMLErrorReporter.java
  
  Index: XMLErrorReporter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLErrorReporter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLErrorReporter.java	20 Feb 2002 20:01:00 -0000	1.6
  +++ XMLErrorReporter.java	27 May 2002 23:07:15 -0000	1.7
  @@ -105,7 +105,7 @@
    * @author Eric Ye, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLErrorReporter.java,v 1.6 2002/02/20 20:01:00 sandygao Exp $
  + * @version $Id: XMLErrorReporter.java,v 1.7 2002/05/27 23:07:15 neilg Exp $
    */
   public class XMLErrorReporter
       implements XMLComponent {
  @@ -449,6 +449,29 @@
                   fContinueAfterFatalError = state;
               }
           }
  +
  +    } // setFeature(String,boolean)
  +
  +    // return state of given feature or false if unsupported.
  +    public boolean getFeature(String featureId)
  +        throws XMLConfigurationException {
  +
  +        //
  +        // Xerces features
  +        //
  +
  +        if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
  +            String feature = featureId.substring(Constants.XERCES_FEATURE_PREFIX.length());
  +            //
  +            // http://apache.org/xml/features/continue-after-fatal-error
  +            //   Allows the parser to continue after a fatal error.
  +            //   Normally, a fatal error would stop the parse.
  +            //
  +            if (feature.equals(Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE)) {
  +                return fContinueAfterFatalError ;
  +            }
  +        }
  +        return false;
   
       } // setFeature(String,boolean)
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org