Index: DOMNormalizer.java
===================================================================
RCS file: /home/cvspublic/xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java,v
retrieving revision 1.35
diff -u -r1.35 DOMNormalizer.java
--- DOMNormalizer.java	11 Nov 2003 20:14:57 -0000	1.35
+++ DOMNormalizer.java	13 Nov 2003 00:07:16 -0000
@@ -66,6 +66,7 @@
 import org.apache.xerces.impl.RevalidationHandler;
 import org.apache.xerces.impl.dv.XSSimpleType;
 import org.apache.xerces.xs.XSTypeDefinition;
+import org.apache.xerces.impl.xs.util.SimpleLocator;
 import org.apache.xerces.util.AugmentationsImpl;
 import org.apache.xerces.util.NamespaceSupport;
 import org.apache.xerces.util.SymbolTable;
@@ -151,7 +152,13 @@
     protected SymbolTable fSymbolTable;
     /** error handler. may be null. */
     protected DOMErrorHandler fErrorHandler;
-
+    
+    /**
+     * Cached {@link DOMError} impl.
+     * The same object is re-used to report multiple errors.
+     */
+    private final DOMErrorImpl fError = new DOMErrorImpl();
+    
     // Validation against namespace aware grammar
     protected boolean fNamespaceValidation = false;
 
@@ -229,9 +236,10 @@
 
 		fErrorHandler = (DOMErrorHandler) fConfiguration.getParameter("error-handler");
 		if (fValidationHandler != null) {
-			fValidationHandler.setBaseURI(fDocument.fDocumentURI);
 			fValidationHandler.setDocumentHandler(this);
-			fValidationHandler.startDocument(null, fDocument.encoding, fNamespaceContext, null);
+			fValidationHandler.startDocument(
+                    new SimpleLocator(fDocument.fDocumentURI, fDocument.fDocumentURI, -1, -1 ),
+                    fDocument.encoding, fNamespaceContext, null);
 
 		}
 		try {
@@ -851,15 +859,14 @@
      */
     protected final void reportDOMError(String message, short severity, Node node, String type ){
         if( fErrorHandler!=null ) {
-            DOMErrorImpl error = new DOMErrorImpl();
-            error.reset();
-            error.fMessage = message;
-            error.fSeverity = severity;
-            error.fLocator = fLocator;
-            error.fType = type;
+            fError.reset();
+            fError.fMessage = message;
+            fError.fSeverity = severity;
+            fError.fLocator = fLocator;
+            fError.fType = type;
             fLocator.fRelatedNode = node;
     
-            if(!fErrorHandler.handleError(error))
+            if(!fErrorHandler.handleError(fError))
                 throw abort;
         }
         if( severity==DOMError.SEVERITY_FATAL_ERROR )
