Author: mrglavas
Date: Tue Jun 16 17:03:16 2009
New Revision: 785295

URL: http://svn.apache.org/viewvc?rev=785295&view=rev
Log:
Fixing JIRA Issue #1378: http://issues.apache.org/jira/browse/XERCESJ-1378. The 
computation of [validation attempted] was not taking attributes into account. 
Patch thanks to Arthur De Magalhaes.

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=785295&r1=785294&r2=785295&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
 Tue Jun 16 17:03:16 2009
@@ -3014,6 +3014,10 @@
                     reportSchemaError(
                         "cvc-complex-type.3.2.2",
                         new Object[] { element.rawname, fTempQName.rawname });
+                    
+                    // We have seen an attribute that was not declared
+                    fNFullValidationDepth = fElementDepth;
+                    
                     continue;
                 }
             }
@@ -3197,7 +3201,10 @@
 
             // PSVI: validation attempted:
             attrPSVI.fValidationAttempted = AttributePSVI.VALIDATION_FULL;
-
+   
+            // We have seen an attribute that was declared.
+            fNNoneValidationDepth = fElementDepth;
+            
             String[] errors = fXSIErrorReporter.mergeContext();
             // PSVI: error codes
             attrPSVI.fErrors = errors;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to