You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by an...@apache.org on 2001/07/24 10:10:36 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/xni/parser XMLConfigurationException.java XMLEntityResolver.java XMLErrorHandler.java XMLInputSource.java XMLLocator.java XMLParseException.java XMLComponent.java XMLComponentManager.java XMLParserConfiguration.java

andyc       01/07/24 01:10:36

  Modified:    java/docs Tag: xerces_j_2 releases.xml
               java/samples/dom Tag: xerces_j_2 Counter.java
               java/samples/sax Tag: xerces_j_2 Counter.java Writer.java
               java/samples/socket Tag: xerces_j_2 KeepSocketOpen.java
               java/samples/ui Tag: xerces_j_2 DOMParserSaveEncoding.java
               java/samples/xni Tag: xerces_j_2 Counter.java
                        DocumentTracer.java
               java/src/org/apache/xerces/impl Tag: xerces_j_2
                        XMLDTDScanner.java XMLDocumentScanner.java
                        XMLEntityManager.java XMLEntityScanner.java
                        XMLErrorReporter.java XMLNamespaceBinder.java
                        XMLScanner.java XMLValidator.java
               java/src/org/apache/xerces/impl/xpath Tag: xerces_j_2
                        XPathMatcher.java
               java/src/org/apache/xerces/parsers Tag: xerces_j_2
                        AbstractDOMParser.java AbstractSAXParser.java
                        AbstractXMLDocumentParser.java
                        BasicParserConfiguration.java DOMParser.java
                        StandardParserConfiguration.java XMLParser.java
               java/src/org/apache/xerces/util Tag: xerces_j_2
                        DefaultErrorHandler.java XMLAttributesImpl.java
               java/src/org/apache/xerces/xni Tag: xerces_j_2
                        XMLAttributes.java XNIException.java
               java/src/org/apache/xerces/xni/parser Tag: xerces_j_2
                        XMLComponent.java XMLComponentManager.java
                        XMLParserConfiguration.java
  Added:       java/src/org/apache/xerces/util Tag: xerces_j_2
                        EntityResolverWrapper.java ErrorHandlerWrapper.java
               java/src/org/apache/xerces/xni/parser Tag: xerces_j_2
                        XMLConfigurationException.java
                        XMLEntityResolver.java XMLErrorHandler.java
                        XMLInputSource.java XMLLocator.java
                        XMLParseException.java
  Log:
  Removed SAX dependency from XNI framework. Now the only
  dependence on external API such as SAX is in the implementation
  of the AbstractSAXParser and DOMParser so that legacy code
  doesn't break.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.16.2.9  +9 -0      xml-xerces/java/docs/releases.xml
  
  Index: releases.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/releases.xml,v
  retrieving revision 1.16.2.8
  retrieving revision 1.16.2.9
  diff -u -r1.16.2.8 -r1.16.2.9
  --- releases.xml	2001/07/19 06:43:10	1.16.2.8
  +++ releases.xml	2001/07/24 08:10:31	1.16.2.9
  @@ -10,6 +10,15 @@
     <changes>
      <update>
       <note>
  +     Removed SAX dependency from XNI framework. Now the only
  +     dependence on external API such as SAX is in the implementation
  +     of the AbstractSAXParser and DOMParser so that legacy code
  +     doesn't break.
  +    </note>
  +    <submitter name='Andy Clark'/>
  +   </update>
  +   <update>
  +    <note>
        Rewrote existing documentation, added XNI information, cleaned
        up stylesheets, and converted some docs to use custom DTDs.
       </note>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +2 -2      xml-xerces/java/samples/dom/Attic/Counter.java
  
  Index: Counter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/dom/Attic/Counter.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- Counter.java	2001/07/02 06:04:51	1.1.2.5
  +++ Counter.java	2001/07/24 08:10:32	1.1.2.6
  @@ -69,7 +69,7 @@
   
   /**
    * A sample DOM counter. This sample program illustrates how to
  - * traverse a DOM tree in order to information about the document.
  + * traverse a DOM tree in order to get information about the document.
    * The output of this program shows the time and count of elements,
    * attributes, ignorable whitespaces, and characters appearing in
    * the document. Three times are shown: the parse time, the first
  @@ -87,7 +87,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: Counter.java,v 1.1.2.5 2001/07/02 06:04:51 andyc Exp $
  + * @version $Id: Counter.java,v 1.1.2.6 2001/07/24 08:10:32 andyc Exp $
    */
   public class Counter {
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +2 -2      xml-xerces/java/samples/sax/Attic/Counter.java
  
  Index: Counter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/sax/Attic/Counter.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- Counter.java	2001/07/02 06:04:52	1.1.2.7
  +++ Counter.java	2001/07/24 08:10:32	1.1.2.8
  @@ -90,7 +90,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: Counter.java,v 1.1.2.7 2001/07/02 06:04:52 andyc Exp $
  + * @version $Id: Counter.java,v 1.1.2.8 2001/07/24 08:10:32 andyc Exp $
    */
   public class Counter
       extends DefaultHandler {
  @@ -577,7 +577,7 @@
           System.err.println("  amount of characters (characters, ignorable whitespace, and tag characters)");
           System.err.println("  in the document.");
           System.err.println();
  -        System.err.println("  Not all features are supported by different parser configurations.");
  +        System.err.println("  Not all features are supported by different parsers.");
   
       } // printUsage()
   
  
  
  
  1.1.2.6   +2 -2      xml-xerces/java/samples/sax/Attic/Writer.java
  
  Index: Writer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/sax/Attic/Writer.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- Writer.java	2001/04/16 05:42:21	1.1.2.5
  +++ Writer.java	2001/07/24 08:10:32	1.1.2.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -84,7 +84,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: Writer.java,v 1.1.2.5 2001/04/16 05:42:21 andyc Exp $
  + * @version $Id: Writer.java,v 1.1.2.6 2001/07/24 08:10:32 andyc Exp $
    */
   public class Writer 
       extends DefaultHandler
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.5   +2 -2      xml-xerces/java/samples/socket/Attic/KeepSocketOpen.java
  
  Index: KeepSocketOpen.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/socket/Attic/KeepSocketOpen.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- KeepSocketOpen.java	2000/12/04 03:13:08	1.1.2.4
  +++ KeepSocketOpen.java	2001/07/24 08:10:32	1.1.2.5
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -129,7 +129,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: KeepSocketOpen.java,v 1.1.2.4 2000/12/04 03:13:08 andyc Exp $
  + * @version $Id: KeepSocketOpen.java,v 1.1.2.5 2001/07/24 08:10:32 andyc Exp $
    */
   public class KeepSocketOpen {
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.4.6   +5 -4      xml-xerces/java/samples/ui/DOMParserSaveEncoding.java
  
  Index: DOMParserSaveEncoding.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/ui/DOMParserSaveEncoding.java,v
  retrieving revision 1.2.4.5
  retrieving revision 1.2.4.6
  diff -u -r1.2.4.5 -r1.2.4.6
  --- DOMParserSaveEncoding.java	2001/07/16 23:49:44	1.2.4.5
  +++ DOMParserSaveEncoding.java	2001/07/24 08:10:32	1.2.4.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -96,13 +96,14 @@
               javaEncoding = "UTF8";
           return(javaEncoding);
       }
  -    public void startEntity(String name, String publicId, String systemId,
  +    public void startEntity(String name, 
  +                            String publicId, String systemId, 
  +                            String baseSystemId,
                               String encoding) throws XNIException {
           if( encoding != null){
               setMimeEncoding( encoding);
           }
  -        //REVISIT: 4th parameter should be baseSystemId
  -        super.startEntity(name, publicId, systemId, systemId, encoding );
  +        super.startEntity(name, publicId, systemId, baseSystemId, encoding);
       }
   
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +46 -46    xml-xerces/java/samples/xni/Attic/Counter.java
  
  Index: Counter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/xni/Attic/Counter.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- Counter.java	2001/07/02 06:04:53	1.1.2.5
  +++ Counter.java	2001/07/24 08:10:32	1.1.2.6
  @@ -64,14 +64,12 @@
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLString;
   import org.apache.xerces.xni.XNIException;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLErrorHandler;
  +import org.apache.xerces.xni.parser.XMLInputSource;
  +import org.apache.xerces.xni.parser.XMLParseException;
   import org.apache.xerces.xni.parser.XMLParserConfiguration;
   
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -import org.xml.sax.SAXParseException;
  -
   /**
    * A sample XNI counter. The output of this program shows the time
    * and count of elements, attributes, ignorable whitespaces, and 
  @@ -89,11 +87,11 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: Counter.java,v 1.1.2.5 2001/07/02 06:04:53 andyc Exp $
  + * @version $Id: Counter.java,v 1.1.2.6 2001/07/24 08:10:32 andyc Exp $
    */
   public class Counter
       extends XMLDocumentParser 
  -    implements ErrorHandler {
  +    implements XMLErrorHandler {
   
       //
       // Constants
  @@ -102,21 +100,26 @@
       // feature ids
   
       /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
  -    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
  +    protected static final String NAMESPACES_FEATURE_ID = 
  +        "http://xml.org/sax/features/namespaces";
       
       /** Namespace prefixes feature id (http://xml.org/sax/features/namespace-prefixes). */
  -    protected static final String NAMESPACE_PREFIXES_FEATURE_ID = "http://xml.org/sax/features/namespace-prefixes";
  +    protected static final String NAMESPACE_PREFIXES_FEATURE_ID = 
  +        "http://xml.org/sax/features/namespace-prefixes";
   
       /** Validation feature id (http://xml.org/sax/features/validation). */
  -    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
  +    protected static final String VALIDATION_FEATURE_ID = 
  +        "http://xml.org/sax/features/validation";
   
       /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
  -    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
  +    protected static final String SCHEMA_VALIDATION_FEATURE_ID = 
  +        "http://apache.org/xml/features/validation/schema";
   
       // default settings
   
       /** Default parser configuration (org.apache.xerces.parsers.StandardParserConfiguration). */
  -    protected static final String DEFAULT_PARSER_CONFIG = "org.apache.xerces.parsers.StandardParserConfiguration";
  +    protected static final String DEFAULT_PARSER_CONFIG = 
  +        "org.apache.xerces.parsers.StandardParserConfiguration";
   
       /** Default repetition (1). */
       protected static final int DEFAULT_REPETITION = 1;
  @@ -168,7 +171,7 @@
       /** Default constructor. */
       public Counter(XMLParserConfiguration configuration) {
           super(configuration);
  -        setErrorHandler(this);
  +        fConfiguration.setErrorHandler(this);
       } // <init>()
   
       //
  @@ -250,7 +253,7 @@
               fAttributes += attrCount;
               for (int i = 0; i < attrCount; i++) {
                   fTagCharacters++; // space
  -                fTagCharacters += attrs.getName(i).length();
  +                fTagCharacters += attrs.getQName(i).length();
                   fTagCharacters++; // '='
                   fTagCharacters++; // open quote
                   fOtherCharacters += attrs.getValue(i).length();
  @@ -273,7 +276,7 @@
               fAttributes += attrCount;
               for (int i = 0; i < attrCount; i++) {
                   fTagCharacters++; // space
  -                fTagCharacters += attrs.getName(i).length();
  +                fTagCharacters += attrs.getQName(i).length();
                   fTagCharacters++; // '='
                   fTagCharacters++; // open quote
                   fOtherCharacters += attrs.getValue(i).length();
  @@ -312,31 +315,34 @@
       } // processingInstruction(String,XMLString)
   
       //
  -    // ErrorHandler methods
  +    // XMLErrorHandler methods
       //
   
       /** Warning. */
  -    public void warning(SAXParseException ex) throws SAXException {
  +    public void warning(String domain, String key, XMLParseException ex) 
  +        throws XNIException {
           printError("Warning", ex);
  -    } // warning(SAXParseException)
  +    } // warning(String,String,XMLParseException)
   
       /** Error. */
  -    public void error(SAXParseException ex) throws SAXException {
  +    public void error(String domain, String key, XMLParseException ex) 
  +        throws XNIException {
           printError("Error", ex);
  -    } // error(SAXParseException)
  +    } // error(String,String,XMLParseException)
   
       /** Fatal error. */
  -    public void fatalError(SAXParseException ex) throws SAXException {
  +    public void fatalError(String domain, String key, XMLParseException ex)
  +        throws XNIException {
           printError("Fatal Error", ex);
           throw ex;
  -    } // fatalError(SAXParseException)
  +    } // fatalError(String,String,XMLParseException)
   
       //
       // Protected methods
       //
   
       /** Prints the error message. */
  -    protected void printError(String type, SAXParseException ex) {
  +    protected void printError(String type, XMLParseException ex) {
   
           System.err.print("[");
           System.err.print(type);
  @@ -357,7 +363,7 @@
           System.err.println();
           System.err.flush();
   
  -    } // printError(String,SAXParseException)
  +    } // printError(String,XMLParseException)
   
       //
       // MAIN
  @@ -492,39 +498,32 @@
                   parser = new Counter(parserConfig);
               }
               try {
  -                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
  +                parserConfig.setFeature(NAMESPACES_FEATURE_ID, namespaces);
               }
  -            catch (SAXException e) {
  +            catch (XMLConfigurationException e) {
                   System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
               }
  -            try {
  -                parser.setFeature(NAMESPACE_PREFIXES_FEATURE_ID, namespacePrefixes);
  -            }
  -            catch (SAXException e) {
  -                System.err.println("warning: Parser does not support feature ("+NAMESPACE_PREFIXES_FEATURE_ID+")");
  -            }
               try {
  -                parser.setFeature(VALIDATION_FEATURE_ID, validation);
  +                parserConfig.setFeature(VALIDATION_FEATURE_ID, validation);
               }
  -            catch (SAXException e) {
  +            catch (XMLConfigurationException e) {
                   System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
               }
               try {
  -                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
  -            }
  -            catch (SAXNotRecognizedException e) {
  -                // ignore
  +                parserConfig.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
               }
  -            catch (SAXNotSupportedException e) {
  -                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
  +            catch (XMLConfigurationException e) {
  +                if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
  +                    System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
  +                }
               }
  -
  +    
               // parse file
               try {
                   long timeBefore = System.currentTimeMillis();
                   long memoryBefore = Runtime.getRuntime().freeMemory();
                   for (int j = 0; j < repetition; j++) {
  -                    parser.parse(arg);
  +                    parser.parse(new XMLInputSource(null, arg, null));
                   }
                   long memoryAfter = Runtime.getRuntime().freeMemory();
                   long timeAfter = System.currentTimeMillis();
  @@ -536,13 +535,13 @@
                                                  memory, tagginess,
                                                  repetition);
               }
  -            catch (SAXParseException e) {
  +            catch (XMLParseException e) {
                   // ignore
               }
               catch (Exception e) {
                   System.err.println("error: Parse error occurred - "+e.getMessage());
  -                if (e instanceof SAXException) {
  -                    e = ((SAXException)e).getException();
  +                if (e instanceof XNIException) {
  +                    e = ((XNIException)e).getException();
                   }
                   e.printStackTrace(System.err);
               }
  @@ -568,6 +567,7 @@
           System.err.println("              NOTE: Requires use of -n.");
           System.err.println("  -v  | -V    Turn on/off validation.");
           System.err.println("  -s  | -S    Turn on/off Schema validation support.");
  +        System.err.println("              NOTE: Not supported by all parser configurations.");
           System.err.println("  -m  | -M    Turn on/off memory usage report.");
           System.err.println("  -t  | -T    Turn on/off \"tagginess\" report.");
           System.err.println("  --rem text  Output user defined comment before next parse.");
  
  
  
  1.1.2.16  +53 -45    xml-xerces/java/samples/xni/Attic/DocumentTracer.java
  
  Index: DocumentTracer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/xni/Attic/DocumentTracer.java,v
  retrieving revision 1.1.2.15
  retrieving revision 1.1.2.16
  diff -u -r1.1.2.15 -r1.1.2.16
  --- DocumentTracer.java	2001/07/09 11:03:01	1.1.2.15
  +++ DocumentTracer.java	2001/07/24 08:10:32	1.1.2.16
  @@ -70,14 +70,12 @@
   import org.apache.xerces.xni.XMLString;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XNIException;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLErrorHandler;
  +import org.apache.xerces.xni.parser.XMLInputSource;
  +import org.apache.xerces.xni.parser.XMLParseException;
   import org.apache.xerces.xni.parser.XMLParserConfiguration;
   
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -import org.xml.sax.SAXParseException;
  -
   /**
    * Provides a complete trace of XNI document and DTD events for 
    * files parsed.
  @@ -85,11 +83,11 @@
    * @author Andy Clark, IBM
    * @author Arnaud Le Hors, IBM
    *
  - * @version $Id: DocumentTracer.java,v 1.1.2.15 2001/07/09 11:03:01 andyc Exp $
  + * @version $Id: DocumentTracer.java,v 1.1.2.16 2001/07/24 08:10:32 andyc Exp $
    */
   public class DocumentTracer 
       extends XMLDocumentParser
  -    implements ErrorHandler {
  +    implements XMLErrorHandler {
   
       //
       // Constants
  @@ -98,21 +96,26 @@
       // feature ids
   
       /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
  -    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
  +    protected static final String NAMESPACES_FEATURE_ID = 
  +        "http://xml.org/sax/features/namespaces";
       
       /** Validation feature id (http://xml.org/sax/features/validation). */
  -    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
  +    protected static final String VALIDATION_FEATURE_ID = 
  +        "http://xml.org/sax/features/validation";
   
       /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
  -    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
  +    protected static final String SCHEMA_VALIDATION_FEATURE_ID = 
  +        "http://apache.org/xml/features/validation/schema";
   
       /** Character ref notification feature id (http://apache.org/xml/features/scanner/notify-char-refs). */
  -    protected static final String NOTIFY_CHAR_REFS_FEATURE_ID = "http://apache.org/xml/features/scanner/notify-char-refs";
  +    protected static final String NOTIFY_CHAR_REFS_FEATURE_ID = 
  +        "http://apache.org/xml/features/scanner/notify-char-refs";
   
       // default settings
   
       /** Default parser configuration (org.apache.xerces.parsers.StandardParserConfiguration). */
  -    protected static final String DEFAULT_PARSER_CONFIG = "org.apache.xerces.parsers.StandardParserConfiguration";
  +    protected static final String DEFAULT_PARSER_CONFIG = 
  +        "org.apache.xerces.parsers.StandardParserConfiguration";
   
       /** Default namespaces support (true). */
       protected static final boolean DEFAULT_NAMESPACES = true;
  @@ -152,7 +155,7 @@
       public DocumentTracer(XMLParserConfiguration config) {
           super(config);
           setOutput(new PrintWriter(System.out));
  -        setErrorHandler(this);
  +        fConfiguration.setErrorHandler(this);
       } // <init>(XMLParserConfiguration)
   
       //
  @@ -722,7 +725,7 @@
       public void any() throws XNIException {
   
           printIndent();
  -        fOut.print("any()");
  +        fOut.println("any()");
           fOut.flush();
   
       } // any()
  @@ -731,7 +734,7 @@
       public void empty() throws XNIException {
   
           printIndent();
  -        fOut.print("empty()");
  +        fOut.println("empty()");
           fOut.flush();
   
       } // empty()
  @@ -840,24 +843,27 @@
       } // endContentModel()
   
       //
  -    // ErrorHandler methods
  +    // XMLErrorHandler methods
       //
   
       /** Warning. */
  -    public void warning(SAXParseException ex) throws SAXException {
  +    public void warning(String domain, String key, XMLParseException ex) 
  +        throws XNIException {
           printError("Warning", ex);
  -    } // warning(SAXParseException)
  +    } // warning(String,String,XMLParseException)
   
       /** Error. */
  -    public void error(SAXParseException ex) throws SAXException {
  +    public void error(String domain, String key, XMLParseException ex) 
  +        throws XNIException {
           printError("Error", ex);
  -    } // error(SAXParseException)
  +    } // error(String,String,XMLParseException)
   
       /** Fatal error. */
  -    public void fatalError(SAXParseException ex) throws SAXException {
  +    public void fatalError(String domain, String key, XMLParseException ex)
  +        throws XNIException {
           printError("Fatal Error", ex);
           throw ex;
  -    } // fatalError(SAXParseException)
  +    } // fatalError(String,String,XMLParseException)
   
       //
       // Protected methods
  @@ -1003,7 +1009,7 @@
       } // normalizeAndPrint(char)
   
       /** Prints the error message. */
  -    protected void printError(String type, SAXParseException ex) {
  +    protected void printError(String type, XMLParseException ex) {
   
           System.err.print("[");
           System.err.print(type);
  @@ -1024,7 +1030,7 @@
           System.err.println();
           System.err.flush();
   
  -    } // printError(String,SAXParseException)
  +    } // printError(String,XMLParseException)
   
       /** Prints the indent. */
       protected void printIndent() {
  @@ -1120,47 +1126,48 @@
                   parser = new DocumentTracer(parserConfig);
               }
               try {
  -                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
  +                parserConfig.setFeature(NAMESPACES_FEATURE_ID, namespaces);
               }
  -            catch (SAXException e) {
  +            catch (XMLConfigurationException e) {
                   System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
               }
               try {
  -                parser.setFeature(VALIDATION_FEATURE_ID, validation);
  +                parserConfig.setFeature(VALIDATION_FEATURE_ID, validation);
               }
  -            catch (SAXException e) {
  +            catch (XMLConfigurationException e) {
                   System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
               }
               try {
  -                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
  -            }
  -            catch (SAXNotRecognizedException e) {
  -                // ignore
  +                parserConfig.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
               }
  -            catch (SAXNotSupportedException e) {
  -                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
  +            catch (XMLConfigurationException e) {
  +                if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
  +                    System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
  +                }
               }
               try {
  -                parser.setFeature(NOTIFY_CHAR_REFS_FEATURE_ID, notifyCharRefs);
  -            }
  -            catch (SAXNotRecognizedException e) {
  -                e.printStackTrace();
  +                parserConfig.setFeature(NOTIFY_CHAR_REFS_FEATURE_ID, notifyCharRefs);
               }
  -            catch (SAXNotSupportedException e) {
  -                System.err.println("warning: Parser does not support feature ("+NOTIFY_CHAR_REFS_FEATURE_ID+")");
  +            catch (XMLConfigurationException e) {
  +                if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                    e.printStackTrace();
  +                }
  +                else {
  +                    System.err.println("warning: Parser does not support feature ("+NOTIFY_CHAR_REFS_FEATURE_ID+")");
  +                }
               }
       
               // parse file
               try {
  -                parser.parse(arg);
  +                parser.parse(new XMLInputSource(null, arg, arg));
               }
  -            catch (SAXParseException e) {
  +            catch (XMLParseException e) {
                   // ignore
               }
               catch (Exception e) {
                   System.err.println("error: Parse error occurred - "+e.getMessage());
  -                if (e instanceof SAXException) {
  -                    e = ((SAXException)e).getException();
  +                if (e instanceof XNIException) {
  +                    e = ((XNIException)e).getException();
                   }
                   e.printStackTrace(System.err);
               }
  @@ -1183,6 +1190,7 @@
           System.err.println("  -n | -N  Turn on/off namespace processing.");
           System.err.println("  -v | -V  Turn on/off validation.");
           System.err.println("  -s | -S  Turn on/off Schema validation support.");
  +        System.err.println("           NOTE: Not supported by all parser configurations.");
           System.err.println("  -c | -C  Turn on/off character notifications");
           System.err.println("  -h       This help screen.");
           System.err.println();
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.90  +5 -8      xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLDTDScanner.java
  
  Index: XMLDTDScanner.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLDTDScanner.java,v
  retrieving revision 1.1.2.89
  retrieving revision 1.1.2.90
  diff -u -r1.1.2.89 -r1.1.2.90
  --- XMLDTDScanner.java	2001/07/09 11:03:06	1.1.2.89
  +++ XMLDTDScanner.java	2001/07/24 08:10:32	1.1.2.90
  @@ -76,11 +76,8 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
   
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
    * @author Arnaud  Le Hors, IBM
  @@ -88,7 +85,7 @@
    * @author Glenn Marcy, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLDTDScanner.java,v 1.1.2.89 2001/07/09 11:03:06 andyc Exp $
  + * @version $Id: XMLDTDScanner.java,v 1.1.2.90 2001/07/24 08:10:32 andyc Exp $
    */
   public class XMLDTDScanner
       extends XMLScanner
  @@ -309,7 +306,7 @@
        * @param componentManager 
        */
       public void reset(XMLComponentManager componentManager)
  -        throws SAXException {
  +        throws XMLConfigurationException {
   
           super.reset(componentManager);
   
  @@ -349,7 +346,7 @@
        * @param state 
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           super.setFeature(featureId, state);
               
  @@ -375,7 +372,7 @@
        * @param value 
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
           
           super.setProperty(propertyId, value);
   
  
  
  
  1.1.2.90  +6 -8      xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLDocumentScanner.java
  
  Index: XMLDocumentScanner.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLDocumentScanner.java,v
  retrieving revision 1.1.2.89
  retrieving revision 1.1.2.90
  diff -u -r1.1.2.89 -r1.1.2.90
  --- XMLDocumentScanner.java	2001/07/09 11:03:08	1.1.2.89
  +++ XMLDocumentScanner.java	2001/07/24 08:10:32	1.1.2.90
  @@ -78,11 +78,9 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLInputSource;
   
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * This class is responsible for scanning XML document structure
    * and content. The scanner acts as the source for the document
  @@ -104,7 +102,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLDocumentScanner.java,v 1.1.2.89 2001/07/09 11:03:08 andyc Exp $
  + * @version $Id: XMLDocumentScanner.java,v 1.1.2.90 2001/07/24 08:10:32 andyc Exp $
    */
   public class XMLDocumentScanner
       extends XMLScanner
  @@ -372,7 +370,7 @@
        *                      SAXNotSupportedException.
        */
       public void reset(XMLComponentManager componentManager)
  -        throws SAXException {
  +        throws XMLConfigurationException {
   
           super.reset(componentManager);
   
  @@ -431,7 +429,7 @@
        *                                  this exception.
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           super.setFeature(featureId, state);
               
  @@ -474,7 +472,7 @@
        *                                  this exception.
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
           
           super.setProperty(propertyId, value);
   
  
  
  
  1.1.2.80  +16 -47    xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityManager.java
  
  Index: XMLEntityManager.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityManager.java,v
  retrieving revision 1.1.2.79
  retrieving revision 1.1.2.80
  diff -u -r1.1.2.79 -r1.1.2.80
  --- XMLEntityManager.java	2001/07/09 11:03:10	1.1.2.79
  +++ XMLEntityManager.java	2001/07/24 08:10:32	1.1.2.80
  @@ -86,13 +86,10 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLEntityResolver;
  +import org.apache.xerces.xni.parser.XMLInputSource;
   
  -import org.xml.sax.EntityResolver;
  -import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * The entity manager handles the registration of general and parameter
    * entities; resolves entities; and starts entities. The entity manager
  @@ -117,7 +114,7 @@
    * @author Andy Clark, IBM
    * @author Arnaud  Le Hors, IBM
    *
  - * @version $Id: XMLEntityManager.java,v 1.1.2.79 2001/07/09 11:03:10 andyc Exp $
  + * @version $Id: XMLEntityManager.java,v 1.1.2.80 2001/07/24 08:10:32 andyc Exp $
    */
   public class XMLEntityManager
       implements XMLComponent {
  @@ -211,7 +208,7 @@
        * Entity resolver. This property identifier is:
        * http://apache.org/xml/properties/internal/entity-resolver
        */
  -    protected EntityResolver fEntityResolver;
  +    protected XMLEntityResolver fEntityResolver;
   
       /** 
        * Symbol table. This property identifier is:
  @@ -488,35 +485,12 @@
           // give the entity resolver a chance
           XMLInputSource xmlInputSource = null;
           if (fEntityResolver != null) {
  -            InputSource inputSource;
  -            try {
  -                 inputSource = fEntityResolver.resolveEntity(publicId, systemId);
  -            }
  -            catch (SAXException e) {
  -                throw new XNIException(e);
  -            }
  -            if (inputSource != null) {
  -                xmlInputSource = new XMLInputSource(inputSource);
  -                xmlInputSource.setBaseSystemId(baseSystemId);
  -                String resolvedSystemId = inputSource.getSystemId();
  -                if (resolvedSystemId == null) {
  -                    resolvedSystemId = systemId;
  -                }
  -                String expandedSystemId =
  -                    expandSystemId(resolvedSystemId, baseSystemId);
  -                xmlInputSource.setExpandedSystemId(expandedSystemId);
  -            }
  +             xmlInputSource = fEntityResolver.resolveEntity(publicId, systemId, baseSystemId);
           }
   
           // do default resolution
           if (xmlInputSource == null) {
  -
  -            // create the input source
  -            xmlInputSource = new XMLInputSource(systemId);
  -            xmlInputSource.setPublicId(publicId);
  -            xmlInputSource.setBaseSystemId(baseSystemId);
  -            String expandedSystemId = expandSystemId(systemId, baseSystemId);
  -            xmlInputSource.setExpandedSystemId(expandedSystemId);
  +            xmlInputSource = new XMLInputSource(publicId, systemId, baseSystemId);
           }
   
           if (DEBUG_RESOLVER) {
  @@ -524,7 +498,6 @@
               System.err.println(" = " + xmlInputSource);
           }
           
  -        
           return xmlInputSource;
   
       } // resolveEntity(String,String,String):XMLInputSource
  @@ -638,7 +611,7 @@
           else {
               InternalEntity internalEntity = (InternalEntity)entity;
               Reader reader = new StringReader(internalEntity.text);
  -            xmlInputSource = new XMLInputSource(reader);
  +            xmlInputSource = new XMLInputSource(null, null, null, reader, null);
           }
   
           // start the entity
  @@ -700,7 +673,7 @@
        *                      SAXNotSupportedException.
        */
       public void reset(XMLComponentManager componentManager)
  -        throws SAXException {
  +        throws XMLConfigurationException {
   
           // sax features
           fValidation = componentManager.getFeature(VALIDATION);
  @@ -711,7 +684,7 @@
           fAllowJavaEncodings = componentManager.getFeature(ALLOW_JAVA_ENCODINGS);
   
           // xerces properties
  -        fEntityResolver = (EntityResolver)componentManager.getProperty(ENTITY_RESOLVER);
  +        fEntityResolver = (XMLEntityResolver)componentManager.getProperty(ENTITY_RESOLVER);
           fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
           fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
   
  @@ -767,7 +740,7 @@
        *                                  this exception.
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           // xerces features
           if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
  @@ -804,13 +777,13 @@
        *                                  this exception.
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           // Xerces properties
           if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
               String property = propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
               if (property.equals(Constants.ENTITY_RESOLVER_PROPERTY)) {
  -                fEntityResolver = (EntityResolver)value;
  +                fEntityResolver = (XMLEntityResolver)value;
                   return;
               }
               if (property.equals(Constants.SYMBOL_TABLE_PROPERTY)) {
  @@ -961,13 +934,9 @@
           if (reader == null) {
               stream = xmlInputSource.getByteStream();
               if (stream == null) {
  -                String expandedSystemId = xmlInputSource.getExpandedSystemId();
  -                if (expandedSystemId == null) {
  -                    expandedSystemId = expandSystemId(systemId, baseSystemId);
  -                    if (baseSystemId == null) {
  -                        baseSystemId = expandedSystemId;
  -                    }
  -                    xmlInputSource.setExpandedSystemId(expandedSystemId);
  +                String expandedSystemId = expandSystemId(systemId, baseSystemId);
  +                if (baseSystemId == null) {
  +                    baseSystemId = expandedSystemId;
                   }
                   stream = new URL(expandedSystemId).openStream();
               }
  
  
  
  1.1.2.11  +3 -4      xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityScanner.java
  
  Index: XMLEntityScanner.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityScanner.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- XMLEntityScanner.java	2001/07/09 11:03:11	1.1.2.10
  +++ XMLEntityScanner.java	2001/07/24 08:10:33	1.1.2.11
  @@ -62,9 +62,8 @@
   
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLString;
  +import org.apache.xerces.xni.parser.XMLLocator;
   
  -import org.xml.sax.Locator;
  -
   /**
    * This class allows various parser scanners to scan basic XML constructs
    * from entities. This class works directly with the entity manager to
  @@ -78,13 +77,13 @@
    * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLEntityScanner.java,v 1.1.2.10 2001/07/09 11:03:11 andyc Exp $
  + * @version $Id: XMLEntityScanner.java,v 1.1.2.11 2001/07/24 08:10:33 andyc Exp $
    *
    * @see XMLEntityHandler
    * @see XMLEntityManager
    */
   public abstract class XMLEntityScanner
  -    implements Locator {
  +    implements XMLLocator {
   
       //
       // Public methods
  
  
  
  1.1.2.11  +40 -41    xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLErrorReporter.java
  
  Index: XMLErrorReporter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLErrorReporter.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- XMLErrorReporter.java	2001/05/09 07:20:27	1.1.2.10
  +++ XMLErrorReporter.java	2001/07/24 08:10:33	1.1.2.11
  @@ -65,14 +65,12 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLErrorHandler;
  +import org.apache.xerces.xni.parser.XMLInputSource;
  +import org.apache.xerces.xni.parser.XMLLocator;
  +import org.apache.xerces.xni.parser.XMLParseException;
   
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * This class is a common element of all parser configurations and is
    * used to report errors that occur. This component can be queried by
  @@ -108,7 +106,7 @@
    * @author Eric Ye, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLErrorReporter.java,v 1.1.2.10 2001/05/09 07:20:27 andyc Exp $
  + * @version $Id: XMLErrorReporter.java,v 1.1.2.11 2001/07/24 08:10:33 andyc Exp $
    */
   public class XMLErrorReporter
       implements XMLComponent {
  @@ -179,10 +177,10 @@
       protected Hashtable fMessageFormatters;
   
       /** Error handler. */
  -    protected ErrorHandler fErrorHandler;
  +    protected XMLErrorHandler fErrorHandler;
   
       /** Document locator. */
  -    protected Locator fLocator;
  +    protected XMLLocator fLocator;
   
       /** Continue after fatal error feature. */
       protected boolean fContinueAfterFatalError;
  @@ -193,14 +191,14 @@
        * "swallowed" silently. This is one of the most common "problems"
        * reported by users of the parser.
        */
  -    protected ErrorHandler fDefaultErrorHandler;
  +    protected XMLErrorHandler fDefaultErrorHandler;
   
       //
       // Constructors
       //
   
       /** Constructs an error reporter with a locator. */
  -    public XMLErrorReporter(Locator locator) {
  +    public XMLErrorReporter(XMLLocator locator) {
   
           // REVISIT: [Q] Should the locator be passed to the reportError
           //              method? Otherwise, there is no way for a parser
  @@ -305,7 +303,7 @@
        * @see SEVERITY_ERROR
        * @see SEVERITY_FATAL_ERROR
        */
  -    public void reportError(Locator location,
  +    public void reportError(XMLLocator location,
                               String domain, String key, Object[] arguments, 
                               short severity) throws XNIException {
   
  @@ -315,10 +313,16 @@
           // format error message and create parse exception
           MessageFormatter messageFormatter = getMessageFormatter(domain);
           String message = messageFormatter.formatMessage(fLocale, key, arguments);
  -        SAXParseException spe = new SAXParseException(message, location);
  +        XMLParseException parseException = 
  +            new XMLParseException(location.getPublicId(),
  +                                  location.getSystemId(),
  +                                  location.getBaseSystemId(),
  +                                  location.getLineNumber(),
  +                                  location.getColumnNumber(),
  +                                  message);
   
           // get error handler
  -        ErrorHandler errorHandler = fErrorHandler;
  +        XMLErrorHandler errorHandler = fErrorHandler;
           if (errorHandler == null) {
               if (fDefaultErrorHandler == null) {
                   fDefaultErrorHandler = new DefaultErrorHandler();
  @@ -327,30 +331,25 @@
           }
   
           // call error handler
  -        try {
  -            switch (severity) {
  -                case SEVERITY_WARNING: {
  -                    errorHandler.warning(spe);
  -                    break;
  -                }
  -                case SEVERITY_ERROR: {
  -                    errorHandler.error(spe);
  -                    break;
  -                }
  -                case SEVERITY_FATAL_ERROR: {
  -                    errorHandler.fatalError(spe);
  -                    if (!fContinueAfterFatalError) {
  -                        throw new XNIException(spe);
  -                    }
  -                    break;
  +        switch (severity) {
  +            case SEVERITY_WARNING: {
  +                errorHandler.warning(domain, key, parseException);
  +                break;
  +            }
  +            case SEVERITY_ERROR: {
  +                errorHandler.error(domain, key, parseException);
  +                break;
  +            }
  +            case SEVERITY_FATAL_ERROR: {
  +                errorHandler.fatalError(domain, key, parseException);
  +                if (!fContinueAfterFatalError) {
  +                    throw parseException;
                   }
  +                break;
               }
           }
  -        catch (SAXException e) {
  -            throw new XNIException(e);
  -        }
   
  -    } // reportError(Locator,String,String,Object[],short)
  +    } // reportError(XMLLocator,String,String,Object[],short)
   
       //
       // XMLComponent methods
  @@ -371,18 +370,18 @@
        *                      SAXNotSupportedException.
        */
       public void reset(XMLComponentManager componentManager)
  -        throws SAXException {
  +        throws XNIException {
   
           // features
           try {
               fContinueAfterFatalError = componentManager.getFeature(CONTINUE_AFTER_FATAL_ERROR);
           }
  -        catch (SAXException e) {
  +        catch (XNIException e) {
               fContinueAfterFatalError = false;
           }
   
           // properties
  -        fErrorHandler = (ErrorHandler)componentManager.getProperty(ERROR_HANDLER);
  +        fErrorHandler = (XMLErrorHandler)componentManager.getProperty(ERROR_HANDLER);
   
       } // reset(XMLComponentManager)
   
  @@ -411,7 +410,7 @@
        *                                  this exception.
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           //
           // Xerces features
  @@ -456,7 +455,7 @@
        *                                  this exception.
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           //
           // Xerces properties
  @@ -466,7 +465,7 @@
               String property = propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
   
               if (property.equals(Constants.ERROR_HANDLER_PROPERTY)) {
  -                fErrorHandler = (ErrorHandler)value;
  +                fErrorHandler = (XMLErrorHandler)value;
               }
           }
   
  
  
  
  1.1.2.12  +5 -4      xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLNamespaceBinder.java
  
  Index: XMLNamespaceBinder.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLNamespaceBinder.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- XMLNamespaceBinder.java	2001/07/09 11:03:13	1.1.2.11
  +++ XMLNamespaceBinder.java	2001/07/24 08:10:33	1.1.2.12
  @@ -72,6 +72,7 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
   
   import org.xml.sax.SAXException;
   import org.xml.sax.SAXNotRecognizedException;
  @@ -93,7 +94,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLNamespaceBinder.java,v 1.1.2.11 2001/07/09 11:03:13 andyc Exp $
  + * @version $Id: XMLNamespaceBinder.java,v 1.1.2.12 2001/07/24 08:10:33 andyc Exp $
    */
   public class XMLNamespaceBinder 
       implements XMLComponent, XMLDocumentHandler {
  @@ -220,7 +221,7 @@
        *                      SAXNotSupportedException.
        */
       public void reset(XMLComponentManager componentManager)
  -        throws SAXException {
  +        throws XNIException {
   
           // Xerces properties
           final String SYMBOL_TABLE = Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
  @@ -263,7 +264,7 @@
        *                                  this exception.
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
       } // setFeature(String,boolean)
   
       /**
  @@ -282,7 +283,7 @@
        * @param value 
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
           
           // Xerces properties
           if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
  
  
  
  1.1.2.47  +6 -9      xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLScanner.java
  
  Index: XMLScanner.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLScanner.java,v
  retrieving revision 1.1.2.46
  retrieving revision 1.1.2.47
  diff -u -r1.1.2.46 -r1.1.2.47
  --- XMLScanner.java	2001/07/09 11:03:14	1.1.2.46
  +++ XMLScanner.java	2001/07/24 08:10:33	1.1.2.47
  @@ -71,11 +71,8 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
   
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * This class is responsible for holding scanning methods common to
    * scanning the XML document structure and content as well as the DTD
  @@ -96,7 +93,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLScanner.java,v 1.1.2.46 2001/07/09 11:03:14 andyc Exp $
  + * @version $Id: XMLScanner.java,v 1.1.2.47 2001/07/24 08:10:33 andyc Exp $
    */
   public abstract class XMLScanner 
       implements XMLComponent {
  @@ -221,7 +218,7 @@
        *                      properties cannot be found.
        */
       public void reset(XMLComponentManager componentManager)
  -        throws SAXException {
  +        throws XMLConfigurationException {
   
           // Xerces properties
           final String SYMBOL_TABLE = Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
  @@ -252,7 +249,7 @@
           try {
               fNotifyCharRefs = componentManager.getFeature(NOTIFY_CHAR_REFS);
           }
  -        catch (SAXException e) {
  +        catch (XMLConfigurationException e) {
               // ignore
           }
   
  @@ -265,7 +262,7 @@
        * @param value 
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
           
           // Xerces properties
           if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
  @@ -289,7 +286,7 @@
        * Sets the feature of the scanner.
        */
       public void setFeature(String featureId, boolean value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
               
           if (VALIDATION.equals(featureId)) {
               fValidation = value;
  
  
  
  1.1.2.77  +7 -10     xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLValidator.java
  
  Index: XMLValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLValidator.java,v
  retrieving revision 1.1.2.76
  retrieving revision 1.1.2.77
  diff -u -r1.1.2.76 -r1.1.2.77
  --- XMLValidator.java	2001/07/23 04:40:06	1.1.2.76
  +++ XMLValidator.java	2001/07/24 08:10:33	1.1.2.77
  @@ -90,11 +90,8 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
   
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   import java.util.Enumeration;
   import java.util.Hashtable;
   import java.util.Vector;
  @@ -124,7 +121,7 @@
    * @author Andy Clark, IBM
    * @author Jeffrey Rodriguez IBM
    *
  - * @version $Id: XMLValidator.java,v 1.1.2.76 2001/07/23 04:40:06 andyc Exp $
  + * @version $Id: XMLValidator.java,v 1.1.2.77 2001/07/24 08:10:33 andyc Exp $
    */
   public class XMLValidator
       implements XMLComponent, 
  @@ -520,7 +517,7 @@
        *                      SAXNotSupportedException.
        */
       public void reset(XMLComponentManager componentManager)
  -        throws SAXException {
  +        throws XMLConfigurationException {
   
   
           // clear grammars
  @@ -587,7 +584,7 @@
        *                                  this exception.
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
       } // setFeature(String,boolean)
   
       /**
  @@ -615,7 +612,7 @@
        *                                  this exception.
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
       } // setProperty(String,Object)
   
       //
  @@ -1793,7 +1790,7 @@
               if (!cdata || required || attValue != null) {
                   int attrCount = attributes.getLength();
                   for (int i = 0; i < attrCount; i++) {
  -                    if (attributes.getName(i) == attRawName) {
  +                    if (attributes.getQName(i) == attRawName) {
                           specified = true;
                           break;
                       }
  @@ -1832,7 +1829,7 @@
           // 3. validate every attribute.
           int attrCount = attributes.getLength();
           for (int i = 0; i < attrCount; i++) {
  -            String attrRawName = attributes.getName(i);
  +            String attrRawName = attributes.getQName(i);
               boolean declared = false;
               if (fValidation) {
                   if (fStandaloneIsYes) {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +12 -9     xml-xerces/java/src/org/apache/xerces/impl/xpath/Attic/XPathMatcher.java
  
  Index: XPathMatcher.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xpath/Attic/XPathMatcher.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- XPathMatcher.java	2001/07/13 03:37:34	1.1.2.7
  +++ XPathMatcher.java	2001/07/24 08:10:34	1.1.2.8
  @@ -69,6 +69,7 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
   
   import org.xml.sax.SAXException;
   import org.xml.sax.SAXNotRecognizedException;
  @@ -79,7 +80,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XPathMatcher.java,v 1.1.2.7 2001/07/13 03:37:34 andyc Exp $
  + * @version $Id: XPathMatcher.java,v 1.1.2.8 2001/07/24 08:10:34 andyc Exp $
    */
   public class XPathMatcher
       implements XMLComponent, XMLDocumentFragmentHandler {
  @@ -229,7 +230,7 @@
        *                      SAXNotSupportedException.
        */
       public void reset(XMLComponentManager componentManager) 
  -        throws SAXException {
  +        throws XNIException {
           
           // get symbol table
           SymbolTable symbols = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
  @@ -282,7 +283,7 @@
        *                                  this exception.
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
       } // setFeature(String,boolean)
   
       /**
  @@ -310,7 +311,7 @@
        *                                  this exception.
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
       } // setProperty(String,Object)
   
       //
  @@ -913,14 +914,16 @@
                   final XPath xpath = new XPath(expr, null);
                   final XPathMatcher matcher = new XPathMatcher(xpath);
                   matcher.reset(new XMLComponentManager() {
  -                    public boolean getFeature(String featureId) throws SAXNotRecognizedException, SAXNotSupportedException {
  -                        throw new SAXNotSupportedException(featureId);
  +                    public boolean getFeature(String featureId) throws XMLConfigurationException {
  +                        short type = XMLConfigurationException.NOT_SUPPORTED;
  +                        throw new XMLConfigurationException(type, featureId);
                       }
  -                    public Object getProperty(String propertyId) throws SAXNotRecognizedException, SAXNotSupportedException {
  +                    public Object getProperty(String propertyId) throws XMLConfigurationException {
                           if (propertyId.equals(SYMBOL_TABLE)) {
                               return symbols;
                           }
  -                        throw new SAXNotSupportedException(propertyId);
  +                        short type = XMLConfigurationException.NOT_SUPPORTED;
  +                        throw new XMLConfigurationException(type, propertyId);
                       }
                   });
                   System.out.println("#### argv["+i+"]: \""+expr+"\" -> \""+xpath.toString()+'"');
  @@ -945,7 +948,7 @@
                   };
                   final String uri = argv[++i];
                   System.out.println("#### argv["+i+"]: "+uri);
  -                parser.parse(uri);
  +                parser.parse(new org.apache.xerces.xni.parser.XMLInputSource(null, uri, null));
               }
           }
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.11  +45 -6     xml-xerces/java/src/org/apache/xerces/parsers/Attic/AbstractDOMParser.java
  
  Index: AbstractDOMParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/Attic/AbstractDOMParser.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- AbstractDOMParser.java	2001/07/17 20:52:41	1.1.2.10
  +++ AbstractDOMParser.java	2001/07/24 08:10:34	1.1.2.11
  @@ -79,8 +79,6 @@
   import org.w3c.dom.ProcessingInstruction;
   import org.w3c.dom.Text;
   
  -import org.xml.sax.SAXException;
  -
   /**
    * This is the base class of all DOM parsers. It implements the XNI 
    * callback methods to create the DOM tree. After a successful parse of
  @@ -92,15 +90,35 @@
    * @author Arnaud Le Hors, IBM
    * @author Andy Clark, IBM
    * 
  - * @version $Id: AbstractDOMParser.java,v 1.1.2.10 2001/07/17 20:52:41 elena Exp $ 
  + * @version $Id: AbstractDOMParser.java,v 1.1.2.11 2001/07/24 08:10:34 andyc Exp $ 
    */
   public abstract class AbstractDOMParser
       extends AbstractXMLDocumentParser {
   
       //
  +    // Constants
  +    //
  +
  +    /** Feature id: create entity ref nodes. */
  +    protected static final String CREATE_ENTITY_REF_NODES =
  +        "http://apache.org/xml/features/dom/create-entity-ref-nodes";
  +
  +    /** Feature id: include ignorable whitespace. */
  +    protected static final String INCLUDE_IGNORABLE_WHITESPACE =
  +        "http://apache.org/xml/features/dom/include-ignorable-whitespace";
  +
  +    //
       // Data
       //
   
  +    // features
  +
  +    /** Create entity reference nodes. */
  +    protected boolean fCreateEntityRefNodes;
  +
  +    /** Include ignorable whitespace. */
  +    protected boolean fIncludeIgnorableWhitespace;
  +
       // dom information
   
       /** The document. */
  @@ -132,6 +150,18 @@
       /** Default constructor. */
       protected AbstractDOMParser(XMLParserConfiguration config) {
           super(config);
  +
  +        // add recognized features
  +        final String[] recognizedFeatures = {
  +            CREATE_ENTITY_REF_NODES,
  +            INCLUDE_IGNORABLE_WHITESPACE,
  +        };
  +        fConfiguration.addRecognizedFeatures(recognizedFeatures);
  +
  +        // set default values
  +        fConfiguration.setFeature(CREATE_ENTITY_REF_NODES, true);
  +        fConfiguration.setFeature(INCLUDE_IGNORABLE_WHITESPACE, true);
  +
       } // <init>(XMLParserConfiguration)
   
       //
  @@ -152,9 +182,13 @@
        *
        * @throws SAXException Thrown on initialization error.
        */
  -    public void reset() throws SAXException {
  +    public void reset() throws XNIException {
           super.reset();
   
  +        // get feature state
  +        fCreateEntityRefNodes = fConfiguration.getFeature(CREATE_ENTITY_REF_NODES);
  +        fIncludeIgnorableWhitespace = fConfiguration.getFeature(INCLUDE_IGNORABLE_WHITESPACE);
  +
           // reset dom information
           fDocument = null;
           fCurrentNode = null;
  @@ -199,7 +233,7 @@
                               String baseSystemId,
                               String encoding) throws XNIException {
   
  -        if (fInDocument && !fInDTD) {
  +        if (fInDocument && !fInDTD && fCreateEntityRefNodes) {
               EntityReference entityRef = fDocument.createEntityReference(name);
               fCurrentNode.appendChild(entityRef);
               fCurrentNode = entityRef;
  @@ -368,6 +402,11 @@
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void ignorableWhitespace(XMLString text) throws XNIException {
  +
  +        if (!fIncludeIgnorableWhitespace) {
  +            return;
  +        }
  +
           if (fInCDATASection) {
               CDATASection cdataSection = (CDATASection)fCurrentNode;
               cdataSection.appendData(text.toString());
  @@ -475,7 +514,7 @@
        */
       public void endEntity(String name) throws XNIException {
   
  -        if (fInDocument && !fInDTD) {
  +        if (fInDocument && !fInDTD && fCreateEntityRefNodes) {
               fCurrentNode = fCurrentNode.getParentNode();
           }
   
  
  
  
  1.1.2.14  +397 -19   xml-xerces/java/src/org/apache/xerces/parsers/Attic/AbstractSAXParser.java
  
  Index: AbstractSAXParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/Attic/AbstractSAXParser.java,v
  retrieving revision 1.1.2.13
  retrieving revision 1.1.2.14
  diff -u -r1.1.2.13 -r1.1.2.14
  --- AbstractSAXParser.java	2001/06/26 03:31:43	1.1.2.13
  +++ AbstractSAXParser.java	2001/07/24 08:10:34	1.1.2.14
  @@ -57,21 +57,36 @@
   
   package org.apache.xerces.parsers;
   
  +import java.io.InputStream;
  +import java.io.IOException;
  +import java.io.Reader;
   import java.util.Hashtable;
  +import java.util.Locale;
   
   import org.apache.xerces.impl.Constants;
  +
  +import org.apache.xerces.util.EntityResolverWrapper;
  +import org.apache.xerces.util.ErrorHandlerWrapper;
   import org.apache.xerces.util.SymbolTable;
   
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLString;
   import org.apache.xerces.xni.XNIException;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLEntityResolver;
  +import org.apache.xerces.xni.parser.XMLErrorHandler;
  +import org.apache.xerces.xni.parser.XMLInputSource;
  +import org.apache.xerces.xni.parser.XMLLocator;
   import org.apache.xerces.xni.parser.XMLParserConfiguration;
   
  +import org.xml.sax.AttributeList;
  +import org.xml.sax.Attributes;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.DTDHandler;
   import org.xml.sax.DocumentHandler;
   import org.xml.sax.EntityResolver;
  +import org.xml.sax.ErrorHandler;
   import org.xml.sax.InputSource;
   import org.xml.sax.Locator;
   import org.xml.sax.Parser;
  @@ -91,7 +106,7 @@
    * @author Arnaud Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: AbstractSAXParser.java,v 1.1.2.13 2001/06/26 03:31:43 andyc Exp $ 
  + * @version $Id: AbstractSAXParser.java,v 1.1.2.14 2001/07/24 08:10:34 andyc Exp $ 
    */
   public abstract class AbstractSAXParser
       extends AbstractXMLDocumentParser
  @@ -169,6 +184,9 @@
        */
       protected boolean fParseInProgress = false;
   
  +    // temp vars
  +    private final AttributesProxy fAttributesProxy = new AttributesProxy();
  +
       //
       // Constructors
       //
  @@ -216,9 +234,10 @@
           // get the locator
           Locator locator = null;
           try {
  -            locator = (Locator)fConfiguration.getProperty(LOCATOR);
  +            XMLLocator xmlLocator = (XMLLocator)fConfiguration.getProperty(LOCATOR);
  +            locator = new LocatorProxy(xmlLocator);
           }
  -        catch (SAXException e) {
  +        catch (XMLConfigurationException e) {
               // ignore
           }
   
  @@ -315,7 +334,8 @@
           try {
               // SAX1
               if (fDocumentHandler != null) {
  -                fDocumentHandler.startElement(element.rawname, attributes);
  +                fAttributesProxy.setAttributes(attributes);
  +                fDocumentHandler.startElement(element.rawname, fAttributesProxy);
               }
       
               // SAX2
  @@ -335,8 +355,9 @@
       
                   String uri = element.uri != null ? element.uri : fEmptySymbol;
                   String localpart = fNamespaces ? element.localpart : fEmptySymbol;
  -                fContentHandler.startElement(uri, localpart,
  -                                             element.rawname, attributes);
  +                fAttributesProxy.setAttributes(attributes);
  +                fContentHandler.startElement(uri, localpart, element.rawname, 
  +                                             fAttributesProxy);
               }
           }
           catch (SAXException e) {
  @@ -860,6 +881,201 @@
       //
   
       /**
  +     * Parses the input source specified by the given system identifier.
  +     * <p>
  +     * This method is equivalent to the following:
  +     * <pre>
  +     *     parse(new InputSource(systemId));
  +     * </pre>
  +     *
  +     * @param source The input source.
  +     *
  +     * @exception org.xml.sax.SAXException Throws exception on SAX error.
  +     * @exception java.io.IOException Throws exception on i/o error.
  +     */
  +    public void parse(String systemId) throws SAXException, IOException {
  +
  +        // parse document
  +        XMLInputSource source = new XMLInputSource(null, systemId, null);
  +        try {
  +            parse(source);
  +        }
  +
  +        // close opened stream
  +        finally {
  +            try {
  +                Reader reader = source.getCharacterStream();
  +                if (reader != null) {
  +                    reader.close();
  +                }
  +                else {
  +                    InputStream is = source.getByteStream();
  +                    if (is != null) {
  +                        is.close();
  +                    }
  +                }
  +            }
  +            catch (IOException e) {
  +                // ignore
  +            }
  +        }
  +
  +    } // parse(String)
  +
  +    /**
  +     * parse
  +     *
  +     * @param inputSource
  +     *
  +     * @exception org.xml.sax.SAXException
  +     * @exception java.io.IOException
  +     */
  +    public void parse(InputSource inputSource) 
  +        throws SAXException, IOException {
  +
  +        try {
  +            reset();
  +            XMLInputSource xmlInputSource = 
  +                new XMLInputSource(inputSource.getPublicId(),
  +                                   inputSource.getSystemId(),
  +                                   null);
  +            xmlInputSource.setByteStream(inputSource.getByteStream());
  +            xmlInputSource.setCharacterStream(inputSource.getCharacterStream());
  +            xmlInputSource.setEncoding(inputSource.getEncoding());
  +            fConfiguration.parse(xmlInputSource);
  +        }
  +        catch (XNIException e) {
  +            Exception ex = e.getException();
  +            if (ex == null) {
  +                throw new SAXException(e.getMessage());
  +            }
  +            if (ex instanceof SAXException) {
  +                throw (SAXException)ex;
  +            }
  +            if (ex instanceof IOException) {
  +                throw (IOException)ex;
  +            }
  +            throw new SAXException(ex);
  +        }
  +
  +    } // parse(InputSource) 
  +
  +    /**
  +     * Sets the resolver used to resolve external entities. The EntityResolver
  +     * interface supports resolution of public and system identifiers.
  +     *
  +     * @param resolver The new entity resolver. Passing a null value will
  +     *                 uninstall the currently installed resolver.
  +     */
  +    public void setEntityResolver(EntityResolver resolver) {
  +
  +        try {
  +            fConfiguration.setProperty(ENTITY_RESOLVER, 
  +                                       new EntityResolverWrapper(resolver));
  +        }
  +        catch (XMLConfigurationException e) {
  +            // do nothing
  +        }
  +
  +    } // setEntityResolver(EntityResolver)
  +
  +    /**
  +     * Return the current entity resolver.
  +     *
  +     * @return The current entity resolver, or null if none
  +     *         has been registered.
  +     * @see #setEntityResolver
  +     */
  +    public EntityResolver getEntityResolver() {
  +
  +        EntityResolver entityResolver = null;
  +        try {
  +            XMLEntityResolver xmlEntityResolver = 
  +                (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
  +            if (xmlEntityResolver != null &&
  +                xmlEntityResolver instanceof EntityResolverWrapper) {
  +                entityResolver = ((EntityResolverWrapper)xmlEntityResolver).getEntityResolver();
  +            }
  +        }
  +        catch (XMLConfigurationException e) {
  +            // do nothing
  +        }
  +        return entityResolver;
  +
  +    } // getEntityResolver():EntityResolver
  +
  +    /**
  +     * Allow an application to register an error event handler.
  +     *
  +     * <p>If the application does not register an error handler, all
  +     * error events reported by the SAX parser will be silently
  +     * ignored; however, normal processing may not continue.  It is
  +     * highly recommended that all SAX applications implement an
  +     * error handler to avoid unexpected bugs.</p>
  +     *
  +     * <p>Applications may register a new or different handler in the
  +     * middle of a parse, and the SAX parser must begin using the new
  +     * handler immediately.</p>
  +     *
  +     * @param errorHandler The error handler.
  +     * @exception java.lang.NullPointerException If the handler 
  +     *            argument is null.
  +     * @see #getErrorHandler
  +     */
  +    public void setErrorHandler(ErrorHandler errorHandler) {
  +
  +        try {
  +            fConfiguration.setProperty(ERROR_HANDLER, 
  +                                       new ErrorHandlerWrapper(errorHandler));
  +        }
  +        catch (XMLConfigurationException e) {
  +            // do nothing
  +        }
  +
  +    } // setErrorHandler(ErrorHandler)
  +
  +    /**
  +     * Return the current error handler.
  +     *
  +     * @return The current error handler, or null if none
  +     *         has been registered.
  +     * @see #setErrorHandler
  +     */
  +    public ErrorHandler getErrorHandler() {
  +
  +        ErrorHandler errorHandler = null;
  +        try {
  +            XMLErrorHandler xmlErrorHandler = 
  +                (XMLErrorHandler)fConfiguration.getProperty(ERROR_HANDLER);
  +            if (xmlErrorHandler != null && 
  +                xmlErrorHandler instanceof ErrorHandlerWrapper) {
  +                errorHandler = ((ErrorHandlerWrapper)xmlErrorHandler).getErrorHandler();
  +            }
  +        }
  +        catch (XMLConfigurationException e) {
  +            // do nothing
  +        }
  +        return errorHandler;
  +
  +    } // getErrorHandler():ErrorHandler
  +
  +    /**
  +     * Set the locale to use for messages.
  +     *
  +     * @param locale The locale object to use for localization of messages.
  +     *
  +     * @exception SAXException An exception thrown if the parser does not
  +     *                         support the specified locale.
  +     *
  +     * @see org.xml.sax.Parser
  +     */
  +    public void setLocale(Locale locale) throws SAXException {
  +
  +        fConfiguration.setLocale(locale);
  +
  +    } // setLocale(Locale)
  +
  +    /**
        * Allow an application to register a DTD event handler.
        * <p>
        * If the application does not register a DTD handler, all DTD
  @@ -908,12 +1124,13 @@
       public void setDocumentHandler(DocumentHandler documentHandler) {
           fDocumentHandler = documentHandler;
           try {
  -            Locator locator = (Locator)fConfiguration.getProperty(LOCATOR);
  -            if (locator != null) {
  +            XMLLocator xmlLocator = (XMLLocator)fConfiguration.getProperty(LOCATOR);
  +            if (xmlLocator != null) {
  +                Locator locator = new LocatorProxy(xmlLocator);
                   fDocumentHandler.setDocumentLocator(locator);
               }
           }
  -        catch (SAXException e) {
  +        catch (XMLConfigurationException e) {
               // do nothing
           }
       } // setDocumentHandler(DocumentHandler)
  @@ -1044,10 +1261,21 @@
           */
   
           //
  -        // Perform default processing
  +        // Default handling
           //
   
  -        super.setFeature(featureId, state);
  +        try {
  +            fConfiguration.setFeature(featureId, state);
  +        }
  +        catch (XMLConfigurationException e) {
  +            String message = e.getMessage();
  +            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                throw new SAXNotRecognizedException(message);
  +            }
  +            else {
  +                throw new SAXNotSupportedException(message);
  +            }
  +        }
   
       } // setFeature(String,boolean)
   
  @@ -1111,11 +1339,18 @@
           }
           */
   
  -        //
  -        // Perform default processing
  -        //
  -
  -        return super.getFeature(featureId);
  +        try {
  +            return fConfiguration.getFeature(featureId);
  +        }
  +        catch (XMLConfigurationException e) {
  +            String message = e.getMessage();
  +            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                throw new SAXNotRecognizedException(message);
  +            }
  +            else {
  +                throw new SAXNotSupportedException(message);
  +            }
  +        }
   
       } // getFeature(String):boolean
   
  @@ -1223,7 +1458,18 @@
           // Perform default processing
           //
   
  -        super.setProperty(propertyId, value);
  +        try {
  +            fConfiguration.setProperty(propertyId, value);
  +        }
  +        catch (XMLConfigurationException e) {
  +            String message = e.getMessage();
  +            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                throw new SAXNotRecognizedException(message);
  +            }
  +            else {
  +                throw new SAXNotSupportedException(message);
  +            }
  +        }
   
       } // setProperty(String,Object)
   
  @@ -1307,7 +1553,18 @@
           // Perform default processing
           //
   
  -        return super.getProperty(propertyId);
  +        try {
  +            return fConfiguration.getProperty(propertyId);
  +        }
  +        catch (XMLConfigurationException e) {
  +            String message = e.getMessage();
  +            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                throw new SAXNotRecognizedException(message);
  +            }
  +            else {
  +                throw new SAXNotSupportedException(message);
  +            }
  +        }
   
       } // getProperty(String):Object
   
  @@ -1400,7 +1657,7 @@
        *
        * @throws SAXException Thrown if an error occurs during initialization.
        */
  -    public void reset() throws SAXException {
  +    public void reset() throws XNIException {
           super.reset();
   
           // reset state
  @@ -1416,5 +1673,126 @@
           fXmlnsSymbol = symbolTable.addSymbol("xmlns");
   
       } // reset()
  +
  +    //
  +    // Classes
  +    //
  +
  +    protected static class LocatorProxy
  +        implements Locator {
  +        
  +        //
  +        // Data
  +        //
  +
  +        /** XML locator. */
  +        protected XMLLocator fLocator;
  +
  +        //
  +        // Constructors
  +        //
  +
  +        /** Constructs an XML locator proxy. */
  +        public LocatorProxy(XMLLocator locator) {
  +            fLocator = locator;
  +        }
  +
  +        //
  +        // Locator methods
  +        //
  +
  +        /** Public identifier. */
  +        public String getPublicId() {
  +            return fLocator.getPublicId();
  +        }
  +
  +        /** System identifier. */
  +        public String getSystemId() {
  +            return fLocator.getSystemId();
  +        }
  +        /** Line number. */
  +        public int getLineNumber() {
  +            return fLocator.getLineNumber();
  +        }
  +
  +        /** Column number. */
  +        public int getColumnNumber() {
  +            return fLocator.getColumnNumber();
  +        }
  +
  +    } // class LocatorProxy
  +
  +    protected static final class AttributesProxy
  +        implements AttributeList, Attributes {
  +
  +        //
  +        // Data
  +        //
  +
  +        /** XML attributes. */
  +        protected XMLAttributes fAttributes;
  +
  +        //
  +        // Public methods
  +        //
  +
  +        /** Sets the XML attributes. */
  +        public void setAttributes(XMLAttributes attributes) {
  +            fAttributes = attributes;
  +        } // setAttributes(XMLAttributes)
  +
  +        public int getLength() {
  +            return fAttributes.getLength();
  +        }
  +
  +        public String getName(int i) {
  +            return fAttributes.getQName(i);
  +        }
  +
  +        public String getQName(int index) {
  +            return fAttributes.getQName(index);
  +        }
  +
  +        public String getURI(int index) {
  +            return fAttributes.getURI(index);
  +        }
  +
  +        public String getLocalName(int index) {
  +            return fAttributes.getLocalName(index);
  +        }
  +
  +        public String getType(int i) {
  +            return fAttributes.getType(i);
  +        }
  +
  +        public String getType(String name) {
  +            return fAttributes.getType(name);
  +        }
  +
  +        public String getType(String uri, String localName) {
  +            return fAttributes.getType(uri, localName);
  +        }
  +
  +        public String getValue(int i) {
  +            return fAttributes.getValue(i);
  +        }
  +
  +        public String getValue(String name) {
  +            return fAttributes.getValue(name);
  +        }
  +        
  +        public String getValue(String uri, String localName) {
  +            return fAttributes.getValue(uri, localName);
  +        }
  +
  +        public int getIndex(String qName) {
  +            return fAttributes.getIndex(qName);
  +        }
  +
  +        public int getIndex(String uri, String localPart) {
  +            return fAttributes.getIndex(uri, localPart);
  +        }
  +
  +    } // class AttributesProxy
   
   } // class AbstractSAXParser
  
  
  
  1.1.2.11  +5 -2      xml-xerces/java/src/org/apache/xerces/parsers/Attic/AbstractXMLDocumentParser.java
  
  Index: AbstractXMLDocumentParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/Attic/AbstractXMLDocumentParser.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- AbstractXMLDocumentParser.java	2001/07/13 03:37:38	1.1.2.10
  +++ AbstractXMLDocumentParser.java	2001/07/24 08:10:34	1.1.2.11
  @@ -82,7 +82,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: AbstractXMLDocumentParser.java,v 1.1.2.10 2001/07/13 03:37:38 andyc Exp $
  + * @version $Id: AbstractXMLDocumentParser.java,v 1.1.2.11 2001/07/24 08:10:34 andyc Exp $
    */
   public abstract class AbstractXMLDocumentParser
       extends XMLParser
  @@ -107,9 +107,12 @@
        */
       protected AbstractXMLDocumentParser(XMLParserConfiguration config) {
           super(config);
  +
  +        // set handlers
           config.setDocumentHandler(this);
           config.setDTDHandler(this);
           config.setDTDContentModelHandler(this);
  +
       } // <init>(XMLParserConfiguration)
   
       //
  @@ -605,7 +608,7 @@
       /**
        * reset all components before parsing
        */
  -    protected void reset() throws SAXException {
  +    protected void reset() throws XNIException {
           super.reset();
           fInDTD = false;
       } // reset()
  
  
  
  1.1.2.7   +30 -29    xml-xerces/java/src/org/apache/xerces/parsers/Attic/BasicParserConfiguration.java
  
  Index: BasicParserConfiguration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/Attic/BasicParserConfiguration.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- BasicParserConfiguration.java	2001/05/09 07:20:46	1.1.2.6
  +++ BasicParserConfiguration.java	2001/07/24 08:10:34	1.1.2.7
  @@ -72,15 +72,13 @@
   import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLEntityResolver;
  +import org.apache.xerces.xni.parser.XMLErrorHandler;
  +import org.apache.xerces.xni.parser.XMLInputSource;
   import org.apache.xerces.xni.parser.XMLParserConfiguration;
   
  -import org.xml.sax.EntityResolver;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.InputSource;
  -import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  +//import org.xml.sax.Locator;
   
   /**
    * A very basic parser configuration. This configuration class can
  @@ -132,7 +130,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: BasicParserConfiguration.java,v 1.1.2.6 2001/05/09 07:20:46 andyc Exp $
  + * @version $Id: BasicParserConfiguration.java,v 1.1.2.7 2001/07/24 08:10:34 andyc Exp $
    */
   public abstract class BasicParserConfiguration
       implements XMLParserConfiguration {
  @@ -348,7 +346,7 @@
        * @exception org.xml.sax.SAXException
        * @exception java.io.IOException
        */
  -    public abstract void parse(InputSource inputSource) 
  +    public abstract void parse(XMLInputSource inputSource) 
           throws XNIException, IOException;
   
   
  @@ -371,9 +369,9 @@
        * @param resolver The new entity resolver. Passing a null value will
        *                 uninstall the currently installed resolver.
        */
  -    public void setEntityResolver(EntityResolver resolver) {
  +    public void setEntityResolver(XMLEntityResolver resolver) {
           fProperties.put(ENTITY_RESOLVER, resolver);
  -    } // setEntityResolver(EntityResolver)
  +    } // setEntityResolver(XMLEntityResolver)
   
       /**
        * Return the current entity resolver.
  @@ -382,9 +380,9 @@
        *         has been registered.
        * @see #setEntityResolver
        */
  -    public EntityResolver getEntityResolver() {
  -        return (EntityResolver)fProperties.get(ENTITY_RESOLVER);
  -    } // getEntityResolver():EntityResolver
  +    public XMLEntityResolver getEntityResolver() {
  +        return (XMLEntityResolver)fProperties.get(ENTITY_RESOLVER);
  +    } // getEntityResolver():XMLEntityResolver
   
       /**
        * Allow an application to register an error event handler.
  @@ -404,9 +402,9 @@
        *            argument is null.
        * @see #getErrorHandler
        */
  -    public void setErrorHandler(ErrorHandler errorHandler) {
  +    public void setErrorHandler(XMLErrorHandler errorHandler) {
           fProperties.put(ERROR_HANDLER, errorHandler);
  -    } // setErrorHandler(ErrorHandler)
  +    } // setErrorHandler(XMLErrorHandler)
   
       /**
        * Return the current error handler.
  @@ -415,9 +413,9 @@
        *         has been registered.
        * @see #setErrorHandler
        */
  -    public ErrorHandler getErrorHandler() {
  -        return (ErrorHandler)fProperties.get(ERROR_HANDLER);
  -    } // getErrorHandler():ErrorHandler
  +    public XMLErrorHandler getErrorHandler() {
  +        return (XMLErrorHandler)fProperties.get(ERROR_HANDLER);
  +    } // getErrorHandler():XMLErrorHandler
   
       /**
        * Allows a parser to add parser specific features to be recognized
  @@ -458,7 +456,7 @@
        *            problem fulfilling the request.
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           checkFeature(featureId);
   
  @@ -500,7 +498,7 @@
        * @param value 
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           checkProperty(propertyId);
   
  @@ -530,7 +528,7 @@
        *                                  supported.
        */
       public boolean getFeature(String featureId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           checkFeature(featureId);
   
  @@ -550,7 +548,7 @@
        *                                  supported.
        */
       public Object getProperty(String propertyId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           checkProperty(propertyId);
   
  @@ -583,7 +581,7 @@
       /**
        * reset all components before parsing
        */
  -    protected void reset() throws SAXException {
  +    protected void reset() throws XNIException {
   
           // reset every component
           int count = fComponents.size();
  @@ -609,11 +607,12 @@
        *            problem fulfilling the request.
        */
       protected void checkFeature(String featureId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           // check feature
           if (!fRecognizedFeatures.contains(featureId)) {
  -            throw new SAXNotRecognizedException(featureId);
  +            short type = XMLConfigurationException.NOT_RECOGNIZED;
  +            throw new XMLConfigurationException(type, featureId);
           }
   
       } // checkFeature(String)
  @@ -633,7 +632,7 @@
        *            problem fulfilling the request.
        */
       protected void checkProperty(String propertyId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           // special cases
           if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
  @@ -653,13 +652,15 @@
                   // REVISIT - we should probably ask xml-dev for a precise
                   // definition of what this is actually supposed to return, and
                   // in exactly which circumstances.
  -                throw new SAXNotSupportedException(propertyId);
  +                short type = XMLConfigurationException.NOT_SUPPORTED;
  +                throw new XMLConfigurationException(type, propertyId);
               }
           }
   
           // check property
           if (!fRecognizedProperties.contains(propertyId)) {
  -            throw new SAXNotRecognizedException(propertyId);
  +            short type = XMLConfigurationException.NOT_RECOGNIZED;
  +            throw new XMLConfigurationException(type, propertyId);
           }
   
       } // checkProperty(String)
  
  
  
  1.19.2.18 +331 -2    xml-xerces/java/src/org/apache/xerces/parsers/DOMParser.java
  
  Index: DOMParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/DOMParser.java,v
  retrieving revision 1.19.2.17
  retrieving revision 1.19.2.18
  diff -u -r1.19.2.17 -r1.19.2.18
  --- DOMParser.java	2001/04/06 19:16:32	1.19.2.17
  +++ DOMParser.java	2001/07/24 08:10:34	1.19.2.18
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,10 +57,28 @@
   
   package org.apache.xerces.parsers;
   
  +import java.io.InputStream;
  +import java.io.IOException;
  +import java.io.Reader;
  +
   import org.apache.xerces.impl.validation.GrammarPool;
  +import org.apache.xerces.util.EntityResolverWrapper;
  +import org.apache.xerces.util.ErrorHandlerWrapper;
   import org.apache.xerces.util.SymbolTable;
  +import org.apache.xerces.xni.XNIException;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLEntityResolver;
  +import org.apache.xerces.xni.parser.XMLErrorHandler;
  +import org.apache.xerces.xni.parser.XMLInputSource;
   import org.apache.xerces.xni.parser.XMLParserConfiguration;
   
  +import org.xml.sax.EntityResolver;
  +import org.xml.sax.ErrorHandler;
  +import org.xml.sax.InputSource;
  +import org.xml.sax.SAXException;
  +import org.xml.sax.SAXNotRecognizedException;
  +import org.xml.sax.SAXNotSupportedException;
  +
   /**
    * This is the main Xerces DOM parser class. It uses the abstract DOM
    * parser with a document scanner, a dtd scanner, and a validator, as 
  @@ -70,7 +88,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: DOMParser.java,v 1.19.2.17 2001/04/06 19:16:32 lehors Exp $ 
  + * @version $Id: DOMParser.java,v 1.19.2.18 2001/07/24 08:10:34 andyc Exp $ 
    */
   public class DOMParser
       extends AbstractDOMParser {
  @@ -107,5 +125,316 @@
       public DOMParser(SymbolTable symbolTable, GrammarPool grammarPool) {
           super(new StandardParserConfiguration(symbolTable, grammarPool));
       }
  +
  +    //
  +    // XMLReader methods
  +    //
  +
  +    /**
  +     * Parses the input source specified by the given system identifier.
  +     * <p>
  +     * This method is equivalent to the following:
  +     * <pre>
  +     *     parse(new InputSource(systemId));
  +     * </pre>
  +     *
  +     * @param source The input source.
  +     *
  +     * @exception org.xml.sax.SAXException Throws exception on SAX error.
  +     * @exception java.io.IOException Throws exception on i/o error.
  +     */
  +    public void parse(String systemId) throws SAXException, IOException {
  +
  +        // parse document
  +        XMLInputSource source = new XMLInputSource(null, systemId, null);
  +        try {
  +            parse(source);
  +        }
  +
  +        // close opened stream
  +        finally {
  +            try {
  +                Reader reader = source.getCharacterStream();
  +                if (reader != null) {
  +                    reader.close();
  +                }
  +                else {
  +                    InputStream is = source.getByteStream();
  +                    if (is != null) {
  +                        is.close();
  +                    }
  +                }
  +            }
  +            catch (IOException e) {
  +                // ignore
  +            }
  +        }
  +
  +    } // parse(String)
  +
  +    /**
  +     * parse
  +     *
  +     * @param inputSource
  +     *
  +     * @exception org.xml.sax.SAXException
  +     * @exception java.io.IOException
  +     */
  +    public void parse(InputSource inputSource) 
  +        throws SAXException, IOException {
  +
  +        try {
  +            XMLInputSource xmlInputSource = 
  +                new XMLInputSource(inputSource.getPublicId(),
  +                                   inputSource.getSystemId(),
  +                                   null);
  +            xmlInputSource.setByteStream(inputSource.getByteStream());
  +            xmlInputSource.setCharacterStream(inputSource.getCharacterStream());
  +            xmlInputSource.setEncoding(inputSource.getEncoding());
  +            parse(xmlInputSource);
  +        }
  +        catch (XNIException e) {
  +            Exception ex = e.getException();
  +            if (ex == null) {
  +                throw new SAXException(e.getMessage());
  +            }
  +            if (ex instanceof SAXException) {
  +                throw (SAXException)ex;
  +            }
  +            if (ex instanceof IOException) {
  +                throw (IOException)ex;
  +            }
  +            throw new SAXException(ex);
  +        }
  +
  +    } // parse(InputSource) 
  +
  +    /**
  +     * Sets the resolver used to resolve external entities. The EntityResolver
  +     * interface supports resolution of public and system identifiers.
  +     *
  +     * @param resolver The new entity resolver. Passing a null value will
  +     *                 uninstall the currently installed resolver.
  +     */
  +    public void setEntityResolver(EntityResolver resolver) {
  +
  +        try {
  +            fConfiguration.setProperty(ENTITY_RESOLVER, 
  +                                       new EntityResolverWrapper(resolver));
  +        }
  +        catch (XMLConfigurationException e) {
  +            // do nothing
  +        }
  +
  +    } // setEntityResolver(EntityResolver)
  +
  +    /**
  +     * Return the current entity resolver.
  +     *
  +     * @return The current entity resolver, or null if none
  +     *         has been registered.
  +     * @see #setEntityResolver
  +     */
  +    public EntityResolver getEntityResolver() {
  +
  +        EntityResolver entityResolver = null;
  +        try {
  +            XMLEntityResolver xmlEntityResolver = 
  +                (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
  +            if (xmlEntityResolver != null &&
  +                xmlEntityResolver instanceof EntityResolverWrapper) {
  +                entityResolver = ((EntityResolverWrapper)xmlEntityResolver).getEntityResolver();
  +            }
  +        }
  +        catch (XMLConfigurationException e) {
  +            // do nothing
  +        }
  +        return entityResolver;
  +
  +    } // getEntityResolver():EntityResolver
  +
  +    /**
  +     * Allow an application to register an error event handler.
  +     *
  +     * <p>If the application does not register an error handler, all
  +     * error events reported by the SAX parser will be silently
  +     * ignored; however, normal processing may not continue.  It is
  +     * highly recommended that all SAX applications implement an
  +     * error handler to avoid unexpected bugs.</p>
  +     *
  +     * <p>Applications may register a new or different handler in the
  +     * middle of a parse, and the SAX parser must begin using the new
  +     * handler immediately.</p>
  +     *
  +     * @param errorHandler The error handler.
  +     * @exception java.lang.NullPointerException If the handler 
  +     *            argument is null.
  +     * @see #getErrorHandler
  +     */
  +    public void setErrorHandler(ErrorHandler errorHandler) {
  +
  +        try {
  +            fConfiguration.setProperty(ERROR_HANDLER, 
  +                                       new ErrorHandlerWrapper(errorHandler));
  +        }
  +        catch (XMLConfigurationException e) {
  +            // do nothing
  +        }
  +
  +    } // setErrorHandler(ErrorHandler)
  +
  +    /**
  +     * Return the current error handler.
  +     *
  +     * @return The current error handler, or null if none
  +     *         has been registered.
  +     * @see #setErrorHandler
  +     */
  +    public ErrorHandler getErrorHandler() {
  +
  +        ErrorHandler errorHandler = null;
  +        try {
  +            XMLErrorHandler xmlErrorHandler = 
  +                (XMLErrorHandler)fConfiguration.getProperty(ERROR_HANDLER);
  +            if (xmlErrorHandler != null && 
  +                xmlErrorHandler instanceof ErrorHandlerWrapper) {
  +                errorHandler = ((ErrorHandlerWrapper)xmlErrorHandler).getErrorHandler();
  +            }
  +        }
  +        catch (XMLConfigurationException e) {
  +            // do nothing
  +        }
  +        return errorHandler;
  +
  +    } // getErrorHandler():ErrorHandler
  +
  +    /**
  +     * Set the state of any feature in a SAX2 parser.  The parser
  +     * might not recognize the feature, and if it does recognize
  +     * it, it might not be able to fulfill the request.
  +     *
  +     * @param featureId The unique identifier (URI) of the feature.
  +     * @param state The requested state of the feature (true or false).
  +     *
  +     * @exception SAXNotRecognizedException If the
  +     *            requested feature is not known.
  +     * @exception SAXNotSupportedException If the
  +     *            requested feature is known, but the requested
  +     *            state is not supported.
  +     */
  +    public void setFeature(String featureId, boolean state)
  +        throws SAXNotRecognizedException, SAXNotSupportedException {
  +
  +        try {
  +            fConfiguration.setFeature(featureId, state);
  +        }
  +        catch (XMLConfigurationException e) {
  +            String message = e.getMessage();
  +            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                throw new SAXNotRecognizedException(message);
  +            }
  +            else {
  +                throw new SAXNotSupportedException(message);
  +            }
  +        }
  +
  +    } // setFeature(String,boolean)
  +
  +    /**
  +     * Query the state of a feature.
  +     *
  +     * Query the current state of any feature in a SAX2 parser.  The
  +     * parser might not recognize the feature.
  +     *
  +     * @param featureId The unique identifier (URI) of the feature
  +     *                  being set.
  +     * @return The current state of the feature.
  +     * @exception org.xml.sax.SAXNotRecognizedException If the
  +     *            requested feature is not known.
  +     * @exception SAXNotSupportedException If the
  +     *            requested feature is known but not supported.
  +     */
  +    public boolean getFeature(String featureId)
  +        throws SAXNotRecognizedException, SAXNotSupportedException {
  +
  +        try {
  +            return fConfiguration.getFeature(featureId);
  +        }
  +        catch (XMLConfigurationException e) {
  +            String message = e.getMessage();
  +            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                throw new SAXNotRecognizedException(message);
  +            }
  +            else {
  +                throw new SAXNotSupportedException(message);
  +            }
  +        }
  +
  +    } // getFeature(String):boolean
  +
  +    /**
  +     * Set the value of any property in a SAX2 parser.  The parser
  +     * might not recognize the property, and if it does recognize
  +     * it, it might not support the requested value.
  +     *
  +     * @param propertyId The unique identifier (URI) of the property
  +     *                   being set.
  +     * @param Object The value to which the property is being set.
  +     *
  +     * @exception SAXNotRecognizedException If the
  +     *            requested property is not known.
  +     * @exception SAXNotSupportedException If the
  +     *            requested property is known, but the requested
  +     *            value is not supported.
  +     */
  +    public void setProperty(String propertyId, Object value)
  +        throws SAXNotRecognizedException, SAXNotSupportedException {
  +
  +        try {
  +            fConfiguration.setProperty(propertyId, value);
  +        }
  +        catch (XMLConfigurationException e) {
  +            String message = e.getMessage();
  +            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                throw new SAXNotRecognizedException(message);
  +            }
  +            else {
  +                throw new SAXNotSupportedException(message);
  +            }
  +        }
  +
  +    } // setProperty(String,Object)
  +
  +    /**
  +     * Query the value of a property.
  +     *
  +     * Return the current value of a property in a SAX2 parser.
  +     * The parser might not recognize the property.
  +     *
  +     * @param propertyId The unique identifier (URI) of the property
  +     *                   being set.
  +     * @return The current value of the property.
  +     * @exception org.xml.sax.SAXNotRecognizedException If the
  +     *            requested property is not known.
  +     * @exception SAXNotSupportedException If the
  +     *            requested property is known but not supported.
  +     */
  +    public Object getProperty(String propertyId)
  +        throws SAXNotRecognizedException, SAXNotSupportedException {
  +
  +        try {
  +            return fConfiguration.getProperty(propertyId);
  +        }
  +        catch (XMLConfigurationException e) {
  +            String message = e.getMessage();
  +            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
  +                throw new SAXNotRecognizedException(message);
  +            }
  +            else {
  +                throw new SAXNotSupportedException(message);
  +            }
  +        }
  +
  +    } // getProperty(String):Object
   
   } // class DOMParser
  
  
  
  1.1.2.11  +21 -20    xml-xerces/java/src/org/apache/xerces/parsers/Attic/StandardParserConfiguration.java
  
  Index: StandardParserConfiguration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/Attic/StandardParserConfiguration.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- StandardParserConfiguration.java	2001/06/25 05:26:57	1.1.2.10
  +++ StandardParserConfiguration.java	2001/07/24 08:10:34	1.1.2.11
  @@ -65,7 +65,6 @@
   import org.apache.xerces.impl.XMLErrorReporter;
   import org.apache.xerces.impl.XMLDTDScanner;
   import org.apache.xerces.impl.XMLEntityManager;
  -import org.apache.xerces.impl.XMLInputSource;
   import org.apache.xerces.impl.XMLValidator;
   import org.apache.xerces.impl.msg.XMLMessageFormatter;
   import org.apache.xerces.impl.validation.DatatypeValidatorFactory;
  @@ -73,12 +72,11 @@
   import org.apache.xerces.impl.validation.datatypes.DatatypeValidatorFactoryImpl;
   import org.apache.xerces.util.SymbolTable;
   import org.apache.xerces.xni.XNIException;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLInputSource;
  +import org.apache.xerces.xni.parser.XMLLocator;
   
  -import org.xml.sax.InputSource;
  -import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  +//import org.xml.sax.Locator;
   
   /**
    * This is the "standard" parser configuration. It extends the basic
  @@ -111,7 +109,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: StandardParserConfiguration.java,v 1.1.2.10 2001/06/25 05:26:57 andyc Exp $
  + * @version $Id: StandardParserConfiguration.java,v 1.1.2.11 2001/07/24 08:10:34 andyc Exp $
    */
   public class StandardParserConfiguration
       extends BasicParserConfiguration {
  @@ -217,7 +215,7 @@
       // state
   
       /** Locator */
  -    protected Locator fLocator;
  +    protected XMLLocator fLocator;
   
       /** 
        * True if a parse is in progress. This state is needed because
  @@ -292,7 +290,7 @@
           fEntityManager = createEntityManager();
           fProperties.put(ENTITY_MANAGER, fEntityManager);
           addComponent(fEntityManager);
  -        fLocator = (Locator)fEntityManager.getEntityScanner();
  +        fLocator = (XMLLocator)fEntityManager.getEntityScanner();
           fProperties.put(LOCATOR, fLocator);
   
           fErrorReporter = createErrorReporter(fEntityManager.getEntityScanner());
  @@ -357,7 +355,7 @@
                   fEntityManager = createEntityManager();
                   fProperties.put(ENTITY_MANAGER, fEntityManager);
                   addComponent(fEntityManager);
  -                fLocator = (Locator)fEntityManager.getEntityScanner();
  +                fLocator = (XMLLocator)fEntityManager.getEntityScanner();
               }
               fErrorReporter =
                   createErrorReporter(fEntityManager.getEntityScanner());
  @@ -379,7 +377,7 @@
        * @exception XNIException Throws exception on XNI error.
        * @exception java.io.IOException Throws exception on i/o error.
        */
  -    public void parse(InputSource source) throws XNIException, IOException {
  +    public void parse(XMLInputSource source) throws XNIException, IOException {
   
           if (fParseInProgress) {
               // REVISIT - need to add new error message
  @@ -390,7 +388,7 @@
           try {
               reset();
               fEntityManager.setEntityHandler(fScanner);
  -            fEntityManager.startDocumentEntity(new XMLInputSource(source));
  +            fEntityManager.startDocumentEntity(source);
               fScanner.scanDocument(true);
           } 
           catch (XNIException ex) {
  @@ -423,7 +421,7 @@
        *
        * @throws SAXException Thrown if an error occurs during initialization.
        */
  -    protected void reset() throws SAXException {
  +    protected void reset() throws XNIException {
   
           // configure the pipeline and initialize the components
           configurePipeline();
  @@ -478,7 +476,7 @@
        *            problem fulfilling the request.
        */
       protected void checkFeature(String featureId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           //
           // Xerces Features
  @@ -507,14 +505,16 @@
               //
               if (feature.equals(Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE)) {
                   // REVISIT
  -                throw new SAXNotSupportedException(featureId);
  +                short type = XMLConfigurationException.NOT_SUPPORTED;
  +                throw new XMLConfigurationException(type, featureId);
               }
               //
               // http://apache.org/xml/features/validation/default-attribute-values
               //
               if (feature.equals(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
                   // REVISIT
  -                throw new SAXNotSupportedException(featureId);
  +                short type = XMLConfigurationException.NOT_SUPPORTED;
  +                throw new XMLConfigurationException(type, featureId);
               }
               //
               // http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
  @@ -533,7 +533,8 @@
               // http://apache.org/xml/features/validation/default-attribute-values
               //
               if (feature.equals(Constants.VALIDATE_DATATYPES_FEATURE)) {
  -                throw new SAXNotSupportedException(featureId);
  +                short type = XMLConfigurationException.NOT_SUPPORTED;
  +                throw new XMLConfigurationException(type, featureId);
               }
           }
   
  @@ -560,7 +561,7 @@
        *            problem fulfilling the request.
        */
       protected void checkProperty(String propertyId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +        throws XMLConfigurationException {
   
           //
           // Xerces Properties
  @@ -589,9 +590,9 @@
       } // createEntityManager():XMLEntityManager
   
       /** Creates an error reporter. */
  -    protected XMLErrorReporter createErrorReporter(Locator locator) {
  +    protected XMLErrorReporter createErrorReporter(XMLLocator locator) {
           return new XMLErrorReporter(locator);
  -    } // createErrorReporter(Locator):XMLErrorReporter
  +    } // createErrorReporter(XMLLocator):XMLErrorReporter
   
       /** Create a document scanner. */
       protected XMLDocumentScanner createDocumentScanner() {
  
  
  
  1.1.2.27  +9 -250    xml-xerces/java/src/org/apache/xerces/parsers/Attic/XMLParser.java
  
  Index: XMLParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/Attic/XMLParser.java,v
  retrieving revision 1.1.2.26
  retrieving revision 1.1.2.27
  diff -u -r1.1.2.26 -r1.1.2.27
  --- XMLParser.java	2001/06/15 04:08:32	1.1.2.26
  +++ XMLParser.java	2001/07/24 08:10:34	1.1.2.27
  @@ -64,15 +64,10 @@
   
   import org.apache.xerces.impl.Constants;
   import org.apache.xerces.xni.XNIException;
  +import org.apache.xerces.xni.parser.XMLConfigurationException;
  +import org.apache.xerces.xni.parser.XMLInputSource;
   import org.apache.xerces.xni.parser.XMLParserConfiguration;
   
  -import org.xml.sax.EntityResolver;
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * Base class of all XML-related parsers.
    * <p>
  @@ -91,7 +86,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLParser.java,v 1.1.2.26 2001/06/15 04:08:32 andyc Exp $
  + * @version $Id: XMLParser.java,v 1.1.2.27 2001/07/24 08:10:34 andyc Exp $
    */
   public abstract class XMLParser {
   
  @@ -139,256 +134,20 @@
       //
   
       /**
  -     * Parses the input source specified by the given system identifier.
  -     * <p>
  -     * This method is equivalent to the following:
  -     * <pre>
  -     *     parse(new InputSource(systemId));
  -     * </pre>
  -     *
  -     * @param source The input source.
  -     *
  -     * @exception org.xml.sax.SAXException Throws exception on SAX error.
  -     * @exception java.io.IOException Throws exception on i/o error.
  -     */
  -    public void parse(String systemId) throws SAXException, IOException {
  -
  -        // parse document
  -        InputSource source = new InputSource(systemId);
  -        try {
  -            parse(source);
  -        }
  -
  -        // close opened stream
  -        finally {
  -            try {
  -                Reader reader = source.getCharacterStream();
  -                if (reader != null) {
  -                    reader.close();
  -                }
  -                else {
  -                    InputStream is = source.getByteStream();
  -                    if (is != null) {
  -                        is.close();
  -                    }
  -                }
  -            }
  -            catch (IOException e) {
  -                // ignore
  -            }
  -        }
  -
  -    } // parse(String)
  -
  -    /**
        * parse
        *
        * @param inputSource
        *
        * @exception org.xml.sax.SAXException
        * @exception java.io.IOException
  -     */
  -    public void parse(InputSource inputSource) 
  -        throws SAXException, IOException {
  -
  -        try {
  -            reset();
  -            fConfiguration.parse(inputSource);
  -        }
  -        catch (XNIException e) {
  -            Exception ex = e.getException();
  -            if (ex == null) {
  -                throw new SAXException(e.getMessage());
  -            }
  -            if (ex instanceof SAXException) {
  -                throw (SAXException)ex;
  -            }
  -            if (ex instanceof IOException) {
  -                throw (IOException)ex;
  -            }
  -            throw new SAXException(ex);
  -        }
  -
  -    } // parse(InputSource) 
  -
  -    /**
  -     * Sets the resolver used to resolve external entities. The EntityResolver
  -     * interface supports resolution of public and system identifiers.
  -     *
  -     * @param resolver The new entity resolver. Passing a null value will
  -     *                 uninstall the currently installed resolver.
  -     */
  -    public void setEntityResolver(EntityResolver resolver) {
  -
  -        try {
  -            setProperty(ENTITY_RESOLVER, resolver);
  -        }
  -        catch (SAXException e) {
  -            // do nothing
  -        }
  -
  -    } // setEntityResolver(EntityResolver)
  -
  -    /**
  -     * Return the current entity resolver.
  -     *
  -     * @return The current entity resolver, or null if none
  -     *         has been registered.
  -     * @see #setEntityResolver
  -     */
  -    public EntityResolver getEntityResolver() {
  -
  -        EntityResolver entityResolver = null;
  -        try {
  -            entityResolver = (EntityResolver)getProperty(ENTITY_RESOLVER);
  -        }
  -        catch (SAXException e) {
  -            // do nothing
  -        }
  -        return entityResolver;
  -
  -    } // getEntityResolver():EntityResolver
  -
  -    /**
  -     * Allow an application to register an error event handler.
  -     *
  -     * <p>If the application does not register an error handler, all
  -     * error events reported by the SAX parser will be silently
  -     * ignored; however, normal processing may not continue.  It is
  -     * highly recommended that all SAX applications implement an
  -     * error handler to avoid unexpected bugs.</p>
  -     *
  -     * <p>Applications may register a new or different handler in the
  -     * middle of a parse, and the SAX parser must begin using the new
  -     * handler immediately.</p>
  -     *
  -     * @param errorHandler The error handler.
  -     * @exception java.lang.NullPointerException If the handler 
  -     *            argument is null.
  -     * @see #getErrorHandler
  -     */
  -    public void setErrorHandler(ErrorHandler errorHandler) {
  -
  -        try {
  -            setProperty(ERROR_HANDLER, errorHandler);
  -        }
  -        catch (SAXException e) {
  -            // do nothing
  -        }
  -
  -    } // setErrorHandler(ErrorHandler)
  -
  -    /**
  -     * Return the current error handler.
  -     *
  -     * @return The current error handler, or null if none
  -     *         has been registered.
  -     * @see #setErrorHandler
  -     */
  -    public ErrorHandler getErrorHandler() {
  -
  -        ErrorHandler errorHandler = null;
  -        try {
  -            errorHandler = (ErrorHandler)getProperty(ERROR_HANDLER);
  -        }
  -        catch (SAXException e) {
  -            // do nothing
  -        }
  -        return errorHandler;
  -
  -    } // getErrorHandler():ErrorHandler
  -
  -    /**
  -     * Set the state of a feature.
  -     *
  -     * Set the state of any feature in a SAX2 parser.  The parser
  -     * might not recognize the feature, and if it does recognize
  -     * it, it might not be able to fulfill the request.
  -     *
  -     * @param featureId The unique identifier (URI) of the feature.
  -     * @param state The requested state of the feature (true or false).
  -     *
  -     * @exception org.xml.sax.SAXNotRecognizedException If the
  -     *            requested feature is not known.
  -     * @exception org.xml.sax.SAXNotSupportedException If the
  -     *            requested feature is known, but the requested
  -     *            state is not supported.
  -     * @exception org.xml.sax.SAXException If there is any other
  -     *            problem fulfilling the request.
  -     */
  -    public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  -
  -        fConfiguration.setFeature(featureId, state);
  -
  -    } // setFeature(String,boolean)
  -
  -    /**
  -     * setProperty
  -     * 
  -     * @param propertyId 
  -     * @param value 
  -     */
  -    public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  -
  -        fConfiguration.setProperty(propertyId, value);
  -
  -    } // setProperty(String,Object)
  -
  -    /**
  -     * Set the locale to use for messages.
  -     *
  -     * @param locale The locale object to use for localization of messages.
  -     *
  -     * @exception SAXException An exception thrown if the parser does not
  -     *                         support the specified locale.
  -     *
  -     * @see org.xml.sax.Parser
  -     */
  -    public void setLocale(Locale locale) throws SAXException {
  -
  -        fConfiguration.setLocale(locale);
  -
  -    } // setLocale(Locale)
  -
  -    //
  -    // XMLComponentManager methods
  -    //
  -
  -    /**
  -     * Returns the state of a feature.
  -     * 
  -     * @param featureId The feature identifier.
  -     * 
  -     * @throws SAXNotRecognizedException Thrown if the feature is not 
  -     *                                   recognized.
  -     * @throws SAXNotSupportedException Thrown if the feature is not
  -     *                                  supported.
  -     */
  -    public boolean getFeature(String featureId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  -
  -        return fConfiguration.getFeature(featureId);
  -
  -    } // getFeature(String):boolean
  -
  -    /**
  -     * Returns the value of a property.
  -     * 
  -     * @param propertyId The property identifier.
  -     * 
  -     * @throws SAXNotRecognizedException Thrown if the feature is not 
  -     *                                   recognized.
  -     * @throws SAXNotSupportedException Thrown if the feature is not
  -     *                                  supported.
        */
  -    public Object getProperty(String propertyId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException {
  +    public void parse(XMLInputSource inputSource) 
  +        throws XNIException, IOException {
   
  -        return fConfiguration.getProperty(propertyId);
  +        reset();
  +        fConfiguration.parse(inputSource);
   
  -    } // getProperty(String):Object
  +    } // parse(XMLInputSource) 
   
       //
       // Protected methods
  @@ -397,7 +156,7 @@
       /**
        * reset all components before parsing
        */
  -    protected void reset() throws SAXException {
  +    protected void reset() throws XNIException {
       } // reset()
   
   } // class XMLParser
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +16 -13    xml-xerces/java/src/org/apache/xerces/util/Attic/DefaultErrorHandler.java
  
  Index: DefaultErrorHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/Attic/DefaultErrorHandler.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- DefaultErrorHandler.java	2000/12/20 06:36:29	1.1.2.1
  +++ DefaultErrorHandler.java	2001/07/24 08:10:35	1.1.2.2
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -59,19 +59,19 @@
   
   import java.io.PrintWriter;
   
  -import org.xml.sax.ErrorHandler;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
  +import org.apache.xerces.xni.XNIException;
  +import org.apache.xerces.xni.parser.XMLErrorHandler;
  +import org.apache.xerces.xni.parser.XMLParseException;
   
   /**
    * Default error handler.
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: DefaultErrorHandler.java,v 1.1.2.1 2000/12/20 06:36:29 andyc Exp $
  + * @version $Id: DefaultErrorHandler.java,v 1.1.2.2 2001/07/24 08:10:35 andyc Exp $
    */
   public class DefaultErrorHandler
  -    implements ErrorHandler {
  +    implements XMLErrorHandler {
   
       //
       // Data
  @@ -105,27 +105,30 @@
       //
   
       /** Warning. */
  -    public void warning(SAXParseException ex) throws SAXException {
  +    public void warning(String domain, String key, XMLParseException ex) 
  +        throws XNIException {
           printError("Warning", ex);
  -    } // warning(SAXParseException)
  +    } // warning(XMLParseException)
   
       /** Error. */
  -    public void error(SAXParseException ex) throws SAXException {
  +    public void error(String domain, String key, XMLParseException ex)
  +        throws XNIException {
           printError("Error", ex);
  -    } // error(SAXParseException)
  +    } // error(XMLParseException)
   
       /** Fatal error. */
  -    public void fatalError(SAXParseException ex) throws SAXException {
  +    public void fatalError(String domain, String key, XMLParseException ex)
  +        throws XNIException {
           printError("Fatal Error", ex);
           throw ex;
  -    } // fatalError(SAXParseException)
  +    } // fatalError(XMLParseException)
   
       //
       // Private methods
       //
   
       /** Prints the error message. */
  -    private void printError(String type, SAXParseException ex) {
  +    private void printError(String type, XMLParseException ex) {
   
           fOut.print("[");
           fOut.print(type);
  
  
  
  1.1.2.6   +6 -3      xml-xerces/java/src/org/apache/xerces/util/Attic/XMLAttributesImpl.java
  
  Index: XMLAttributesImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/Attic/XMLAttributesImpl.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- XMLAttributesImpl.java	2001/07/09 06:52:09	1.1.2.5
  +++ XMLAttributesImpl.java	2001/07/24 08:10:35	1.1.2.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -61,6 +61,9 @@
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLString;
   
  +import org.xml.sax.AttributeList;
  +import org.xml.sax.Attributes;
  +
   /**
    * The XMLAttributesImpl class is an implementation of the XMLAttributes
    * interface which defines a collection of attributes for an element. 
  @@ -76,10 +79,10 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLAttributesImpl.java,v 1.1.2.5 2001/07/09 06:52:09 andyc Exp $
  + * @version $Id: XMLAttributesImpl.java,v 1.1.2.6 2001/07/24 08:10:35 andyc Exp $
    */
   public class XMLAttributesImpl
  -    implements XMLAttributes {
  +    implements XMLAttributes, AttributeList, Attributes {
   
       //
       // Data
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +171 -0    xml-xerces/java/src/org/apache/xerces/util/Attic/EntityResolverWrapper.java
  
  
  
  
  1.1.2.1   +241 -0    xml-xerces/java/src/org/apache/xerces/util/Attic/ErrorHandlerWrapper.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.11  +168 -92   xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLAttributes.java
  
  Index: XMLAttributes.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLAttributes.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- XMLAttributes.java	2001/05/09 07:20:54	1.1.2.10
  +++ XMLAttributes.java	2001/07/24 08:10:35	1.1.2.11
  @@ -57,9 +57,6 @@
   
   package org.apache.xerces.xni;
   
  -import org.xml.sax.AttributeList;
  -import org.xml.sax.Attributes;
  -
   /**
    * The XMLAttributes interface defines a collection of attributes for 
    * an element. In the parser, the document source would scan the entire
  @@ -74,10 +71,9 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLAttributes.java,v 1.1.2.10 2001/05/09 07:20:54 andyc Exp $
  + * @version $Id: XMLAttributes.java,v 1.1.2.11 2001/07/24 08:10:35 andyc Exp $
    */
  -public interface XMLAttributes
  -    extends AttributeList, Attributes {
  +public interface XMLAttributes {
   
       //
       // XMLAttributes methods
  @@ -86,7 +82,7 @@
       /**
        * Adds an attribute. 
        * <p>
  -     * <strong>Note:</strogn> If an attribute of the same name already
  +     * <strong>Note:</strong> If an attribute of the same name already
        * exists, the old values for the attribute are replaced by the new
        * values.
        * 
  @@ -159,6 +155,20 @@
       public void removeEntityAt(int attrIndex, int entityIndex);
   
       /**
  +     * Returns the number of attributes in the list.
  +     * <p>
  +     * Once you know the number of attributes, you can iterate
  +     * through the list.
  +     *
  +     * @see #getURI(int)
  +     * @see #getLocalName(int)
  +     * @see #getQName(int)
  +     * @see #getType(int)
  +     * @see #getValue(int)
  +     */
  +    public int getLength();
  +
  +    /**
        * Sets the name of the attribute at the specified index.
        * 
        * @param attrIndex The attribute index.
  @@ -176,6 +186,45 @@
       public void getName(int attrIndex, QName attrName);
   
       /**
  +     * Look up an attribute's Namespace URI by index.
  +     *
  +     * @param index The attribute index (zero-based).
  +     *
  +     * @return The Namespace URI, or the empty string if none
  +     *         is available, or null if the index is out of
  +     *         range.
  +     *
  +     * @see #getLength
  +     */
  +    public String getURI(int index);
  +    
  +    /**
  +     * Look up an attribute's local name by index.
  +     *
  +     * @param index The attribute index (zero-based).
  +     *
  +     * @return The local name, or the empty string if Namespace
  +     *         processing is not being performed, or null
  +     *         if the index is out of range.
  +     *
  +     * @see #getLength
  +     */
  +    public String getLocalName(int index);
  +
  +    /**
  +     * Look up an attribute's XML 1.0 qualified name by index.
  +     *
  +     * @param index The attribute index (zero-based).
  +     *
  +     * @return The XML 1.0 qualified name, or the empty string
  +     *         if none is available, or null if the index
  +     *         is out of range.
  +     *
  +     * @see #getLength
  +     */
  +    public String getQName(int index);
  +
  +    /**
        * Sets the type of the attribute at the specified index.
        * 
        * @param attrIndex The attribute index.
  @@ -191,6 +240,60 @@
       public void setType(int attrIndex, String attrType);
   
       /**
  +     * Look up an attribute's type by index.
  +     * <p>
  +     * The attribute type is one of the strings "CDATA", "ID",
  +     * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
  +     * or "NOTATION" (always in upper case).
  +     * <p>
  +     * If the parser has not read a declaration for the attribute,
  +     * or if the parser does not report attribute types, then it must
  +     * return the value "CDATA" as stated in the XML 1.0 Recommentation
  +     * (clause 3.3.3, "Attribute-Value Normalization").
  +     * <p>
  +     * For an enumerated attribute that is not a notation, the
  +     * parser will report the type as "NMTOKEN".
  +     *
  +     * @param index The attribute index (zero-based).
  +     *
  +     * @return The attribute's type as a string, or null if the
  +     *         index is out of range.
  +     *
  +     * @see #getLength
  +     */
  +    public String getType(int index);
  +
  +    /**
  +     * Look up an attribute's type by XML 1.0 qualified name.
  +     * <p>
  +     * See {@link #getType(int) getType(int)} for a description
  +     * of the possible types.
  +     *
  +     * @param qName The XML 1.0 qualified name.
  +     *
  +     * @return The attribute type as a string, or null if the
  +     *         attribute is not in the list or if qualified names
  +     *         are not available.
  +     */
  +    public String getType(String qName);
  +
  +    /**
  +     * Look up an attribute's type by Namespace name.
  +     * <p>
  +     * See {@link #getType(int) getType(int)} for a description
  +     * of the possible types.
  +     *
  +     * @param uri       The Namespace URI, or the empty String if the
  +     *                  name has no Namespace URI.
  +     * @param localName The local name of the attribute.
  +     *
  +     * @return The attribute type as a string, or null if the
  +     *         attribute is not in the list or if Namespace
  +     *         processing is not being performed.
  +     */
  +    public String getType(String uri, String localName);
  +
  +    /**
        * Sets the value of the attribute at the specified index.
        * 
        * @param attrIndex The attribute index.
  @@ -199,6 +302,52 @@
       public void setValue(int attrIndex, String attrValue);
   
       /**
  +     * Look up an attribute's value by index.
  +     * <p>
  +     * If the attribute value is a list of tokens (IDREFS,
  +     * ENTITIES, or NMTOKENS), the tokens will be concatenated
  +     * into a single string with each token separated by a
  +     * single space.
  +     *
  +     * @param index The attribute index (zero-based).
  +     *
  +     * @return The attribute's value as a string, or null if the
  +     *         index is out of range.
  +     *
  +     * @see #getLength
  +     */
  +    public String getValue(int index);
  +
  +    /**
  +     * Look up an attribute's value by XML 1.0 qualified name.
  +     * <p>
  +     * See {@link #getValue(int) getValue(int)} for a description
  +     * of the possible values.
  +     *
  +     * @param qName The XML 1.0 qualified name.
  +     *
  +     * @return The attribute value as a string, or null if the
  +     *         attribute is not in the list or if qualified names
  +     *         are not available.
  +     */
  +    public String getValue(String qName);
  +
  +    /**
  +     * Look up an attribute's value by Namespace name.
  +     * <p>
  +     * See {@link #getValue(int) getValue(int)} for a description
  +     * of the possible values.
  +     *
  +     * @param uri       The Namespace URI, or the empty String if the
  +     *                  name has no Namespace URI.
  +     * @param localName The local name of the attribute.
  +     *
  +     * @return The attribute value as a string, or null if the
  +     *         attribute is not in the list.
  +     */
  +    public String getValue(String uri, String localName);
  +
  +    /**
        * Sets the non-normalized value of the attribute at the specified
        * index.
        *
  @@ -294,99 +443,26 @@
        */
       public int getEntityLength(int attrIndex, int entityIndex);
   
  -    //
  -    // Attributes and AttributeList methods
  -    //
  -
  -    // NOTE: The methods shared by both the SAX Attributes and
  -    //       AttributeList interfaces must be repeated in this
  -    //       interface due to a compiler bug in javac (JDK 1.1.8)
  -    //       that thinks that the XMLAttributes#getLength():int 
  -    //       method and other shared methods are ambiguous. 
  -    //       Simply including this method prototypes explicitly
  -    //       works around the problem. -Ac
  -
       /**
  -     * Returns the number of attributes in the list.
  -     * <p>
  -     * Once you know the number of attributes, you can iterate
  -     * through the list.
  +     * Look up the index of an attribute by XML 1.0 qualified name.
        *
  -     * @see #getURI(int)
  -     * @see #getLocalName(int)
  -     * @see #getQName(int)
  -     * @see #getType(int)
  -     * @see #getValue(int)
  -     */
  -    public int getLength();
  -
  -    /**
  -     * Look up an attribute's type by index.
  -     * <p>
  -     * The attribute type is one of the strings "CDATA", "ID",
  -     * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
  -     * or "NOTATION" (always in upper case).
  -     * <p>
  -     * If the parser has not read a declaration for the attribute,
  -     * or if the parser does not report attribute types, then it must
  -     * return the value "CDATA" as stated in the XML 1.0 Recommentation
  -     * (clause 3.3.3, "Attribute-Value Normalization").
  -     * <p>
  -     * For an enumerated attribute that is not a notation, the
  -     * parser will report the type as "NMTOKEN".
  -     *
  -     * @param index The attribute index (zero-based).
  -     *
  -     * @return The attribute's type as a string, or null if the
  -     *         index is out of range.
  -     *
  -     * @see #getLength
  -     */
  -    public String getType(int index);
  -
  -    /**
  -     * Look up an attribute's type by XML 1.0 qualified name.
  -     * <p>
  -     * See {@link #getType(int) getType(int)} for a description
  -     * of the possible types.
  -     *
  -     * @param qName The XML 1.0 qualified name.
  -     *
  -     * @return The attribute type as a string, or null if the
  -     *         attribute is not in the list or if qualified names
  -     *         are not available.
  -     */
  -    public String getType(String qName);
  -
  -    /**
  -     * Look up an attribute's value by index.
  -     * <p>
  -     * If the attribute value is a list of tokens (IDREFS,
  -     * ENTITIES, or NMTOKENS), the tokens will be concatenated
  -     * into a single string with each token separated by a
  -     * single space.
  -     *
  -     * @param index The attribute index (zero-based).
  +     * @param qName The qualified (prefixed) name.
        *
  -     * @return The attribute's value as a string, or null if the
  -     *         index is out of range.
  -     *
  -     * @see #getLength
  +     * @return The index of the attribute, or -1 if it does not
  +     *         appear in the list.
        */
  -    public String getValue(int index);
  +    public int getIndex(String qName);
   
       /**
  -     * Look up an attribute's value by XML 1.0 qualified name.
  -     * <p>
  -     * See {@link #getValue(int) getValue(int)} for a description
  -     * of the possible values.
  +     * Look up the index of an attribute by Namespace name.
        *
  -     * @param qName The XML 1.0 qualified name.
  +     * @param uri       The Namespace URI, or the empty string if
  +     *                  the name has no Namespace URI.
  +     * @param localName The attribute's local name.
        *
  -     * @return The attribute value as a string, or null if the
  -     *         attribute is not in the list or if qualified names
  -     *         are not available.
  +     * @return The index of the attribute, or -1 if it does not
  +     *         appear in the list.
        */
  -    public String getValue(String qName);
  +    public int getIndex(String uri, String localPart);
   
   } // interface XMLAttributes
  
  
  
  1.1.2.2   +3 -3      xml-xerces/java/src/org/apache/xerces/xni/Attic/XNIException.java
  
  Index: XNIException.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XNIException.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XNIException.java	2001/05/09 07:21:00	1.1.2.1
  +++ XNIException.java	2001/07/24 08:10:35	1.1.2.2
  @@ -69,7 +69,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XNIException.java,v 1.1.2.1 2001/05/09 07:21:00 andyc Exp $
  + * @version $Id: XNIException.java,v 1.1.2.2 2001/07/24 08:10:35 andyc Exp $
    */
   public class XNIException 
       extends RuntimeException {
  @@ -107,10 +107,10 @@
       /**
        * Constructs an XNI exception with a message and wrapped exception. 
        *
  -     * @param exception The wrapped exception.
        * @param message The exception message.
  +     * @param exception The wrapped exception.
        */
  -    public XNIException(Exception exception, String message) {
  +    public XNIException(String message, Exception exception) {
           super(message);
           fException = exception;
       } // <init>(Exception,String)
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.5   +15 -17    xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLComponent.java
  
  Index: XMLComponent.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLComponent.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- XMLComponent.java	2001/05/09 07:21:10	1.1.2.4
  +++ XMLComponent.java	2001/07/24 08:10:35	1.1.2.5
  @@ -57,10 +57,6 @@
   
   package org.apache.xerces.xni.parser;
   
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * The component interface defines methods that must be implemented
    * by components in a parser configuration. The component methods allow
  @@ -72,7 +68,7 @@
    * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLComponent.java,v 1.1.2.4 2001/05/09 07:21:10 andyc Exp $
  + * @version $Id: XMLComponent.java,v 1.1.2.5 2001/07/24 08:10:35 andyc Exp $
    */
   public interface XMLComponent {
   
  @@ -87,10 +83,10 @@
        * 
        * @param componentManager The component manager.
        *
  -     * @throws SAXException Thrown by component on initialization error.
  +     * @throws XNIException Thrown by component on initialization error.
        */
       public void reset(XMLComponentManager componentManager) 
  -        throws SAXException;
  +        throws XMLConfigurationException;
   
       /**
        * Returns a list of feature identifiers that are recognized by
  @@ -109,13 +105,14 @@
        * @param featureId The feature identifier.
        * @param state     The state of the feature.
        *
  -     * @throws SAXNotRecognizedException The component should not throw
  -     *                                   this exception.
  -     * @throws SAXNotSupportedException The component should not throw
  -     *                                  this exception.
  +     * @throws XMLConfigurationException Thrown for configuration error.
  +     *                                   In general, components should
  +     *                                   only throw this exception if
  +     *                                   it is <strong>really</strong>
  +     *                                   a critical error.
        */
       public void setFeature(String featureId, boolean state)
  -        throws SAXNotRecognizedException, SAXNotSupportedException;
  +        throws XMLConfigurationException;
   
       /**
        * Returns a list of property identifiers that are recognized by
  @@ -134,12 +131,13 @@
        * @param propertyId The property identifier.
        * @param value      The value of the property.
        *
  -     * @throws SAXNotRecognizedException The component should not throw
  -     *                                   this exception.
  -     * @throws SAXNotSupportedException The component should not throw
  -     *                                  this exception.
  +     * @throws XMLConfigurationException Thrown for configuration error.
  +     *                                   In general, components should
  +     *                                   only throw this exception if
  +     *                                   it is <strong>really</strong>
  +     *                                   a critical error.
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException;
  +       throws XMLConfigurationException;
   
   } // interface XMLComponent
  
  
  
  1.1.2.2   +5 -14     xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLComponentManager.java
  
  Index: XMLComponentManager.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLComponentManager.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- XMLComponentManager.java	2001/03/23 08:45:29	1.1.2.1
  +++ XMLComponentManager.java	2001/07/24 08:10:35	1.1.2.2
  @@ -57,9 +57,6 @@
   
   package org.apache.xerces.xni.parser;
   
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * The component manager manages a parser configuration and the components
    * that make up that configuration. The manager notifies each component
  @@ -74,7 +71,7 @@
    * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLComponentManager.java,v 1.1.2.1 2001/03/23 08:45:29 andyc Exp $
  + * @version $Id: XMLComponentManager.java,v 1.1.2.2 2001/07/24 08:10:35 andyc Exp $
    */
   public interface XMLComponentManager {
   
  @@ -87,25 +84,19 @@
        * 
        * @param featureId The feature identifier.
        * 
  -     * @throws SAXNotRecognizedException Thrown if the feature is not 
  -     *                                   recognized.
  -     * @throws SAXNotSupportedException Thrown if the feature is not
  -     *                                  supported.
  +     * @throws XMLConfigurationException Thrown on configuration error.
        */
       public boolean getFeature(String featureId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException;
  +        throws XMLConfigurationException;
   
       /**
        * Returns the value of a property.
        * 
        * @param propertyId The property identifier.
        * 
  -     * @throws SAXNotRecognizedException Thrown if the feature is not 
  -     *                                   recognized.
  -     * @throws SAXNotSupportedException Thrown if the feature is not
  -     *                                  supported.
  +    * @throws XMLConfigurationException Thrown on configuration error.
        */
       public Object getProperty(String propertyId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException;
  +        throws XMLConfigurationException;
   
   } // interface XMLComponentManager
  
  
  
  1.1.2.5   +36 -32    xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLParserConfiguration.java
  
  Index: XMLParserConfiguration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLParserConfiguration.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- XMLParserConfiguration.java	2001/05/09 07:21:11	1.1.2.4
  +++ XMLParserConfiguration.java	2001/07/24 08:10:35	1.1.2.5
  @@ -65,11 +65,6 @@
   import org.apache.xerces.xni.XMLDTDContentModelHandler;
   import org.apache.xerces.xni.XNIException;
   
  -import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXNotRecognizedException;
  -import org.xml.sax.SAXNotSupportedException;
  -
   /**
    * Represents a parser configuration. The parser configuration maintains
    * a table of recognized features and properties, assembles components
  @@ -117,7 +112,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLParserConfiguration.java,v 1.1.2.4 2001/05/09 07:21:11 andyc Exp $
  + * @version $Id: XMLParserConfiguration.java,v 1.1.2.5 2001/07/24 08:10:35 andyc Exp $
    */
   public interface XMLParserConfiguration
       extends XMLComponentManager {
  @@ -126,6 +121,8 @@
       // XMLParserConfiguration methods
       //
   
  +    // parsing
  +
       /**
        * Parse an XML document.
        * <p>
  @@ -150,9 +147,11 @@
        *                         from a byte stream or character stream
        *                         supplied by the parser.
        */
  -    public void parse(InputSource inputSource) 
  +    public void parse(XMLInputSource inputSource) 
           throws XNIException, IOException;
   
  +    // generic configuration
  +
       /**
        * Allows a parser to add parser specific features to be recognized
        * and managed by the parser configuration.
  @@ -169,26 +168,22 @@
        * @param featureId The feature identifier.
        * @param state     The state of the feature.
        *
  -     * @throws SAXNotRecognizedException Thrown if the feature is not
  -     *                                   recognized by this configuration
  -     *                                   or any of its components.
  -     * @throws SAXNotSupportedException Thrown if the state is not supported.
  +     * @throws XMLConfigurationException Thrown if there is a configuration
  +     *                                   error.
        */
       public void setFeature(String featureId, boolean statek)
  -        throws SAXNotRecognizedException, SAXNotSupportedException;
  +        throws XMLConfigurationException;
   
       /**
        * Returns the state of a feature.
        * 
        * @param featureId The feature identifier.
        * 
  -     * @throws SAXNotRecognizedException Thrown if the feature is not 
  -     *                                   recognized.
  -     * @throws SAXNotSupportedException Thrown if the feature is not
  -     *                                  supported.
  +     * @throws XMLConfigurationException Thrown if there is a configuration
  +     *                                   error.
        */
       public boolean getFeature(String featureId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException;
  +        throws XMLConfigurationException;
   
       /**
        * Allows a parser to add parser specific properties to be recognized
  @@ -206,26 +201,31 @@
        * @param propertyId The property identifier.
        * @param value      The value of the property.
        *
  -     * @throws SAXNotRecognizedException Thrown if the property is not
  -     *                                   recognized by this configuration
  -     *                                   or any of its components.
  -     * @throws SAXNotSupportedException Thrown if the value is not supported.
  +     * @throws XMLConfigurationException Thrown if there is a configuration
  +     *                                   error.
        */
       public void setProperty(String propertyId, Object value)
  -        throws SAXNotRecognizedException, SAXNotSupportedException;
  +        throws XMLConfigurationException;
   
       /**
        * Returns the value of a property.
        * 
        * @param propertyId The property identifier.
        * 
  -     * @throws SAXNotRecognizedException Thrown if the feature is not 
  -     *                                   recognized.
  -     * @throws SAXNotSupportedException Thrown if the feature is not
  -     *                                  supported.
  +     * @throws XMLConfigurationException Thrown if there is a configuration
  +     *                                   error.
        */
       public Object getProperty(String propertyId)
  -        throws SAXNotRecognizedException, SAXNotSupportedException;
  +        throws XMLConfigurationException;
  +
  +    // handlers
  +
  +    /**
  +     * Sets the error handler.
  +     *
  +     * @param errorHandler The error resolver.
  +     */
  +    public void setErrorHandler(XMLErrorHandler errorHandler);
   
       /**
        * Sets the document handler to receive information about the document.
  @@ -234,11 +234,6 @@
        */
       public void setDocumentHandler(XMLDocumentHandler documentHandler);
   
  -    // REVISIT: The XMLDTDHandler and XMLDTDContentModelHandler are to be
  -    //          re-designed and merged together. At which point, these two
  -    //          methods will probably be merged into a single registration
  -    //          method. -Ac
  -
       /**
        * Sets the DTD handler.
        * 
  @@ -252,6 +247,15 @@
        * @param dtdContentModelHandler The DTD content model handler.
        */
       public void setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler);
  +
  +    // other settings
  +
  +    /**
  +     * Sets the entity resolver.
  +     *
  +     * @param entityResolver The new entity resolver.
  +     */
  +    public void setEntityResolver(XMLEntityResolver entityResolver);
   
       /**
        * Set the locale to use for messages.
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +151 -0    xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLConfigurationException.java
  
  
  
  
  1.1.2.1   +100 -0    xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLEntityResolver.java
  
  
  
  
  1.1.2.1   +144 -0    xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLErrorHandler.java
  
  
  
  
  1.1.2.1   +276 -0    xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLInputSource.java
  
  
  
  
  1.1.2.1   +88 -0     xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLLocator.java
  
  
  
  
  1.1.2.1   +194 -0    xml-xerces/java/src/org/apache/xerces/xni/parser/Attic/XMLParseException.java
  
  
  
  

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