You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2006/01/16 19:32:49 UTC

svn commit: r369542 - /xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java

Author: mrglavas
Date: Mon Jan 16 10:32:47 2006
New Revision: 369542

URL: http://svn.apache.org/viewcvs?rev=369542&view=rev
Log:
Fixing JIRA Bug #1128:
https://issues.apache.org/jira/browse/XERCESJ-1128

The variables which track full/none validation attempted depth are updated together
which can lead to the {validation attempted} property of an element to be reported
as partial when it should have been full or none. Fixed thanks to the patch by
Peter McCracken.

Modified:
    xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java

Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL: http://svn.apache.org/viewcvs/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=369542&r1=369541&r2=369542&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Mon Jan 16 10:32:47 2006
@@ -2268,7 +2268,14 @@
             // otherwise partial, and anything above this level will be partial
             else {
                 fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL;
-                fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1;
+            }
+            
+            // this guarantees that depth settings do not cross-over between sibling nodes
+            if (fNFullValidationDepth == fElementDepth) {
+                fNFullValidationDepth = fElementDepth - 1;
+            }
+            if (fNNoneValidationDepth == fElementDepth) {
+                fNNoneValidationDepth = fElementDepth - 1;
             }
 
             if (fDefaultValue != null)



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