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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to