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/05/09 09:21:14 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/xni/parser XMLComponent.java XMLParserConfiguration.java

andyc       01/05/09 00:21:13

  Modified:    java/src/org/apache/xerces/impl Tag: xerces_j_2
                        XMLDTDScanner.java XMLDocumentScanner.java
                        XMLEntityHandler.java XMLEntityManager.java
                        XMLEntityScanner.java XMLErrorReporter.java
                        XMLNamespaceBinder.java XMLScanner.java
                        XMLValidator.java
               java/src/org/apache/xerces/impl/validation/grammars Tag:
                        xerces_j_2 DTDGrammar.java
               java/src/org/apache/xerces/parsers Tag: xerces_j_2
                        AbstractDOMParser.java AbstractSAXParser.java
                        AbstractXMLDocumentParser.java
                        BasicParserConfiguration.java
                        StandardParserConfiguration.java XMLParser.java
               java/src/org/apache/xerces/xni Tag: xerces_j_2
                        NamespaceContext.java QName.java XMLAttributes.java
                        XMLDTDContentModelHandler.java XMLDTDHandler.java
                        XMLDocumentFragmentHandler.java
                        XMLDocumentHandler.java XMLString.java
               java/src/org/apache/xerces/xni/parser Tag: xerces_j_2
                        XMLComponent.java XMLParserConfiguration.java
  Added:       java/src/org/apache/xerces/xni Tag: xerces_j_2
                        XNIException.java
  Log:
  1) Added XNIException which extends RuntimeException.
  2) Replaced "throws SAXException" with "throws XNIException"
     in handler interfaces so that implementors may choose to
     catch internal parser (XNI) exceptions but aren't
     required to.
  3) Updated all of the implementation classes to comply with
     the changes.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.86  +35 -35    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.85
  retrieving revision 1.1.2.86
  diff -u -r1.1.2.85 -r1.1.2.86
  --- XMLDTDScanner.java	2001/05/04 23:19:26	1.1.2.85
  +++ XMLDTDScanner.java	2001/05/09 07:20:22	1.1.2.86
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  - * reserved.
  + * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
  + * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -73,6 +73,7 @@
   import org.apache.xerces.xni.XMLDTDContentModelHandler;
   import org.apache.xerces.xni.XMLDTDHandler;
   import org.apache.xerces.xni.XMLString;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
   
  @@ -87,7 +88,7 @@
    * @author Glenn Marcy, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLDTDScanner.java,v 1.1.2.85 2001/05/04 23:19:26 lehors Exp $
  + * @version $Id: XMLDTDScanner.java,v 1.1.2.86 2001/05/09 07:20:22 andyc Exp $
    */
   public class XMLDTDScanner
       extends XMLScanner
  @@ -231,7 +232,7 @@
        * @return Whether there is more to parse or not.
        */
       public boolean scanDTD(boolean complete)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           if (fScannerState == SCANNER_STATE_TEXT_DECL) {
               fSeenExternalDTD = true;
  @@ -269,7 +270,7 @@
        */
       public boolean scanDTDInternalSubset(boolean complete, boolean standalone,
                                            boolean hasExtDTD)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           if (fScannerState == SCANNER_STATE_TEXT_DECL) {
               // call handler
  @@ -420,7 +421,7 @@
        * @param encoding
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException {
  +                            String encoding) throws XNIException {
   
           super.startEntity(name, publicId, systemId, encoding);
   
  @@ -450,8 +451,7 @@
        * 
        * @param name 
        */
  -    public void endEntity(String name)
  -        throws SAXException {
  +    public void endEntity(String name) throws XNIException {
   
           super.endEntity(name);
   
  @@ -535,7 +535,7 @@
        * @param literal Whether this is happening within a literal
        */
       protected void startPE(String name, boolean literal) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
           int depth = fPEDepth;
           if (fValidation && !fEntityManager.isDeclaredEntity("%"+name)) {
               fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,"EntityNotDeclared", 
  @@ -560,11 +560,11 @@
        *          or a another dispatcher.
        *
        * @throws IOException  Thrown on i/o error.
  -     * @throws SAXException Thrown on parse error.
  +     * @throws XNIException Thrown on parse error.
        *
        */
       protected final boolean scanTextDecl(boolean complete) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // scan XMLDecl
           if (fEntityScanner.skipString("<?xml")) {
  @@ -620,7 +620,7 @@
        * @param data The string to fill in with the data
        */
       protected final void scanPIData(String target, XMLString data) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           super.scanPIData(target, data);
           fMarkUpDepth--;
  @@ -641,7 +641,7 @@
        * <p>
        * <strong>Note:</strong> Called after scanning past '&lt;!--'
        */
  -    protected final void scanComment() throws IOException, SAXException {
  +    protected final void scanComment() throws IOException, XNIException {
   
           scanComment(fStringBuffer);
           fMarkUpDepth--;
  @@ -657,13 +657,13 @@
        * Scans an element declaration
        * <p>
        * <pre>
  -     * [45]    elementdecl    ::=    '<!ELEMENT' S Name S contentspec S? '>'
  +     * [45]    elementdecl    ::=    '&lt;!ELEMENT' S Name S contentspec S? '>'
        * [46]    contentspec    ::=    'EMPTY' | 'ANY' | Mixed | children  
        * </pre>
        * <p>
        * <strong>Note:</strong> Called after scanning past '&lt;!ELEMENT'
        */
  -    protected final void scanElementDecl() throws IOException, SAXException {
  +    protected final void scanElementDecl() throws IOException, XNIException {
   
           // spaces
           if (!skipSeparator(true, !scanningInternalSubset())) {
  @@ -765,7 +765,7 @@
        * <strong>Note:</strong> Called after scanning past '(#PCDATA'.
        */
       private final void scanMixed(String elName)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           String childName = null;
   
  @@ -825,7 +825,7 @@
        * paranthesis.
        */
       private final void scanChildren(String elName)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // call handler
           if (fDTDContentModelHandler != null) {
  @@ -963,13 +963,13 @@
        * Scans an attlist declaration
        * <p>
        * <pre>
  -     * [52]  AttlistDecl    ::=   '<!ATTLIST' S Name AttDef* S? '>' 
  +     * [52]  AttlistDecl    ::=   '&lt;!ATTLIST' S Name AttDef* S? '>' 
        * [53]  AttDef         ::=   S Name S AttType S DefaultDecl 
        * </pre>
        * <p>
        * <strong>Note:</strong> Called after scanning past '&lt;!ATTLIST'
        */
  -    protected final void scanAttlistDecl() throws IOException, SAXException {
  +    protected final void scanAttlistDecl() throws IOException, XNIException {
   
           // spaces
           if (!skipSeparator(true, !scanningInternalSubset())) {
  @@ -1078,7 +1078,7 @@
        * @param atName The attribute name this declaration is about.
        */
       private final String scanAttType(String elName, String atName)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           String type = null;
           fEnumerationCount = 0;
  @@ -1189,7 +1189,7 @@
       protected final String scanAttDefaultDecl(String elName, String atName,
                                                 String type,
                                                 XMLString defaultVal)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           String defaultType = null;
           fString.clear();
  @@ -1223,8 +1223,8 @@
        * <p>
        * <pre>
        * [70]    EntityDecl  ::=    GEDecl | PEDecl 
  -     * [71]    GEDecl      ::=    '<!ENTITY' S Name S EntityDef S? '>' 
  -     * [72]    PEDecl      ::=    '<!ENTITY' S '%' S Name S PEDef S? '>' 
  +     * [71]    GEDecl      ::=    '&lt;!ENTITY' S Name S EntityDef S? '>' 
  +     * [72]    PEDecl      ::=    '&lt;!ENTITY' S '%' S Name S PEDef S? '>' 
        * [73]    EntityDef   ::=    EntityValue | (ExternalID NDataDecl?) 
        * [74]    PEDef       ::=    EntityValue | ExternalID 
        * [75]    ExternalID  ::=    'SYSTEM' S SystemLiteral 
  @@ -1234,7 +1234,7 @@
        * <p>
        * <strong>Note:</strong> Called after scanning past '&lt;!ENTITY'
        */
  -    private final void scanEntityDecl() throws IOException, SAXException {
  +    private final void scanEntityDecl() throws IOException, XNIException {
   
           boolean isPEDecl = false;
           boolean sawPERef = false;
  @@ -1402,7 +1402,7 @@
        * at the time of calling is lost.
        */
       protected final void scanEntityValue(XMLString value)
  -        throws IOException, SAXException
  +        throws IOException, XNIException
       {
           int quote = fEntityScanner.scanChar();
           if (quote != '\'' && quote != '"') {
  @@ -1491,13 +1491,13 @@
        * Scans a notation declaration
        * <p>
        * <pre>
  -     * [82] NotationDecl ::= '<!NOTATION' S Name S (ExternalID|PublicID) S? '>'
  +     * [82] NotationDecl ::= '&lt;!NOTATION' S Name S (ExternalID|PublicID) S? '>'
        * [83]  PublicID    ::= 'PUBLIC' S PubidLiteral  
        * </pre>
        * <p>
        * <strong>Note:</strong> Called after scanning past '&lt;!NOTATION'
        */
  -    private final void scanNotationDecl() throws IOException, SAXException {
  +    private final void scanNotationDecl() throws IOException, XNIException {
   
           // spaces
           if (!skipSeparator(true, !scanningInternalSubset())) {
  @@ -1553,15 +1553,15 @@
        * <p>
        * <pre>
        * [61] conditionalSect   ::= includeSect | ignoreSect  
  -     * [62] includeSect       ::= '<![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>'
  -     * [63] ignoreSect   ::= '<![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>'
  -     * [64] ignoreSectContents ::= Ignore ('<![' ignoreSectContents ']]>' Ignore)* 
  -     * [65] Ignore            ::=    Char* - (Char* ('<![' | ']]>') Char*)  
  +     * [62] includeSect       ::= '&lt;![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>'
  +     * [63] ignoreSect   ::= '&lt;![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>'
  +     * [64] ignoreSectContents ::= Ignore ('&lt;![' ignoreSectContents ']]>' Ignore)* 
  +     * [65] Ignore            ::=    Char* - (Char* ('&lt;![' | ']]>') Char*)  
        * </pre>
        * <p>
        * <strong>Note:</strong> Called after scanning past '&lt;![' */
       private final void scanConditionalSect()
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           skipSeparator(false, !scanningInternalSubset());
           if (fEntityScanner.skipString("INCLUDE")) {
  @@ -1665,11 +1665,11 @@
        * @returns True if there is more to scan.
        *
        * @throws IOException  Thrown on i/o error.
  -     * @throws SAXException Thrown on parse error.
  +     * @throws XNIException Thrown on parse error.
        *
        */
       protected final boolean scanDecls(boolean complete)
  -            throws IOException, SAXException {
  +            throws IOException, XNIException {
           
           skipSeparator(false, true);
           while (complete && fScannerState == SCANNER_STATE_MARKUP_DECL) {
  @@ -1761,7 +1761,7 @@
        *         parameter entity was crossed.
        */
       private boolean skipSeparator(boolean spaceRequired, boolean lookForPERefs)
  -        throws IOException, SAXException
  +        throws IOException, XNIException
       {
           int depth = fPEDepth;
           boolean sawSpace = fEntityScanner.skipSpaces();
  
  
  
  1.1.2.87  +34 -33    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.86
  retrieving revision 1.1.2.87
  diff -u -r1.1.2.86 -r1.1.2.87
  --- XMLDocumentScanner.java	2001/04/11 07:22:02	1.1.2.86
  +++ XMLDocumentScanner.java	2001/05/09 07:20:24	1.1.2.87
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  - * reserved.
  + * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
  + * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -75,6 +75,7 @@
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLDocumentHandler;
   import org.apache.xerces.xni.XMLString;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
   
  @@ -103,7 +104,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLDocumentScanner.java,v 1.1.2.86 2001/04/11 07:22:02 andyc Exp $
  + * @version $Id: XMLDocumentScanner.java,v 1.1.2.87 2001/05/09 07:20:24 andyc Exp $
    */
   public class XMLDocumentScanner
       extends XMLScanner
  @@ -327,7 +328,7 @@
        * @returns True if scanning is not finished.
        */
       public boolean scanDocument(boolean complete) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // keep dispatching "events"
           do {
  @@ -506,10 +507,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException {
  +                            String encoding) throws XNIException {
   
           // keep track of this entity before fEntityDepth is increased
           if (fEntityDepth == fEntityStack.length) {
  @@ -545,9 +546,9 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException {
  +    public void endEntity(String name) throws XNIException {
   
           super.endEntity(name);
   
  @@ -593,7 +594,7 @@
        *                         declaration.
        */
       protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // scan decl
           super.scanXMLDeclOrTextDecl(scanningTextDecl, fStrings);
  @@ -635,7 +636,7 @@
        * @param data The string to fill in with the data
        */
       protected void scanPIData(String target, XMLString data) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           super.scanPIData(target, data);
           fMarkupDepth--;
  @@ -656,7 +657,7 @@
        * <p>
        * <strong>Note:</strong> Called after scanning past '&lt;!--'
        */
  -    protected void scanComment() throws IOException, SAXException {
  +    protected void scanComment() throws IOException, XNIException {
   
           scanComment(fStringBuffer);
           fMarkupDepth--;
  @@ -669,7 +670,7 @@
       } // scanComment()
       
       /** Scans a doctype declaration. */
  -    protected void scanDoctypeDecl() throws IOException, SAXException {
  +    protected void scanDoctypeDecl() throws IOException, XNIException {
   
           // spaces
           if (!fEntityScanner.skipSpaces()) {
  @@ -765,7 +766,7 @@
        *          production [44].
        */
       protected boolean scanStartElement() 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
           if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanStartElement()");
   
           // name
  @@ -846,7 +847,7 @@
        * @param attributes The attributes list for the scanned attribute.
        */
       protected void scanAttribute(XMLAttributes attributes) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
           if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanAttribute()");
   
           // name
  @@ -892,7 +893,7 @@
        *
        * @returns Returns the next character on the stream.
        */
  -    protected int scanContent() throws IOException, SAXException {
  +    protected int scanContent() throws IOException, XNIException {
   
           XMLString content = fString;
           int c = fEntityScanner.scanContent(content);
  @@ -947,7 +948,7 @@
        * @return True if CDATA is completely scanned.
        */
       protected boolean scanCDATASection(boolean complete) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
           
           // call handler
           if (fDocumentHandler != null) {
  @@ -1025,7 +1026,7 @@
        *
        * @returns The element depth.
        */
  -    protected int scanEndElement() throws IOException, SAXException {
  +    protected int scanEndElement() throws IOException, XNIException {
           if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanEndElement()");
   
           // name
  @@ -1062,7 +1063,7 @@
        * </pre>
        */
       protected void scanCharReference() 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           fStringBuffer2.clear();
           int ch = scanCharReferenceValue(fStringBuffer2);
  @@ -1087,10 +1088,10 @@
        * Scans an entity reference.
        *
        * @throws IOException  Thrown if i/o error occurs.
  -     * @throws SAXException Thrown if handler throws exception upon
  +     * @throws XNIException Thrown if handler throws exception upon
        *                      notification.
        */
  -    protected void scanEntityReference() throws IOException, SAXException {
  +    protected void scanEntityReference() throws IOException, XNIException {
   
           // name
           String name = fEntityScanner.scanName();
  @@ -1149,7 +1150,7 @@
        * @param c
        * @param entity built-in name
        */
  -    private void handleCharacter(char c, String entity) throws SAXException {
  +    private void handleCharacter(char c, String entity) throws XNIException {
           if (fDocumentHandler != null) {
               if (fNotifyCharRefs) {
                   fDocumentHandler.startEntity(entity, null, null, null);
  @@ -1178,12 +1179,12 @@
        *
        * @returns The element depth.
        *
  -     * @throws SAXException Thrown if the handler throws a SAX exception
  +     * @throws XNIException Thrown if the handler throws a SAX exception
        *                      upon notification.
        *
        */
       protected int handleEndElement(QName element, boolean isEmpty) 
  -        throws SAXException {
  +        throws XNIException {
   
           fMarkupDepth--;
           // check that this element was opened in the same entity
  @@ -1406,10 +1407,10 @@
            *          or a another dispatcher.
            *
            * @throws IOException  Thrown on i/o error.
  -         * @throws SAXException Thrown on parse error.
  +         * @throws XNIException Thrown on parse error.
            */
           public boolean dispatch(boolean complete) 
  -            throws IOException, SAXException;
  +            throws IOException, XNIException;
   
       } // interface Dispatcher
   
  @@ -1435,10 +1436,10 @@
            *          or a another dispatcher.
            *
            * @throws IOException  Thrown on i/o error.
  -         * @throws SAXException Thrown on parse error.
  +         * @throws XNIException Thrown on parse error.
            */
           public boolean dispatch(boolean complete) 
  -            throws IOException, SAXException {
  +            throws IOException, XNIException {
   
               // next dispatcher is prolog regardless of whether there
               // is an XMLDecl in this document
  @@ -1504,10 +1505,10 @@
            *          or a another dispatcher.
            *
            * @throws IOException  Thrown on i/o error.
  -         * @throws SAXException Thrown on parse error.
  +         * @throws XNIException Thrown on parse error.
            */
           public boolean dispatch(boolean complete) 
  -            throws IOException, SAXException {
  +            throws IOException, XNIException {
   
               try {
                   boolean again;
  @@ -1636,10 +1637,10 @@
            *          or a another dispatcher.
            *
            * @throws IOException  Thrown on i/o error.
  -         * @throws SAXException Thrown on parse error.
  +         * @throws XNIException Thrown on parse error.
            */
           public boolean dispatch(boolean complete) 
  -            throws IOException, SAXException {
  +            throws IOException, XNIException {
   
               try {
                   boolean again;
  @@ -1842,10 +1843,10 @@
            *          or a another dispatcher.
            *
            * @throws IOException  Thrown on i/o error.
  -         * @throws SAXException Thrown on parse error.
  +         * @throws XNIException Thrown on parse error.
            */
           public boolean dispatch(boolean complete) 
  -            throws IOException, SAXException {
  +            throws IOException, XNIException {
   
               try {
                   boolean again;
  
  
  
  1.1.2.3   +7 -7      xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityHandler.java
  
  Index: XMLEntityHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/Attic/XMLEntityHandler.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- XMLEntityHandler.java	2001/02/16 08:05:45	1.1.2.2
  +++ XMLEntityHandler.java	2001/05/09 07:20:25	1.1.2.3
  @@ -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,7 +57,7 @@
   
   package org.apache.xerces.impl;
   
  -import  org.xml.sax.SAXException;
  +import  org.apache.xerces.xni.XNIException;
   
   /**
    * The entity handler interface defines methods to report information
  @@ -68,7 +68,7 @@
    * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLEntityHandler.java,v 1.1.2.2 2001/02/16 08:05:45 andyc Exp $
  + * @version $Id: XMLEntityHandler.java,v 1.1.2.3 2001/05/09 07:20:25 andyc Exp $
    */
   public interface XMLEntityHandler {
   
  @@ -92,10 +92,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException;
  +                            String encoding) throws XNIException;
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  @@ -104,8 +104,8 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException;
  +    public void endEntity(String name) throws XNIException;
   
   } // interface XMLEntityHandler
  
  
  
  1.1.2.76  +37 -54    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.75
  retrieving revision 1.1.2.76
  diff -u -r1.1.2.75 -r1.1.2.76
  --- XMLEntityManager.java	2001/04/09 01:35:27	1.1.2.75
  +++ XMLEntityManager.java	2001/05/09 07:20:26	1.1.2.76
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  - * reserved.
  + * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
  + * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -83,6 +83,7 @@
   
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLString;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
   
  @@ -116,7 +117,7 @@
    * @author Andy Clark, IBM
    * @author Arnaud  Le Hors, IBM
    *
  - * @version $Id: XMLEntityManager.java,v 1.1.2.75 2001/04/09 01:35:27 lehors Exp $
  + * @version $Id: XMLEntityManager.java,v 1.1.2.76 2001/05/09 07:20:26 andyc Exp $
    */
   public class XMLEntityManager
       implements XMLComponent {
  @@ -469,16 +470,22 @@
        *         This method will never return null.
        *
        * @throws IOException  Thrown on i/o error.
  -     * @throws SAXException Thrown by entity resolver to signal an error.
  +     * @throws XNIException Thrown by entity resolver to signal an error.
        */
       public XMLInputSource resolveEntity(String publicId, String systemId, 
                                           String baseSystemId)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // give the entity resolver a chance
           XMLInputSource xmlInputSource = null;
           if (fEntityResolver != null) {
  -            InputSource inputSource = fEntityResolver.resolveEntity(publicId, systemId);
  +            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);
  @@ -515,10 +522,10 @@
        *                   value. 
        *
        * @throws IOException  Thrown on i/o error.
  -     * @throws SAXException Thrown by entity handler to signal an error.
  +     * @throws XNIException Thrown by entity handler to signal an error.
        */
       public void startEntity(String entityName, boolean literal) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // was entity declared?
           Entity entity = (Entity)fEntities.get(entityName);
  @@ -620,10 +627,10 @@
        * @param xmlInputSource The input source of the document entity.
        *
        * @throws IOException  Thrown on i/o error.
  -     * @throws SAXException Thrown by entity handler to signal an error.
  +     * @throws XNIException Thrown by entity handler to signal an error.
        */
       public void startDocumentEntity(XMLInputSource xmlInputSource) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
           final String entityName = fSymbolTable.addSymbol("[xml]");
           startEntity(entityName, xmlInputSource, false);
       } // startDocumentEntity(XMLInputSource)
  @@ -635,10 +642,10 @@
        * @param xmlInputSource The input source of the DTD entity.
        *
        * @throws IOException  Thrown on i/o error.
  -     * @throws SAXException Thrown by entity handler to signal an error.
  +     * @throws XNIException Thrown by entity handler to signal an error.
        */
       public void startDTDEntity(XMLInputSource xmlInputSource)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
           final String entityName = fSymbolTable.addSymbol("[dtd]");
           startEntity(entityName, xmlInputSource, false);
       } // startDTDEntity(XMLInputSource)
  @@ -909,11 +916,11 @@
        *                       literal value. 
        *
        * @throws IOException  Thrown on i/o error.
  -     * @throws SAXException Thrown by entity handler to signal an error.
  +     * @throws XNIException Thrown by entity handler to signal an error.
        */
       protected void startEntity(String name, 
                                  XMLInputSource xmlInputSource, boolean literal) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // get information
           final String publicId = xmlInputSource.getPublicId();
  @@ -995,9 +1002,9 @@
       /**
        * Ends an entity.
        *
  -     * @throws SAXException Thrown by entity handler to signal an error.
  +     * @throws XNIException Thrown by entity handler to signal an error.
        */
  -    protected void endEntity() throws SAXException {
  +    protected void endEntity() throws XNIException {
   
           // call handler
           if (DEBUG_BUFFER) {
  @@ -1105,7 +1112,7 @@
        * @return Returns a reader.
        */
       protected Reader createReader(InputStream inputStream, String encoding)
  -        throws IOException, SAXException {
  +        throws IOException {
   
           // normalize encoding name
           if (encoding == null) {
  @@ -1598,8 +1605,7 @@
            *
            * @see org.apache.xerces.util.EncodingMap
            */
  -        public void setEncoding(String encoding) 
  -            throws IOException, SAXException {
  +        public void setEncoding(String encoding) throws IOException {
   
               if (DEBUG_ENCODINGS) {
                   System.out.println("$$$ setEncoding: "+encoding);
  @@ -1646,10 +1652,8 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            */
  -        public int peekChar() throws IOException, SAXException {
  +        public int peekChar() throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(peekChar: ");
                   print();
  @@ -1691,10 +1695,8 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            */
  -        public int scanChar() throws IOException, SAXException {
  +        public int scanChar() throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(scanChar: ");
                   print();
  @@ -1753,13 +1755,11 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            *
            * @see org.apache.xerces.util.SymbolTable
            * @see org.apache.xerces.util.XMLChar#isName
            */
  -        public String scanNmtoken() throws IOException, SAXException {
  +        public String scanNmtoken() throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(scanNmtoken: ");
                   print();
  @@ -1822,14 +1822,12 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            *
            * @see org.apache.xerces.util.SymbolTable
            * @see org.apache.xerces.util.XMLChar#isName
            * @see org.apache.xerces.util.XMLChar#isNameStart
            */
  -        public String scanName() throws IOException, SAXException {
  +        public String scanName() throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(scanName: ");
                   print();
  @@ -1914,14 +1912,12 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            *
            * @see org.apache.xerces.util.SymbolTable
            * @see org.apache.xerces.util.XMLChar#isName
            * @see org.apache.xerces.util.XMLChar#isNameStart
            */
  -        public boolean scanQName(QName qname) throws IOException, SAXException {
  +        public boolean scanQName(QName qname) throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(scanQName, "+qname+": ");
                   print();
  @@ -2048,11 +2044,8 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            */
  -        public int scanContent(XMLString content) 
  -            throws IOException, SAXException {
  +        public int scanContent(XMLString content) throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(scanContent: ");
                   print();
  @@ -2198,11 +2191,9 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            */
           public int scanLiteral(int quote, XMLString content)
  -            throws IOException, SAXException {
  +            throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(scanLiteral, '"+(char)quote+"': ");
                   print();
  @@ -2355,11 +2346,9 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            */
           public boolean scanData(String delimiter, XMLString data)
  -            throws IOException, SAXException {
  +            throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(scanData: ");
                   print();
  @@ -2518,10 +2507,8 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            */
  -        public boolean skipChar(int c) throws IOException, SAXException {
  +        public boolean skipChar(int c) throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(skipChar, '"+(char)c+"': ");
                   print();
  @@ -2591,12 +2578,10 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            *
            * @see org.apache.xerces.util.XMLChar#isSpace
            */
  -        public boolean skipSpaces() throws IOException, SAXException {
  +        public boolean skipSpaces() throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(skipSpaces: ");
                   print();
  @@ -2678,10 +2663,8 @@
            *
            * @throws IOException  Thrown if i/o error occurs.
            * @throws EOFException Thrown on end of file.
  -         * @throws SAXException Thrown by entity handler to signal an error
  -         *                      when the end of an entity is reached.
            */
  -        public boolean skipString(String s) throws IOException, SAXException {
  +        public boolean skipString(String s) throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(skipString, \""+s+"\": ");
                   print();
  @@ -2887,7 +2870,7 @@
            *          load operation.
            */
           private final boolean load(int offset, boolean changeEntity) 
  -            throws IOException, SAXException {
  +            throws IOException {
               if (DEBUG_BUFFER) {
                   System.out.print("(load, "+offset+": ");
                   print();
  
  
  
  1.1.2.9   +14 -42    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.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- XMLEntityScanner.java	2000/10/26 18:32:17	1.1.2.8
  +++ XMLEntityScanner.java	2001/05/09 07:20:27	1.1.2.9
  @@ -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
  @@ -64,7 +64,6 @@
   import org.apache.xerces.xni.XMLString;
   
   import org.xml.sax.Locator;
  -import org.xml.sax.SAXException;
   
   /**
    * This class allows various parser scanners to scan basic XML constructs
  @@ -79,7 +78,7 @@
    * @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.8 2000/10/26 18:32:17 andyc Exp $
  + * @version $Id: XMLEntityScanner.java,v 1.1.2.9 2001/05/09 07:20:27 andyc Exp $
    *
    * @see XMLEntityHandler
    * @see XMLEntityManager
  @@ -106,15 +105,13 @@
        * @param encoding The IANA encoding name of the new encoding.
        *
        * @throws IOException  Thrown if the new encoding is not supported.                     
  -     * @throws SAXException Thrown by error handler if encoding name is
  -     *                      reported as invalid to signal an error.
        *
        * @see org.apache.xerces.util.EncodingMap
        * @see org.apache.xerces.util.XMLChar#isValidIANAEncoding
        * @see org.apache.xerces.util.XMLChar#isValidJavaEncoding
        */
       public abstract void setEncoding(String encoding) 
  -        throws IOException, SAXException;
  +        throws IOException;
   
       /** Returns true if the current entity being scanned is external. */
       public abstract boolean isExternal();
  @@ -126,10 +123,8 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        */
  -    public abstract int peekChar() throws IOException, SAXException;
  +    public abstract int peekChar() throws IOException;
   
       /**
        * Returns the next character on the input.
  @@ -138,10 +133,8 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        */
  -    public abstract int scanChar() throws IOException, SAXException;
  +    public abstract int scanChar() throws IOException;
   
       /**
        * Returns a string matching the NMTOKEN production appearing immediately
  @@ -154,13 +147,11 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        *
        * @see org.apache.xerces.util.SymbolTable
        * @see org.apache.xerces.util.XMLChar#isName
        */
  -    public abstract String scanNmtoken() throws IOException, SAXException;
  +    public abstract String scanNmtoken() throws IOException;
   
       /**
        * Returns a string matching the Name production appearing immediately
  @@ -173,14 +164,12 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        *
        * @see org.apache.xerces.util.SymbolTable
        * @see org.apache.xerces.util.XMLChar#isName
        * @see org.apache.xerces.util.XMLChar#isNameStart
        */
  -    public abstract String scanName() throws IOException, SAXException;
  +    public abstract String scanName() throws IOException;
       
       /**
        * Scans a qualified name from the input, setting the fields of the
  @@ -199,15 +188,12 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        *
        * @see org.apache.xerces.util.SymbolTable
        * @see org.apache.xerces.util.XMLChar#isName
        * @see org.apache.xerces.util.XMLChar#isNameStart
        */
  -    public abstract boolean scanQName(QName qname) 
  -        throws IOException, SAXException;
  +    public abstract boolean scanQName(QName qname) throws IOException;
   
       /**
        * Scans a range of parsed character data, setting the fields of the
  @@ -234,11 +220,8 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        */
  -    public abstract int scanContent(XMLString content) 
  -        throws IOException, SAXException;
  +    public abstract int scanContent(XMLString content) throws IOException;
   
       /**
        * Scans a range of attribute value data, setting the fields of the
  @@ -267,11 +250,9 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        */
       public abstract int scanLiteral(int quote, XMLString content) 
  -        throws IOException, SAXException;
  +        throws IOException;
       
       /**
        * Scans a range of character data up to the specicied delimiter, 
  @@ -302,11 +283,9 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        */
       public abstract boolean scanData(String delimiter, XMLString data) 
  -        throws IOException, SAXException;
  +        throws IOException;
   
       /**
        * Skips a character appearing immediately on the input.
  @@ -320,10 +299,8 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        */
  -    public abstract boolean skipChar(int c) throws IOException, SAXException;
  +    public abstract boolean skipChar(int c) throws IOException;
   
       /**
        * Skips space characters appearing immediately on the input.
  @@ -335,12 +312,10 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        *
        * @see org.apache.xerces.util.XMLChar#isSpace
        */
  -    public abstract boolean skipSpaces() throws IOException, SAXException;
  +    public abstract boolean skipSpaces() throws IOException;
   
       /**
        * Skips the specified string appearing immediately on the input.
  @@ -354,10 +329,7 @@
        *
        * @throws IOException  Thrown if i/o error occurs.
        * @throws EOFException Thrown on end of file.
  -     * @throws SAXException Thrown by entity handler to signal an error
  -     *                      when the end of an entity is reached.
        */
  -    public abstract boolean skipString(String s) 
  -        throws IOException, SAXException;
  +    public abstract boolean skipString(String s) throws IOException;
   
   } // class XMLEntityScanner
  
  
  
  1.1.2.10  +25 -21    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.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- XMLErrorReporter.java	2001/04/06 10:11:48	1.1.2.9
  +++ XMLErrorReporter.java	2001/05/09 07:20:27	1.1.2.10
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  - * reserved.
  + * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
  + * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -62,6 +62,7 @@
   
   import org.apache.xerces.util.DefaultErrorHandler;
   import org.apache.xerces.util.MessageFormatter;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
   
  @@ -107,7 +108,7 @@
    * @author Eric Ye, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLErrorReporter.java,v 1.1.2.9 2001/04/06 10:11:48 andyc Exp $
  + * @version $Id: XMLErrorReporter.java,v 1.1.2.10 2001/05/09 07:20:27 andyc Exp $
    */
   public class XMLErrorReporter
       implements XMLComponent {
  @@ -286,7 +287,7 @@
        * @see SEVERITY_FATAL_ERROR
        */
       public void reportError(String domain, String key, Object[] arguments, 
  -                            short severity) throws SAXException {
  +                            short severity) throws XNIException {
           reportError(fLocator, domain, key, arguments, severity);
       } // reportError(String,String,Object[],short)
   
  @@ -306,7 +307,7 @@
        */
       public void reportError(Locator location,
                               String domain, String key, Object[] arguments, 
  -                            short severity) throws SAXException {
  +                            short severity) throws XNIException {
   
           // REVISIT: [Q] Should we do anything about invalid severity
           //              parameter? -Ac
  @@ -326,24 +327,27 @@
           }
   
           // call error handler
  -        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) {
  -                    // NOTE: In Xerces 1.x, SAX parse exception was wrapped
  -                    //       again.
  -                    throw spe;
  +        try {
  +            switch (severity) {
  +                case SEVERITY_WARNING: {
  +                    errorHandler.warning(spe);
  +                    break;
  +                }
  +                case SEVERITY_ERROR: {
  +                    errorHandler.error(spe);
  +                    break;
                   }
  -                break;
  +                case SEVERITY_FATAL_ERROR: {
  +                    errorHandler.fatalError(spe);
  +                    if (!fContinueAfterFatalError) {
  +                        throw new XNIException(spe);
  +                    }
  +                    break;
  +                }
               }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // reportError(Locator,String,String,Object[],short)
  
  
  
  1.1.2.9   +39 -38    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.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- XMLNamespaceBinder.java	2001/04/16 05:42:20	1.1.2.8
  +++ XMLNamespaceBinder.java	2001/05/09 07:20:28	1.1.2.9
  @@ -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
  @@ -69,6 +69,7 @@
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLDocumentHandler;
   import org.apache.xerces.xni.XMLString;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
   
  @@ -92,7 +93,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLNamespaceBinder.java,v 1.1.2.8 2001/04/16 05:42:20 andyc Exp $
  + * @version $Id: XMLNamespaceBinder.java,v 1.1.2.9 2001/05/09 07:20:28 andyc Exp $
    */
   public class XMLNamespaceBinder 
       implements XMLComponent, XMLDocumentHandler {
  @@ -333,10 +334,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException {
  +                            String encoding) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.startEntity(name, publicId, systemId, encoding);
           }
  @@ -356,10 +357,10 @@
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void textDecl(String version, String encoding) 
  -        throws SAXException {
  +        throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.textDecl(version, encoding);
           }
  @@ -368,10 +369,10 @@
       /**
        * The start of the document.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startDocument(String systemId, String encoding) 
  -        throws SAXException {
  +        throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.startDocument(systemId, encoding);
           }
  @@ -387,10 +388,10 @@
        *                   not specified.
        * @param standalone The standalone value, or null if not specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void xmlDecl(String version, String encoding, String standalone)
  -        throws SAXException {
  +        throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.xmlDecl(version, encoding, standalone);
           }
  @@ -405,11 +406,11 @@
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement, 
                               String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.doctypeDecl(rootElement, publicId, systemId);
           }
  @@ -420,9 +421,9 @@
        * 
        * @param text The text in the comment.
        *
  -     * @throws SAXException Thrown by application to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws SAXException {
  +    public void comment(XMLString text) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.comment(text);
           }
  @@ -442,10 +443,10 @@
        * @param target The target.
        * @param data   The data or null if none specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void processingInstruction(String target, XMLString data)
  -        throws SAXException {
  +        throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.processingInstruction(target, data);
           }
  @@ -458,10 +459,10 @@
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startPrefixMapping(String prefix, String uri)
  -        throws SAXException {
  +        throws XNIException {
   
           // REVISIT: Should prefix mapping from previous stage in
           //          the pipeline affect the namespaces?
  @@ -485,10 +486,10 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startElement(QName element, XMLAttributes attributes)
  -        throws SAXException {
  +        throws XNIException {
   
           // add new namespace context
           fNamespaceSupport.pushContext();
  @@ -567,10 +568,10 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void emptyElement(QName element, XMLAttributes attributes)
  -        throws SAXException {
  +        throws XNIException {
   
           startElement(element, attributes);
           endElement(element);
  @@ -582,9 +583,9 @@
        * 
        * @param text The content.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws SAXException {
  +    public void characters(XMLString text) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.characters(text);
           }
  @@ -600,9 +601,9 @@
        * 
        * @param text The ignorable whitespace.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws SAXException {
  +    public void ignorableWhitespace(XMLString text) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.ignorableWhitespace(text);
           }
  @@ -613,9 +614,9 @@
        * 
        * @param element The name of the element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws SAXException {
  +    public void endElement(QName element) throws XNIException {
   
           // bind element
           element.uri = fNamespaceSupport.getURI(element.prefix);
  @@ -645,9 +646,9 @@
        * 
        * @param prefix The namespace prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws SAXException {
  +    public void endPrefixMapping(String prefix) throws XNIException {
   
           // REVISIT: Should prefix mapping from previous stage in
           //          the pipeline affect the namespaces?
  @@ -662,9 +663,9 @@
       /** 
        * The start of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws SAXException {
  +    public void startCDATA() throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.startCDATA();
           }
  @@ -673,9 +674,9 @@
       /**
        * The end of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws SAXException {
  +    public void endCDATA() throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.endCDATA();
           }
  @@ -684,9 +685,9 @@
       /**
        * The end of the document.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws SAXException {
  +    public void endDocument() throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.endDocument();
           }
  @@ -701,9 +702,9 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException {
  +    public void endEntity(String name) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.endEntity(name);
           }
  
  
  
  1.1.2.45  +25 -20    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.44
  retrieving revision 1.1.2.45
  diff -u -r1.1.2.44 -r1.1.2.45
  --- XMLScanner.java	2001/04/07 02:41:55	1.1.2.44
  +++ XMLScanner.java	2001/05/09 07:20:29	1.1.2.45
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  - * reserved.
  + * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
  + * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -68,6 +68,7 @@
   import org.apache.xerces.util.XMLChar;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLString;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
   
  @@ -95,7 +96,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLScanner.java,v 1.1.2.44 2001/04/07 02:41:55 lehors Exp $
  + * @version $Id: XMLScanner.java,v 1.1.2.45 2001/05/09 07:20:29 andyc Exp $
    */
   public abstract class XMLScanner 
       implements XMLComponent {
  @@ -249,8 +250,12 @@
           
           // sax features
           fValidation = componentManager.getFeature(VALIDATION);
  -        fNotifyCharRefs = componentManager.getFeature(NOTIFY_CHAR_REFS);
  - 
  +        try {
  +            fNotifyCharRefs = componentManager.getFeature(NOTIFY_CHAR_REFS);
  +        }
  +        catch (SAXException e) {
  +            // ignore
  +        }
   
       } // reset(XMLComponentManager)
   
  @@ -326,7 +331,7 @@
        */
       protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl,
                                            String[] pseudoAttributeValues) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // pseudo-attribute values
           String version = null;
  @@ -470,7 +475,7 @@
        */
       public String scanPseudoAttribute(boolean scanningTextDecl, 
                                         XMLString value) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           String name = fEntityScanner.scanName();
           if (name == null) {
  @@ -534,7 +539,7 @@
        * <strong>Note:</strong> This method uses fString, anything in it
        * at the time of calling is lost.
        */
  -    protected void scanPI() throws IOException, SAXException {
  +    protected void scanPI() throws IOException, XNIException {
   
           // target
           String target = fEntityScanner.scanName();
  @@ -559,7 +564,7 @@
        * @param data The string to fill in with the data
        */
       protected void scanPIData(String target, XMLString data) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // check target
           if (target.length() == 3) {
  @@ -621,7 +626,7 @@
        * @param text The buffer to fill in with the text.
        */
       protected void scanComment(XMLStringBuffer text)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // text
           // REVISIT: handle invalid character, eof
  @@ -667,7 +672,7 @@
       protected void scanAttributeValue(XMLString value, String atName,
                                         XMLAttributes attributes, int attrIndex,
                                         boolean checkEntities)
  -        throws IOException, SAXException
  +        throws IOException, XNIException
       {
           // quote
           int quote = fEntityScanner.peekChar();
  @@ -955,7 +960,7 @@
        */
       protected void scanExternalID(String[] identifiers,
                                     boolean optionalSystemId)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           String systemId = null;
           String publicId = null;
  @@ -1032,7 +1037,7 @@
        * the time of calling is lost.
        */
       protected boolean scanPubidLiteral(XMLString literal)
  -        throws IOException, SAXException
  +        throws IOException, XNIException
       {
           int quote = fEntityScanner.scanChar();
           if (quote != '\'' && quote != '"') {
  @@ -1114,10 +1119,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException {
  +                            String encoding) throws XNIException {
   
           // keep track of the entity depth
           fEntityDepth++;
  @@ -1139,9 +1144,9 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException {
  +    public void endEntity(String name) throws XNIException {
   
           // keep track of the entity depth
           fEntityDepth--;
  @@ -1174,7 +1179,7 @@
        * @return the character value or (-1) on conversion failure
        */
       protected int scanCharReferenceValue(XMLStringBuffer buf) 
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           // scan hexadecimal value
           boolean hex = false;
  @@ -1268,7 +1273,7 @@
        * @returns True if it succeeded.
        */
       protected boolean scanSurrogates(XMLStringBuffer buf)
  -        throws IOException, SAXException {
  +        throws IOException, XNIException {
   
           int high = fEntityScanner.scanChar();
           int low = fEntityScanner.peekChar();
  @@ -1302,7 +1307,7 @@
        * Convenience function used in all XML scanners.
        */
       protected void reportFatalError(String msgId, Object[] args)
  -        throws SAXException {
  +        throws XNIException {
           fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                      msgId, args,
                                      XMLErrorReporter.SEVERITY_FATAL_ERROR);
  
  
  
  1.1.2.70  +83 -82    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.69
  retrieving revision 1.1.2.70
  diff -u -r1.1.2.69 -r1.1.2.70
  --- XMLValidator.java	2001/04/11 07:22:04	1.1.2.69
  +++ XMLValidator.java	2001/05/09 07:20:30	1.1.2.70
  @@ -87,6 +87,7 @@
   import org.apache.xerces.xni.XMLDocumentHandler;
   import org.apache.xerces.xni.XMLDTDHandler;
   import org.apache.xerces.xni.XMLDTDContentModelHandler;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLComponent;
   import org.apache.xerces.xni.parser.XMLComponentManager;
   
  @@ -123,7 +124,7 @@
    * @author Andy Clark, IBM
    * @author Jeffrey Rodriguez IBM
    *
  - * @version $Id: XMLValidator.java,v 1.1.2.69 2001/04/11 07:22:04 andyc Exp $
  + * @version $Id: XMLValidator.java,v 1.1.2.70 2001/05/09 07:20:30 andyc Exp $
    */
   public class XMLValidator
       implements XMLComponent, 
  @@ -667,10 +668,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *     
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startDocument(String systemId, String encoding) 
  -        throws SAXException {
  +        throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  @@ -689,10 +690,10 @@
        *                   not specified.
        * @param standalone The standalone value, or null if not specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void xmlDecl(String version, String encoding, String standalone)
  -        throws SAXException {
  +        throws XNIException {
   
           // save standalone state
           fStandaloneIsYes = standalone != null && standalone.equals("yes");
  @@ -713,10 +714,10 @@
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement, String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
   
           // save root element state
           fRootElement.setValues(null, rootElement, rootElement, null);
  @@ -735,10 +736,10 @@
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startPrefixMapping(String prefix, String uri)
  -        throws SAXException {
  +        throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  @@ -753,10 +754,10 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startElement(QName element, XMLAttributes attributes)
  -        throws SAXException {
  +        throws XNIException {
   
           handleStartElement(element, attributes, false);
   
  @@ -768,10 +769,10 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void emptyElement(QName element, XMLAttributes attributes)
  -        throws SAXException {
  +        throws XNIException {
   
           handleStartElement(element, attributes, true);
   
  @@ -782,9 +783,9 @@
        * 
        * @param text The content.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws SAXException {
  +    public void characters(XMLString text) throws XNIException {
   
           // ignored characters in DTD
           if (fInDTD) {
  @@ -859,9 +860,9 @@
        * 
        * @param text The ignorable whitespace.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws SAXException {
  +    public void ignorableWhitespace(XMLString text) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  @@ -875,9 +876,9 @@
        * 
        * @param element The name of the element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws SAXException {
  +    public void endElement(QName element) throws XNIException {
   
           handleEndElement(element, false);
       
  @@ -889,9 +890,9 @@
        * 
        * @param prefix The namespace prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws SAXException {
  +    public void endPrefixMapping(String prefix) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  @@ -903,9 +904,9 @@
       /** 
        * The start of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws SAXException {
  +    public void startCDATA() throws XNIException {
   
           if (fValidation && fInElementContent) {
               charDataInContent();
  @@ -921,9 +922,9 @@
       /**
        * The end of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws SAXException {
  +    public void endCDATA() throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  @@ -935,9 +936,9 @@
       /**
        * The end of the document.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws SAXException {
  +    public void endDocument() throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  @@ -973,10 +974,10 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal parameter entities).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException {
  +                            String encoding) throws XNIException {
           
           // call handlers
           if (fInDTD) {
  @@ -1022,9 +1023,9 @@
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding) throws SAXException {
  +    public void textDecl(String version, String encoding) throws XNIException {
   
           // call handlers
           if (fInDTD) {
  @@ -1046,9 +1047,9 @@
        * 
        * @param text The text in the comment.
        *
  -     * @throws SAXException Thrown by application to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws SAXException {
  +    public void comment(XMLString text) throws XNIException {
   
           // call handlers
           if (fInDTD) {
  @@ -1079,10 +1080,10 @@
        * @param target The target.
        * @param data   The data or null if none specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void processingInstruction(String target, XMLString data)
  -        throws SAXException {
  +        throws XNIException {
   
           // call handlers
           if (fInDTD) {
  @@ -1114,9 +1115,9 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException {
  +    public void endEntity(String name) throws XNIException {
   
           // call handlers
           if (fInDTD) {
  @@ -1140,9 +1141,9 @@
       /**
        * The start of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDTD() throws SAXException {
  +    public void startDTD() throws XNIException {
   
           // initialize state
           fInDTD = true;
  @@ -1169,10 +1170,10 @@
        * @param name         The name of the element.
        * @param contentModel The element content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void elementDecl(String name, String contentModel)
  -        throws SAXException {
  +        throws XNIException {
   
           //check VC: Unique Element Declaration
           if (fValidation) {
  @@ -1201,9 +1202,9 @@
        * @param elementName The name of the element that this attribute
        *                    list is associated with.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startAttlist(String elementName) throws SAXException {
  +    public void startAttlist(String elementName) throws XNIException {
           
           // call handlers
           fDTDGrammar.startAttlist(elementName);
  @@ -1232,12 +1233,12 @@
        * @param defaultValue  The attribute default value, or null if no
        *                      default value is specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void attributeDecl(String elementName, String attributeName, 
                                 String type, String[] enumeration, 
                                 String defaultType, XMLString defaultValue)
  -        throws SAXException {
  +        throws XNIException {
   
           if (type != fCDATASymbol) {
               normalizeDefaultAttrValue(defaultValue);
  @@ -1382,9 +1383,9 @@
       /**
        * The end of an attribute list.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endAttlist() throws SAXException {
  +    public void endAttlist() throws XNIException {
   
           // call handlers
           fDTDGrammar.endAttlist();
  @@ -1402,10 +1403,10 @@
        *             entity name.
        * @param text The value of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void internalEntityDecl(String name, XMLString text) 
  -        throws SAXException {
  +        throws XNIException {
   
           // call handlers
           fDTDGrammar.internalEntityDecl(name, text);
  @@ -1425,10 +1426,10 @@
        *                 the entity was specified with SYSTEM.
        * @param systemId The system identifier of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void externalEntityDecl(String name, String publicId, 
  -                                   String systemId) throws SAXException {
  +                                   String systemId) throws XNIException {
   
           // call handlers
           fDTDGrammar.externalEntityDecl(name, publicId, systemId);
  @@ -1448,11 +1449,11 @@
        *                 specified.
        * @param notation The name of the notation.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void unparsedEntityDecl(String name, 
                                      String publicId, String systemId, 
  -                                   String notation) throws SAXException {
  +                                   String notation) throws XNIException {
   
           // VC: Notation declared,  in the production of NDataDecl
           if (fValidation) {
  @@ -1476,10 +1477,10 @@
        * @param systemId The system identifier of the notation, or null if not
        *                 specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void notationDecl(String name, String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
   
           // call handlers
           fDTDGrammar.notationDecl(name, publicId, systemId);
  @@ -1495,12 +1496,12 @@
        * @param type The type of the conditional section. This value will
        *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see CONDITIONAL_INCLUDE
        * @see CONDITIONAL_IGNORE
        */
  -    public void startConditional(short type) throws SAXException {
  +    public void startConditional(short type) throws XNIException {
   
           // set state
           fInDTDIgnore = type == XMLDTDHandler.CONDITIONAL_IGNORE;
  @@ -1516,9 +1517,9 @@
       /**
        * The end of a conditional section.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endConditional() throws SAXException {
  +    public void endConditional() throws XNIException {
   
           // set state
           fInDTDIgnore = false;
  @@ -1534,9 +1535,9 @@
       /**
        * The end of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDTD() throws SAXException {
  +    public void endDTD() throws XNIException {
   
           // set state
           fInDTD = false;
  @@ -1604,7 +1605,7 @@
        * @param elementName The name of the element.
        * @param type        The content model type.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_EMPTY
        * @see TYPE_ANY
  @@ -1612,7 +1613,7 @@
        * @see TYPE_CHILDREN
        */
       public void startContentModel(String elementName, short type)
  -        throws SAXException {
  +        throws XNIException {
   
           if (fValidation) {
               fDTDElementDeclName = elementName;
  @@ -1638,11 +1639,11 @@
        * 
        * @param elementName The name of the referenced element. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_MIXED
        */
  -    public void mixedElement(String elementName) throws SAXException {
  +    public void mixedElement(String elementName) throws XNIException {
   
           // check VC: No duplicate Types, in a single mixed-content declaration
           if (fValidation) {
  @@ -1673,11 +1674,11 @@
        * <strong>Note:</strong> Children groups can be nested and have
        * associated occurrence counts.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenStartGroup() throws SAXException {
  +    public void childrenStartGroup() throws XNIException {
   
           // call handlers
           fDTDGrammar.childrenStartGroup();
  @@ -1692,11 +1693,11 @@
        * 
        * @param elementName The name of the referenced element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenElement(String elementName) throws SAXException {
  +    public void childrenElement(String elementName) throws XNIException {
   
           // call handlers
           fDTDGrammar.childrenElement(elementName);
  @@ -1715,13 +1716,13 @@
        * 
        * @param separator The type of children separator.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see SEPARATOR_CHOICE
        * @see SEPARATOR_SEQUENCE
        * @see TYPE_CHILDREN
        */
  -    public void childrenSeparator(short separator) throws SAXException {
  +    public void childrenSeparator(short separator) throws XNIException {
   
           // call handlers
           fDTDGrammar.childrenSeparator(separator);
  @@ -1740,14 +1741,14 @@
        * @param occurrence The occurrence count for the last children element
        *                   or children group.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see OCCURS_ZERO_OR_ONE
        * @see OCCURS_ZERO_OR_MORE
        * @see OCCURS_ONE_OR_MORE
        * @see TYPE_CHILDREN
        */
  -    public void childrenOccurrence(short occurrence) throws SAXException {
  +    public void childrenOccurrence(short occurrence) throws XNIException {
   
           // call handlers
           fDTDGrammar.childrenOccurrence(occurrence);
  @@ -1765,7 +1766,7 @@
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenEndGroup() throws SAXException {
  +    public void childrenEndGroup() throws XNIException {
   
           // call handlers
           fDTDGrammar.childrenEndGroup();
  @@ -1778,9 +1779,9 @@
       /**
        * The end of a content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endContentModel() throws SAXException {
  +    public void endContentModel() throws XNIException {
   
           // call handlers
           fDTDGrammar.endContentModel();
  @@ -1797,7 +1798,7 @@
       /** Add default attributes and validate. */
       private void addDTDDefaultAttrsAndValidate(int elementIndex, 
                                                  XMLAttributes attributes) 
  -        throws SAXException {
  +        throws XNIException {
   
           // is there anything to do?
           if (elementIndex == -1 || fCurrentGrammar == null) {
  @@ -2000,7 +2001,7 @@
        */
       private void validateDTDattribute(QName element, String attValue,
                                         XMLAttributeDecl attributeDecl) 
  -        throws SAXException {
  +        throws XNIException {
   
           switch (attributeDecl.simpleType.type) {
               case XMLSimpleType.TYPE_ENTITY: {                            
  @@ -2282,7 +2283,7 @@
       }
   
       /** Root element specified. */
  -    private void rootElementSpecified(QName rootElement) throws SAXException {
  +    private void rootElementSpecified(QName rootElement) throws XNIException {
           if (fValidation && fCurrentGrammarIsDTD) {
               String root1 = fRootElement.rawname;
               String root2 = rootElement.rawname;
  @@ -2331,7 +2332,7 @@
       private int checkContent(int elementIndex, 
                                QName[] children,
                                int childOffset, 
  -                             int childCount) throws SAXException {
  +                             int childCount) throws XNIException {
   
           fCurrentGrammar.getElementDecl(elementIndex, fTempElementDecl);
   
  @@ -2559,7 +2560,7 @@
   
       /** Handle element. */
       protected void handleStartElement(QName element, XMLAttributes attributes,
  -                                      boolean isEmpty) throws SAXException {
  +                                      boolean isEmpty) throws XNIException {
   
           // VC: Root Element Type
           // see if the root element's name matches the one in DoctypeDecl 
  @@ -2666,7 +2667,7 @@
   
       /** Handle end element. */
       protected void handleEndElement(QName element, boolean isEmpty)
  -        throws SAXException {
  +        throws XNIException {
   
           // decrease element depth
           fElementDepth--;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.40  +51 -50    xml-xerces/java/src/org/apache/xerces/impl/validation/grammars/Attic/DTDGrammar.java
  
  Index: DTDGrammar.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/grammars/Attic/DTDGrammar.java,v
  retrieving revision 1.1.2.39
  retrieving revision 1.1.2.40
  diff -u -r1.1.2.39 -r1.1.2.40
  --- DTDGrammar.java	2001/03/19 23:12:16	1.1.2.39
  +++ DTDGrammar.java	2001/05/09 07:20:41	1.1.2.40
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  - * reserved.
  + * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
  + * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -79,6 +79,7 @@
   import org.apache.xerces.xni.XMLString;
   import org.apache.xerces.xni.XMLDTDContentModelHandler;
   import org.apache.xerces.xni.XMLDTDHandler;
  +import org.apache.xerces.xni.XNIException;
   
   import org.xml.sax.SAXException;
   
  @@ -92,7 +93,7 @@
    * @author Jeffrey Rodriguez, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: DTDGrammar.java,v 1.1.2.39 2001/03/19 23:12:16 lehors Exp $
  + * @version $Id: DTDGrammar.java,v 1.1.2.40 2001/05/09 07:20:41 andyc Exp $
    */
   public class DTDGrammar
       extends Grammar
  @@ -279,9 +280,9 @@
       /**
        * The start of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDTD() throws SAXException {
  +    public void startDTD() throws XNIException {
           //Initialize stack
           fOpStack = null;
           fNodeIndexStack = null;
  @@ -307,10 +308,10 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal parameter entities).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId, 
  -                            String encoding) throws SAXException {
  +                            String encoding) throws XNIException {
   
           if (name.startsWith("%")) {
               // keep track of this entity before fEntityDepth is increased
  @@ -330,9 +331,9 @@
   
       } // startEntity(String,String,String,String)
   
  -    public void textDecl(String version, String encoding) throws SAXException {}
  -    public void comment(XMLString text) throws SAXException {}
  -    public void processingInstruction(String target, XMLString data) throws SAXException {}
  +    public void textDecl(String version, String encoding) throws XNIException {}
  +    public void comment(XMLString text) throws XNIException {}
  +    public void processingInstruction(String target, XMLString data) throws XNIException {}
   
       /**
        * An element declaration.
  @@ -340,10 +341,10 @@
        * @param name         The name of the element.
        * @param contentModel The element content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void elementDecl(String name, String contentModel)
  -        throws SAXException {
  +        throws XNIException {
   
           XMLElementDecl tmpElementDecl = (XMLElementDecl) fElementDeclTab.get(name) ;
   
  @@ -424,9 +425,9 @@
        * @param elementName The name of the element that this attribute
        *                    list is associated with.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startAttlist(String elementName) throws SAXException {
  +    public void startAttlist(String elementName) throws XNIException {
           // no-op
       } // startAttlist
   
  @@ -449,12 +450,12 @@
        * @param defaultValue  The attribute default value, or null if no
        *                      default value is specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void attributeDecl(String elementName, String attributeName, 
                                 String type, String[] enumeration, 
                                 String defaultType, XMLString defaultValue) 
  -        throws SAXException {
  +        throws XNIException {
   
           if ( this.fElementDeclTab.containsKey( (String) elementName) ) {
               //if ElementDecl has already being created in the Grammar then remove from table, 
  @@ -559,9 +560,9 @@
       /**
        * The end of an attribute list.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endAttlist() throws SAXException {
  +    public void endAttlist() throws XNIException {
           // no-op
       } // endAttlist()
   
  @@ -573,10 +574,10 @@
        *             entity name.
        * @param text The value of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void internalEntityDecl(String name, XMLString text)
  -        throws SAXException {
  +        throws XNIException {
   
           XMLEntityDecl  entityDecl = new XMLEntityDecl();
           boolean isPE = name.startsWith("%");
  @@ -601,10 +602,10 @@
        *                 the entity was specified with SYSTEM.
        * @param systemId The system identifier of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void externalEntityDecl(String name, String publicId, 
  -                                   String systemId) throws SAXException {
  +                                   String systemId) throws XNIException {
   
           XMLEntityDecl  entityDecl = new XMLEntityDecl();
           boolean isPE = name.startsWith("%");
  @@ -630,11 +631,11 @@
        *                 specified.
        * @param notation The name of the notation.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void unparsedEntityDecl(String name, String publicId, 
                                      String systemId, String notation)
  -        throws SAXException {
  +        throws XNIException {
   
           XMLEntityDecl  entityDecl = new XMLEntityDecl();
           boolean isPE = name.startsWith("%");
  @@ -658,10 +659,10 @@
        * @param systemId The system identifier of the notation, or null if not
        *                 specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void notationDecl(String name, String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
   
           XMLNotationDecl  notationDecl = new XMLNotationDecl();
           notationDecl.setValues(name,publicId,systemId);
  @@ -679,12 +680,12 @@
        * @param type The type of the conditional section. This value will
        *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see CONDITIONAL_INCLUDE
        * @see CONDITIONAL_IGNORE
        */
  -    public void startConditional(short type) throws SAXException {
  +    public void startConditional(short type) throws XNIException {
           // no-op
       } // startConditional(short)
   
  @@ -693,25 +694,25 @@
        *
        * @param text The ignored text.
        */
  -    public void characters(XMLString text) throws SAXException {
  +    public void characters(XMLString text) throws XNIException {
           // no-op
       } // characters(XMLString)
   
       /**
        * The end of a conditional section.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endConditional() throws SAXException {
  +    public void endConditional() throws XNIException {
           // no-op
       } // endConditional()
   
       /**
        * The end of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDTD() throws SAXException {
  +    public void endDTD() throws XNIException {
   
           // REVISIT: What is this for? -Ac
           /*
  @@ -747,9 +748,9 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException {
  +    public void endEntity(String name) throws XNIException {
   
           if (name.equals("[dtd]")) {
               fReadingExternalDTD = false;
  @@ -773,7 +774,7 @@
        * @param elementName The name of the element.
        * @param type        The content model type.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_EMPTY
        * @see TYPE_ANY
  @@ -781,7 +782,7 @@
        * @see TYPE_CHILDREN
        */
       public void startContentModel(String elementName, short type)
  -        throws SAXException {
  +        throws XNIException {
         
           XMLElementDecl elementDecl = (XMLElementDecl) this.fElementDeclTab.get( elementName);
           if ( elementDecl != null ) {
  @@ -803,11 +804,11 @@
        * 
        * @param elementName The name of the referenced element. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_MIXED
        */
  -    public void mixedElement(String elementName) throws SAXException {
  +    public void mixedElement(String elementName) throws XNIException {
   
           if (fNodeIndexStack[fDepth] == -1 ) {
               fNodeIndexStack[fDepth] = addUniqueLeafNode(elementName);
  @@ -829,11 +830,11 @@
        * <strong>Note:</strong> Children groups can be nested and have
        * associated occurrence counts.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenStartGroup() throws SAXException {
  +    public void childrenStartGroup() throws XNIException {
           fDepth++;
           initializeContentModelStack();
       } // childrenStartGroup()
  @@ -843,11 +844,11 @@
        * 
        * @param elementName The name of the referenced element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenElement(String elementName) throws SAXException {
  +    public void childrenElement(String elementName) throws XNIException {
           fNodeIndexStack[fDepth] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_LEAF, elementName);
       } // childrenElement(String)
   
  @@ -860,13 +861,13 @@
        * 
        * @param separator The type of children separator.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see SEPARATOR_CHOICE
        * @see SEPARATOR_SEQUENCE
        * @see TYPE_CHILDREN
        */
  -    public void childrenSeparator(short separator) throws SAXException {
  +    public void childrenSeparator(short separator) throws XNIException {
   
           if (fOpStack[fDepth] != XMLContentSpec.CONTENTSPECNODE_SEQ && separator == XMLDTDContentModelHandler.SEPARATOR_CHOICE ) {
               if (fPrevNodeIndexStack[fDepth] != -1) {
  @@ -893,14 +894,14 @@
        * @param occurrence The occurrence count for the last children element
        *                   or children group.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see OCCURS_ZERO_OR_ONE
        * @see OCCURS_ZERO_OR_MORE
        * @see OCCURS_ONE_OR_MORE
        * @see TYPE_CHILDREN
        */
  -    public void childrenOccurrence(short occurrence) throws SAXException {
  +    public void childrenOccurrence(short occurrence) throws XNIException {
   
           if ( occurrence == XMLDTDContentModelHandler.OCCURS_ZERO_OR_ONE ) {
               fNodeIndexStack[fDepth] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE, fNodeIndexStack[fDepth], -1);
  @@ -920,7 +921,7 @@
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenEndGroup() throws SAXException {
  +    public void childrenEndGroup() throws XNIException {
   
           if (fPrevNodeIndexStack[fDepth] != -1) {
               fNodeIndexStack[fDepth] = addContentSpecNode(fOpStack[fDepth], fPrevNodeIndexStack[fDepth], fNodeIndexStack[fDepth]);
  @@ -933,9 +934,9 @@
       /**
        * The end of a content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endContentModel() throws SAXException {
  +    public void endContentModel() throws XNIException {
           // no-op
       } // endContentModel()
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +30 -29    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.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- AbstractDOMParser.java	2001/04/06 19:16:30	1.1.2.7
  +++ AbstractDOMParser.java	2001/05/09 07:20:43	1.1.2.8
  @@ -64,6 +64,7 @@
   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.XMLParserConfiguration;
   
   import org.w3c.dom.Attr;
  @@ -91,7 +92,7 @@
    * @author Arnaud Le Hors, IBM
    * @author Andy Clark, IBM
    * 
  - * @version $Id: AbstractDOMParser.java,v 1.1.2.7 2001/04/06 19:16:30 lehors Exp $ 
  + * @version $Id: AbstractDOMParser.java,v 1.1.2.8 2001/05/09 07:20:43 andyc Exp $ 
    */
   public abstract class AbstractDOMParser
       extends AbstractXMLDocumentParser {
  @@ -192,10 +193,10 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal parameter entities).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException {
  +                            String encoding) throws XNIException {
   
           if (fInDocument && !fInDTD) {
               EntityReference entityRef = fDocument.createEntityReference(name);
  @@ -210,9 +211,9 @@
        * 
        * @param text The text in the comment.
        *
  -     * @throws SAXException Thrown by application to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws SAXException {
  +    public void comment(XMLString text) throws XNIException {
   
           Comment comment = fDocument.createComment(text.toString());
           fCurrentNode.appendChild(comment);
  @@ -233,10 +234,10 @@
        * @param target The target.
        * @param data   The data or null if none specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void processingInstruction(String target, XMLString data)
  -        throws SAXException {
  +        throws XNIException {
   
           ProcessingInstruction pi = fDocument.createProcessingInstruction(target, data.toString());
           fCurrentNode.appendChild(pi);
  @@ -254,10 +255,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *     
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startDocument(String systemId, String encoding) 
  -        throws SAXException {
  +        throws XNIException {
   
           fInDocument = true;
           fDocument = new DocumentImpl();
  @@ -277,10 +278,10 @@
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement, String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
           
           DocumentImpl docimpl = (DocumentImpl)fDocument;
           DocumentType doctype = docimpl.createDocumentType(rootElement, publicId, systemId);
  @@ -296,10 +297,10 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startElement(QName element, XMLAttributes attributes)
  -        throws SAXException {
  +        throws XNIException {
   
           Element elementNode = element.prefix != null
                               ? fDocument.createElementNS(element.uri, element.rawname)
  @@ -331,9 +332,9 @@
        * 
        * @param text The content.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws SAXException {
  +    public void characters(XMLString text) throws XNIException {
   
           if (fInCDATASection) {
               CDATASection cdataSection = (CDATASection)fCurrentNode;
  @@ -363,9 +364,9 @@
        * 
        * @param text The ignorable whitespace.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws SAXException {
  +    public void ignorableWhitespace(XMLString text) throws XNIException {
   
           Node child = fCurrentNode.getLastChild();
           if (child != null && child.getNodeType() == Node.TEXT_NODE) {
  @@ -388,9 +389,9 @@
        * 
        * @param element The name of the element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws SAXException {
  +    public void endElement(QName element) throws XNIException {
   
           fCurrentNode = fCurrentNode.getParentNode();
   
  @@ -402,17 +403,17 @@
        * 
        * @param prefix The namespace prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws SAXException {
  +    public void endPrefixMapping(String prefix) throws XNIException {
       } // endPrefixMapping(String)
   
       /** 
        * The start of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws SAXException {
  +    public void startCDATA() throws XNIException {
   
           fInCDATASection = true;
           CDATASection cdataSection = fDocument.createCDATASection("");
  @@ -424,9 +425,9 @@
       /**
        * The end of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws SAXException {
  +    public void endCDATA() throws XNIException {
   
           fInCDATASection = false;
           fCurrentNode = fCurrentNode.getParentNode();
  @@ -436,9 +437,9 @@
       /**
        * The end of the document.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws SAXException {
  +    public void endDocument() throws XNIException {
   
           // set DOM error checking back on
           if (fDocumentImpl != null) {
  @@ -464,9 +465,9 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException {
  +    public void endEntity(String name) throws XNIException {
   
           if (fInDocument && !fInDTD) {
               fCurrentNode = fCurrentNode.getParentNode();
  
  
  
  1.1.2.12  +285 -161  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.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- AbstractSAXParser.java	2001/05/04 19:38:03	1.1.2.11
  +++ AbstractSAXParser.java	2001/05/09 07:20:44	1.1.2.12
  @@ -65,6 +65,7 @@
   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.XMLParserConfiguration;
   
   import org.xml.sax.ContentHandler;
  @@ -90,7 +91,7 @@
    * @author Arnaud Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: AbstractSAXParser.java,v 1.1.2.11 2001/05/04 19:38:03 lehors Exp $ 
  + * @version $Id: AbstractSAXParser.java,v 1.1.2.12 2001/05/09 07:20:44 andyc Exp $ 
    */
   public abstract class AbstractSAXParser
       extends AbstractXMLDocumentParser
  @@ -196,10 +197,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *     
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startDocument(String systemId, String encoding) 
  -        throws SAXException {
  +        throws XNIException {
   
           // get the locator
           Locator locator = null;
  @@ -210,20 +211,25 @@
               // ignore
           }
   
  -        // SAX1
  -        if (fDocumentHandler != null) {
  -            if (locator != null) {
  -                fDocumentHandler.setDocumentLocator(locator);
  +        try {
  +            // SAX1
  +            if (fDocumentHandler != null) {
  +                if (locator != null) {
  +                    fDocumentHandler.setDocumentLocator(locator);
  +                }
  +                fDocumentHandler.startDocument();
               }
  -            fDocumentHandler.startDocument();
  -        }
   
  -        // SAX2
  -        if (fContentHandler != null) {
  -            if (locator != null) {
  -                fContentHandler.setDocumentLocator(locator);
  +            // SAX2
  +            if (fContentHandler != null) {
  +                if (locator != null) {
  +                    fContentHandler.setDocumentLocator(locator);
  +                }
  +                fContentHandler.startDocument();
               }
  -            fContentHandler.startDocument();
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // startDocument(String,String)
  @@ -237,16 +243,21 @@
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement,
                               String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
           fInDTD = true;
   
  -        // SAX2 extension
  -        if (fLexicalHandler != null) {
  -            fLexicalHandler.startDTD(rootElement, publicId, systemId);
  +        try {
  +            // SAX2 extension
  +            if (fLexicalHandler != null) {
  +                fLexicalHandler.startDTD(rootElement, publicId, systemId);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // doctypeDecl(String,String,String)
  @@ -258,15 +269,21 @@
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void startPrefixMapping(String prefix, String uri)
  -        throws SAXException {
  +        throws XNIException {
   
  -        // SAX2
  -        if (fContentHandler != null) {
  -            fContentHandler.startPrefixMapping(prefix, uri);
  +        try {
  +            // SAX2
  +            if (fContentHandler != null) {
  +                fContentHandler.startPrefixMapping(prefix, uri);
  +            }
           }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
  +        }
   
       } // startPrefixMapping(String prefix, String uri)
   
  @@ -278,34 +295,40 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void startElement(QName element, XMLAttributes attributes) 
  -        throws SAXException {
  +        throws XNIException {
   
  -        // SAX1
  -        if (fDocumentHandler != null) {
  -            fDocumentHandler.startElement(element.rawname, attributes);
  -        }
  -
  -        // SAX2
  -        if (fContentHandler != null) {
  -
  -            if (!fNamespacePrefixes) {
  -                // remove namespace declaration attributes
  -                int len = attributes.getLength();
  -                for (int i = len - 1; i >= 0; i--) {
  -                    attributes.getName(i, fQName);
  -                    if (fQName.rawname == fXmlnsSymbol ||
  -                        fQName.prefix == fXmlnsSymbol) {
  -                        attributes.removeAttributeAt(i);
  +        try {
  +            // SAX1
  +            if (fDocumentHandler != null) {
  +                fDocumentHandler.startElement(element.rawname, attributes);
  +            }
  +    
  +            // SAX2
  +            if (fContentHandler != null) {
  +    
  +                if (!fNamespacePrefixes) {
  +                    // remove namespace declaration attributes
  +                    int len = attributes.getLength();
  +                    for (int i = len - 1; i >= 0; i--) {
  +                        attributes.getName(i, fQName);
  +                        if (fQName.rawname == fXmlnsSymbol ||
  +                            fQName.prefix == fXmlnsSymbol) {
  +                            attributes.removeAttributeAt(i);
  +                        }
                       }
                   }
  +    
  +                String uri = element.uri != null ? element.uri : fEmptySymbol;
  +                fContentHandler.startElement(uri, element.localpart,
  +                                             element.rawname, attributes);
               }
  -
  -            String uri = element.uri != null ? element.uri : fEmptySymbol;
  -            fContentHandler.startElement(uri, element.localpart,
  -                                         element.rawname, attributes);
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // startElement(QName,XMLAttributes)
  @@ -315,22 +338,28 @@
        * 
        * @param text The content.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
  -    public void characters(XMLString text) throws SAXException {
  +    public void characters(XMLString text) throws XNIException {
   
           if (fInDTD) {
               return;
           }
   
  -        // SAX1
  -        if (fDocumentHandler != null) {
  -            fDocumentHandler.characters(text.ch, text.offset, text.length);
  -        }
  +        try {
  +            // SAX1
  +            if (fDocumentHandler != null) {
  +                fDocumentHandler.characters(text.ch, text.offset, text.length);
  +            }
   
  -        // SAX2
  -        if (fContentHandler != null) {
  -            fContentHandler.characters(text.ch, text.offset, text.length);
  +            // SAX2
  +            if (fContentHandler != null) {
  +                fContentHandler.characters(text.ch, text.offset, text.length);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // characters(XMLString)
  @@ -345,19 +374,24 @@
        * 
        * @param text The ignorable whitespace.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) 
  -        throws SAXException {
  +    public void ignorableWhitespace(XMLString text) throws XNIException {
   
  -        // SAX1
  -        if (fDocumentHandler != null) {
  -            fDocumentHandler.ignorableWhitespace(text.ch, text.offset, text.length);
  -        }
  +        try {
  +            // SAX1
  +            if (fDocumentHandler != null) {
  +                fDocumentHandler.ignorableWhitespace(text.ch, text.offset, text.length);
  +            }
   
  -        // SAX2
  -        if (fContentHandler != null) {
  -            fContentHandler.ignorableWhitespace(text.ch, text.offset, text.length);
  +            // SAX2
  +            if (fContentHandler != null) {
  +                fContentHandler.ignorableWhitespace(text.ch, text.offset, text.length);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // ignorableWhitespace(XMLString)
  @@ -367,20 +401,26 @@
        * 
        * @param element The name of the element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
  -    public void endElement(QName element) throws SAXException {
  +    public void endElement(QName element) throws XNIException {
   
  -        // SAX1
  -        if (fDocumentHandler != null) {
  -            fDocumentHandler.endElement(element.rawname);
  -        }
  +        try {
  +            // SAX1
  +            if (fDocumentHandler != null) {
  +                fDocumentHandler.endElement(element.rawname);
  +            }
   
  -        // SAX2
  -        if (fContentHandler != null) {
  -            String uri = element.uri != null ? element.uri : fEmptySymbol;
  -            fContentHandler.endElement(uri, element.localpart,
  -                                       element.rawname);
  +            // SAX2
  +            if (fContentHandler != null) {
  +                String uri = element.uri != null ? element.uri : fEmptySymbol;
  +                fContentHandler.endElement(uri, element.localpart,
  +                                           element.rawname);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // endElement(QName)
  @@ -391,33 +431,45 @@
        * 
        * @param prefix The namespace prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws SAXException {
  +    public void endPrefixMapping(String prefix)  throws XNIException {
   
  -        // SAX2
  -        if (fContentHandler != null) {
  -            fContentHandler.endPrefixMapping(prefix);
  +        try {
  +            // SAX2
  +            if (fContentHandler != null) {
  +                fContentHandler.endPrefixMapping(prefix);
  +            }
           }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
  +        }
   
       } // endPrefixMapping(String)
   
       /**
        * The end of the document.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
  -    public void endDocument() throws SAXException {
  +    public void endDocument() throws XNIException {
   
  -        // SAX1
  -        if (fDocumentHandler != null) {
  -            fDocumentHandler.endDocument();
  -        }
  +        try {
  +            // SAX1
  +            if (fDocumentHandler != null) {
  +                fDocumentHandler.endDocument();
  +            }
   
  -        // SAX2
  -        if (fContentHandler != null) {
  -            fContentHandler.endDocument();
  +            // SAX2
  +            if (fContentHandler != null) {
  +                fContentHandler.endDocument();
  +            }
           }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
  +        }
   
       } // endDocument()
   
  @@ -454,13 +506,22 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal parameter entities).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException {
  -        if (fLexicalHandler != null) {
  -            fLexicalHandler.startEntity(name);
  +                            String encoding) throws XNIException {
  +
  +        try {
  +            // SAX2 extension
  +            if (fLexicalHandler != null) {
  +                fLexicalHandler.startEntity(name);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
  +
       } // startEntity(String,String,String,String)
   
       /**
  @@ -484,12 +545,21 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException {
  -        if (fLexicalHandler != null) {
  -            fLexicalHandler.endEntity(name);
  +    public void endEntity(String name) throws XNIException {
  +
  +        try {
  +            // SAX2 extension
  +            if (fLexicalHandler != null) {
  +                fLexicalHandler.endEntity(name);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
  +
       } // endEntity(String)
   
       /**
  @@ -497,13 +567,19 @@
        * 
        * @param text The text in the comment.
        *
  -     * @throws SAXException Thrown by application to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
  -    public void comment(XMLString text) throws SAXException {
  +    public void comment(XMLString text) throws XNIException {
   
  -        // SAX2 extension
  -        if (fLexicalHandler != null) {
  -            fLexicalHandler.comment(text.ch, 0, text.length);
  +        try {
  +            // SAX2 extension
  +            if (fLexicalHandler != null) {
  +                fLexicalHandler.comment(text.ch, 0, text.length);
  +            }
  +        }
  +        catch (SAXException e) { 
  +            throw new XNIException(e);
           }
   
       } // comment(XMLString)
  @@ -522,10 +598,11 @@
        * @param target The target.
        * @param data   The data or null if none specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void processingInstruction(String target, XMLString data)
  -        throws SAXException {
  +        throws XNIException {
   
           //
           // REVISIT - I keep running into SAX apps that expect
  @@ -533,16 +610,21 @@
           //   to the comment for this method in the SAX API.
           //
   
  -        // SAX1
  -        if (fDocumentHandler != null) {
  -            fDocumentHandler.processingInstruction(target,
  -                                                   data.toString());
  -        }
  +        try {
  +            // SAX1
  +            if (fDocumentHandler != null) {
  +                fDocumentHandler.processingInstruction(target,
  +                                                       data.toString());
  +            }
   
  -        // SAX2
  -        if (fContentHandler != null) {
  -            fContentHandler.processingInstruction(target, data.toString());
  +            // SAX2
  +            if (fContentHandler != null) {
  +                fContentHandler.processingInstruction(target, data.toString());
  +            }
           }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
  +        }
   
       } // processingInstruction(String,XMLString)
   
  @@ -556,14 +638,20 @@
        * @param name         The name of the element.
        * @param contentModel The element content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void elementDecl(String name, String contentModel) 
  -        throws SAXException {
  +        throws XNIException {
   
  -        // SAX2 extension
  -        if (fDeclHandler != null) {
  -            fDeclHandler.elementDecl(name, contentModel);
  +        try {
  +            // SAX2 extension
  +            if (fDeclHandler != null) {
  +                fDeclHandler.elementDecl(name, contentModel);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // elementDecl(String,String)
  @@ -587,31 +675,37 @@
        * @param defaultValue  The attribute default value, or null if no
        *                      default value is specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void attributeDecl(String elementName, String attributeName, 
                                 String type, String[] enumeration, 
                                 String defaultType, XMLString defaultValue)
  -        throws SAXException {
  +        throws XNIException {
   
  -        // SAX2 extension
  -        if (fDeclHandler != null) {
  -            if (type.equals("NOTATION")) {
  -                StringBuffer str = new StringBuffer();
  -                str.append(type);
  -                str.append(" (");
  -                for (int i = 0; i < enumeration.length; i++) {
  -                    str.append(enumeration[i]);
  -                    if (i < enumeration.length - 1) {
  -                        str.append('|');
  +        try {
  +            // SAX2 extension
  +            if (fDeclHandler != null) {
  +                if (type.equals("NOTATION")) {
  +                    StringBuffer str = new StringBuffer();
  +                    str.append(type);
  +                    str.append(" (");
  +                    for (int i = 0; i < enumeration.length; i++) {
  +                        str.append(enumeration[i]);
  +                        if (i < enumeration.length - 1) {
  +                            str.append('|');
  +                        }
                       }
  +                    str.append(')');
  +                    type = str.toString();
                   }
  -                str.append(')');
  -                type = str.toString();
  +                String value = defaultValue.toString();
  +                fDeclHandler.attributeDecl(elementName, attributeName,
  +                                           type, defaultType, value);
               }
  -            String value = defaultValue.toString();
  -            fDeclHandler.attributeDecl(elementName, attributeName,
  -                                       type, defaultType, value);
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // attributeDecl(String,String,String,String[],String,XMLString)
  @@ -624,14 +718,20 @@
        *             entity name.
        * @param text The value of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void internalEntityDecl(String name, XMLString text)
  -        throws SAXException {
  +        throws XNIException {
   
  -        // SAX2 extensions
  -        if (fDeclHandler != null) {
  -            fDeclHandler.internalEntityDecl(name, text.toString());
  +        try {
  +            // SAX2 extensions
  +            if (fDeclHandler != null) {
  +                fDeclHandler.internalEntityDecl(name, text.toString());
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // internalEntityDecl(String,XMLString)
  @@ -646,15 +746,21 @@
        *                 the entity was specified with SYSTEM.
        * @param systemId The system identifier of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void externalEntityDecl(String name, String publicId,
  -                                   String systemId) throws SAXException {
  +                                   String systemId) throws XNIException {
   
  -        // SAX2 extension
  -        if (fDeclHandler != null) {
  -            fDeclHandler.externalEntityDecl(name, publicId, systemId);
  +        try {
  +            // SAX2 extension
  +            if (fDeclHandler != null) {
  +                fDeclHandler.externalEntityDecl(name, publicId, systemId);
  +            }
           }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
  +        }
   
       } // externalEntityDecl(String,String,String)
   
  @@ -668,16 +774,22 @@
        *                 specified.
        * @param notation The name of the notation.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void unparsedEntityDecl(String name, String publicId,
                                      String systemId, String notation)
  -        throws SAXException {
  +        throws XNIException {
   
  -        // SAX2 extension
  -        if (fDTDHandler != null) {
  -            fDTDHandler.unparsedEntityDecl(name, publicId,
  -                                           systemId, notation);
  +        try {
  +            // SAX2 extension
  +            if (fDTDHandler != null) {
  +                fDTDHandler.unparsedEntityDecl(name, publicId,
  +                                               systemId, notation);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // unparsedEntityDecl(String,String,String,String)
  @@ -691,29 +803,41 @@
        * @param systemId The system identifier of the notation, or null if not
        *                 specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
       public void notationDecl(String name, String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
   
  -        // SAX1 and SAX2
  -        if (fDTDHandler != null) {
  -            fDTDHandler.notationDecl(name, publicId, systemId);
  +        try {
  +            // SAX1 and SAX2
  +            if (fDTDHandler != null) {
  +                fDTDHandler.notationDecl(name, publicId, systemId);
  +            }
           }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
  +        }
   
       } // notationDecl(String,String,String)
   
       /**
        * The end of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws SAXException Thrown by SAX handler to signal an error.
        */
  -    public void endDTD() throws SAXException {
  +    public void endDTD() throws XNIException {
           fInDTD = false;
   
  -        // SAX2 extension
  -        if (fLexicalHandler != null) {
  -            fLexicalHandler.endDTD();
  +        try {
  +            // SAX2 extension
  +            if (fLexicalHandler != null) {
  +                fLexicalHandler.endDTD();
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
           }
   
       } // endDTD()
  
  
  
  1.1.2.6   +79 -78    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.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- AbstractXMLDocumentParser.java	2001/04/06 19:16:31	1.1.2.5
  +++ AbstractXMLDocumentParser.java	2001/05/09 07:20:45	1.1.2.6
  @@ -63,6 +63,7 @@
   import org.apache.xerces.xni.XMLDTDHandler;
   import org.apache.xerces.xni.XMLDTDContentModelHandler;
   import org.apache.xerces.xni.XMLString;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLParserConfiguration;
   
   import org.xml.sax.SAXException;
  @@ -78,7 +79,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: AbstractXMLDocumentParser.java,v 1.1.2.5 2001/04/06 19:16:31 lehors Exp $
  + * @version $Id: AbstractXMLDocumentParser.java,v 1.1.2.6 2001/05/09 07:20:45 andyc Exp $
    */
   public abstract class AbstractXMLDocumentParser
       extends XMLParser
  @@ -123,10 +124,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *     
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startDocument(String systemId, String encoding) 
  -        throws SAXException {
  +        throws XNIException {
       } // startDocument(String,String)
   
       /**
  @@ -139,10 +140,10 @@
        *                   not specified.
        * @param standalone The standalone value, or null if not specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void xmlDecl(String version, String encoding, String standalone)
  -        throws SAXException {
  +        throws XNIException {
       } // xmlDecl(String,String,String)
   
       /**
  @@ -154,10 +155,10 @@
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement, String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
       } // doctypeDecl(String,String,String)
   
       /**
  @@ -167,10 +168,10 @@
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startPrefixMapping(String prefix, String uri)
  -        throws SAXException {
  +        throws XNIException {
       } // startPrefixMapping(String,String)
   
       /**
  @@ -181,10 +182,10 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startElement(QName element, XMLAttributes attributes)
  -        throws SAXException {
  +        throws XNIException {
       } // startElement(QName,XMLAttributes)
   
       /**
  @@ -193,10 +194,10 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void emptyElement(QName element, XMLAttributes attributes)
  -        throws SAXException {
  +        throws XNIException {
   
           startElement(element, attributes);
           endElement(element);
  @@ -208,9 +209,9 @@
        * 
        * @param text The content.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws SAXException {
  +    public void characters(XMLString text) throws XNIException {
       } // characters(XMLString)
   
       /**
  @@ -223,9 +224,9 @@
        * 
        * @param text The ignorable whitespace.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws SAXException {
  +    public void ignorableWhitespace(XMLString text) throws XNIException {
       } // ignorableWhitespace(XMLString)
   
       /**
  @@ -233,9 +234,9 @@
        * 
        * @param element The name of the element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws SAXException {
  +    public void endElement(QName element) throws XNIException {
       } // endElement(QName)
   
       /**
  @@ -244,33 +245,33 @@
        * 
        * @param prefix The namespace prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws SAXException {
  +    public void endPrefixMapping(String prefix) throws XNIException {
       } // endPrefixMapping(String)
   
       /** 
        * The start of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws SAXException {
  +    public void startCDATA() throws XNIException {
       } // startCDATA()
   
       /**
        * The end of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws SAXException {
  +    public void endCDATA() throws XNIException {
       } // endCDATA()
   
       /**
        * The end of the document.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws SAXException {
  +    public void endDocument() throws XNIException {
       } // endDocument()
   
       //
  @@ -287,7 +288,7 @@
        * will be notified of the start of the document entity by calling the
        * startEntity method with the entity name "[xml]" <em>before</em> calling
        * the startDocument method. When exposing entity boundaries through the
  -     * SAX API, the document entity is never reported, however.
  +     * XNI API, the document entity is never reported, however.
        * <p>
        * <strong>Note:</strong> Since the DTD is an entity, the handler
        * will be notified of the start of the DTD entity by calling the
  @@ -307,10 +308,10 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal parameter entities).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException {
  +                            String encoding) throws XNIException {
       } // startEntity(String,String,String,String)
   
       /**
  @@ -327,9 +328,9 @@
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding) throws SAXException {
  +    public void textDecl(String version, String encoding) throws XNIException {
       } // textDecl(String,String)
   
       /**
  @@ -337,9 +338,9 @@
        * 
        * @param text The text in the comment.
        *
  -     * @throws SAXException Thrown by application to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws SAXException {
  +    public void comment(XMLString text) throws XNIException {
       } // comment(XMLString)
   
       /**
  @@ -356,10 +357,10 @@
        * @param target The target.
        * @param data   The data or null if none specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void processingInstruction(String target, XMLString data)
  -        throws SAXException {
  +        throws XNIException {
       } // processingInstruction(String,XMLString)
   
       /**
  @@ -372,7 +373,7 @@
        * will be notified of the end of the document entity by calling the
        * endEntity method with the entity name "[xml]" <em>after</em> calling
        * the endDocument method. When exposing entity boundaries through the
  -     * SAX API, the document entity is never reported, however.
  +     * XNI API, the document entity is never reported, however.
        * <p>
        * <strong>Note:</strong> Since the DTD is an entity, the handler
        * will be notified of the end of the DTD entity by calling the
  @@ -384,9 +385,9 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException {
  +    public void endEntity(String name) throws XNIException {
       } // endEntity(String)
   
       //
  @@ -396,9 +397,9 @@
       /**
        * The start of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDTD() throws SAXException {
  +    public void startDTD() throws XNIException {
           fInDTD = true;
       } // startDTD()
   
  @@ -408,10 +409,10 @@
        * @param name         The name of the element.
        * @param contentModel The element content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void elementDecl(String name, String contentModel)
  -        throws SAXException {
  +        throws XNIException {
       } // elementDecl(String,String)
   
       /**
  @@ -420,9 +421,9 @@
        * @param elementName The name of the element that this attribute
        *                    list is associated with.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startAttlist(String elementName) throws SAXException {
  +    public void startAttlist(String elementName) throws XNIException {
       } // startAttlist(String)
   
       /**
  @@ -444,20 +445,20 @@
        * @param defaultValue  The attribute default value, or null if no
        *                      default value is specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void attributeDecl(String elementName, String attributeName, 
                                 String type, String[] enumeration, 
                                 String defaultType, XMLString defaultValue)
  -        throws SAXException {
  +        throws XNIException {
       } // attributeDecl(String,String,String,String[],String,XMLString)
   
       /**
        * The end of an attribute list.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endAttlist() throws SAXException {
  +    public void endAttlist() throws XNIException {
       } // endAttlist()
   
       /**
  @@ -468,10 +469,10 @@
        *             entity name.
        * @param text The value of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void internalEntityDecl(String name, XMLString text) 
  -        throws SAXException {
  +        throws XNIException {
       } // internalEntityDecl(String,XMLString)
   
       /**
  @@ -484,11 +485,11 @@
        *                 the entity was specified with SYSTEM.
        * @param systemId The system identifier of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void externalEntityDecl(String name, 
                                      String publicId, String systemId) 
  -        throws SAXException {
  +        throws XNIException {
       } // externalEntityDecl(String,String,String)
   
       /**
  @@ -501,11 +502,11 @@
        *                 specified.
        * @param notation The name of the notation.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void unparsedEntityDecl(String name, 
                                      String publicId, String systemId, 
  -                                   String notation) throws SAXException {
  +                                   String notation) throws XNIException {
       } // unparsedEntityDecl(String,String,String,String)
   
       /**
  @@ -517,10 +518,10 @@
        * @param systemId The system identifier of the notation, or null if not
        *                 specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void notationDecl(String name, String publicId, String systemId)
  -        throws SAXException {
  +        throws XNIException {
       } // notationDecl(String,String,String)
   
       /**
  @@ -529,28 +530,28 @@
        * @param type The type of the conditional section. This value will
        *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see CONDITIONAL_INCLUDE
        * @see CONDITIONAL_IGNORE
        */
  -    public void startConditional(short type) throws SAXException {
  +    public void startConditional(short type) throws XNIException {
       } // startConditional(short)
   
       /**
        * The end of a conditional section.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endConditional() throws SAXException {
  +    public void endConditional() throws XNIException {
       } // endConditional()
   
       /**
        * The end of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDTD() throws SAXException {
  +    public void endDTD() throws XNIException {
           fInDTD = false;
       } // endDTD()
   
  @@ -566,7 +567,7 @@
        * @param elementName The name of the element.
        * @param type        The content model type.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_EMPTY
        * @see TYPE_ANY
  @@ -574,7 +575,7 @@
        * @see TYPE_CHILDREN
        */
       public void startContentModel(String elementName, short type)
  -        throws SAXException {
  +        throws XNIException {
       } // startContentModel(String,short)
   
       /**
  @@ -588,11 +589,11 @@
        * 
        * @param elementName The name of the referenced element. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_MIXED
        */
  -    public void mixedElement(String elementName) throws SAXException {
  +    public void mixedElement(String elementName) throws XNIException {
       } // mixedElement(elementName)
   
       /**
  @@ -604,11 +605,11 @@
        * <strong>Note:</strong> Children groups can be nested and have
        * associated occurrence counts.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenStartGroup() throws SAXException {
  +    public void childrenStartGroup() throws XNIException {
       } // childrenStartGroup()
   
       /**
  @@ -616,11 +617,11 @@
        * 
        * @param elementName The name of the referenced element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenElement(String elementName) throws SAXException {
  +    public void childrenElement(String elementName) throws XNIException {
       } // childrenElement(String)
   
       /**
  @@ -632,13 +633,13 @@
        * 
        * @param separator The type of children separator.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see SEPARATOR_CHOICE
        * @see SEPARATOR_SEQUENCE
        * @see TYPE_CHILDREN
        */
  -    public void childrenSeparator(short separator) throws SAXException {
  +    public void childrenSeparator(short separator) throws XNIException {
       } // childrenSeparator(short)
   
       /**
  @@ -650,14 +651,14 @@
        * @param occurrence The occurrence count for the last children element
        *                   or children group.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see OCCURS_ZERO_OR_ONE
        * @see OCCURS_ZERO_OR_MORE
        * @see OCCURS_ONE_OR_MORE
        * @see TYPE_CHILDREN
        */
  -    public void childrenOccurrence(short occurrence) throws SAXException {
  +    public void childrenOccurrence(short occurrence) throws XNIException {
       } // childrenOccurrence(short)
   
       /**
  @@ -668,15 +669,15 @@
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenEndGroup() throws SAXException {
  +    public void childrenEndGroup() throws XNIException {
       } // childrenEndGroup()
   
       /**
        * The end of a content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endContentModel() throws SAXException {
  +    public void endContentModel() throws XNIException {
       } // endContentModel()
   
       //
  
  
  
  1.1.2.6   +5 -3      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.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- BasicParserConfiguration.java	2001/04/07 02:38:52	1.1.2.5
  +++ BasicParserConfiguration.java	2001/05/09 07:20:46	1.1.2.6
  @@ -69,6 +69,7 @@
   import org.apache.xerces.xni.XMLDocumentHandler;
   import org.apache.xerces.xni.XMLDTDHandler;
   import org.apache.xerces.xni.XMLDTDContentModelHandler;
  +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.XMLParserConfiguration;
  @@ -131,7 +132,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: BasicParserConfiguration.java,v 1.1.2.5 2001/04/07 02:38:52 lehors Exp $
  + * @version $Id: BasicParserConfiguration.java,v 1.1.2.6 2001/05/09 07:20:46 andyc Exp $
    */
   public abstract class BasicParserConfiguration
       implements XMLParserConfiguration {
  @@ -315,8 +316,9 @@
        * @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 {
  +        throws XNIException, IOException {
   
           InputSource source = new InputSource(systemId);
           parse(source);
  @@ -347,7 +349,7 @@
        * @exception java.io.IOException
        */
       public abstract void parse(InputSource inputSource) 
  -        throws SAXException, IOException;
  +        throws XNIException, IOException;
   
   
       public void setDocumentHandler(XMLDocumentHandler handler) {
  
  
  
  1.1.2.9   +11 -13    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.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- StandardParserConfiguration.java	2001/04/16 05:42:20	1.1.2.8
  +++ StandardParserConfiguration.java	2001/05/09 07:20:47	1.1.2.9
  @@ -71,8 +71,8 @@
   import org.apache.xerces.impl.validation.DatatypeValidatorFactory;
   import org.apache.xerces.impl.validation.GrammarPool;
   import org.apache.xerces.impl.validation.datatypes.DatatypeValidatorFactoryImpl;
  -
   import org.apache.xerces.util.SymbolTable;
  +import org.apache.xerces.xni.XNIException;
   
   import org.xml.sax.InputSource;
   import org.xml.sax.Locator;
  @@ -111,7 +111,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: StandardParserConfiguration.java,v 1.1.2.8 2001/04/16 05:42:20 andyc Exp $
  + * @version $Id: StandardParserConfiguration.java,v 1.1.2.9 2001/05/09 07:20:47 andyc Exp $
    */
   public class StandardParserConfiguration
       extends BasicParserConfiguration {
  @@ -327,7 +327,7 @@
           try {
               setLocale(Locale.getDefault());
           }
  -        catch (SAXException e) {
  +        catch (XNIException e) {
               // do nothing
               // REVISIT: What is the right thing to do? -Ac
           }
  @@ -342,13 +342,11 @@
        * 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
  +     * @exception XNIException Thrown if the parser does not support the
  +     *                         specified locale.
        */
  -    public void setLocale(Locale locale) throws SAXException {
  +    public void setLocale(Locale locale) throws XNIException {
           if (fErrorReporter == null) {
               if (fEntityManager == null) {
                   fEntityManager = createEntityManager();
  @@ -373,14 +371,14 @@
        *
        * @param source The input source.
        *
  -     * @exception org.xml.sax.SAXException Throws exception on SAX error.
  +     * @exception XNIException Throws exception on XNI error.
        * @exception java.io.IOException Throws exception on i/o error.
        */
  -    public void parse(InputSource source) throws SAXException, IOException {
  +    public void parse(InputSource source) throws XNIException, IOException {
   
           if (fParseInProgress) {
               // REVISIT - need to add new error message
  -            throw new SAXException("FWK005 parse may not be called while parsing.");
  +            throw new XNIException("FWK005 parse may not be called while parsing.");
           }
           fParseInProgress = true;
   
  @@ -390,7 +388,7 @@
               fEntityManager.startDocumentEntity(new XMLInputSource(source));
               fScanner.scanDocument(true);
           } 
  -        catch (SAXException ex) {
  +        catch (XNIException ex) {
               if (PRINT_EXCEPTION_STACK_TRACE)
                   ex.printStackTrace();
               throw ex;
  @@ -403,7 +401,7 @@
           catch (Exception ex) {
               if (PRINT_EXCEPTION_STACK_TRACE)
                   ex.printStackTrace();
  -            throw new org.xml.sax.SAXException(ex);
  +            throw new XNIException(ex);
           }
           finally {
               fParseInProgress = false;
  
  
  
  1.1.2.25  +48 -5     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.24
  retrieving revision 1.1.2.25
  diff -u -r1.1.2.24 -r1.1.2.25
  --- XMLParser.java	2001/04/06 19:16:35	1.1.2.24
  +++ XMLParser.java	2001/05/09 07:20:47	1.1.2.25
  @@ -2,8 +2,8 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
  - * reserved.
  + * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
  + * All rights reserved.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
  @@ -57,10 +57,13 @@
   
   package org.apache.xerces.parsers;
   
  +import java.io.InputStream;
   import java.io.IOException;
  +import java.io.Reader;
   import java.util.Locale;
   
   import org.apache.xerces.impl.Constants;
  +import org.apache.xerces.xni.XNIException;
   import org.apache.xerces.xni.parser.XMLParserConfiguration;
   
   import org.xml.sax.EntityResolver;
  @@ -88,7 +91,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLParser.java,v 1.1.2.24 2001/04/06 19:16:35 lehors Exp $
  + * @version $Id: XMLParser.java,v 1.1.2.25 2001/05/09 07:20:47 andyc Exp $
    */
   public abstract class XMLParser {
   
  @@ -149,7 +152,32 @@
        * @exception java.io.IOException Throws exception on i/o error.
        */
       public void parse(String systemId) throws SAXException, IOException {
  -        parse(new InputSource(systemId));
  +
  +        // 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)
   
       /**
  @@ -163,7 +191,22 @@
       public void parse(InputSource inputSource) 
           throws SAXException, IOException {
   
  -        fConfiguration.parse(inputSource);
  +        try {
  +            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) 
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +2 -2      xml-xerces/java/src/org/apache/xerces/xni/Attic/NamespaceContext.java
  
  Index: NamespaceContext.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/NamespaceContext.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- NamespaceContext.java	2000/12/28 09:44:31	1.1.2.1
  +++ NamespaceContext.java	2001/05/09 07:20:52	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) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -62,7 +62,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: NamespaceContext.java,v 1.1.2.1 2000/12/28 09:44:31 andyc Exp $
  + * @version $Id: NamespaceContext.java,v 1.1.2.2 2001/05/09 07:20:52 andyc Exp $
    */
   public interface NamespaceContext {
   
  
  
  
  1.1.2.6   +2 -2      xml-xerces/java/src/org/apache/xerces/xni/Attic/QName.java
  
  Index: QName.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/QName.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- QName.java	2001/04/16 05:42:20	1.1.2.5
  +++ QName.java	2001/05/09 07:20:53	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
  @@ -70,7 +70,7 @@
    * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: QName.java,v 1.1.2.5 2001/04/16 05:42:20 andyc Exp $
  + * @version $Id: QName.java,v 1.1.2.6 2001/05/09 07:20:53 andyc Exp $
    */
   public class QName 
       implements Cloneable {
  
  
  
  1.1.2.10  +2 -2      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.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- XMLAttributes.java	2001/03/07 07:44:14	1.1.2.9
  +++ XMLAttributes.java	2001/05/09 07:20:54	1.1.2.10
  @@ -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
  @@ -74,7 +74,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLAttributes.java,v 1.1.2.9 2001/03/07 07:44:14 andyc Exp $
  + * @version $Id: XMLAttributes.java,v 1.1.2.10 2001/05/09 07:20:54 andyc Exp $
    */
   public interface XMLAttributes
       extends AttributeList, Attributes {
  
  
  
  1.1.2.5   +17 -25    xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDTDContentModelHandler.java
  
  Index: XMLDTDContentModelHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDTDContentModelHandler.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- XMLDTDContentModelHandler.java	2000/10/10 08:04:58	1.1.2.4
  +++ XMLDTDContentModelHandler.java	2001/05/09 07:20:55	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
  @@ -57,27 +57,19 @@
   
   package org.apache.xerces.xni;
   
  -import org.xml.sax.SAXException;
  -
   /**
    * The DTD content model handler interface defines callback methods 
    * to report information items in DTD content models of an element
    * declaration. Parser components interested in DTD content model
    * information implement this interface and are registered as the DTD
    * content model handler on the DTD content model source.
  - * <p>
  - * A pipeline of DTD content model components starts with a DTD content
  - * model source; is followed by zero or more DTD content model filters; 
  - * and ends with a DTD content model handler.
    *
  - * @see XMLDTDContentModelSource
  - * @see XMLDTDContentModelFilter
    * @see XMLDTDHandler
    *
    * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLDTDContentModelHandler.java,v 1.1.2.4 2000/10/10 08:04:58 andyc Exp $
  + * @version $Id: XMLDTDContentModelHandler.java,v 1.1.2.5 2001/05/09 07:20:55 andyc Exp $
    */
   public interface XMLDTDContentModelHandler {
   
  @@ -256,7 +248,7 @@
        * @param elementName The name of the element.
        * @param type        The content model type.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_EMPTY
        * @see TYPE_ANY
  @@ -264,7 +256,7 @@
        * @see TYPE_CHILDREN
        */
       public void startContentModel(String elementName, short type)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * A referenced element in a mixed content model. If the mixed content 
  @@ -277,11 +269,11 @@
        * 
        * @param elementName The name of the referenced element. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_MIXED
        */
  -    public void mixedElement(String elementName) throws SAXException;
  +    public void mixedElement(String elementName) throws XNIException;
   
       /**
        * The start of a children group.
  @@ -292,22 +284,22 @@
        * <strong>Note:</strong> Children groups can be nested and have
        * associated occurrence counts.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenStartGroup() throws SAXException;
  +    public void childrenStartGroup() throws XNIException;
   
       /**
        * A referenced element in a children content model.
        * 
        * @param elementName The name of the referenced element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenElement(String elementName) throws SAXException;
  +    public void childrenElement(String elementName) throws XNIException;
   
       /**
        * The separator between choices or sequences of a children content
  @@ -318,13 +310,13 @@
        * 
        * @param separator The type of children separator.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see SEPARATOR_CHOICE
        * @see SEPARATOR_SEQUENCE
        * @see TYPE_CHILDREN
        */
  -    public void childrenSeparator(short separator) throws SAXException;
  +    public void childrenSeparator(short separator) throws XNIException;
   
       /**
        * The occurrence count for a child in a children content model.
  @@ -335,14 +327,14 @@
        * @param occurrence The occurrence count for the last children element
        *                   or children group.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see OCCURS_ZERO_OR_ONE
        * @see OCCURS_ZERO_OR_MORE
        * @see OCCURS_ONE_OR_MORE
        * @see TYPE_CHILDREN
        */
  -    public void childrenOccurrence(short occurrence) throws SAXException;
  +    public void childrenOccurrence(short occurrence) throws XNIException;
   
       /**
        * The end of a children group.
  @@ -352,13 +344,13 @@
        *
        * @see TYPE_CHILDREN
        */
  -    public void childrenEndGroup() throws SAXException;
  +    public void childrenEndGroup() throws XNIException;
   
       /**
        * The end of a content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endContentModel() throws SAXException;
  +    public void endContentModel() throws XNIException;
   
   } // interface XMLDTDContentModelHandler
  
  
  
  1.1.2.11  +37 -46    xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDTDHandler.java
  
  Index: XMLDTDHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDTDHandler.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- XMLDTDHandler.java	2001/02/16 08:05:51	1.1.2.10
  +++ XMLDTDHandler.java	2001/05/09 07:20:56	1.1.2.11
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,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,27 +57,18 @@
   
   package org.apache.xerces.xni;
   
  -import org.apache.xerces.xni.XMLString;
  -
  -import org.xml.sax.SAXException;
  -
   /**
    * The DTD handler interface defines callback methods to report
    * information items in the DTD of an XML document. Parser components
    * interested in DTD information implement this interface and are
    * registered as the DTD handler on the DTD source.
  - * <p>
  - * A pipeline of DTD components starts with a DTD source; is followed
  - * by zero or more DTD filters; and ends with a DTD handler.
    *
  - * @see XMLDTDSource
  - * @see XMLDTDFilter
    * @see XMLDTDContentModelHandler
    *
    * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLDTDHandler.java,v 1.1.2.10 2001/02/16 08:05:51 andyc Exp $
  + * @version $Id: XMLDTDHandler.java,v 1.1.2.11 2001/05/09 07:20:56 andyc Exp $
    */
   public interface XMLDTDHandler {
   
  @@ -114,10 +105,10 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal parameter entities).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException;
  +                            String encoding) throws XNIException;
   
       /**
        * Notifies of the presence of a TextDecl line in an entity. If present,
  @@ -129,25 +120,25 @@
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding) throws SAXException;
  +    public void textDecl(String version, String encoding) throws XNIException;
   
       /**
        * The start of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDTD() throws SAXException;
  +    public void startDTD() throws XNIException;
   
       /**
        * A comment.
        * 
        * @param text The text in the comment.
        *
  -     * @throws SAXException Thrown by application to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws SAXException;
  +    public void comment(XMLString text) throws XNIException;
   
       /**
        * A processing instruction. Processing instructions consist of a
  @@ -163,10 +154,10 @@
        * @param target The target.
        * @param data   The data or null if none specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void processingInstruction(String target, XMLString data)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * An element declaration.
  @@ -174,10 +165,10 @@
        * @param name         The name of the element.
        * @param contentModel The element content model.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void elementDecl(String name, String contentModel)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * The start of an attribute list.
  @@ -185,9 +176,9 @@
        * @param elementName The name of the element that this attribute
        *                    list is associated with.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startAttlist(String elementName) throws SAXException;
  +    public void startAttlist(String elementName) throws XNIException;
   
       /**
        * An attribute declaration.
  @@ -208,19 +199,19 @@
        * @param defaultValue  The attribute default value, or null if no
        *                      default value is specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void attributeDecl(String elementName, String attributeName, 
                                 String type, String[] enumeration, 
                                 String defaultType, XMLString defaultValue)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * The end of an attribute list.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endAttlist() throws SAXException;
  +    public void endAttlist() throws XNIException;
   
       /**
        * An internal entity declaration.
  @@ -230,10 +221,10 @@
        *             entity name.
        * @param text The value of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void internalEntityDecl(String name, XMLString text) 
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * An external entity declaration.
  @@ -245,11 +236,11 @@
        *                 the entity was specified with SYSTEM.
        * @param systemId The system identifier of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void externalEntityDecl(String name, 
                                      String publicId, String systemId) 
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * An unparsed entity declaration.
  @@ -261,11 +252,11 @@
        *                 specified.
        * @param notation The name of the notation.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void unparsedEntityDecl(String name, 
                                      String publicId, String systemId, 
  -                                   String notation) throws SAXException;
  +                                   String notation) throws XNIException;
   
       /**
        * A notation declaration
  @@ -276,10 +267,10 @@
        * @param systemId The system identifier of the notation, or null if not
        *                 specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void notationDecl(String name, String publicId, String systemId)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * The start of a conditional section.
  @@ -287,33 +278,33 @@
        * @param type The type of the conditional section. This value will
        *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        *
        * @see CONDITIONAL_INCLUDE
        * @see CONDITIONAL_IGNORE
        */
  -    public void startConditional(short type) throws SAXException;
  +    public void startConditional(short type) throws XNIException;
   
       /**
        * Characters within an IGNORE conditional section.
        *
        * @param text The ignored text.
        */
  -    public void characters(XMLString text) throws SAXException;
  +    public void characters(XMLString text) throws XNIException;
   
       /**
        * The end of a conditional section.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endConditional() throws SAXException;
  +    public void endConditional() throws XNIException;
   
       /**
        * The end of the DTD.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDTD() throws SAXException;
  +    public void endDTD() throws XNIException;
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  @@ -326,8 +317,8 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException;
  +    public void endEntity(String name) throws XNIException;
   
   } // interface XMLDTDHandler
  
  
  
  1.1.2.3   +34 -34    xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDocumentFragmentHandler.java
  
  Index: XMLDocumentFragmentHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDocumentFragmentHandler.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- XMLDocumentFragmentHandler.java	2001/01/16 05:29:34	1.1.2.2
  +++ XMLDocumentFragmentHandler.java	2001/05/09 07:20:57	1.1.2.3
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights 
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,8 +57,6 @@
   
   package org.apache.xerces.xni;
   
  -import org.xml.sax.SAXException;
  -
   /**
    * This handler interface contains methods necessary to receive
    * information about document elements and content.
  @@ -66,8 +64,10 @@
    * <strong>Note:</strong> Some of these methods overlap methods
    * found in the XMLDocumentHandler interface.
    *
  + * @see XMLDocumentHandler
  + *
    * @author Andy Clark, IBM
  - * @version $Id: XMLDocumentFragmentHandler.java,v 1.1.2.2 2001/01/16 05:29:34 andyc Exp $
  + * @version $Id: XMLDocumentFragmentHandler.java,v 1.1.2.3 2001/05/09 07:20:57 andyc Exp $
    */
   public interface XMLDocumentFragmentHandler {
   
  @@ -86,10 +86,10 @@
        *                         the current context (and its parent contexts)
        *                         if that information is important.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startDocumentFragment(NamespaceContext namespaceContext) 
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * This method notifies the start of an entity.
  @@ -108,10 +108,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException;
  +                            String encoding) throws XNIException;
   
       /**
        * Notifies of the presence of a TextDecl line in an entity. If present,
  @@ -127,9 +127,9 @@
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding) throws SAXException;
  +    public void textDecl(String version, String encoding) throws XNIException;
   
       /**
        * This method notifies the end of an entity.
  @@ -139,18 +139,18 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException;
  +    public void endEntity(String name) throws XNIException;
   
       /**
        * A comment.
        * 
        * @param text The text in the comment.
        *
  -     * @throws SAXException Thrown by application to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws SAXException;
  +    public void comment(XMLString text) throws XNIException;
   
       /**
        * A processing instruction. Processing instructions consist of a
  @@ -166,10 +166,10 @@
        * @param target The target.
        * @param data   The data or null if none specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void processingInstruction(String target, XMLString data)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * The start of a namespace prefix mapping. This method will only be
  @@ -178,10 +178,10 @@
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startPrefixMapping(String prefix, String uri)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * The start of an element. If the document specifies the start element
  @@ -191,19 +191,19 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startElement(QName element, XMLAttributes attributes)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * Character content.
        * 
        * @param text The content.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws SAXException;
  +    public void characters(XMLString text) throws XNIException;
   
       /**
        * Ignorable whitespace. For this method to be called, the document
  @@ -215,18 +215,18 @@
        * 
        * @param text The ignorable whitespace.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws SAXException;
  +    public void ignorableWhitespace(XMLString text) throws XNIException;
   
       /**
        * The end of an element.
        * 
        * @param element The name of the element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws SAXException;
  +    public void endElement(QName element) throws XNIException;
   
       /**
        * The end of a namespace prefix mapping. This method will only be
  @@ -234,29 +234,29 @@
        * 
        * @param prefix The namespace prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws SAXException;
  +    public void endPrefixMapping(String prefix) throws XNIException;
   
       /** 
        * The start of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws SAXException;
  +    public void startCDATA() throws XNIException;
   
       /**
        * The end of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws SAXException;
  +    public void endCDATA() throws XNIException;
   
       /**
        * The end of the document fragment.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocumentFragment() throws SAXException;
  +    public void endDocumentFragment() throws XNIException;
   
   } // interface XMLDocumentFragmentHandler
  
  
  
  1.1.2.9   +38 -50    xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDocumentHandler.java
  
  Index: XMLDocumentHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLDocumentHandler.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- XMLDocumentHandler.java	2001/02/16 08:05:51	1.1.2.8
  +++ XMLDocumentHandler.java	2001/05/09 07:20:57	1.1.2.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 1999,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,28 +57,16 @@
   
   package org.apache.xerces.xni;
   
  -import org.apache.xerces.xni.XMLString;
  -import org.apache.xerces.xni.QName;
  -
  -import org.xml.sax.SAXException;
  -
   /**
    * The document handler interface defines callback methods to report
    * information items in XML documents. Parser components interested in 
    * document information implement this interface and are registered
    * as the document handler on the document source.
  - * <p>
  - * A pipeline of document components starts with a document source; is
  - * followed by zero or more document filters; and ends with a document 
  - * handler.
  - *
  - * @see XMLDocumentSource
  - * @see XMLDocumentFilter
    *
    * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLDocumentHandler.java,v 1.1.2.8 2001/02/16 08:05:51 andyc Exp $
  + * @version $Id: XMLDocumentHandler.java,v 1.1.2.9 2001/05/09 07:20:57 andyc Exp $
    */
   public interface XMLDocumentHandler {
   
  @@ -103,10 +91,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, String publicId, String systemId,
  -                            String encoding) throws SAXException;
  +                            String encoding) throws XNIException;
   
       /**
        * Notifies of the presence of a TextDecl line in an entity. If present,
  @@ -122,9 +110,9 @@
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding) throws SAXException;
  +    public void textDecl(String version, String encoding) throws XNIException;
   
       /**
        * The start of the document.
  @@ -137,10 +125,10 @@
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
        *     
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startDocument(String systemId, String encoding) 
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * Notifies of the presence of an XMLDecl line in the document. If
  @@ -152,10 +140,10 @@
        *                   not specified.
        * @param standalone The standalone value, or null if not specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void xmlDecl(String version, String encoding, String standalone)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * Notifies of the presence of the DOCTYPE line in the document.
  @@ -166,19 +154,19 @@
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement, String publicId, String systemId)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * A comment.
        * 
        * @param text The text in the comment.
        *
  -     * @throws SAXException Thrown by application to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws SAXException;
  +    public void comment(XMLString text) throws XNIException;
   
       /**
        * A processing instruction. Processing instructions consist of a
  @@ -194,10 +182,10 @@
        * @param target The target.
        * @param data   The data or null if none specified.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void processingInstruction(String target, XMLString data)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * The start of a namespace prefix mapping. This method will only be
  @@ -206,10 +194,10 @@
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startPrefixMapping(String prefix, String uri)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * The start of an element.
  @@ -217,10 +205,10 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void startElement(QName element, XMLAttributes attributes)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * An empty element.
  @@ -228,19 +216,19 @@
        * @param element    The name of the element.
        * @param attributes The element attributes.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
       public void emptyElement(QName element, XMLAttributes attributes)
  -        throws SAXException;
  +        throws XNIException;
   
       /**
        * Character content.
        * 
        * @param text The content.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws SAXException;
  +    public void characters(XMLString text) throws XNIException;
   
       /**
        * Ignorable whitespace. For this method to be called, the document
  @@ -252,18 +240,18 @@
        * 
        * @param text The ignorable whitespace.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws SAXException;
  +    public void ignorableWhitespace(XMLString text) throws XNIException;
   
       /**
        * The end of an element.
        * 
        * @param element The name of the element.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws SAXException;
  +    public void endElement(QName element) throws XNIException;
   
       /**
        * The end of a namespace prefix mapping. This method will only be
  @@ -271,30 +259,30 @@
        * 
        * @param prefix The namespace prefix.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws SAXException;
  +    public void endPrefixMapping(String prefix) throws XNIException;
   
       /** 
        * The start of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws SAXException;
  +    public void startCDATA() throws XNIException;
   
       /**
        * The end of a CDATA section. 
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws SAXException;
  +    public void endCDATA() throws XNIException;
   
       /**
        * The end of the document.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws SAXException;
  +    public void endDocument() throws XNIException;
   
       /**
        * This method notifies the end of an entity.
  @@ -304,8 +292,8 @@
        * 
        * @param name The name of the entity.
        *
  -     * @throws SAXException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws SAXException;
  +    public void endEntity(String name) throws XNIException;
   
   } // interface XMLDocumentHandler
  
  
  
  1.1.2.7   +4 -3      xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLString.java
  
  Index: XMLString.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/Attic/XMLString.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- XMLString.java	2000/12/28 09:41:29	1.1.2.6
  +++ XMLString.java	2001/05/09 07:20:59	1.1.2.7
  @@ -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
  @@ -77,9 +77,10 @@
    * to the structure or the character array contained in the structure.
    *
    * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
  - * @author Eric Ye
  + * @author Eric Ye, IBM
  + * @author Andy Clark, IBM
    *
  - * @version $Id: XMLString.java,v 1.1.2.6 2000/12/28 09:41:29 andyc Exp $
  + * @version $Id: XMLString.java,v 1.1.2.7 2001/05/09 07:20:59 andyc Exp $
    */
   public class XMLString {
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +127 -0    xml-xerces/java/src/org/apache/xerces/xni/Attic/XNIException.java
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +1 -6      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.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- XMLComponent.java	2001/04/06 10:12:06	1.1.2.3
  +++ XMLComponent.java	2001/05/09 07:21:10	1.1.2.4
  @@ -72,7 +72,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.3 2001/04/06 10:12:06 andyc Exp $
  + * @version $Id: XMLComponent.java,v 1.1.2.4 2001/05/09 07:21:10 andyc Exp $
    */
   public interface XMLComponent {
   
  @@ -88,11 +88,6 @@
        * @param componentManager The component manager.
        *
        * @throws SAXException Thrown by component on initialization error.
  -     *                      For example, if a feature or property is
  -     *                      required for the operation of the component, the
  -     *                      component manager may throw a 
  -     *                      SAXNotRecognizedException or a
  -     *                      SAXNotSupportedException.
        */
       public void reset(XMLComponentManager componentManager) 
           throws SAXException;
  
  
  
  1.1.2.4   +7 -8      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.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- XMLParserConfiguration.java	2001/04/06 10:12:06	1.1.2.3
  +++ XMLParserConfiguration.java	2001/05/09 07:21:11	1.1.2.4
  @@ -63,6 +63,7 @@
   import org.apache.xerces.xni.XMLDocumentHandler;
   import org.apache.xerces.xni.XMLDTDHandler;
   import org.apache.xerces.xni.XMLDTDContentModelHandler;
  +import org.apache.xerces.xni.XNIException;
   
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
  @@ -116,7 +117,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLParserConfiguration.java,v 1.1.2.3 2001/04/06 10:12:06 andyc Exp $
  + * @version $Id: XMLParserConfiguration.java,v 1.1.2.4 2001/05/09 07:21:11 andyc Exp $
    */
   public interface XMLParserConfiguration
       extends XMLComponentManager {
  @@ -143,14 +144,14 @@
        * @param source The input source for the top-level of the
        *               XML document.
        *
  -     * @exception SAXException Any SAX exception, possibly wrapping 
  +     * @exception XNIException Any XNI exception, possibly wrapping 
        *                         another exception.
        * @exception IOException  An IO exception from the parser, possibly
        *                         from a byte stream or character stream
        *                         supplied by the parser.
        */
       public void parse(InputSource inputSource) 
  -        throws SAXException, IOException;
  +        throws XNIException, IOException;
   
       /**
        * Allows a parser to add parser specific features to be recognized
  @@ -257,11 +258,9 @@
        *
        * @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
  +     * @exception XNIException Thrown if the parser does not support the
  +     *                         specified locale.
        */
  -    public void setLocale(Locale locale) throws SAXException;
  +    public void setLocale(Locale locale) throws XNIException;
   
   } // interface ParserConfiguration
  
  
  

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