You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2001/11/26 22:45:52 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/xni Augmentations.java XMLDTDHandler.java XMLDocumentHandler.java

elena       01/11/26 13:45:52

  Modified:    java/samples/xni DocumentTracer.java PassThroughFilter.java
                        UpperCaseFilter.java
               java/samples/xni/parser CSVConfiguration.java
               java/src/javax/xml/parsers SAXParser.java
               java/src/org/apache/xerces/impl
                        XMLDocumentFragmentScannerImpl.java
                        XMLDocumentScannerImpl.java XMLEntityHandler.java
                        XMLNamespaceBinder.java XMLScanner.java
               java/src/org/apache/xerces/impl/dtd DTDGrammar.java
                        XMLDTDValidator.java
               java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java
               java/src/org/apache/xerces/parsers AbstractDOMParser.java
                        AbstractSAXParser.java
                        AbstractXMLDocumentParser.java DTDParser.java
               java/src/org/apache/xerces/xni XMLDTDHandler.java
                        XMLDocumentHandler.java
  Added:       java/src/org/apache/xerces/util AugmentationsImpl.java
               java/src/org/apache/xerces/xni Augmentations.java
  Log:
  Modify XNI to include Augmentations parameter on each XMLDocumentHandler call.
  Modify samples.
  Modify docs http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5058
  
  Revision  Changes    Path
  1.6       +135 -37   xml-xerces/java/samples/xni/DocumentTracer.java
  
  Index: DocumentTracer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/xni/DocumentTracer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DocumentTracer.java	2001/11/13 20:34:14	1.5
  +++ DocumentTracer.java	2001/11/26 21:45:50	1.6
  @@ -64,6 +64,7 @@
   import java.io.Writer;
   
   import org.apache.xerces.parsers.XMLDocumentParser;
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLDTDHandler;
  @@ -84,7 +85,7 @@
    * @author Andy Clark, IBM
    * @author Arnaud Le Hors, IBM
    *
  - * @version $Id: DocumentTracer.java,v 1.5 2001/11/13 20:34:14 sandygao Exp $
  + * @version $Id: DocumentTracer.java,v 1.6 2001/11/26 21:45:50 elena Exp $
    */
   public class DocumentTracer
       extends XMLDocumentParser
  @@ -208,7 +209,7 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding)
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
           throws XNIException {
   
           fIndent = 0;
  @@ -247,7 +248,7 @@
   
       /** XML Declaration. */
       public void xmlDecl(String version, String encoding, String actualEncoding,
  -                        String standalone) throws XNIException {
  +                        String standalone, Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.print("xmlDecl(");
  @@ -268,7 +269,7 @@
   
       /** Doctype declaration. */
       public void doctypeDecl(String rootElement, String publicId,
  -                            String systemId) throws XNIException {
  +                            String systemId, Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.print("doctypeDecl(");
  @@ -286,7 +287,7 @@
       } // doctypeDecl(String,String,String)
   
       /** Start prefix mapping. */
  -    public void startPrefixMapping(String prefix, String uri)
  +    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
           throws XNIException {
   
           printIndent();
  @@ -302,7 +303,7 @@
       } // startPrefixMapping(String,String)
   
       /** Start element. */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
   
           printIndent();
  @@ -315,7 +316,7 @@
       } // startElement(QName,XMLAttributes)
   
       /** Empty element. */
  -    public void emptyElement(QName element, XMLAttributes attributes)
  +    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
   
           printIndent();
  @@ -326,8 +327,8 @@
   
       } // emptyElement(QName,XMLAttributes)
   
  -    /** Characters. */
  -    public void characters(XMLString text) throws XNIException {
  +
  +    public void characters(XMLString text, Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.print("characters(");
  @@ -338,8 +339,10 @@
   
       } // characters(XMLString)
   
  +
  +
       /** Ignorable whitespace. */
  -    public void ignorableWhitespace(XMLString text) throws XNIException {
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.print("ignorableWhitespace(");
  @@ -351,7 +354,7 @@
       } // ignorableWhitespace(XMLString)
   
       /** End element. */
  -    public void endElement(QName element) throws XNIException {
  +    public void endElement(QName element, Augmentations augs) throws XNIException {
   
           fIndent--;
           printIndent();
  @@ -376,7 +379,7 @@
       } // endElement(QName)
   
       /** End prefix mapping. */
  -    public void endPrefixMapping(String prefix) throws XNIException {
  +    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.print("endPrefixMapping(");
  @@ -388,7 +391,7 @@
       } // endPrefixMapping(String)
   
       /** Start CDATA section. */
  -    public void startCDATA() throws XNIException {
  +    public void startCDATA(Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.println("startCDATA()");
  @@ -398,7 +401,7 @@
       } // startCDATA()
   
       /** End CDATA section. */
  -    public void endCDATA() throws XNIException {
  +    public void endCDATA(Augmentations augs) throws XNIException {
   
           fIndent--;
           printIndent();
  @@ -407,25 +410,11 @@
   
       } //  endCDATA()
   
  -    /** End document. */
  -    public void endDocument() throws XNIException {
  -
  -        fIndent--;
  -        printIndent();
  -        fOut.println("endDocument()");
  -        fOut.flush();
  -
  -    } // endDocument();
  -
  -    //
  -    // XMLDocumentHandler and XMLDTDHandler methods
  -    //
  -
  -    /** Start entity. */
  +     /** Start entity. */
       public void startEntity(String name,
                               String publicId, String systemId,
                               String baseSystemId,
  -                            String encoding) throws XNIException {
  +                            String encoding, Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.print("startEntity(");
  @@ -450,7 +439,7 @@
       } // startEntity(String,String,String,String)
   
       /** Text declaration. */
  -    public void textDecl(String version, String encoding) throws XNIException {
  +    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.print("textDecl(");
  @@ -465,7 +454,7 @@
       } // textDecl(String,String)
   
       /** Comment. */
  -    public void comment(XMLString text) throws XNIException {
  +    public void comment(XMLString text, Augmentations augs) throws XNIException {
   
           printIndent();
           fOut.print("comment(");
  @@ -477,7 +466,7 @@
       } // comment(XMLText)
   
       /** Processing instruction. */
  -    public void processingInstruction(String target, XMLString data)
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
           throws XNIException {
   
           printIndent();
  @@ -493,7 +482,7 @@
       } // processingInstruction(String,XMLString)
   
       /** End entity. */
  -    public void endEntity(String name) throws XNIException {
  +    public void endEntity(String name, Augmentations augs) throws XNIException {
   
           fIndent--;
           printIndent();
  @@ -505,10 +494,22 @@
   
       } // endEntity(String)
   
  +
  +
  +
  +    /** End document. */
  +    public void endDocument(Augmentations augs) throws XNIException {
  +
  +        fIndent--;
  +        printIndent();
  +        fOut.println("endDocument()");
  +        fOut.flush();
  +
  +    } // endDocument();
  +
       //
  -    // XMLDTDHandler methods
  +    // XMLDTDHandler
       //
  -
       /** Start DTD. */
       public void startDTD(XMLLocator locator) throws XNIException {
   
  @@ -541,8 +542,105 @@
           fIndent++;
   
       } // startDTD(XMLLocator)
  +
  +
  +
  +    /** Characters.*/
  +    public void characters(XMLString text) throws XNIException {
  +
  +        printIndent();
  +        fOut.print("characters(");
  +        fOut.print("text=");
  +        printQuotedString(text.ch, text.offset, text.length);
  +        fOut.println(')');
  +        fOut.flush();
  +
  +    } // characters(XMLString)
  +    /** Start entity. */
  +    public void startEntity(String name,
  +                            String publicId, String systemId,
  +                            String baseSystemId,
  +                            String encoding) throws XNIException {
  +
  +        printIndent();
  +        fOut.print("startEntity(");
  +        fOut.print("name=");
  +        printQuotedString(name);
  +        fOut.print(',');
  +        fOut.print("publicId=");
  +        printQuotedString(publicId);
  +        fOut.print(',');
  +        fOut.print("systemId=");
  +        printQuotedString(systemId);
  +        fOut.print(',');
  +        fOut.print("baseSystemId=");
  +        printQuotedString(baseSystemId);
  +        fOut.print(',');
  +        fOut.print("encoding=");
  +        printQuotedString(encoding);
  +        fOut.println(')');
  +        fOut.flush();
  +        fIndent++;
  +
  +    } // startEntity(String,String,String,String)
  +
  +    /** Text declaration. */
  +    public void textDecl(String version, String encoding) throws XNIException {
  +
  +        printIndent();
  +        fOut.print("textDecl(");
  +        fOut.print("version=");
  +        printQuotedString(version);
  +        fOut.print(',');
  +        fOut.print("encoding=");
  +        printQuotedString(encoding);
  +        fOut.println(')');
  +        fOut.flush();
  +
  +    } // textDecl(String,String)
  +
  +    /** Comment. */
  +    public void comment(XMLString text) throws XNIException {
  +
  +        printIndent();
  +        fOut.print("comment(");
  +        fOut.print("text=");
  +        printQuotedString(text.ch, text.offset, text.length);
  +        fOut.println(')');
  +        fOut.flush();
  +
  +    } // comment(XMLText)
  +
  +    /** Processing instruction. */
  +    public void processingInstruction(String target, XMLString data)
  +        throws XNIException {
  +
  +        printIndent();
  +        fOut.print("processingInstruction(");
  +        fOut.print("target=");
  +        printQuotedString(target);
  +        fOut.print(',');
  +        fOut.print("data=");
  +        printQuotedString(data.ch, data.offset, data.length);
  +        fOut.println(')');
  +        fOut.flush();
  +
  +    } // processingInstruction(String,XMLString)
  +
  +    /** End entity. */
  +    public void endEntity(String name) throws XNIException {
  +
  +        fIndent--;
  +        printIndent();
  +        fOut.print("endEntity(");
  +        fOut.print("name=");
  +        printQuotedString(name);
  +        fOut.println(')');
  +        fOut.flush();
  +
  +    } // endEntity(String)
   
  -    /** Element declaration. */
  +        /** Element declaration. */
       public void elementDecl(String name, String contentModel)
           throws XNIException {
   
  
  
  
  1.3       +38 -37    xml-xerces/java/samples/xni/PassThroughFilter.java
  
  Index: PassThroughFilter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/xni/PassThroughFilter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PassThroughFilter.java	2001/08/23 00:35:18	1.2
  +++ PassThroughFilter.java	2001/11/26 21:45:50	1.3
  @@ -57,6 +57,7 @@
   
   package xni;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLDocumentHandler;
  @@ -76,7 +77,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: PassThroughFilter.java,v 1.2 2001/08/23 00:35:18 lehors Exp $
  + * @version $Id: PassThroughFilter.java,v 1.3 2001/11/26 21:45:50 elena Exp $
    */
   public class PassThroughFilter
       implements XMLDocumentHandler {
  @@ -122,10 +123,10 @@
        *     
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding)
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startDocument(locator, encoding);
  +            fDocumentHandler.startDocument(locator, encoding, augs);
   	    }
       } // startDocument(XMLLocator,String)
       
  @@ -142,9 +143,9 @@
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void xmlDecl(String version, String encoding, 
  -                        String standalone) throws XNIException {
  +                        String standalone, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.xmlDecl(version, encoding, standalone);
  +            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
   	    }
       } // xmlDecl(String,String,String
       
  @@ -160,9 +161,9 @@
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement, String publicId, 
  -                            String systemId) throws XNIException {
  +                            String systemId, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId);
  +            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
           }
       } // doctypeDecl(String,String,String)
       
  @@ -173,9 +174,9 @@
        *
        * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws XNIException {
  +    public void comment(XMLString text, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.comment(text);
  +            fDocumentHandler.comment(text, augs);
           }
       } // comment(XMLString)
       
  @@ -195,10 +196,10 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void processingInstruction(String target, XMLString data)
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.processingInstruction(target, data);
  +            fDocumentHandler.processingInstruction(target, data, augs);
           }
       } // processingInstruction(String,XMLString)
       
  @@ -211,10 +212,10 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startPrefixMapping(String prefix, String uri)
  +    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startPrefixMapping(prefix, uri);
  +            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
           }
       } // startPrefixMapping(String,String)
       
  @@ -226,9 +227,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws XNIException {
  +    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endPrefixMapping(prefix);
  +            fDocumentHandler.endPrefixMapping(prefix, augs);
           }
       } // endPrefixMapping(String)
       
  @@ -240,10 +241,10 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startElement(element, attributes);
  +            fDocumentHandler.startElement(element, attributes, augs);
           }
       } // startElement(QName,XMLAttributes)
       
  @@ -255,10 +256,10 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void emptyElement(QName element, XMLAttributes attributes)
  +    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.emptyElement(element, attributes);
  +            fDocumentHandler.emptyElement(element, attributes, augs);
           }
       } // emptyElement(QName,XMLAttributes)
       
  @@ -269,10 +270,10 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element)
  +    public void endElement(QName element, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endElement(element);
  +            fDocumentHandler.endElement(element, augs);
           }
       } // endElement(QName)
       
  @@ -299,11 +300,11 @@
        */
       public void startEntity(String name, String publicId, 
                               String systemId, String baseSystemId,
  -                            String encoding) throws XNIException {
  +                            String encoding, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
               fDocumentHandler.startEntity(name, publicId, 
                                            systemId, baseSystemId,
  -                                         encoding);
  +                                         encoding, augs);
           }
       } // startEntity(String,String,String,String,String)
       
  @@ -323,10 +324,10 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding)
  +    public void textDecl(String version, String encoding, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.textDecl(version, encoding);
  +            fDocumentHandler.textDecl(version, encoding, augs);
           }
       } // textDecl(String,String)
       
  @@ -340,9 +341,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws XNIException {
  +    public void endEntity(String name, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endEntity(name);
  +            fDocumentHandler.endEntity(name, augs);
           }
       } // endEntity(String)
       
  @@ -353,9 +354,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws XNIException {
  +    public void characters(XMLString text, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.characters(text);
  +            fDocumentHandler.characters(text, augs);
           }
       } // characters(XMLString)
       
  @@ -371,9 +372,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws XNIException {
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.ignorableWhitespace(text);
  +            fDocumentHandler.ignorableWhitespace(text, augs);
           }
       } // ignorableWhitespace(XMLString)
       
  @@ -382,9 +383,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws XNIException {
  +    public void startCDATA(Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startCDATA();
  +            fDocumentHandler.startCDATA(augs);
           }
       } // startCDATA()
       
  @@ -393,9 +394,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws XNIException {
  +    public void endCDATA(Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endCDATA();
  +            fDocumentHandler.endCDATA(augs);
           }
       } // endCDATA()
       
  @@ -404,9 +405,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws XNIException {
  +    public void endDocument(Augmentations augs) throws XNIException {
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endDocument();
  +            fDocumentHandler.endDocument(augs);
           }
       } // endDocument()
       
  
  
  
  1.3       +8 -7      xml-xerces/java/samples/xni/UpperCaseFilter.java
  
  Index: UpperCaseFilter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/xni/UpperCaseFilter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UpperCaseFilter.java	2001/08/23 00:35:19	1.2
  +++ UpperCaseFilter.java	2001/11/26 21:45:50	1.3
  @@ -57,6 +57,7 @@
   
   package xni;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XNIException;
  @@ -72,7 +73,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: UpperCaseFilter.java,v 1.2 2001/08/23 00:35:19 lehors Exp $
  + * @version $Id: UpperCaseFilter.java,v 1.3 2001/11/26 21:45:50 elena Exp $
    */
   public class UpperCaseFilter
       extends PassThroughFilter {
  @@ -101,9 +102,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
  -        super.startElement(toUpperCase(element), attributes);
  +        super.startElement(toUpperCase(element), attributes, augs);
       } // startElement(QName,XMLAttributes)
       
       /**
  @@ -114,9 +115,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void emptyElement(QName element, XMLAttributes attributes)
  +    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
  -        super.emptyElement(toUpperCase(element), attributes);
  +        super.emptyElement(toUpperCase(element), attributes, augs);
       } // emptyElement(QName,XMLAttributes)
       
       /**
  @@ -126,9 +127,9 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element)
  +    public void endElement(QName element, Augmentations augs)
           throws XNIException {
  -        super.endElement(toUpperCase(element));
  +        super.endElement(toUpperCase(element), augs);
       } // endElement(QName)
       
       //
  
  
  
  1.3       +21 -16    xml-xerces/java/samples/xni/parser/CSVConfiguration.java
  
  Index: CSVConfiguration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/xni/parser/CSVConfiguration.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CSVConfiguration.java	2001/08/23 00:35:19	1.2
  +++ CSVConfiguration.java	2001/11/26 21:45:50	1.3
  @@ -64,9 +64,11 @@
   import java.io.Reader;
   import java.util.StringTokenizer;
   
  +import org.apache.xerces.util.AugmentationsImpl;
   import org.apache.xerces.util.XMLAttributesImpl;
   import org.apache.xerces.util.XMLStringBuffer;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLDTDContentModelHandler;
  @@ -102,7 +104,7 @@
    * 
    * @author Andy Clark, IBM
    *
  - * @version $Id: CSVConfiguration.java,v 1.2 2001/08/23 00:35:19 lehors Exp $
  + * @version $Id: CSVConfiguration.java,v 1.3 2001/11/26 21:45:50 elena Exp $
    */
   public class CSVConfiguration
       extends AbstractConfiguration {
  @@ -123,6 +125,9 @@
       /** An empty list of attributes. */
       protected static final XMLAttributes EMPTY_ATTRS = new XMLAttributesImpl();
   
  +    /** An empty list of augmentations. */
  +    protected final Augmentations fAugmentations = new AugmentationsImpl();
  +
       /** A newline XMLString. */
       private final XMLString NEWLINE = new XMLStringBuffer("\n");
   
  @@ -184,9 +189,9 @@
   
           // start document
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startDocument(null, "UTF-8");
  -            fDocumentHandler.xmlDecl("1.0", "UTF-8", "true");
  -            fDocumentHandler.doctypeDecl("csv", null, null);
  +            fDocumentHandler.startDocument(null, "UTF-8", fAugmentations);
  +            fDocumentHandler.xmlDecl("1.0", "UTF-8", "true", fAugmentations);
  +            fDocumentHandler.doctypeDecl("csv", null, null, fAugmentations);
           }
           if (fDTDHandler != null) {
               fDTDHandler.startDTD(null);
  @@ -221,36 +226,36 @@
               fDTDHandler.endDTD();
           }
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startElement(CSV, EMPTY_ATTRS);
  +            fDocumentHandler.startElement(CSV, EMPTY_ATTRS, fAugmentations);
           }
   
           // read lines
           String line;
           while ((line = bufferedReader.readLine()) != null) {
               if (fDocumentHandler != null) {
  -                fDocumentHandler.ignorableWhitespace(NEWLINE_ONE_SPACE);
  -                fDocumentHandler.startElement(ROW, EMPTY_ATTRS);
  +                fDocumentHandler.ignorableWhitespace(NEWLINE_ONE_SPACE, fAugmentations);
  +                fDocumentHandler.startElement(ROW, EMPTY_ATTRS, fAugmentations);
                   StringTokenizer tokenizer = new StringTokenizer(line, ",");
                   while (tokenizer.hasMoreTokens()) {
  -                    fDocumentHandler.ignorableWhitespace(NEWLINE_TWO_SPACES);
  -                    fDocumentHandler.startElement(COL, EMPTY_ATTRS);
  +                    fDocumentHandler.ignorableWhitespace(NEWLINE_TWO_SPACES, fAugmentations);
  +                    fDocumentHandler.startElement(COL, EMPTY_ATTRS, fAugmentations);
                       String token = tokenizer.nextToken();
                       fStringBuffer.clear();
                       fStringBuffer.append(token);
  -                    fDocumentHandler.characters(fStringBuffer);
  -                    fDocumentHandler.endElement(COL);
  +                    fDocumentHandler.characters(fStringBuffer, fAugmentations);
  +                    fDocumentHandler.endElement(COL, fAugmentations);
                   }
  -                fDocumentHandler.ignorableWhitespace(NEWLINE_ONE_SPACE);
  -                fDocumentHandler.endElement(ROW);
  +                fDocumentHandler.ignorableWhitespace(NEWLINE_ONE_SPACE, fAugmentations);
  +                fDocumentHandler.endElement(ROW, fAugmentations);
               }
           }
           bufferedReader.close();
   
           // end document
           if (fDocumentHandler != null) {
  -            fDocumentHandler.ignorableWhitespace(NEWLINE);
  -            fDocumentHandler.endElement(CSV);
  -            fDocumentHandler.endDocument();
  +            fDocumentHandler.ignorableWhitespace(NEWLINE, fAugmentations);
  +            fDocumentHandler.endElement(CSV, fAugmentations);
  +            fDocumentHandler.endDocument(fAugmentations);
           }
   
       } // parse(XMLInputSource)
  
  
  
  1.6       +1 -0      xml-xerces/java/src/javax/xml/parsers/SAXParser.java
  
  Index: SAXParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/javax/xml/parsers/SAXParser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SAXParser.java	2001/10/15 19:11:17	1.5
  +++ SAXParser.java	2001/11/26 21:45:50	1.6
  @@ -353,6 +353,7 @@
           }
           
           Parser parser = this.getParser();
  +
           if (hb != null) {
               parser.setDocumentHandler(hb);
               parser.setEntityResolver(hb);
  
  
  
  1.4       +32 -28    xml-xerces/java/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java
  
  Index: XMLDocumentFragmentScannerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLDocumentFragmentScannerImpl.java	2001/10/16 19:37:59	1.3
  +++ XMLDocumentFragmentScannerImpl.java	2001/11/26 21:45:50	1.4
  @@ -70,7 +70,9 @@
   import org.apache.xerces.util.XMLStringBuffer;
   import org.apache.xerces.util.SymbolTable;
   import org.apache.xerces.util.XMLChar;
  +import org.apache.xerces.util.AugmentationsImpl;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLDocumentHandler;
  @@ -106,7 +108,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLDocumentFragmentScannerImpl.java,v 1.3 2001/10/16 19:37:59 neilg Exp $
  + * @version $Id: XMLDocumentFragmentScannerImpl.java,v 1.4 2001/11/26 21:45:50 elena Exp $
    */
   public class XMLDocumentFragmentScannerImpl
       extends XMLScanner
  @@ -242,6 +244,8 @@
       /** Content dispatcher. */
       protected Dispatcher fContentDispatcher = createContentDispatcher();
   
  +    protected final Augmentations fAugmentations = new AugmentationsImpl();
  +
       // temporary variables
   
       /** Array of 3 strings. */
  @@ -492,7 +496,7 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the
  -     * pseudo-name of "[dtd]; parameter entity names start with '%'; and
  +     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
        * general entities are just specified by their name.
        * 
        * @param name     The name of the entity.
  @@ -529,7 +533,7 @@
           if (fDocumentHandler != null) {
               if (!name.equals("[xml]") && !fScanningAttribute) {
                   fDocumentHandler.startEntity(name, publicId, systemId, 
  -                                             baseSystemId, encoding);
  +                                             baseSystemId, encoding, fAugmentations);
               }
           }
   
  @@ -537,7 +541,7 @@
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; parameter entity names start with '%'; and general entities 
  +     * of "[dtd]" parameter entity names start with '%'; and general entities 
        * are just specified by their name.
        * 
        * @param name The name of the entity.
  @@ -556,7 +560,7 @@
           // call handler
           if (fDocumentHandler != null) {
               if (!name.equals("[xml]") && !fScanningAttribute) {
  -                fDocumentHandler.endEntity(name);
  +                fDocumentHandler.endEntity(name, fAugmentations);
               }
           }
           
  @@ -612,10 +616,10 @@
           // call handler
           if (fDocumentHandler != null) {
               if (scanningTextDecl) {
  -                fDocumentHandler.textDecl(version, encoding);
  +                fDocumentHandler.textDecl(version, encoding, fAugmentations);
               }
               else {
  -                fDocumentHandler.xmlDecl(version, encoding, standalone);
  +                fDocumentHandler.xmlDecl(version, encoding, standalone, fAugmentations);
               }
           }
   
  @@ -642,7 +646,7 @@
   
           // call handler
           if (fDocumentHandler != null) {
  -            fDocumentHandler.processingInstruction(target, data);
  +            fDocumentHandler.processingInstruction(target, data, fAugmentations);
           }
   
       } // scanPIData(String)
  @@ -663,7 +667,7 @@
   
           // call handler
           if (fDocumentHandler != null) {
  -            fDocumentHandler.comment(fStringBuffer);
  +            fDocumentHandler.comment(fStringBuffer, fAugmentations);
           }
   
       } // scanComment()
  @@ -740,11 +744,11 @@
           // call handler
           if (fDocumentHandler != null) {
               if (empty) {
  -                fDocumentHandler.emptyElement(fElementQName, fAttributes);
  +                fDocumentHandler.emptyElement(fElementQName, fAttributes, fAugmentations);
                   handleEndElement(fElementQName, true);
               }
               else {
  -                fDocumentHandler.startElement(fElementQName, fAttributes);
  +                fDocumentHandler.startElement(fElementQName, fAttributes, fAugmentations);
               }
           }
   
  @@ -833,7 +837,7 @@
               c = -1;
           }
           if (fDocumentHandler != null && content.length > 0) {
  -            fDocumentHandler.characters(content);
  +            fDocumentHandler.characters(content, fAugmentations);
           }
   
           if (c == ']' && fString.length == 0) {
  @@ -853,7 +857,7 @@
                   }
               }
               if (fDocumentHandler != null) {
  -                fDocumentHandler.characters(fStringBuffer);
  +                fDocumentHandler.characters(fStringBuffer, fAugmentations);
               }
               c = -1;
           }
  @@ -878,13 +882,13 @@
           
           // call handler
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startCDATA();
  +            fDocumentHandler.startCDATA(fAugmentations);
           }
   
           while (true) {
               if (!fEntityScanner.scanData("]]", fString)) {
                   if (fDocumentHandler != null && fString.length > 0) {
  -                    fDocumentHandler.characters(fString);
  +                    fDocumentHandler.characters(fString, fAugmentations);
                   }
                   int brackets = 2;
                   while (fEntityScanner.skipChar(']')) {
  @@ -895,7 +899,7 @@
                       for (int i = 2; i < brackets; i++) {
                           fStringBuffer.append(']');
                       }
  -                    fDocumentHandler.characters(fStringBuffer);
  +                    fDocumentHandler.characters(fStringBuffer, fAugmentations);
                   }
                   if (fEntityScanner.skipChar('>')) {
                       break;
  @@ -903,12 +907,12 @@
                   if (fDocumentHandler != null) {
                       fStringBuffer.clear();
                       fStringBuffer.append("]]");
  -                    fDocumentHandler.characters(fStringBuffer);
  +                    fDocumentHandler.characters(fStringBuffer, fAugmentations);
                   }
               }
               else {
                   if (fDocumentHandler != null) {
  -                    fDocumentHandler.characters(fString);
  +                    fDocumentHandler.characters(fString, fAugmentations);
                   }
                   int c = fEntityScanner.peekChar();
                   if (c != -1 && XMLChar.isInvalid(c)) {
  @@ -916,7 +920,7 @@
                           fStringBuffer.clear();
                           scanSurrogates(fStringBuffer);
                           if (fDocumentHandler != null) {
  -                            fDocumentHandler.characters(fStringBuffer);
  +                            fDocumentHandler.characters(fStringBuffer, fAugmentations);
                           }
                       }
                       else {
  @@ -931,7 +935,7 @@
   
           // call handler
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endCDATA();
  +            fDocumentHandler.endCDATA(fAugmentations);
           }
   
           return true;
  @@ -999,11 +1003,11 @@
               if (fDocumentHandler != null) {
                   if (fNotifyCharRefs) {
                       fDocumentHandler.startEntity(fCharRefLiteral, null,
  -                                                 null, null, null);
  +                                                 null, null, null, fAugmentations);
                   }
  -                fDocumentHandler.characters(fStringBuffer2);
  +                fDocumentHandler.characters(fStringBuffer2, fAugmentations);
                   if (fNotifyCharRefs) {
  -                    fDocumentHandler.endEntity(fCharRefLiteral);
  +                    fDocumentHandler.endEntity(fCharRefLiteral, fAugmentations);
                   }
               }
           }
  @@ -1079,15 +1083,15 @@
       private void handleCharacter(char c, String entity) throws XNIException {
           if (fDocumentHandler != null) {
               if (fNotifyBuiltInRefs) {
  -                fDocumentHandler.startEntity(entity, null, null, null, null);
  +                fDocumentHandler.startEntity(entity, null, null, null, null, fAugmentations);
               }
               
               fSingleChar[0] = c;
               fString.setValues(fSingleChar, 0, 1);
  -            fDocumentHandler.characters(fString);
  +            fDocumentHandler.characters(fString, fAugmentations);
               
               if (fNotifyBuiltInRefs) {
  -                fDocumentHandler.endEntity(entity);
  +                fDocumentHandler.endEntity(entity, fAugmentations);
               }
           }
       } // handleCharacter(char)
  @@ -1133,7 +1137,7 @@
           
           // call handler
           if (fDocumentHandler != null && !isEmpty) {
  -            fDocumentHandler.endElement(element);
  +            fDocumentHandler.endElement(element, fAugmentations);
           }
   
           return fMarkupDepth;
  @@ -1394,7 +1398,7 @@
                                               if (scanSurrogates(fStringBuffer)) {
                                                   // call handler
                                                   if (fDocumentHandler != null) {
  -                                                    fDocumentHandler.characters(fStringBuffer);
  +                                                    fDocumentHandler.characters(fStringBuffer, fAugmentations);
                                                   }
                                               }
                                           }
  
  
  
  1.7       +7 -6      xml-xerces/java/src/org/apache/xerces/impl/XMLDocumentScannerImpl.java
  
  Index: XMLDocumentScannerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLDocumentScannerImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XMLDocumentScannerImpl.java	2001/09/14 13:04:31	1.6
  +++ XMLDocumentScannerImpl.java	2001/11/26 21:45:50	1.7
  @@ -108,7 +108,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLDocumentScannerImpl.java,v 1.6 2001/09/14 13:04:31 andyc Exp $
  + * @version $Id: XMLDocumentScannerImpl.java,v 1.7 2001/11/26 21:45:50 elena Exp $
    */
   public class XMLDocumentScannerImpl
       extends XMLDocumentFragmentScannerImpl {
  @@ -387,7 +387,7 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the
  -     * pseudo-name of "[dtd]; parameter entity names start with '%'; and
  +     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
        * general entities are just specified by their name.
        * 
        * @param name     The name of the entity.
  @@ -420,7 +420,7 @@
           // call handler
           if (fDocumentHandler != null) {
               if (name.equals("[xml]")) {
  -                fDocumentHandler.startDocument(fEntityScanner, encoding);
  +                fDocumentHandler.startDocument(fEntityScanner, encoding, fAugmentations);
               }
           }
   
  @@ -428,7 +428,7 @@
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; parameter entity names start with '%'; and general entities 
  +     * of "[dtd]" parameter entity names start with '%'; and general entities 
        * are just specified by their name.
        * 
        * @param name The name of the entity.
  @@ -442,7 +442,7 @@
           // call handler
           if (fDocumentHandler != null) {
               if (name.equals("[xml]")) {
  -                fDocumentHandler.endDocument();
  +                fDocumentHandler.endDocument(fAugmentations);
               }
           }
           
  @@ -493,7 +493,8 @@
               //       subset) is parsed correctly but SAX2 requires that
               //       it knows the root element name and public and system
               //       identifier for the startDTD call. -Ac
  -            fDocumentHandler.doctypeDecl(fDoctypeName, fDoctypePublicId, fDoctypeSystemId);
  +            fDocumentHandler.doctypeDecl(fDoctypeName, fDoctypePublicId, fDoctypeSystemId,
  +                                         fAugmentations);
           }
   
           // is there an internal subset?
  
  
  
  1.3       +3 -3      xml-xerces/java/src/org/apache/xerces/impl/XMLEntityHandler.java
  
  Index: XMLEntityHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLEntityHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLEntityHandler.java	2001/08/23 00:35:21	1.2
  +++ XMLEntityHandler.java	2001/11/26 21:45:50	1.3
  @@ -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.2 2001/08/23 00:35:21 lehors Exp $
  + * @version $Id: XMLEntityHandler.java,v 1.3 2001/11/26 21:45:50 elena Exp $
    */
   public interface XMLEntityHandler {
   
  @@ -78,7 +78,7 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the 
  -     * pseudo-name of "[dtd]; parameter entity names start with '%'; and 
  +     * pseudo-name of "[dtd]" parameter entity names start with '%'; and 
        * general entities are just specified by their name.
        * 
        * @param name     The name of the entity.
  @@ -103,7 +103,7 @@
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; parameter entity names start with '%'; and general entities 
  +     * of "[dtd]" parameter entity names start with '%'; and general entities 
        * are just specified by their name.
        * 
        * @param name The name of the entity.
  
  
  
  1.11      +72 -50    xml-xerces/java/src/org/apache/xerces/impl/XMLNamespaceBinder.java
  
  Index: XMLNamespaceBinder.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLNamespaceBinder.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XMLNamespaceBinder.java	2001/10/26 05:21:27	1.10
  +++ XMLNamespaceBinder.java	2001/11/26 21:45:50	1.11
  @@ -65,6 +65,7 @@
   import org.apache.xerces.util.NamespaceSupport;
   import org.apache.xerces.util.SymbolTable;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.NamespaceContext;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
  @@ -93,7 +94,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLNamespaceBinder.java,v 1.10 2001/10/26 05:21:27 andyc Exp $
  + * @version $Id: XMLNamespaceBinder.java,v 1.11 2001/11/26 21:45:50 elena Exp $
    */
   public class XMLNamespaceBinder
       implements XMLComponent, XMLDocumentFilter {
  @@ -391,16 +392,18 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name,
                               String publicId, String systemId,
                               String baseSystemId,
  -                            String encoding) throws XNIException {
  +                            String encoding, 
  +                            Augmentations augs) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               fDocumentHandler.startEntity(name, publicId, systemId,
  -                                         baseSystemId, encoding);
  +                                         baseSystemId, encoding, augs);
           }
       } // startEntity(String,String,String,String,String)
   
  @@ -417,13 +420,14 @@
        *
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding)
  +    public void textDecl(String version, String encoding, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.textDecl(version, encoding);
  +            fDocumentHandler.textDecl(version, encoding, augs);
           }
       } // textDecl(String,String)
   
  @@ -432,10 +436,10 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding)
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.startDocument(locator, encoding);
  +            fDocumentHandler.startDocument(locator, encoding, augs);
           }
       } // startDocument(XMLLocator,String)
   
  @@ -448,13 +452,14 @@
        * @param encoding   The IANA encoding name of the document, or null if
        *                   not specified.
        * @param standalone The standalone value, or null if not specified.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void xmlDecl(String version, String encoding, String standalone)
  +    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.xmlDecl(version, encoding, standalone);
  +            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
           }
       } // xmlDecl(String,String,String)
   
  @@ -466,14 +471,15 @@
        *                    if the external DTD is specified using SYSTEM.
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement,
  -                            String publicId, String systemId)
  +                            String publicId, String systemId, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId);
  +            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
           }
       } // doctypeDecl(String,String,String)
   
  @@ -481,12 +487,13 @@
        * A comment.
        *
        * @param text The text in the comment.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws XNIException {
  +    public void comment(XMLString text, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.comment(text);
  +            fDocumentHandler.comment(text, augs);
           }
       } // comment(XMLString)
   
  @@ -503,13 +510,14 @@
        *
        * @param target The target.
        * @param data   The data or null if none specified.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void processingInstruction(String target, XMLString data)
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
           throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.processingInstruction(target, data);
  +            fDocumentHandler.processingInstruction(target, data, augs);
           }
       } // processingInstruction(String,XMLString)
   
  @@ -519,10 +527,11 @@
        *
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startPrefixMapping(String prefix, String uri)
  +    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
           throws XNIException {
   
           // REVISIT: Should prefix mapping from previous stage in
  @@ -530,7 +539,7 @@
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startPrefixMapping(prefix, uri);
  +            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
           }
   
       } // startPrefixMapping(String,String)
  @@ -546,19 +555,21 @@
        *
        * @param element    The name of the element.
        * @param attributes The element attributes.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
   
           if (fNamespaces) {
  -            handleStartElement(element, attributes, false);
  +            handleStartElement(element, attributes, augs, false);
           }
           else if (fDocumentHandler != null) {
  -            fDocumentHandler.startElement(element, attributes);
  +            fDocumentHandler.startElement(element, attributes, augs);
           }
   
  +
       } // startElement(QName,XMLAttributes)
   
       /**
  @@ -566,18 +577,19 @@
        *
        * @param element    The name of the element.
        * @param attributes The element attributes.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void emptyElement(QName element, XMLAttributes attributes)
  +    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
   
           if (fNamespaces) {
  -            handleStartElement(element, attributes, true);
  -            handleEndElement(element, true);
  +            handleStartElement(element, attributes, augs, true);
  +            handleEndElement(element, augs, true);
           }
           else if (fDocumentHandler != null) {
  -            fDocumentHandler.emptyElement(element, attributes);
  +            fDocumentHandler.emptyElement(element, attributes, augs);
           }
   
       } // emptyElement(QName,XMLAttributes)
  @@ -586,12 +598,13 @@
        * Character content.
        *
        * @param text The content.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws XNIException {
  +    public void characters(XMLString text, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.characters(text);
  +            fDocumentHandler.characters(text, augs);
           }
       } // characters(XMLString)
   
  @@ -604,12 +617,13 @@
        * content model.
        *
        * @param text The ignorable whitespace.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws XNIException {
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.ignorableWhitespace(text);
  +            fDocumentHandler.ignorableWhitespace(text, augs);
           }
       } // ignorableWhitespace(XMLString)
   
  @@ -617,16 +631,17 @@
        * The end of an element.
        *
        * @param element The name of the element.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws XNIException {
  +    public void endElement(QName element, Augmentations augs) throws XNIException {
   
           if (fNamespaces) {
  -            handleEndElement(element, false);
  +            handleEndElement(element, augs, false);
           }
           else if (fDocumentHandler != null) {
  -            fDocumentHandler.endElement(element);
  +            fDocumentHandler.endElement(element, augs);
           }
   
       } // endElement(QName)
  @@ -636,51 +651,55 @@
        * called when namespace processing is enabled.
        *
        * @param prefix The namespace prefix.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws XNIException {
  +    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
   
           // REVISIT: Should prefix mapping from previous stage in
           //          the pipeline affect the namespaces?
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endPrefixMapping(prefix);
  +            fDocumentHandler.endPrefixMapping(prefix, augs);
           }
   
       } // endPrefixMapping(String)
   
       /**
        * The start of a CDATA section.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws XNIException {
  +    public void startCDATA(Augmentations augs) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.startCDATA();
  +            fDocumentHandler.startCDATA(augs);
           }
       } // startCDATA()
   
       /**
        * The end of a CDATA section.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws XNIException {
  +    public void endCDATA(Augmentations augs) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.endCDATA();
  +            fDocumentHandler.endCDATA(augs);
           }
       } // endCDATA()
   
       /**
  -     * The end of the document.
  +     * The end of the document.     
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws XNIException {
  +    public void endDocument(Augmentations augs) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.endDocument();
  +            fDocumentHandler.endDocument(augs);
           }
       } // endDocument()
   
  @@ -692,12 +711,13 @@
        * appearing as part of attribute values.
        *
        * @param name The name of the entity.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws XNIException {
  +    public void endEntity(String name, Augmentations augs) throws XNIException {
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
  -            fDocumentHandler.endEntity(name);
  +            fDocumentHandler.endEntity(name, augs);
           }
       } // endEntity(String)
   
  @@ -706,7 +726,8 @@
       //
   
       /** Handles start element. */
  -    protected void handleStartElement(QName element, XMLAttributes attributes,
  +    protected void handleStartElement(QName element, XMLAttributes attributes, 
  +                                      Augmentations augs, 
                                         boolean isEmpty) throws XNIException {
   
           // add new namespace context
  @@ -739,7 +760,7 @@
   
                   // call handler
                   if (fDocumentHandler != null) {
  -                    fDocumentHandler.startPrefixMapping(prefix, uri);
  +                    fDocumentHandler.startPrefixMapping(prefix, uri, augs);
                   }
               }
           }
  @@ -799,21 +820,22 @@
                   }
               }
           }
  -
  +       
           // call handler
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               if (isEmpty) {
  -                fDocumentHandler.emptyElement(element, attributes);
  +                fDocumentHandler.emptyElement(element, attributes, augs);
               }
               else {
  -                fDocumentHandler.startElement(element, attributes);
  +                fDocumentHandler.startElement(element, attributes, augs);
               }
           }
   
  +
       } // handleStartElement(QName,XMLAttributes,boolean)
   
       /** Handles end element. */
  -    protected void handleEndElement(QName element, boolean isEmpty)
  +    protected void handleEndElement(QName element, Augmentations augs, boolean isEmpty)
           throws XNIException {
   
           // bind element
  @@ -826,7 +848,7 @@
           // call handlers
           if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
               if (!isEmpty) {
  -                fDocumentHandler.endElement(element);
  +                fDocumentHandler.endElement(element, augs);
               }
           }
   
  @@ -835,7 +857,7 @@
               int count = fNamespaceSupport.getDeclaredPrefixCount();
               for (int i = count - 1; i >= 0; i--) {
                   String prefix = fNamespaceSupport.getDeclaredPrefixAt(i);
  -                fDocumentHandler.endPrefixMapping(prefix);
  +                fDocumentHandler.endPrefixMapping(prefix, augs);
               }
           }
   
  
  
  
  1.8       +3 -3      xml-xerces/java/src/org/apache/xerces/impl/XMLScanner.java
  
  Index: XMLScanner.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLScanner.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLScanner.java	2001/10/23 08:01:52	1.7
  +++ XMLScanner.java	2001/11/26 21:45:50	1.8
  @@ -94,7 +94,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Eric Ye, IBM
    *
  - * @version $Id: XMLScanner.java,v 1.7 2001/10/23 08:01:52 andyc Exp $
  + * @version $Id: XMLScanner.java,v 1.8 2001/11/26 21:45:50 elena Exp $
    */
   public abstract class XMLScanner 
       implements XMLComponent {
  @@ -1045,7 +1045,7 @@
   
       /**
        * This method notifies of the start of an entity. The document entity
  -     * has the pseudo-name of "[xml]"; the DTD has the pseudo-name of "[dtd]; 
  +     * has the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]" 
        * parameter entity names start with '%'; and general entities are just
        * specified by their name.
        * 
  @@ -1076,7 +1076,7 @@
   
       /**
        * This method notifies the end of an entity. The document entity has
  -     * the pseudo-name of "[xml]"; the DTD has the pseudo-name of "[dtd]; 
  +     * the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]" 
        * parameter entity names start with '%'; and general entities are just
        * specified by their name.
        * 
  
  
  
  1.2       +3 -3      xml-xerces/java/src/org/apache/xerces/impl/dtd/DTDGrammar.java
  
  Index: DTDGrammar.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dtd/DTDGrammar.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DTDGrammar.java	2001/10/25 20:35:56	1.1
  +++ DTDGrammar.java	2001/11/26 21:45:51	1.2
  @@ -94,7 +94,7 @@
    * @author Jeffrey Rodriguez, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: DTDGrammar.java,v 1.1 2001/10/25 20:35:56 elena Exp $
  + * @version $Id: DTDGrammar.java,v 1.2 2001/11/26 21:45:51 elena Exp $
    */
   public class DTDGrammar
       extends Grammar
  @@ -302,7 +302,7 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the 
  -     * pseudo-name of "[dtd]; and parameter entity names start with '%'.
  +     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
        * <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
  @@ -348,7 +348,7 @@
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; and parameter entity names start with '%'.
  +     * of "[dtd]" and parameter entity names start with '%'.
        * <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
  
  
  
  1.4       +388 -301  xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
  
  Index: XMLDTDValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLDTDValidator.java	2001/11/19 21:04:34	1.3
  +++ XMLDTDValidator.java	2001/11/26 21:45:51	1.4
  @@ -79,6 +79,7 @@
   import org.apache.xerces.util.SymbolTable;
   import org.apache.xerces.util.XMLChar;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLString;
   import org.apache.xerces.xni.XMLAttributes;
  @@ -123,12 +124,11 @@
    * @author Andy Clark, IBM
    * @author Jeffrey Rodriguez IBM
    *
  - * @version $Id: XMLDTDValidator.java,v 1.3 2001/11/19 21:04:34 neilg Exp $
  + * @version $Id: XMLDTDValidator.java,v 1.4 2001/11/26 21:45:51 elena Exp $
    */
   public class XMLDTDValidator
  -    implements XMLComponent, 
  -               XMLDocumentFilter, XMLDTDFilter, XMLDTDContentModelFilter
  -    {
  +implements XMLComponent, 
  +XMLDocumentFilter, XMLDTDFilter, XMLDTDContentModelFilter {
   
       //
       // Constants
  @@ -136,46 +136,46 @@
   
       /** Top level scope (-1). */
       private static final int TOP_LEVEL_SCOPE = -1;
  -    
  +
       // feature identifiers
   
       /** Feature identifier: namespaces. */
       protected static final String NAMESPACES =
  -        Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
  +    Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
   
       /** Feature identifier: validation. */
       protected static final String VALIDATION =
  -        Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
  +    Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
   
       /** Feature identifier: dynamic validation. */
       protected static final String DYNAMIC_VALIDATION = 
  -        Constants.XERCES_FEATURE_PREFIX + Constants.DYNAMIC_VALIDATION_FEATURE;
  +    Constants.XERCES_FEATURE_PREFIX + Constants.DYNAMIC_VALIDATION_FEATURE;
   
       /** Feature identifier: xml schema validation */
       protected static final String SCHEMA_VALIDATION = 
  -        Constants.XERCES_FEATURE_PREFIX +Constants.SCHEMA_VALIDATION_FEATURE;
  +    Constants.XERCES_FEATURE_PREFIX +Constants.SCHEMA_VALIDATION_FEATURE;
   
       // property identifiers
   
       /** Property identifier: symbol table. */
       protected static final String SYMBOL_TABLE =
  -        Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
  -    
  +    Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
  +
       /** Property identifier: error reporter. */
       protected static final String ERROR_REPORTER =
  -        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
  +    Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
   
       /** Property identifier: grammar pool. */
       protected static final String GRAMMAR_POOL =
  -        Constants.XERCES_PROPERTY_PREFIX + Constants.GRAMMAR_POOL_PROPERTY;
  +    Constants.XERCES_PROPERTY_PREFIX + Constants.GRAMMAR_POOL_PROPERTY;
   
       /** Property identifier: datatype validator factory. */
       protected static final String DATATYPE_VALIDATOR_FACTORY =
  -        Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY;
  +    Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY;
   
   
       protected static final String VALIDATION_MANAGER =
  -        Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
  +    Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
       // recognized features and properties
   
       /** Recognized features. */
  @@ -217,7 +217,7 @@
   
       /** Validation. */
       protected boolean fValidation;
  -    
  +
       /** Validation against only DTD */
       protected boolean fDTDValidation;
   
  @@ -265,9 +265,6 @@
       /** Skip validation. */
       private boolean fSkipValidation;
   
  -    /** True if currently in the DTD. */
  -    protected boolean fInDTD;
  -
       /** True if in an ignore conditional section of the DTD. */
       protected boolean fInDTDIgnore;
   
  @@ -366,7 +363,7 @@
   
       /** DTD element declaration name. */
       private String fDTDElementDeclName = null;
  -    
  +
       /** Mixed element type "hash". */
       private Vector fMixedElementTypes = new Vector();
   
  @@ -489,12 +486,12 @@
   
       /** Default constructor. */
       public XMLDTDValidator() {
  -        
  +
           // initialize data
           for (int i = 0; i < fElementQNamePartsStack.length; i++) {
               fElementQNamePartsStack[i] = new QName();
           }
  -        
  +
       } // <init>()
   
       //
  @@ -516,14 +513,13 @@
        *                      SAXNotSupportedException.
        */
       public void reset(XMLComponentManager componentManager)
  -        throws XMLConfigurationException {
  +    throws XMLConfigurationException {
   
           // clear grammars
           fDTDGrammar = null;
           fSeenDoctypeDecl = false;
           fInCDATASection = false;
           // initialize state
  -        fInDTD = false;
           fInDTDIgnore = false;
           fStandaloneIsYes = false;
           fSeenRootElement = false;
  @@ -602,7 +598,7 @@
        *                                  this exception.
        */
       public void setFeature(String featureId, boolean state)
  -        throws XMLConfigurationException {
  +    throws XMLConfigurationException {
       } // setFeature(String,boolean)
   
       /**
  @@ -630,7 +626,7 @@
        *                                  this exception.
        */
       public void setProperty(String propertyId, Object value)
  -        throws XMLConfigurationException {
  +    throws XMLConfigurationException {
       } // setProperty(String,Object)
   
       //
  @@ -686,15 +682,15 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
  -     *     
  +     * @param augs   Additional information that may include infoset augmentations
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding) 
  -        throws XNIException {
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs) 
  +    throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startDocument(locator, encoding);
  +            fDocumentHandler.startDocument(locator, encoding, augs);
           }
   
       } // startDocument(XMLLocator,String)
  @@ -707,19 +703,20 @@
        * @param version    The XML version.
        * @param encoding   The IANA encoding name of the document, or null if
        *                   not specified.
  -     * @param standalone The standalone value, or null if not specified.
  +     * @param standalone The standalone value, or null if not specified.     
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void xmlDecl(String version, String encoding, String standalone)
  -        throws XNIException {
  +    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
  +    throws XNIException {
   
           // save standalone state
           fStandaloneIsYes = standalone != null && standalone.equals("yes");
  -            
  +
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.xmlDecl(version, encoding, standalone);
  +            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
           }
   
       } // xmlDecl(String,String,String)
  @@ -731,12 +728,14 @@
        * @param publicId    The public identifier if an external DTD or null
        *                    if the external DTD is specified using SYSTEM.
        * @param systemId    The system identifier if an external DTD, null
  -     *                    otherwise.
  +     *                    otherwise.     
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void doctypeDecl(String rootElement, String publicId, String systemId)
  -        throws XNIException {
  +    public void doctypeDecl(String rootElement, String publicId, String systemId, 
  +                            Augmentations augs)
  +    throws XNIException {
   
           // save root element state
           fSeenDoctypeDecl = true;
  @@ -744,7 +743,7 @@
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId);
  +            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
           }
   
       } // doctypeDecl(String,String,String)
  @@ -754,16 +753,16 @@
        * called when namespace processing is enabled.
        * 
        * @param prefix The namespace prefix.
  -     * @param uri    The URI bound to the prefix.
  -     *
  +     * @param uri    The URI bound to the prefix.     
  +     * @param augs   Additional information that may include infoset augmentations
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startPrefixMapping(String prefix, String uri)
  -        throws XNIException {
  +    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
  +    throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startPrefixMapping(prefix, uri);
  +            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
           }
   
       } // startPrefixMapping(String,String)
  @@ -772,14 +771,21 @@
        * The start of an element.
        * 
        * @param element    The name of the element.
  -     * @param attributes The element attributes.
  +     * @param attributes The element attributes.     
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  -        throws XNIException {
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
  +    throws XNIException {
  +
  +        handleStartElement(element, attributes);
  +
  +        // call handlers
  +        if (fDocumentHandler != null) {
  +            fDocumentHandler.startElement(element, attributes, augs);
   
  -        handleStartElement(element, attributes, false);
  +        }
   
       } // startElement(QName,XMLAttributes)
   
  @@ -787,15 +793,21 @@
        * An empty element.
        * 
        * @param element    The name of the element.
  -     * @param attributes The element attributes.
  +     * @param attributes The element attributes.     
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void emptyElement(QName element, XMLAttributes attributes)
  -        throws XNIException {
  +    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
  +    throws XNIException {
  +
  +        handleStartElement(element, attributes);
   
  -        handleStartElement(element, attributes, true);
  -        handleEndElement(element, true);
  +        if (fDocumentHandler !=null) {
  +            fDocumentHandler.emptyElement(element, attributes, augs);
  +        }
  +
  +        handleEndElement(element, augs, true);
   
       } // emptyElement(QName,XMLAttributes)
   
  @@ -804,69 +816,62 @@
        * 
        * @param text The content.
        *
  +     * @param augs   Additional information that may include infoset augmentations
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws XNIException {
  +    public void characters(XMLString text, Augmentations augs) throws XNIException {
   
  -        // ignored characters in DTD
  -        if (fInDTD) {
  -            if (fDTDHandler != null) {
  -                fDTDHandler.characters(text);
  -            }
  -        }
  +        boolean callNextCharacters = true;
   
  -        // characters in content
  -        else {
  -            boolean callNextCharacters = true;
  -    
  -            // REVISIT: [Q] Is there a more efficient way of doing this?
  -            //          Perhaps if the scanner told us so we don't have to
  -            //          look at the characters again. -Ac
  -            boolean allWhiteSpace = true;
  -            for (int i=text.offset; i< text.offset+text.length; i++) {
  -                if (!XMLChar.isSpace(text.ch[i])) {
  -                    allWhiteSpace = false;
  -                    break;
  -                }
  +        // REVISIT: [Q] Is there a more efficient way of doing this?
  +        //          Perhaps if the scanner told us so we don't have to
  +        //          look at the characters again. -Ac
  +        boolean allWhiteSpace = true;
  +        for (int i=text.offset; i< text.offset+text.length; i++) {
  +            if (!XMLChar.isSpace(text.ch[i])) {
  +                allWhiteSpace = false;
  +                break;
               }
  -            // call the ignoreableWhiteSpace callback
  -            // never call ignorableWhitespace if we are in cdata section
  -            if (fInElementContent && allWhiteSpace && !fInCDATASection) {
  -                if (fDocumentHandler != null) {
  -                    fDocumentHandler.ignorableWhitespace(text);
  -                    callNextCharacters = false;
  -                }
  +        }
  +        // call the ignoreableWhiteSpace callback
  +        // never call ignorableWhitespace if we are in cdata section
  +        if (fInElementContent && allWhiteSpace && !fInCDATASection) {
  +            if (fDocumentHandler != null) {
  +                fDocumentHandler.ignorableWhitespace(text, augs);
  +                callNextCharacters = false;
               }
  -    
  -            // validate
  -            if (fPerformValidation) {
  -                if (fInElementContent) {
  -                    if (fStandaloneIsYes &&
  -                        fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
  -                        if (allWhiteSpace) {
  -                            fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
  -                                                        "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
  -                                                        null, XMLErrorReporter.SEVERITY_ERROR);
  -                        }
  -                    }
  -                    if (!allWhiteSpace) {
  -                        charDataInContent();
  +        }
  +
  +        // validate
  +        if (fPerformValidation) {
  +            if (fInElementContent) {
  +                if (fStandaloneIsYes &&
  +                    fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
  +                    if (allWhiteSpace) {
  +                        fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
  +                                                    "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
  +                                                    null, XMLErrorReporter.SEVERITY_ERROR);
                       }
                   }
  -    
  -                if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
  +                if (!allWhiteSpace) {
                       charDataInContent();
                   }
               }
  -    
  -            // call handlers
  -            if (callNextCharacters && fDocumentHandler != null) {
  -                fDocumentHandler.characters(text);
  +
  +            if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
  +                charDataInContent();
               }
           }
   
  +        // call handlers
  +        if (callNextCharacters && fDocumentHandler != null) {
  +            fDocumentHandler.characters(text, augs);
  +        }
  +
       } // characters(XMLString)
   
  +
  +
       /**
        * Ignorable whitespace. For this method to be called, the document
        * source must have some way of determining that the text containing
  @@ -877,13 +882,14 @@
        * 
        * @param text The ignorable whitespace.
        *
  +     * @param augs   Additional information that may include infoset augmentations
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws XNIException {
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.ignorableWhitespace(text);
  +            fDocumentHandler.ignorableWhitespace(text, augs);
           }
   
       } // ignorableWhitespace(XMLString)
  @@ -892,13 +898,14 @@
        * The end of an element.
        * 
        * @param element The name of the element.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws XNIException {
  +    public void endElement(QName element, Augmentations augs) throws XNIException {
   
  -        handleEndElement(element, false);
  -    
  +        handleEndElement(element,  augs, false);
  +
       } // endElement(QName)
   
       /**
  @@ -906,24 +913,26 @@
        * called when namespace processing is enabled.
        * 
        * @param prefix The namespace prefix.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws XNIException {
  +    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endPrefixMapping(prefix);
  +            fDocumentHandler.endPrefixMapping(prefix, augs);
           }
   
       } // endPrefixMapping(String)
   
       /** 
        * The start of a CDATA section. 
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws XNIException {
  +    public void startCDATA(Augmentations augs) throws XNIException {
   
           if (fPerformValidation && fInElementContent) {
               charDataInContent();
  @@ -931,36 +940,38 @@
           fInCDATASection = true;
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startCDATA();
  +            fDocumentHandler.startCDATA(augs);
           }
   
       } // startCDATA()
   
       /**
        * The end of a CDATA section. 
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws XNIException {
  +    public void endCDATA(Augmentations augs) throws XNIException {
   
           fInCDATASection = false;
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endCDATA();
  +            fDocumentHandler.endCDATA(augs);
           }
   
       } // endCDATA()
   
       /**
        * The end of the document.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws XNIException {
  +    public void endDocument(Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endDocument();
  +            fDocumentHandler.endDocument(augs);
           }
   
       } // endDocument()
  @@ -971,14 +982,9 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the
  -     * pseudo-name of "[dtd]; parameter entity names start with '%'; and 
  +     * pseudo-name of "[dtd]" parameter entity names start with '%'; and 
        * general entity names are just the entity name.
        * <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
  -     * startEntity method with the entity name "[dtd]" <em>before</em> calling
  -     * the startDTD method.
  -     * <p>
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        * 
  @@ -994,46 +1000,39 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal parameter entities).
        *
  +     * @param augs   Additional information that may include infoset augmentations
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void startEntity(String name, 
                               String publicId, String systemId,
                               String baseSystemId,
  -                            String encoding) throws XNIException {
  -        
  -        // call handlers
  -        if (fInDTD) {
  -            fDTDGrammar.startEntity(name, publicId, systemId, 
  -                                    baseSystemId, encoding);
  -            if (fDTDHandler != null) {
  -                fDTDHandler.startEntity(name, publicId, systemId, 
  -                                        baseSystemId, encoding);
  -            }
  -        } 
  -        else {
  -            // check VC: Standalone Document Declartion, entities references appear in the document.
  -            if (fPerformValidation && fDTDGrammar != null) {
  -                if (fStandaloneIsYes && !name.startsWith("[")) {
  -                    int entIndex = fDTDGrammar.getEntityDeclIndex(name);
  -                    if (entIndex > -1) {
  -                        fDTDGrammar.getEntityDecl(entIndex, fEntityDecl);
  -                        if (fEntityDecl.inExternal) {
  -                            fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
  -                                                        "MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE",
  -                                                        new Object[]{name}, XMLErrorReporter.SEVERITY_ERROR);
  -                        }
  +                            String encoding, 
  +                            Augmentations augs) throws XNIException {
  +
  +        // check VC: Standalone Document Declartion, entities references appear in the document.
  +        if (fPerformValidation && fDTDGrammar != null) {
  +            if (fStandaloneIsYes && !name.startsWith("[")) {
  +                int entIndex = fDTDGrammar.getEntityDeclIndex(name);
  +                if (entIndex > -1) {
  +                    fDTDGrammar.getEntityDecl(entIndex, fEntityDecl);
  +                    if (fEntityDecl.inExternal) {
  +                        fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
  +                                                    "MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE",
  +                                                    new Object[]{name}, XMLErrorReporter.SEVERITY_ERROR);
                       }
                   }
               }
  +        }
   
  -            if (fDocumentHandler != null) {
  -                fDocumentHandler.startEntity(name, publicId, systemId, 
  -                                             baseSystemId, encoding);
  -            }
  +        if (fDocumentHandler != null) {
  +            fDocumentHandler.startEntity(name, publicId, systemId, 
  +                                         baseSystemId, encoding, augs);
           }
   
  -    } // startEntity(String,String,String,String,String)
   
  +    } // startEntity(String,String,String,String,String, Augmentations)
  +
  +
       /**
        * Notifies of the presence of a TextDecl line in an entity. If present,
        * this method will be called immediately following the startEntity call.
  @@ -1047,50 +1046,38 @@
        * 
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs     Additional information that may include infoset augmentations
  +     *                 
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding) throws XNIException {
  +    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
   
  -        // call handlers
  -        if (fInDTD) {
  -            fDTDGrammar.textDecl(version, encoding);
  -            if (fDTDHandler != null) {
  -                fDTDHandler.textDecl(version, encoding);
  -            }
  -        } 
  -        else {
  -            if (fDocumentHandler != null) {
  -                fDocumentHandler.textDecl(version, encoding);
  -            }
  +        if (fDocumentHandler != null) {
  +            fDocumentHandler.textDecl(version, encoding, augs);
           }
   
       } // textDecl(String,String)
   
  +
       /**
        * A comment.
        * 
        * @param text The text in the comment.
        *
  +     * @param augs   Additional information that may include infoset augmentations
        * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws XNIException {
  +    public void comment(XMLString text, Augmentations augs) throws XNIException {
   
           // call handlers
  -        if (fInDTD) {
  -            fDTDGrammar.comment(text);
  -            if (fDTDHandler != null) {
  -                fDTDHandler.comment(text);
  -            }
  -        } 
  -        else {
  -            if (fDocumentHandler != null) {
  -                fDocumentHandler.comment(text);
  -            }
  +        if (fDocumentHandler != null) {
  +            fDocumentHandler.comment(text, augs);
           }
   
       } // comment(XMLString)
   
  +
       /**
        * A processing instruction. Processing instructions consist of a
        * target name and, optionally, text data. The data is only meaningful
  @@ -1103,62 +1090,44 @@
        * responsible for parsing the data.
        * 
        * @param target The target.
  -     * @param data   The data or null if none specified.
  +     * @param data   The data or null if none specified.     
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void processingInstruction(String target, XMLString data)
  -        throws XNIException {
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
  +    throws XNIException {
   
           // call handlers
  -        if (fInDTD) {
  -            fDTDGrammar.processingInstruction(target, data);
  -            if (fDTDHandler != null) {
  -                fDTDHandler.processingInstruction(target, data);
  -            }
  -        } 
  -        else {
  -            if (fDocumentHandler != null) {
  -                fDocumentHandler.processingInstruction(target, data);
  -            }
  +        if (fDocumentHandler != null) {
  +            fDocumentHandler.processingInstruction(target, data, augs);
           }
  -
       } // processingInstruction(String,XMLString)
   
  +
       /**
  -     * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; parameter entity names start with '%'; and general entity 
  -     * names are just the entity name.
  -     * <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
  -     * endEntity method with the entity name "[dtd]" <em>after</em> calling
  -     * the endDTD method.
  +     * This method notifies the end of an entity.
        * <p>
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        * 
  -     * @param name The name of the entity.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param name   The name of the entity.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws XNIException {
  +    public void endEntity(String name, Augmentations augs) throws XNIException {
   
           // call handlers
  -        if (fInDTD) {
  -            fDTDGrammar.endEntity(name);
  -            if (fDTDHandler != null) {
  -                fDTDHandler.endEntity(name);
  -            }
  -        } 
  -        else {
  -            if (fDocumentHandler != null) {
  -                fDocumentHandler.endEntity(name);
  -            }
  +        if (fDocumentHandler != null) {
  +            fDocumentHandler.endEntity(name, augs);
           }
   
       } // endEntity(String)
   
  +
  +
       //
       // XMLDTDHandler methods
       //
  @@ -1171,7 +1140,6 @@
       public void startDTD(XMLLocator locator) throws XNIException {
   
           // initialize state
  -        fInDTD = true;
           fNDataDeclNotations.clear();
           fDTDElementDecls.removeAllElements();
   
  @@ -1190,6 +1158,131 @@
       } // startDTD(XMLLocator)
   
       /**
  + * A comment.
  + * 
  + * @param text The text in the comment.
  + *
  + * @throws XNIException Thrown by application to signal an error.
  + */
  +    public void comment(XMLString text) throws XNIException {
  +
  +        // call handlers
  +        fDTDGrammar.comment(text);
  +        if (fDTDHandler != null) {
  +            fDTDHandler.comment(text);
  +        }
  +    }  
  +
  +    /**
  +     * Character content.
  +     * 
  +     * @param text The content.
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    public void characters(XMLString text) throws XNIException {
  +
  +        // ignored characters in DTD
  +        if (fDTDHandler != null) {
  +            fDTDHandler.characters(text);
  +        }
  +    }
  +
  +    /**
  +     * Notifies of the presence of a TextDecl line in an entity. If present,
  +     * this method will be called immediately following the startEntity call.
  +     * <p>
  +     * <strong>Note:</strong> This method is only called for external
  +     * parameter entities referenced in the DTD.
  +     * 
  +     * @param version  The XML version, or null if not specified.
  +     * @param encoding The IANA encoding name of the entity.
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    public void textDecl(String version, String encoding) throws XNIException {
  +
  +        // call handlers
  +        fDTDGrammar.textDecl(version, encoding);
  +        if (fDTDHandler != null) {
  +            fDTDHandler.textDecl(version, encoding);
  +        }
  +    }
  +
  +    /**
  +     * This method notifies of the start of an entity. The DTD has the 
  +     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
  +     * 
  +     * @param name     The name of the entity.
  +     * @param publicId The public identifier of the entity if the entity
  +     *                 is external, null otherwise.
  +     * @param systemId The system identifier of the entity if the entity
  +     *                 is external, null otherwise.
  +     * @param baseSystemId The base system identifier of the entity if
  +     *                     the entity is external, null otherwise.
  +     * @param encoding The auto-detected IANA encoding name of the entity
  +     *                 stream. This value will be null in those situations
  +     *                 where the entity encoding is not auto-detected (e.g.
  +     *                 internal parameter entities).
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    public void startEntity(String name, 
  +                            String publicId, String systemId,
  +                            String baseSystemId,
  +                            String encoding) throws XNIException {
  +
  +        // call handlers
  +        fDTDGrammar.startEntity(name, publicId, systemId, 
  +                                baseSystemId, encoding);
  +        if (fDTDHandler != null) {
  +            fDTDHandler.startEntity(name, publicId, systemId, 
  +                                    baseSystemId, encoding);
  +        }
  +    }
  +    /**
  +     * This method notifies the end of an entity. The DTD has the pseudo-name
  +     * of "[dtd]" and parameter entity names start with '%'.
  +     * 
  +     * @param name The name of the entity.
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    public void endEntity(String name) throws XNIException {
  +
  +        // call handlers
  +        fDTDGrammar.endEntity(name);
  +        if (fDTDHandler != null) {
  +            fDTDHandler.endEntity(name);
  +        }
  +    } 
  +
  +    /**
  +     * A processing instruction. Processing instructions consist of a
  +     * target name and, optionally, text data. The data is only meaningful
  +     * to the application.
  +     * <p>
  +     * Typically, a processing instruction's data will contain a series
  +     * of pseudo-attributes. These pseudo-attributes follow the form of
  +     * element attributes but are <strong>not</strong> parsed or presented
  +     * to the application as anything other than text. The application is
  +     * responsible for parsing the data.
  +     * 
  +     * @param target The target.
  +     * @param data   The data or null if none specified.
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
  +     */
  +    public void processingInstruction(String target, XMLString data)
  +    throws XNIException {
  +
  +        // call handlers
  +        fDTDGrammar.processingInstruction(target, data);
  +        if (fDTDHandler != null) {
  +            fDTDHandler.processingInstruction(target, data);
  +        }
  +    } 
  +    /**
        * An element declaration.
        * 
        * @param name         The name of the element.
  @@ -1198,7 +1291,7 @@
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void elementDecl(String name, String contentModel)
  -        throws XNIException {
  +    throws XNIException {
   
           //check VC: Unique Element Declaration
           if (fValidation) {
  @@ -1207,7 +1300,7 @@
                                              "MSG_ELEMENT_ALREADY_DECLARED",
                                              new Object[]{ name},
                                              XMLErrorReporter.SEVERITY_ERROR);
  -            } 
  +            }
               else {
                   fDTDElementDecls.addElement(name);
               }
  @@ -1230,7 +1323,7 @@
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void startAttlist(String elementName) throws XNIException {
  -        
  +
           // call handlers
           fDTDGrammar.startAttlist(elementName);
           if (fDTDHandler != null) {
  @@ -1263,7 +1356,7 @@
       public void attributeDecl(String elementName, String attributeName, 
                                 String type, String[] enumeration, 
                                 String defaultType, XMLString defaultValue)
  -        throws XNIException {
  +    throws XNIException {
   
           if (type != fCDATASymbol) {
               normalizeDefaultAttrValue(defaultValue);
  @@ -1288,7 +1381,7 @@
   
                   if (!fTableOfIDAttributeNames.containsKey(elementName)) {
                       fTableOfIDAttributeNames.put(elementName, attributeName);
  -                } 
  +                }
                   else {
                       String previousIDAttributeName = (String)fTableOfIDAttributeNames.get( elementName );//rule a)
                       fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
  @@ -1311,7 +1404,7 @@
   
                   if (fTableOfNOTATIONAttributeNames.containsKey( elementName ) == false) {
                       fTableOfNOTATIONAttributeNames.put( elementName, attributeName);
  -                } 
  +                }
                   else {
                       String previousNOTATIONAttributeName = (String) fTableOfNOTATIONAttributeNames.get( elementName );
                       fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
  @@ -1340,7 +1433,7 @@
                                       ok = false;
                                       break;
                                   }
  -                            } 
  +                            }
                               else if (type == fENTITIESSymbol ||
                                        type == fIDREFSSymbol) {
                                   if (!XMLChar.isValidName(nmtoken)) {
  @@ -1354,7 +1447,7 @@
                           }
                       }
   
  -                } 
  +                }
                   else {
                       if (type == fENTITYSymbol ||
                           type == fIDSymbol ||
  @@ -1365,8 +1458,9 @@
                               ok = false;
                           }
   
  -                    } else if (type == fNMTOKENSymbol ||
  -                               type == fENUMERATIONSymbol) {
  +                    }
  +                    else if (type == fNMTOKENSymbol ||
  +                             type == fENUMERATIONSymbol) {
   
                           if (!XMLChar.isValidNmtoken(value)) {
                               ok = false;
  @@ -1436,7 +1530,7 @@
        */
       public void internalEntityDecl(String name, XMLString text,
                                      XMLString nonNormalizedText) 
  -        throws XNIException {
  +    throws XNIException {
   
           // call handlers
           fDTDGrammar.internalEntityDecl(name, text, nonNormalizedText);
  @@ -1514,7 +1608,7 @@
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void notationDecl(String name, String publicId, String systemId)
  -        throws XNIException {
  +    throws XNIException {
   
           // call handlers
           fDTDGrammar.notationDecl(name, publicId, systemId);
  @@ -1573,9 +1667,6 @@
        */
       public void endDTD() throws XNIException {
   
  -        // set state
  -        fInDTD = false;
  -
           // save grammar
           fDTDGrammar.endDTD();
   
  @@ -1690,11 +1781,12 @@
                                              "DuplicateTypeInMixedContent",
                                              new Object[]{fDTDElementDeclName, elementName},
                                              XMLErrorReporter.SEVERITY_ERROR);
  -            } else {
  +            }
  +            else {
                   fMixedElementTypes.addElement(elementName);
               }
           }
  -        
  +
           // call handlers
           fDTDGrammar.element(elementName);
           if (fDTDContentModelHandler != null) {
  @@ -1754,7 +1846,7 @@
       /** Add default attributes and validate. */
       private void addDTDDefaultAttrsAndValidate(int elementIndex, 
                                                  XMLAttributes attributes) 
  -        throws XNIException {
  +    throws XNIException {
   
           // is there anything to do?
           if (elementIndex == -1 || fDTDGrammar == null) {
  @@ -1822,7 +1914,7 @@
                                                      "MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED", args,
                                                      XMLErrorReporter.SEVERITY_ERROR);
                       }
  -                } 
  +                }
                   else if (attValue != null) {
                       if (fPerformValidation && fStandaloneIsYes) {
                           if (fDTDGrammar.getAttributeDeclIsExternal(attlistIndex)) {
  @@ -1883,7 +1975,7 @@
               }
               int attDefIndex = -1;
               int position =
  -                fDTDGrammar.getFirstAttributeDeclIndex(elementIndex);
  +            fDTDGrammar.getFirstAttributeDeclIndex(elementIndex);
               while (position != -1) {
                   fDTDGrammar.getAttributeDecl(position, fTempAttDecl);
                   if (fTempAttDecl.name.rawname == attrRawName) {
  @@ -1898,7 +1990,7 @@
                   if (fPerformValidation) {
                       // REVISIT - cache the elem/attr tuple so that we only
                       // give this error once for each unique occurrence
  -                    Object[] args = { element.rawname, attrRawName };
  +                    Object[] args = { element.rawname, attrRawName};
   
                       fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                                  "MSG_ATTRIBUTE_NOT_DECLARED",
  @@ -1924,7 +2016,7 @@
                   if (fPerformValidation && fStandaloneIsYes
                       && changedByNormalization 
                       && fDTDGrammar.getAttributeDeclIsExternal(position)
  -                    ) {
  +                   ) {
                       // check VC: Standalone Document Declaration
                       fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                                  "MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE",
  @@ -1941,9 +2033,9 @@
   
                   if (!attrValue.equals(defaultValue)) {
                       Object[] args = {element.localpart,
  -                                     attrRawName,
  -                                     attrValue,
  -                                     defaultValue};
  +                        attrRawName,
  +                        attrValue,
  +                        defaultValue};
                       fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                                  "MSG_FIXED_ATTVALUE_INVALID",
                                                  args, XMLErrorReporter.SEVERITY_ERROR);
  @@ -1956,7 +2048,7 @@
                   fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_IDREF ||
                   fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_NMTOKEN ||
                   fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_NOTATION
  -                ) {
  +               ) {
                   validateDTDattribute(element, attrValue, fTempAttDecl);
               }
           } // for all attributes
  @@ -1992,21 +2084,21 @@
        */
       private void validateDTDattribute(QName element, String attValue,
                                         XMLAttributeDecl attributeDecl) 
  -        throws XNIException {
  +    throws XNIException {
   
           switch (attributeDecl.simpleType.type) {
  -            case XMLSimpleType.TYPE_ENTITY: {                            
  +        case XMLSimpleType.TYPE_ENTITY: {                            
                   // NOTE: Save this information because invalidStandaloneAttDef
                   boolean isAlistAttribute = attributeDecl.simpleType.list;
   
                   try {
                       if (isAlistAttribute) {
                           fValENTITIES.validate(attValue, null);
  -                    } 
  +                    }
                       else {
                           fValENTITY.validate(attValue, null);
                       }
  -                } 
  +                }
                   catch (InvalidDatatypeValueException ex) {
                       String  key = ex.getKeyIntoReporter();
                       fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
  @@ -2018,8 +2110,8 @@
                   break;
               }
   
  -            case XMLSimpleType.TYPE_NOTATION:
  -            case XMLSimpleType.TYPE_ENUMERATION: {
  +        case XMLSimpleType.TYPE_NOTATION:
  +        case XMLSimpleType.TYPE_ENUMERATION: {
                   boolean found = false;
                   String [] enumVals = attributeDecl.simpleType.enumeration;
                   if (enumVals == null) {
  @@ -2032,7 +2124,7 @@
                               break;
                           }
                       }
  -    
  +
                   if (!found) {
                       StringBuffer enumValueString = new StringBuffer();
                       if (enumVals != null)
  @@ -2047,35 +2139,35 @@
                   break;
               }
   
  -            case XMLSimpleType.TYPE_ID: {
  +        case XMLSimpleType.TYPE_ID: {
                   try {
                       fValID.validate(attValue, null);
  -                } 
  +                }
                   catch (InvalidDatatypeValueException ex) {
                       String  key = ex.getKeyIntoReporter();
                       fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                                  key,
  -                                               new Object[] { ex.getMessage() },
  +                                               new Object[] { ex.getMessage()},
                                                  XMLErrorReporter.SEVERITY_ERROR );
                   }
                   break;
               }
  -        
  -            case XMLSimpleType.TYPE_IDREF: {
  +
  +        case XMLSimpleType.TYPE_IDREF: {
                   boolean isAlistAttribute = attributeDecl.simpleType.list;//Caveat - Save this information because invalidStandaloneAttDef
   
                   try {
                       if (isAlistAttribute) {
                           //System.out.println("values = >>" + value + "<<" );
                           fValIDRefs.validate(attValue, null);
  -                    } 
  +                    }
                       else {
                           fValIDRef.validate(attValue, null);
                       }
  -                } 
  +                }
                   catch (InvalidDatatypeValueException ex) {
                       String key = ex.getKeyIntoReporter();
  -                    if (key == null){
  +                    if (key == null) {
                           key = "IDREFSInvalid";
                       }
                       fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
  @@ -2087,28 +2179,28 @@
                   break;
               }
   
  -            case XMLSimpleType.TYPE_NMTOKEN: {
  +        case XMLSimpleType.TYPE_NMTOKEN: {
                   boolean isAlistAttribute = attributeDecl.simpleType.list;//Caveat - Save this information because invalidStandaloneAttDef
                   //changes fTempAttDef
                   try {
                       if (isAlistAttribute) {
                           fValNMTOKENS.validate(attValue, null);
  -                    } 
  +                    }
                       else {
                           fValNMTOKEN.validate(attValue, null);
                       }
  -                } 
  +                }
                   catch (InvalidDatatypeValueException ex) {
  -                    if (isAlistAttribute){
  +                    if (isAlistAttribute) {
                           fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                                      "NMTOKENSInvalid",
  -                                                   new Object[] { attValue },
  +                                                   new Object[] { attValue},
                                                      XMLErrorReporter.SEVERITY_ERROR);
  -                    } 
  +                    }
                       else {
                           fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                                      "NMTOKENInvalid",
  -                                                   new Object[] { attValue },
  +                                                   new Object[] { attValue},
                                                      XMLErrorReporter.SEVERITY_ERROR);
                       }
                   }
  @@ -2169,7 +2261,7 @@
                       spaceStart = false;
                       fBuffer.append(attValue[i]);
                       count++;
  -                } 
  +                }
                   else {
                       if (leadingSpace || !spaceStart) {
                           eaten ++;
  @@ -2195,7 +2287,7 @@
                       }
                   }
   
  -            } 
  +            }
               else {
                   readingNonSpace = true;
                   spaceStart = false;
  @@ -2351,31 +2443,36 @@
               if (childCount != 0) {
                   return 0;
               }
  -        } else if (contentType == XMLElementDecl.TYPE_ANY) {
  +        }
  +        else if (contentType == XMLElementDecl.TYPE_ANY) {
               //
               //  This one is open game so we don't pass any judgement on it
               //  at all. Its assumed to fine since it can hold anything.
               //
  -        } else if (contentType == XMLElementDecl.TYPE_MIXED ||  
  -                   contentType == XMLElementDecl.TYPE_CHILDREN) {
  +        }
  +        else if (contentType == XMLElementDecl.TYPE_MIXED ||  
  +                 contentType == XMLElementDecl.TYPE_CHILDREN) {
               // Get the content model for this element, faulting it in if needed
               ContentModelValidator cmElem = null;
               cmElem = fTempElementDecl.contentModelValidator;
               int result = cmElem.validate(children, childOffset, childCount);
               return result;
  -        } else if (contentType == -1) {
  +        }
  +        else if (contentType == -1) {
               //REVISIT
               /****
               reportRecoverableXMLError(XMLMessages.MSG_ELEMENT_NOT_DECLARED,
                                         XMLMessages.VC_ELEMENT_VALID,
                                         elementType);
               /****/
  -        } else if (contentType == XMLElementDecl.TYPE_SIMPLE) {
  +        }
  +        else if (contentType == XMLElementDecl.TYPE_SIMPLE) {
   
               //REVISIT
               // this should never be reached in the case of DTD validation.
   
  -        } else {
  +        }
  +        else {
               //REVISIT
               /****
               fErrorReporter.reportError(fErrorReporter.getLocator(),
  @@ -2431,10 +2528,10 @@
       private String getAttributeTypeName(XMLAttributeDecl attrDecl) {
   
           switch (attrDecl.simpleType.type) {
  -            case XMLSimpleType.TYPE_ENTITY: {
  +        case XMLSimpleType.TYPE_ENTITY: {
                   return attrDecl.simpleType.list ? fENTITIESSymbol : fENTITYSymbol;
               }
  -            case XMLSimpleType.TYPE_ENUMERATION: {
  +        case XMLSimpleType.TYPE_ENUMERATION: {
                   StringBuffer buffer = new StringBuffer();
                   buffer.append('(');
                   for (int i=0; i<attrDecl.simpleType.enumeration.length ; i++) {
  @@ -2446,16 +2543,16 @@
                   buffer.append(')');
                   return fSymbolTable.addSymbol(buffer.toString());
               }
  -            case XMLSimpleType.TYPE_ID: {
  +        case XMLSimpleType.TYPE_ID: {
                   return fIDSymbol;
               }
  -            case XMLSimpleType.TYPE_IDREF: {
  +        case XMLSimpleType.TYPE_IDREF: {
                   return attrDecl.simpleType.list ? fIDREFSSymbol : fIDREFSymbol;
               }
  -            case XMLSimpleType.TYPE_NMTOKEN: {
  +        case XMLSimpleType.TYPE_NMTOKEN: {
                   return attrDecl.simpleType.list ? fNMTOKENSSymbol : fNMTOKENSSymbol;
               }
  -            case XMLSimpleType.TYPE_NOTATION: {
  +        case XMLSimpleType.TYPE_NOTATION: {
                   return fNOTATIONSymbol;
               }
           }
  @@ -2501,7 +2598,7 @@
                   fValNMTOKEN  = ((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("NMTOKEN");
                   fValNMTOKENS = ((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("NMTOKENS");
                   fValNOTATION = (NOTATIONDatatypeValidator)((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("NOTATION" );
  -                                
  +
               }
               catch (Exception e) {
                   // should never happen
  @@ -2560,8 +2657,7 @@
       //
   
       /** Handle element. */
  -    protected void handleStartElement(QName element, XMLAttributes attributes,
  -                                      boolean isEmpty) throws XNIException {
  +    protected void handleStartElement(QName element, XMLAttributes attributes) throws XNIException {
   
           // REVISIT: Here are current assumptions about validation features
           //          given that XMLSchema validator is in the pipeline
  @@ -2585,8 +2681,8 @@
           // 
           // set wether we're performing validation
           fPerformValidation = fValidation && (!fDynamicValidation || fSeenDoctypeDecl)  
  -                            && (fDTDValidation || fSeenDoctypeDecl);
  -        
  +                             && (fDTDValidation || fSeenDoctypeDecl);
  +
           // VC: Root Element Type
           // see if the root element's name matches the one in DoctypeDecl 
           if (!fSeenRootElement) {
  @@ -2596,12 +2692,12 @@
               rootElementSpecified(element);
           }
   
  -        if (fDTDGrammar == null ){
  -        
  -            if  (!fPerformValidation) {
  -            fCurrentElementIndex = -1;
  -            fCurrentContentSpecType = -1;
  -            fInElementContent = false;
  +        if (fDTDGrammar == null) {
  +
  +            if (!fPerformValidation) {
  +                fCurrentElementIndex = -1;
  +                fCurrentContentSpecType = -1;
  +                fInElementContent = false;
               }
               if (fPerformValidation && !fSkipValidation) {
                   fSkipValidation = true;
  @@ -2610,7 +2706,7 @@
                                              new Object[]{ element.rawname},
                                              XMLErrorReporter.SEVERITY_ERROR);
               }
  -        } 
  +        }
           else {
               //  resolve the element
               fCurrentElementIndex = fDTDGrammar.getElementDeclIndex(element, -1);
  @@ -2621,7 +2717,7 @@
                                              "MSG_ELEMENT_NOT_DECLARED",
                                              new Object[]{ element.rawname},
                                              XMLErrorReporter.SEVERITY_ERROR);
  -            } 
  +            }
               else {
                   //  0. insert default attributes
                   //  1. normalize the attributes
  @@ -2631,7 +2727,7 @@
                   addDTDDefaultAttrsAndValidate(fCurrentElementIndex, attributes);
               }
           }
  -        
  +
           // set element content state
           fInElementContent = fCurrentContentSpecType == XMLElementDecl.TYPE_CHILDREN;
   
  @@ -2671,21 +2767,12 @@
           fElementIndexStack[fElementDepth] = fCurrentElementIndex;
           fContentSpecTypeStack[fElementDepth] = fCurrentContentSpecType;
   
  -        // call handlers
  -        if (fDocumentHandler != null) {
  -            if (isEmpty) {
  -                fDocumentHandler.emptyElement(element, attributes);
  -            }
  -            else {
  -                fDocumentHandler.startElement(element, attributes);
  -            }
  -        }
   
       } // handleStartElement(QName,XMLAttributes,boolean)
   
       /** Handle end element. */
  -    protected void handleEndElement(QName element, boolean isEmpty)
  -        throws XNIException {
  +    protected void handleEndElement(QName element,  Augmentations augs, boolean isEmpty)
  +    throws XNIException {
   
           // decrease element depth
           fElementDepth--;
  @@ -2707,7 +2794,7 @@
                                                      "MSG_CONTENT_INVALID",
                                                      new Object[]{ element.rawname, "EMPTY"},
                                                      XMLErrorReporter.SEVERITY_ERROR);
  -                    } 
  +                    }
                       else {
                           String messageKey = result != childrenLength ? 
                                               "MSG_CONTENT_INVALID" : "MSG_CONTENT_INCOMPLETE";
  @@ -2721,7 +2808,7 @@
               }
               fElementChildrenLength = fElementChildrenOffsetStack[fElementDepth + 1] + 1;
           }
  -
  +        
           // call handlers
           if (fDocumentHandler != null && !isEmpty) {
               // NOTE: The binding of the element doesn't actually happen
  @@ -2730,7 +2817,7 @@
               //       Mapping calls get made too soon! As long as the
               //       rawnames match, we know it'll have a good binding,
               //       so we can just use the current element. -Ac
  -            fDocumentHandler.endElement(fCurrentElement);
  +            fDocumentHandler.endElement(fCurrentElement, augs);
           }
           
           // now pop this element off the top of the element stack
  @@ -2753,7 +2840,7 @@
                   try {
                       fValIDRef.validate();//Do final validation of IDREFS against IDs
                       fValIDRefs.validate();
  -                } 
  +                }
                   catch (InvalidDatatypeValueException ex) {
                       String  key = ex.getKeyIntoReporter();
   
  @@ -2762,7 +2849,7 @@
                                                   new Object[]{ ex.getMessage()},
                                                   XMLErrorReporter.SEVERITY_ERROR );
                   }
  -            fTableOfIDs.clear();//Clear table of IDs
  +                fTableOfIDs.clear();//Clear table of IDs
               }
               return;
           }
  
  
  
  1.11      +50 -51    xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
  
  Index: XMLSchemaValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XMLSchemaValidator.java	2001/11/25 18:48:56	1.10
  +++ XMLSchemaValidator.java	2001/11/26 21:45:51	1.11
  @@ -78,6 +78,7 @@
   import org.apache.xerces.util.XMLChar;
   import org.apache.xerces.util.IntStack;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLString;
   import org.apache.xerces.xni.XMLAttributes;
  @@ -118,7 +119,7 @@
    * @author Eric Ye IBM
    * @author Andy Clark IBM
    * @author Jeffrey Rodriguez IBM
  - * @version $Id: XMLSchemaValidator.java,v 1.10 2001/11/25 18:48:56 lmartin Exp $
  + * @version $Id: XMLSchemaValidator.java,v 1.11 2001/11/26 21:45:51 elena Exp $
    */
   public class XMLSchemaValidator
                implements XMLComponent, XMLDocumentFilter, FieldActivator {
  @@ -315,13 +316,13 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding)
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
       throws XNIException {
   
           handleStartDocument(locator, encoding);
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startDocument(locator, encoding);
  +            fDocumentHandler.startDocument(locator, encoding, augs);
           }
   
       } // startDocument(XMLLocator,String)
  @@ -338,12 +339,12 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void xmlDecl(String version, String encoding, String standalone)
  +    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
       throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.xmlDecl(version, encoding, standalone);
  +            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
           }
   
       } // xmlDecl(String,String,String)
  @@ -359,12 +360,13 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void doctypeDecl(String rootElement, String publicId, String systemId)
  +    public void doctypeDecl(String rootElement, String publicId, String systemId, 
  +                            Augmentations augs)
       throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId);
  +            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
           }
   
       } // doctypeDecl(String,String,String)
  @@ -378,13 +380,13 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startPrefixMapping(String prefix, String uri)
  +    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
       throws XNIException {
   
           handleStartPrefix(prefix, uri);
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startPrefixMapping(prefix, uri);
  +            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
           }
   
       } // startPrefixMapping(String,String)
  @@ -397,13 +399,13 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
       throws XNIException {
   
           handleStartElement(element, attributes);
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startElement(element, attributes);
  +            fDocumentHandler.startElement(element, attributes, augs);
           }
   
       } // startElement(QName,XMLAttributes)
  @@ -416,7 +418,7 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void emptyElement(QName element, XMLAttributes attributes)
  +    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
       throws XNIException {
   
           handleStartElement(element, attributes);
  @@ -426,13 +428,18 @@
           XMLString defaultValue = handleEndElement(element);
           // call handlers
           if (fDocumentHandler != null) {
  -            if (defaultValue == null) {
  +            
  +            fDocumentHandler.emptyElement(element, attributes, augs);
  +            
  +            // REVISIT: should we send default element value?
  +            /*if (defaultValue == null) {
                   fDocumentHandler.emptyElement(element, attributes);
               } else {
                   fDocumentHandler.startElement(element, attributes);
                   fDocumentHandler.characters(defaultValue);
                   fDocumentHandler.endElement(element);
               }
  +            */
           }
   
       } // emptyElement(QName,XMLAttributes)
  @@ -444,12 +451,12 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws XNIException {
  +    public void characters(XMLString text, Augmentations augs) throws XNIException {
   
           handleCharacters(text);
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.characters(text);
  +            fDocumentHandler.characters(text, augs);
           }
   
       } // characters(XMLString)
  @@ -466,12 +473,12 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws XNIException {
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
   
           handleIgnorableWhitespace(text);
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.ignorableWhitespace(text);
  +            fDocumentHandler.ignorableWhitespace(text, augs);
           }
   
       } // ignorableWhitespace(XMLString)
  @@ -483,16 +490,17 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws XNIException {
  +    public void endElement(QName element, Augmentations augs) throws XNIException {
   
           // in the case where there is a {value constraint}, and the element
           // doesn't have any text content, add a characters call.
           XMLString defaultValue = handleEndElement(element);
           // call handlers
           if (fDocumentHandler != null) {
  -            if (defaultValue != null)
  -                fDocumentHandler.characters(defaultValue);
  -            fDocumentHandler.endElement(element);
  +            // REVISIT: should we send default element values??
  +            //if (defaultValue != null)
  +            //    fDocumentHandler.characters(defaultValue);
  +            fDocumentHandler.endElement(element, augs);
           }
   
       } // endElement(QName)
  @@ -505,11 +513,11 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws XNIException {
  +    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endPrefixMapping(prefix);
  +            fDocumentHandler.endPrefixMapping(prefix, augs);
           }
   
       } // endPrefixMapping(String)
  @@ -519,11 +527,11 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws XNIException {
  +    public void startCDATA(Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.startCDATA();
  +            fDocumentHandler.startCDATA(augs);
           }
   
       } // startCDATA()
  @@ -533,11 +541,11 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws XNIException {
  +    public void endCDATA(Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endCDATA();
  +            fDocumentHandler.endCDATA(augs);
           }
   
       } // endCDATA()
  @@ -547,12 +555,12 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws XNIException {
  +    public void endDocument(Augmentations augs) throws XNIException {
   
           handleEndDocument();
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endDocument();
  +            fDocumentHandler.endDocument(augs);
           }
   
       } // endDocument()
  @@ -563,14 +571,9 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the
  -     * pseudo-name of "[dtd]; parameter entity names start with '%'; and
  +     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
        * general entity names are just the entity name.
        * <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
  -     * startEntity method with the entity name "[dtd]" <em>before</em> calling
  -     * the startDTD method.
  -     * <p>
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        *
  @@ -591,12 +594,13 @@
       public void startEntity(String name,
                               String publicId, String systemId,
                               String baseSystemId,
  -                            String encoding) throws XNIException {
  +                            String encoding, 
  +                            Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
               fDocumentHandler.startEntity(name, publicId, systemId,
  -                                         baseSystemId, encoding);
  +                                         baseSystemId, encoding, augs);
           }
   
       } // startEntity(String,String,String,String,String)
  @@ -617,11 +621,11 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding) throws XNIException {
  +    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.textDecl(version, encoding);
  +            fDocumentHandler.textDecl(version, encoding, augs);
           }
   
       } // textDecl(String,String)
  @@ -633,11 +637,11 @@
        *
        * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws XNIException {
  +    public void comment(XMLString text, Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.comment(text);
  +            fDocumentHandler.comment(text, augs);
           }
   
       } // comment(XMLString)
  @@ -658,26 +662,21 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void processingInstruction(String target, XMLString data)
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
       throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.processingInstruction(target, data);
  +            fDocumentHandler.processingInstruction(target, data, augs);
           }
   
       } // processingInstruction(String,XMLString)
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; parameter entity names start with '%'; and general entity
  +     * of "[dtd]" parameter entity names start with '%'; and general entity
        * names are just the entity name.
        * <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
  -     * endEntity method with the entity name "[dtd]" <em>after</em> calling
  -     * the endDTD method.
  -     * <p>
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        *
  @@ -685,11 +684,11 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws XNIException {
  +    public void endEntity(String name, Augmentations augs) throws XNIException {
   
           // call handlers
           if (fDocumentHandler != null) {
  -            fDocumentHandler.endEntity(name);
  +            fDocumentHandler.endEntity(name, augs);
           }
   
       } // endEntity(String)
  
  
  
  1.17      +33 -27    xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java
  
  Index: AbstractDOMParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AbstractDOMParser.java	2001/11/19 22:34:32	1.16
  +++ AbstractDOMParser.java	2001/11/26 21:45:51	1.17
  @@ -69,6 +69,7 @@
   import org.apache.xerces.dom.TextImpl;
   import org.apache.xerces.impl.Constants;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.NamespaceContext;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
  @@ -101,7 +102,7 @@
    * @author Arnaud Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: AbstractDOMParser.java,v 1.16 2001/11/19 22:34:32 neilg Exp $
  + * @version $Id: AbstractDOMParser.java,v 1.17 2001/11/26 21:45:51 elena Exp $
    */
   public abstract class AbstractDOMParser
       extends AbstractXMLDocumentParser {
  @@ -348,14 +349,9 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the
  -     * pseudo-name of "[dtd]; parameter entity names start with '%'; and
  +     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
        * general entity names are just the entity name.
        * <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
  -     * startEntity method with the entity name "[dtd]" <em>before</em> calling
  -     * the startDTD method.
  -     * <p>
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        *
  @@ -373,8 +369,12 @@
        */
       public void startEntity(String name, String publicId, String systemId,
                               String baseSystemId,
  -                            String encoding) throws XNIException {
  +                            String encoding, 
  +                            Augmentations augs) throws XNIException {
   
  +        // REVISIT: investigate fInDTD & fInDocument flags
  +        // this method now only called by DocumentHandler
  +        // comment(), endEntity(), processingInstruction(), textDecl()
           if (fInDocument && !fInDTD && fCreateEntityRefNodes ) {
               if (!fDeferNodeExpansion) {
                   EntityReference er = fDocument.createEntityReference(name);
  @@ -398,7 +398,7 @@
        *
        * @throws XNIException Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws XNIException {
  +    public void comment(XMLString text, Augmentations augs) throws XNIException {
   
           if (!fDeferNodeExpansion) {
               Comment comment = fDocument.createComment(text.toString());
  @@ -428,7 +428,7 @@
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void processingInstruction(String target, XMLString data)
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
           throws XNIException {
   
           if (!fDeferNodeExpansion) {
  @@ -454,10 +454,11 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding)
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
           throws XNIException {
   
           fInDocument = true;
  @@ -511,11 +512,12 @@
        *                    if the external DTD is specified using SYSTEM.
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement,
  -                            String publicId, String systemId)
  +                            String publicId, String systemId, Augmentations augs)
           throws XNIException {
   
           if (!fDeferNodeExpansion) {
  @@ -540,10 +542,11 @@
        *
        * @param element    The name of the element.
        * @param attributes The element attributes.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
           if (!fDeferNodeExpansion) {
               Element el;
  @@ -623,10 +626,11 @@
        * Character content.
        *
        * @param text The content.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws XNIException {
  +    public void characters(XMLString text, Augmentations augs) throws XNIException {
           if (!fDeferNodeExpansion) {
               if (fInCDATASection) {
                   if (fCurrentCDATASection == null) {
  @@ -685,10 +689,11 @@
        * content model.
        *
        * @param text The ignorable whitespace.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws XNIException {
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
   
           if (!fIncludeIgnorableWhitespace) {
               return;
  @@ -723,10 +728,11 @@
        * The end of an element.
        *
        * @param element The name of the element.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws XNIException {
  +    public void endElement(QName element, Augmentations augs) throws XNIException {
           if (!fDeferNodeExpansion) {
               fCurrentNode = fCurrentNode.getParentNode();
           }
  @@ -743,28 +749,31 @@
        * called when namespace processing is enabled.
        *
        * @param prefix The namespace prefix.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws XNIException {
  +    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
       } // endPrefixMapping(String)
   
       /**
        * The start of a CDATA section.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws XNIException {
  +    public void startCDATA(Augmentations augs) throws XNIException {
   
           fInCDATASection = true;
       } // startCDATA()
   
       /**
        * The end of a CDATA section.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws XNIException {
  +    public void endCDATA(Augmentations augs) throws XNIException {
   
           fInCDATASection = false;
           if (!fDeferNodeExpansion) {
  @@ -785,10 +794,11 @@
   
       /**
        * The end of the document.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws XNIException {
  +    public void endDocument(Augmentations augs) throws XNIException {
   
           fInDocument = false;
           if (!fDeferNodeExpansion) {
  @@ -806,22 +816,18 @@
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; parameter entity names start with '%'; and general entity
  +     * of "[dtd]" parameter entity names start with '%'; and general entity
        * names are just the entity name.
        * <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
  -     * endEntity method with the entity name "[dtd]" <em>after</em> calling
  -     * the endDTD method.
  -     * <p>
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        *
        * @param name The name of the entity.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws XNIException {
  +    public void endEntity(String name, Augmentations augs) throws XNIException {
   
           if (fInDocument && !fInDTD && fCreateEntityRefNodes) {
               if (!fDeferNodeExpansion) {
  
  
  
  1.8       +229 -129  xml-xerces/java/src/org/apache/xerces/parsers/AbstractSAXParser.java
  
  Index: AbstractSAXParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractSAXParser.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractSAXParser.java	2001/11/20 17:39:41	1.7
  +++ AbstractSAXParser.java	2001/11/26 21:45:51	1.8
  @@ -69,6 +69,7 @@
   import org.apache.xerces.util.ErrorHandlerWrapper;
   import org.apache.xerces.util.SymbolTable;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLLocator;
  @@ -109,7 +110,7 @@
    * @author Arnaud Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: AbstractSAXParser.java,v 1.7 2001/11/20 17:39:41 elena Exp $
  + * @version $Id: AbstractSAXParser.java,v 1.8 2001/11/26 21:45:51 elena Exp $
    */
   public abstract class AbstractSAXParser
       extends AbstractXMLDocumentParser
  @@ -223,10 +224,11 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding)
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
           throws XNIException {
   
           try {
  @@ -260,11 +262,12 @@
        *                    if the external DTD is specified using SYSTEM.
        * @param systemId    The system identifier if an external DTD, null
        *                    otherwise.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
       public void doctypeDecl(String rootElement,
  -                            String publicId, String systemId)
  +                            String publicId, String systemId, Augmentations augs)
           throws XNIException {
           fInDTD = true;
   
  @@ -280,16 +283,77 @@
   
       } // doctypeDecl(String,String,String)
   
  +        /**
  +     * This method notifies of the start of an entity. The DTD has the
  +     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
  +     * general entity names are just the entity name.
  +     * <p>
  +     * <strong>Note:</strong> Since the document is an entity, the handler
  +     * 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.
  +     * <p>
  +     * <strong>Note:</strong> This method is not called for entity references
  +     * appearing as part of attribute values.
  +     *
  +     * @param name     The name of the entity.
  +     * @param publicId The public identifier of the entity if the entity
  +     *                 is external, null otherwise.
  +     * @param systemId The system identifier of the entity if the entity
  +     *                 is external, null otherwise.
  +     * @param encoding The auto-detected IANA encoding name of the entity
  +     *                 stream. This value will be null in those situations
  +     *                 where the entity encoding is not auto-detected (e.g.
  +     *                 internal parameter entities).
  +     * @param augs     Additional information that may include infoset augmentations
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    public void startEntity(String name, String publicId, String systemId,
  +                            String baseSystemId, String encoding, Augmentations augs)
  +        throws XNIException {
  +        
  +        startEntity(name, publicId, systemId, baseSystemId, encoding);
  +
  +    } // startEntity(String,String,String,String,String)
  +
       /**
  +     * This method notifies the end of an entity. The DTD has the pseudo-name
  +     * of "[dtd]" parameter entity names start with '%'; and general entity
  +     * names are just the entity name.
  +     * <p>
  +     * <strong>Note:</strong> Since the document is an entity, the handler
  +     * 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.
  +     * <p>
  +     * <strong>Note:</strong> This method is not called for entity references
  +     * appearing as part of attribute values.
  +     *
  +     * @param name The name of the entity.
  +     * @param augs     Additional information that may include infoset augmentations
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    public void endEntity(String name, Augmentations augs) throws XNIException {
  +
  +        endEntity(name);
  +
  +    } // endEntity(String)
  +
  +    /**
        * The start of a namespace prefix mapping. This method will only be
        * called when namespace processing is enabled.
        *
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startPrefixMapping(String prefix, String uri)
  +    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
           throws XNIException {
   
           try {
  @@ -311,10 +375,11 @@
        *
        * @param element    The name of the element.
        * @param attributes The element attributes.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
   
           try {
  @@ -356,14 +421,12 @@
        * Character content.
        *
        * @param text The content.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws XNIException {
  +    public void characters(XMLString text, Augmentations augs) throws XNIException {
   
  -        if (fInDTD) {
  -            return;
  -        }
   
           try {
               // SAX1
  @@ -391,10 +454,11 @@
        * content model.
        *
        * @param text The ignorable whitespace.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws XNIException {
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
   
           try {
               // SAX1
  @@ -417,10 +481,12 @@
        * The end of an element.
        *
        * @param element The name of the element.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws XNIException {
  +    public void endElement(QName element, Augmentations augs) throws XNIException {
  +        
   
           try {
               // SAX1
  @@ -447,10 +513,11 @@
        * called when namespace processing is enabled.
        *
        * @param prefix The namespace prefix.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix)  throws XNIException {
  +    public void endPrefixMapping(String prefix, Augmentations augs)  throws XNIException {
   
           try {
               // SAX2
  @@ -464,176 +531,115 @@
   
       } // endPrefixMapping(String)
   
  -    /**
  -     * The end of the document.
  +        /**
  +     * The start of a CDATA section.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws XNIException {
  +    public void startCDATA(Augmentations augs) throws XNIException {
   
           try {
  -            // SAX1
  -            if (fDocumentHandler != null) {
  -                fDocumentHandler.endDocument();
  -            }
  -
  -            // SAX2
  -            if (fContentHandler != null) {
  -                fContentHandler.endDocument();
  +            // SAX2 extension
  +            if (fLexicalHandler != null) {
  +                fLexicalHandler.startCDATA();
               }
           }
           catch (SAXException e) {
               throw new XNIException(e);
           }
  -
  -    } // endDocument()
   
  -    //
  -    // XMLDocumentHandler and XMLDTDHandler methods
  -    //
  +    } // startCDATA()
   
       /**
  -     * This method notifies of the start of an entity. The DTD has the
  -     * pseudo-name of "[dtd]; parameter entity names start with '%'; and
  -     * general entity names are just the entity name.
  -     * <p>
  -     * <strong>Note:</strong> Since the document is an entity, the handler
  -     * 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.
  -     * <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
  -     * startEntity method with the entity name "[dtd]" <em>before</em> calling
  -     * the startDTD method.
  -     * <p>
  -     * <strong>Note:</strong> This method is not called for entity references
  -     * appearing as part of attribute values.
  -     *
  -     * @param name     The name of the entity.
  -     * @param publicId The public identifier of the entity if the entity
  -     *                 is external, null otherwise.
  -     * @param systemId The system identifier of the entity if the entity
  -     *                 is external, null otherwise.
  -     * @param encoding The auto-detected IANA encoding name of the entity
  -     *                 stream. This value will be null in those situations
  -     *                 where the entity encoding is not auto-detected (e.g.
  -     *                 internal parameter entities).
  +     * The end of a CDATA section.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startEntity(String name, String publicId, String systemId,
  -                            String baseSystemId, String encoding)
  -        throws XNIException {
  +    public void endCDATA(Augmentations augs) throws XNIException {
   
           try {
               // SAX2 extension
               if (fLexicalHandler != null) {
  -                fLexicalHandler.startEntity(name);
  +                fLexicalHandler.endCDATA();
               }
           }
           catch (SAXException e) {
               throw new XNIException(e);
           }
   
  -    } // startEntity(String,String,String,String,String)
  +    } // endCDATA()
   
       /**
  -     * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; parameter entity names start with '%'; and general entity
  -     * names are just the entity name.
  -     * <p>
  -     * <strong>Note:</strong> Since the document is an entity, the handler
  -     * 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.
  -     * <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
  -     * endEntity method with the entity name "[dtd]" <em>after</em> calling
  -     * the endDTD method.
  -     * <p>
  -     * <strong>Note:</strong> This method is not called for entity references
  -     * appearing as part of attribute values.
  +     * A comment.
        *
  -     * @param name The name of the entity.
  +     * @param text The text in the comment.
  +     * @param augs     Additional information that may include infoset augmentations
        *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @throws XNIException Thrown by application to signal an error.
        */
  -    public void endEntity(String name) throws XNIException {
  +    public void comment(XMLString text, Augmentations augs) throws XNIException {
   
  -        try {
  -            // SAX2 extension
  -            if (fLexicalHandler != null) {
  -                fLexicalHandler.endEntity(name);
  -            }
  -        }
  -        catch (SAXException e) {
  -            throw new XNIException(e);
  -        }
  +            comment (text);
   
  -    } // endEntity(String)
  +    } // comment(XMLString)
   
       /**
  -     * The start of a CDATA section.
  +     * A processing instruction. Processing instructions consist of a
  +     * target name and, optionally, text data. The data is only meaningful
  +     * to the application.
  +     * <p>
  +     * Typically, a processing instruction's data will contain a series
  +     * of pseudo-attributes. These pseudo-attributes follow the form of
  +     * element attributes but are <strong>not</strong> parsed or presented
  +     * to the application as anything other than text. The application is
  +     * responsible for parsing the data.
        *
  +     * @param target The target.
  +     * @param data   The data or null if none specified.
  +     * @param augs     Additional information that may include infoset augmentations
  +     *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws XNIException {
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
  +        throws XNIException {
   
  -        try {
  -            // SAX2 extension
  -            if (fLexicalHandler != null) {
  -                fLexicalHandler.startCDATA();
  -            }
  -        }
  -        catch (SAXException e) {
  -            throw new XNIException(e);
  -        }
  +        processingInstruction (target, data);
   
  -    } // startCDATA()
  +    } // processingInstruction(String,XMLString)
   
  +
       /**
  -     * The end of a CDATA section.
  +     * The end of the document.
  +     * @param augs     Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws XNIException {
  +    public void endDocument(Augmentations augs) throws XNIException {
   
           try {
  -            // SAX2 extension
  -            if (fLexicalHandler != null) {
  -                fLexicalHandler.endCDATA();
  +            // SAX1
  +            if (fDocumentHandler != null) {
  +                fDocumentHandler.endDocument();
               }
  +
  +            // SAX2
  +            if (fContentHandler != null) {
  +                fContentHandler.endDocument();
  +            }
           }
           catch (SAXException e) {
               throw new XNIException(e);
           }
   
  -    } // endCDATA()
  +    } // endDocument()
   
  -    /**
  -     * A comment.
  -     *
  -     * @param text The text in the comment.
  -     *
  -     * @throws XNIException Thrown by application to signal an error.
  -     */
  -    public void comment(XMLString text) throws XNIException {
   
  -        try {
  -            // SAX2 extension
  -            if (fLexicalHandler != null) {
  -                fLexicalHandler.comment(text.ch, 0, text.length);
  -            }
  -        }
  -        catch (SAXException e) {
  -            throw new XNIException(e);
  -        }
  +    //
  +    // XMLDTDHandler methods
  +    //
   
  -    } // comment(XMLString)
   
       /**
        * A processing instruction. Processing instructions consist of a
  @@ -678,9 +684,103 @@
   
       } // processingInstruction(String,XMLString)
   
  -    //
  -    // XMLDTDHandler methods
  -    //
  +
  +
  +    /**
  +     * A comment.
  +     *
  +     * @param text The text in the comment.
  +     *
  +     * @throws XNIException Thrown by application to signal an error.
  +     */
  +    public void comment(XMLString text) throws XNIException {
  +
  +        try {
  +            // SAX2 extension
  +            if (fLexicalHandler != null) {
  +                fLexicalHandler.comment(text.ch, 0, text.length);
  +            }
  +        }
  +        catch (SAXException e) {
  +            throw new XNIException(e);
  +        }
  +
  +    } // comment(XMLString)
  +
  +
  +    /**
  +     * This method notifies of the start of an entity. The DTD has the
  +     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
  +     * general entity names are just the entity name.
  +     * <p>
  +     * <strong>Note:</strong> Since the document is an entity, the handler
  +     * 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.
  +     * <p>
  +     * <strong>Note:</strong> This method is not called for entity references
  +     * appearing as part of attribute values.
  +     *
  +     * @param name     The name of the entity.
  +     * @param publicId The public identifier of the entity if the entity
  +     *                 is external, null otherwise.
  +     * @param systemId The system identifier of the entity if the entity
  +     *                 is external, null otherwise.
  +     * @param encoding The auto-detected IANA encoding name of the entity
  +     *                 stream. This value will be null in those situations
  +     *                 where the entity encoding is not auto-detected (e.g.
  +     *                 internal parameter entities).
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    public void startEntity(String name, String publicId, String systemId,
  +                            String baseSystemId, 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,String)
  +
  +    /**
  +     * This method notifies the end of an entity. The DTD has the pseudo-name
  +     * of "[dtd]" parameter entity names start with '%'; and general entity
  +     * names are just the entity name.
  +     * <p>
  +     * <strong>Note:</strong> Since the document is an entity, the handler
  +     * 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.
  +     * <p>
  +     * <strong>Note:</strong> This method is not called for entity references
  +     * appearing as part of attribute values.
  +     *
  +     * @param name The name of the entity.
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    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)
   
       /**
        * An element declaration.
  
  
  
  1.4       +162 -44   xml-xerces/java/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java
  
  Index: AbstractXMLDocumentParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractXMLDocumentParser.java	2001/09/14 13:04:32	1.3
  +++ AbstractXMLDocumentParser.java	2001/11/26 21:45:51	1.4
  @@ -59,6 +59,7 @@
   
   import java.io.IOException;
   
  +import org.apache.xerces.xni.Augmentations;
   import org.apache.xerces.xni.QName;
   import org.apache.xerces.xni.XMLAttributes;
   import org.apache.xerces.xni.XMLDocumentHandler;
  @@ -83,7 +84,7 @@
    * @author Arnaud  Le Hors, IBM
    * @author Andy Clark, IBM
    *
  - * @version $Id: AbstractXMLDocumentParser.java,v 1.3 2001/09/14 13:04:32 andyc Exp $
  + * @version $Id: AbstractXMLDocumentParser.java,v 1.4 2001/11/26 21:45:51 elena Exp $
    */
   public abstract class AbstractXMLDocumentParser
       extends XMLParser
  @@ -129,11 +130,12 @@
        *                 stream. This value will be null in those situations
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal entities or a document entity that is
  -     *                 parsed from a java.io.Reader).
  +     *                 parsed from a java.io.Reader). 
  +     * @param augs   Additional information that may include infoset augmentations    
        *     
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding) 
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs) 
           throws XNIException {
       } // startDocument(XMLLocator,String)
   
  @@ -146,10 +148,11 @@
        * @param encoding   The IANA encoding name of the document, or null if
        *                   not specified.
        * @param standalone The standalone value, or null if not specified.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void xmlDecl(String version, String encoding, String standalone)
  +    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
           throws XNIException {
       } // xmlDecl(String,String,String)
   
  @@ -160,11 +163,12 @@
        * @param publicId    The public identifier if an external DTD or null
        *                    if the external DTD is specified using SYSTEM.
        * @param systemId    The system identifier if an external DTD, null
  +     * @param augs   Additional information that may include infoset augmentations
        *                    otherwise.
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void doctypeDecl(String rootElement, String publicId, String systemId)
  +    public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
           throws XNIException {
       } // doctypeDecl(String,String,String)
   
  @@ -174,10 +178,11 @@
        * 
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startPrefixMapping(String prefix, String uri)
  +    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
           throws XNIException {
       } // startPrefixMapping(String,String)
   
  @@ -188,10 +193,11 @@
        * 
        * @param element    The name of the element.
        * @param attributes The element attributes.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
       } // startElement(QName,XMLAttributes)
   
  @@ -200,14 +206,15 @@
        * 
        * @param element    The name of the element.
        * @param attributes The element attributes.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void emptyElement(QName element, XMLAttributes attributes)
  +    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException {
   
  -        startElement(element, attributes);
  -        endElement(element);
  +        startElement(element, attributes, augs);
  +        endElement(element, augs);
   
       } // emptyElement(QName,XMLAttributes)
   
  @@ -215,10 +222,11 @@
        * Character content.
        * 
        * @param text The content.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws XNIException {
  +    public void characters(XMLString text, Augmentations augs) throws XNIException {
       } // characters(XMLString)
   
       /**
  @@ -230,20 +238,22 @@
        * content model.
        * 
        * @param text The ignorable whitespace.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws XNIException {
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
       } // ignorableWhitespace(XMLString)
   
       /**
        * The end of an element.
        * 
        * @param element The name of the element.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws XNIException {
  +    public void endElement(QName element, Augmentations augs) throws XNIException {
       } // endElement(QName)
   
       /**
  @@ -251,43 +261,174 @@
        * called when namespace processing is enabled.
        * 
        * @param prefix The namespace prefix.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws XNIException {
  +    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
       } // endPrefixMapping(String)
   
       /** 
        * The start of a CDATA section. 
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws XNIException {
  +    public void startCDATA(Augmentations augs) throws XNIException {
       } // startCDATA()
   
       /**
  -     * The end of a CDATA section. 
  +     * The end of a CDATA section.
  +     * @param augs   Additional information that may include infoset augmentations 
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws XNIException {
  +    public void endCDATA(Augmentations augs) throws XNIException {
       } // endCDATA()
   
       /**
        * The end of the document.
  +     * @param augs   Additional information that may include infoset augmentations
        *
        * @throws XNIException Thrown by handler to signal an error.
        */
  -    public void endDocument() throws XNIException {
  +    public void endDocument(Augmentations augs) throws XNIException {
       } // endDocument()
   
  +
  +    /**
  +     * This method notifies the start of an entity.
  +     * <p>
  +     * <strong>Note:</strong> This method is not called for entity references
  +     * appearing as part of attribute values.
  +     * 
  +     * @param name     The name of the entity.
  +     * @param publicId The public identifier of the entity if the entity
  +     *                 is external, null otherwise.
  +     * @param systemId The system identifier of the entity if the entity
  +     *                 is external, null otherwise.
  +     * @param baseSystemId
  +     *                 The base system identifier of the entity if
  +     *                 the entity is external, null otherwise.
  +     * @param encoding The auto-detected IANA encoding name of the entity
  +     *                 stream. This value will be null in those situations
  +     *                 where the entity encoding is not auto-detected (e.g.
  +     *                 internal entities or a document entity that is
  +     *                 parsed from a java.io.Reader).
  +     * @param augs     Additional information that may include infoset augmentations
  +     *                 
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
  +     */
  +    public void startEntity(String name, 
  +                            String publicId, String systemId,
  +                            String baseSystemId,
  +                            String encoding,
  +                            Augmentations augs) throws XNIException{
  +    }
  +
  +    /**
  +     * Notifies of the presence of a TextDecl line in an entity. If present,
  +     * this method will be called immediately following the startEntity call.
  +     * <p>
  +     * <strong>Note:</strong> This method will never be called for the
  +     * document entity; it is only called for external general entities
  +     * referenced in document content.
  +     * <p>
  +     * <strong>Note:</strong> This method is not called for entity references
  +     * appearing as part of attribute values.
  +     * 
  +     * @param version  The XML version, or null if not specified.
  +     * @param encoding The IANA encoding name of the entity.
  +     * @param augs     Additional information that may include infoset augmentations
  +     *                 
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
  +     */
  +    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException{
  +    }
  +
  +    /**
  +     * This method notifies the end of an entity.
  +     * <p>
  +     * <strong>Note:</strong> This method is not called for entity references
  +     * appearing as part of attribute values.
  +     * 
  +     * @param name   The name of the entity.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
  +     */
  +    public void endEntity(String name, Augmentations augs) throws XNIException{
  +    }
  +
  +
  +    
  +    /**
  +     * A comment.
  +     * 
  +     * @param text   The text in the comment.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by application to signal an error.
  +     */
  +    public void comment(XMLString text, Augmentations augs) throws XNIException{
  +    }
  +
  +    /**
  +     * A processing instruction. Processing instructions consist of a
  +     * target name and, optionally, text data. The data is only meaningful
  +     * to the application.
  +     * <p>
  +     * Typically, a processing instruction's data will contain a series
  +     * of pseudo-attributes. These pseudo-attributes follow the form of
  +     * element attributes but are <strong>not</strong> parsed or presented
  +     * to the application as anything other than text. The application is
  +     * responsible for parsing the data.
  +     * 
  +     * @param target The target.
  +     * @param data   The data or null if none specified.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
  +     */
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
  +        throws XNIException{
  +    }
  +
  +
       //
  -    // XMLDocumentHandler and XMLDTDHandler methods
  +    // XMLDTDHandler methods
       //
  +    
  +    /**
  +     * The start of the DTD.
  +     *
  +     * @throws XNIException Thrown by handler to signal an error.
  +     */
  +    public void startDTD(XMLLocator locator) throws XNIException {
  +        fInDTD = true;
  +    } // startDTD(XMLLocator)
  +
  +
  +    /**
  +     * Character content.
  +     * 
  +     * @param text   The content.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
  +     */
  +     public void characters(XMLString text) throws XNIException{
  +     }
   
       /**
        * This method notifies of the start of an entity. The document entity
  -     * has the pseudo-name of "[xml]"; The DTD has the pseudo-name of "[dtd]; 
  +     * has the pseudo-name of "[xml]"; The DTD has the pseudo-name of "[dtd]" 
        * parameter entity names start with '%'; and general entity names are
        * just the entity name.
        * <p>
  @@ -297,11 +438,6 @@
        * the startDocument method. When exposing entity boundaries through the
        * 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
  -     * startEntity method with the entity name "[dtd]" <em>before</em> calling
  -     * the startDTD method.
  -     * <p>
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        * 
  @@ -376,7 +512,7 @@
   
       /**
        * This method notifies the end of an entity. The document entity has
  -     * the pseudo-name of "[xml]"; the DTD has the pseudo-name of "[dtd]; 
  +     * the pseudo-name of "[xml]"; the DTD has the pseudo-name of "[dtd]" 
        * parameter entity names start with '%'; and general entity names are
        * just the entity name.
        * <p>
  @@ -386,11 +522,6 @@
        * the endDocument method. When exposing entity boundaries through the
        * 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
  -     * endEntity method with the entity name "[dtd]" <em>after</em> calling
  -     * the endDTD method.
  -     * <p>
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        * 
  @@ -400,19 +531,6 @@
        */
       public void endEntity(String name) throws XNIException {
       } // endEntity(String)
  -
  -    //
  -    // XMLDTDHandler methods
  -    //
  -
  -    /**
  -     * The start of the DTD.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  -     */
  -    public void startDTD(XMLLocator locator) throws XNIException {
  -        fInDTD = true;
  -    } // startDTD(XMLLocator)
   
       /**
        * An element declaration.
  
  
  
  1.5       +3 -3      xml-xerces/java/src/org/apache/xerces/parsers/DTDParser.java
  
  Index: DTDParser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/DTDParser.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DTDParser.java	2001/10/25 20:36:05	1.4
  +++ DTDParser.java	2001/11/26 21:45:51	1.5
  @@ -68,7 +68,7 @@
   
   /**
    * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
  - * @version $Id: DTDParser.java,v 1.4 2001/10/25 20:36:05 elena Exp $
  + * @version $Id: DTDParser.java,v 1.5 2001/11/26 21:45:51 elena Exp $
    */
   public abstract class DTDParser
       extends XMLGrammarParser
  @@ -113,7 +113,7 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the 
  -     * pseudo-name of "[dtd]; and parameter entity names start with '%'.
  +     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
        * <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
  @@ -359,7 +359,7 @@
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; and parameter entity names start with '%'.
  +     * of "[dtd]" and parameter entity names start with '%'.
        * <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
  
  
  
  1.1                  xml-xerces/java/src/org/apache/xerces/util/AugmentationsImpl.java
  
  Index: AugmentationsImpl.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 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
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.xerces.util;
  
  import java.util.Hashtable;
  
  import org.apache.xerces.xni.Augmentations;
  
  /**
   * This class provides an implementation for Augmentations interface. 
   * Augmentations interface defines a hashtable of additional data that could
   * be passed along the document pipeline. The information can contain extra
   * arguments or infoset augmentations, for example PSVI. This additional
   * information is identified by a String key.
   * <p>
   * 
   * @author Elena Litani, IBM
   */
  public class AugmentationsImpl implements Augmentations{
      
      private final Hashtable fAugmentations = new Hashtable();
      
      /**
       * Add additional information identified by a key to the Augmentations structure.
       * 
       * @param key    Identifier, can't be <code>null</code>
       * @param item   Additional information
       *
       * @return the previous value of the specified key in the Augmentations strucutre,
       *         or <code>null</code> if it did not have one.
       */
      public Object putItem (String key, Object item){
          return fAugmentations.put(key, item);
  
      }
  
  
      /**
       * Get information identified by a key from the Augmentations structure
       * 
       * @param key    Identifier, can't be <code>null</code>
       *
       * @return the value to which the key is mapped in the Augmentations structure;
       *         <code>null</code> if the key is not mapped to any value.
       */
      public Object getItem(String key){
          return fAugmentations.get(key);
      }
      
      
      /**
       * Remove additional info from the Augmentations structure
       * 
       * @param key    Identifier, can't be <code>null</code>
       */
      public Object removeItem (String key){
          return fAugmentations.remove(key);
      }
  }
  
  
  
  1.4       +3 -11     xml-xerces/java/src/org/apache/xerces/xni/XMLDTDHandler.java
  
  Index: XMLDTDHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/XMLDTDHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLDTDHandler.java	2001/09/14 13:04:32	1.3
  +++ XMLDTDHandler.java	2001/11/26 21:45:51	1.4
  @@ -68,7 +68,7 @@
    * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLDTDHandler.java,v 1.3 2001/09/14 13:04:32 andyc Exp $
  + * @version $Id: XMLDTDHandler.java,v 1.4 2001/11/26 21:45:51 elena Exp $
    */
   public interface XMLDTDHandler {
   
  @@ -110,12 +110,8 @@
   
       /**
        * This method notifies of the start of an entity. The DTD has the 
  -     * pseudo-name of "[dtd]; and parameter entity names start with '%'.
  +     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
        * <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
  -     * startEntity method with the entity name "[dtd]" <em>before</em> calling
  -     * the startDTD method.
        * 
        * @param name     The name of the entity.
        * @param publicId The public identifier of the entity if the entity
  @@ -152,12 +148,8 @@
   
       /**
        * This method notifies the end of an entity. The DTD has the pseudo-name
  -     * of "[dtd]; and parameter entity names start with '%'.
  +     * of "[dtd]" and parameter entity names start with '%'.
        * <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
  -     * endEntity method with the entity name "[dtd]" <em>after</em> calling
  -     * the endDTD method.
        * 
        * @param name The name of the entity.
        *
  
  
  
  1.3       +113 -72   xml-xerces/java/src/org/apache/xerces/xni/XMLDocumentHandler.java
  
  Index: XMLDocumentHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/xni/XMLDocumentHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLDocumentHandler.java	2001/08/23 00:35:36	1.2
  +++ XMLDocumentHandler.java	2001/11/26 21:45:51	1.3
  @@ -66,7 +66,7 @@
    * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
    * @author Andy Clark, IBM
    *
  - * @version $Id: XMLDocumentHandler.java,v 1.2 2001/08/23 00:35:36 lehors Exp $
  + * @version $Id: XMLDocumentHandler.java,v 1.3 2001/11/26 21:45:51 elena Exp $
    */
   public interface XMLDocumentHandler {
   
  @@ -76,11 +76,11 @@
   
       /**
        * The start of the document.
  -     *
  +     * 
        * @param locator  The document locator, or null if the document
  -     *                 location cannot be reported during the parsing 
  +     *                 location cannot be reported during the parsing
        *                 of this document. However, it is <em>strongly</em>
  -     *                 recommended that a locator be supplied that can 
  +     *                 recommended that a locator be supplied that can
        *                 at least report the system identifier of the
        *                 document.
        * @param encoding The auto-detected IANA encoding name of the entity
  @@ -88,10 +88,11 @@
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
  -     *     
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs     Additional information that may include infoset augmentations
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void startDocument(XMLLocator locator, String encoding) 
  +    public void startDocument(XMLLocator locator, String encoding, Augmentations augs) 
           throws XNIException;
   
       /**
  @@ -103,34 +104,41 @@
        * @param encoding   The IANA encoding name of the document, or null if
        *                   not specified.
        * @param standalone The standalone value, or null if not specified.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs       Additional information that may include infoset augmentations
  +     *                   
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void xmlDecl(String version, String encoding, String standalone)
  +    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
           throws XNIException;
   
       /**
        * Notifies of the presence of the DOCTYPE line in the document.
        * 
  -     * @param rootElement The name of the root element.
  -     * @param publicId    The public identifier if an external DTD or null
  -     *                    if the external DTD is specified using SYSTEM.
  -     * @param systemId    The system identifier if an external DTD, null
  -     *                    otherwise.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param rootElement
  +     *                 The name of the root element.
  +     * @param publicId The public identifier if an external DTD or null
  +     *                 if the external DTD is specified using SYSTEM.
  +     * @param systemId The system identifier if an external DTD, null
  +     *                 otherwise.
  +     * @param augs     Additional information that may include infoset augmentations
  +     *                 
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void doctypeDecl(String rootElement, String publicId, String systemId)
  +    public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
           throws XNIException;
   
       /**
        * A comment.
        * 
  -     * @param text The text in the comment.
  -     *
  -     * @throws XNIException Thrown by application to signal an error.
  +     * @param text   The text in the comment.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by application to signal an error.
        */
  -    public void comment(XMLString text) throws XNIException;
  +    public void comment(XMLString text, Augmentations augs) throws XNIException;
   
       /**
        * A processing instruction. Processing instructions consist of a
  @@ -145,10 +153,12 @@
        * 
        * @param target The target.
        * @param data   The data or null if none specified.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void processingInstruction(String target, XMLString data)
  +    public void processingInstruction(String target, XMLString data, Augmentations augs)
           throws XNIException;
   
       /**
  @@ -157,10 +167,12 @@
        * 
        * @param prefix The namespace prefix.
        * @param uri    The URI bound to the prefix.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void startPrefixMapping(String prefix, String uri)
  +    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
           throws XNIException;
   
       /**
  @@ -168,10 +180,12 @@
        * 
        * @param element    The name of the element.
        * @param attributes The element attributes.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs       Additional information that may include infoset augmentations
  +     *                   
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void startElement(QName element, XMLAttributes attributes)
  +    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException;
   
       /**
  @@ -179,10 +193,12 @@
        * 
        * @param element    The name of the element.
        * @param attributes The element attributes.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs       Additional information that may include infoset augmentations
  +     *                   
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void emptyElement(QName element, XMLAttributes attributes)
  +    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
           throws XNIException;
   
       /**
  @@ -196,20 +212,24 @@
        *                 is external, null otherwise.
        * @param systemId The system identifier of the entity if the entity
        *                 is external, null otherwise.
  -     * @param baseSystemId The base system identifier of the entity if
  -     *                     the entity is external, null otherwise.
  +     * @param baseSystemId
  +     *                 The base system identifier of the entity if
  +     *                 the entity is external, null otherwise.
        * @param encoding The auto-detected IANA encoding name of the entity
        *                 stream. This value will be null in those situations
        *                 where the entity encoding is not auto-detected (e.g.
        *                 internal entities or a document entity that is
        *                 parsed from a java.io.Reader).
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs     Additional information that may include infoset augmentations
  +     *                 
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
       public void startEntity(String name, 
                               String publicId, String systemId,
                               String baseSystemId,
  -                            String encoding) throws XNIException;
  +                            String encoding,
  +                            Augmentations augs) throws XNIException;
   
       /**
        * Notifies of the presence of a TextDecl line in an entity. If present,
  @@ -224,10 +244,12 @@
        * 
        * @param version  The XML version, or null if not specified.
        * @param encoding The IANA encoding name of the entity.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs     Additional information that may include infoset augmentations
  +     *                 
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void textDecl(String version, String encoding) throws XNIException;
  +    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException;
   
       /**
        * This method notifies the end of an entity.
  @@ -235,20 +257,24 @@
        * <strong>Note:</strong> This method is not called for entity references
        * appearing as part of attribute values.
        * 
  -     * @param name The name of the entity.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param name   The name of the entity.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void endEntity(String name) throws XNIException;
  +    public void endEntity(String name, Augmentations augs) throws XNIException;
   
       /**
        * Character content.
        * 
  -     * @param text The content.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param text   The content.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void characters(XMLString text) throws XNIException;
  +    public void characters(XMLString text, Augmentations augs) throws XNIException;
   
       /**
        * Ignorable whitespace. For this method to be called, the document
  @@ -258,50 +284,65 @@
        * characters in the document are ignorable based on the element
        * content model.
        * 
  -     * @param text The ignorable whitespace.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param text   The ignorable whitespace.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void ignorableWhitespace(XMLString text) throws XNIException;
  +    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException;
   
       /**
        * The end of an element.
        * 
        * @param element The name of the element.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs    Additional information that may include infoset augmentations
  +     *                
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void endElement(QName element) throws XNIException;
  +    public void endElement(QName element, Augmentations augs) throws XNIException;
   
       /**
        * The end of a namespace prefix mapping. This method will only be
        * called when namespace processing is enabled.
        * 
        * @param prefix The namespace prefix.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void endPrefixMapping(String prefix) throws XNIException;
  +    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException;
   
  -    /** 
  -     * The start of a CDATA section. 
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +    /**
  +     * The start of a CDATA section.
  +     * 
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void startCDATA() throws XNIException;
  +    public void startCDATA(Augmentations augs) throws XNIException;
   
       /**
  -     * The end of a CDATA section. 
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * The end of a CDATA section.
  +     * 
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void endCDATA() throws XNIException;
  +    public void endCDATA(Augmentations augs) throws XNIException;
   
       /**
        * The end of the document.
  -     *
  -     * @throws XNIException Thrown by handler to signal an error.
  +     * 
  +     * @param augs   Additional information that may include infoset augmentations
  +     *               
  +     * @exception XNIException
  +     *                   Thrown by handler to signal an error.
        */
  -    public void endDocument() throws XNIException;
  +    public void endDocument(Augmentations augs) throws XNIException;
   
   } // interface XMLDocumentHandler
  
  
  
  1.1                  xml-xerces/java/src/org/apache/xerces/xni/Augmentations.java
  
  Index: Augmentations.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 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
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.xerces.xni;
  
  /**
   * The Augmentations interface defines a table of additional data that may
   * be passed along the document pipeline. The information can contain extra
   * arguments or infoset augmentations, for example PSVI. This additional
   * information is identified by a String key.
   * <p>
   * <strong>Note:</strong>
   * Methods that receive Augmentations are required to copy the information
   * if it is to be saved for use beyond the scope of the method.
   * The Augmentations content is volatile, and maybe modified by any method in
   * any component in the pipeline. Therefore, methods passed this structure
   * should not save any reference to the structure.
   * 
   * @author Elena Litani, IBM
   */
  public interface Augmentations {
      
      
      /**
       * Add additional information identified by a key to the Augmentations structure.
       * 
       * @param key    Identifier, can't be <code>null</code>
       * @param item   Additional information
       *
       * @return the previous value of the specified key in the Augmentations structure,
       *         or <code>null</code> if it did not have one.
       */
      public Object putItem (String key, Object item);
  
  
      /**
       * Get information identified by a key from the Augmentations structure
       * 
       * @param key    Identifier, can't be <code>null</code>
       *
       * @return the value to which the key is mapped in the Augmentations structure;
       *         <code>null</code> if the key is not mapped to any value.
       */
      public Object getItem(String key);
      
      
      /**
       * Remove additional info from the Augmentations structure
       * 
       * @param key    Identifier, can't be <code>null</code>
       * @return the previous value of the specified key in the Augmentations structure,
       *         or <code>null</code> if it did not have one.
       */
      public Object removeItem (String key);
  
      //
      // REVISIT:
      // provide a way to iterate through all of the items in the augmentations.
      //
  }
  
  
  

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