You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2001/01/26 23:58:43 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/validators/common XMLValidator.java
neilg 01/01/26 14:58:43
Modified: java/src/org/apache/xerces/validators/common
XMLValidator.java
Log:
fixed a rather serious and insidious bug that caused the deferred DOM implementation to throw nullPointerExceptions in certain cases when dealing with attributes. This is a partial pullback of andyc's change of R1.107 so has the potential to affect the schema identity constraint implementation.
Revision Changes Path
1.108 +5 -5 xml-xerces/java/src/org/apache/xerces/validators/common/XMLValidator.java
Index: XMLValidator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/common/XMLValidator.java,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- XMLValidator.java 2001/01/25 07:18:44 1.107
+++ XMLValidator.java 2001/01/26 22:58:42 1.108
@@ -121,7 +121,7 @@
/**
* This class is the super all-in-one validator used by the parser.
*
- * @version $Id: XMLValidator.java,v 1.107 2001/01/25 07:18:44 andyc Exp $
+ * @version $Id: XMLValidator.java,v 1.108 2001/01/26 22:58:42 neilg Exp $
*/
public final class XMLValidator
implements DefaultEntityHandler.EventHandler,
@@ -922,16 +922,16 @@
bindNamespacesToElementAndAttributes(element, fAttrList);
}
- //before we increment the element depth, add this element's QName to its enclosing element 's children list
- fElementDepth++;
-
validateElementAndAttributes(element, fAttrList);
if (fAttrListHandle != -1) {
fAttrList.endAttrList();
}
fDocumentHandler.startElement(element, fAttrList, fAttrListHandle);
-
+ fAttrListHandle = -1;
+ //before we increment the element depth, add this element's QName to its enclosing element 's children list
+ fElementDepth++;
+
//if (fElementDepth >= 0) {
// REVISIT: Why are doing anything if the grammar is null? -Ac
if (fValidating) {