Author: mukulg
Date: Wed Jul  8 04:12:23 2009
New Revision: 792026

URL: http://svn.apache.org/viewvc?rev=792026&view=rev
Log:
refactored assertions code, a bit

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=792026&r1=792025&r2=792026&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
 Wed Jul  8 04:12:23 2009
@@ -2336,6 +2336,14 @@
         }
         
         // process assertions
+        addAssertsForEvaluation(element, attributes);
+
+        return augs;
+
+    } // handleStartElement(QName,XMLAttributes,boolean)
+
+    /** Add assertions for processing */
+    private void addAssertsForEvaluation(QName element, XMLAttributes 
attributes) {
         if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1) {
             XSTypeDefinition typeDef = fCurrentPSVI.getTypeDefinition();
             Object assertObject = null;
@@ -2403,10 +2411,7 @@
                 assertionProcessor.startElement(element, attributes, 
assertAugs);
             }
         }
-
-        return augs;
-
-    } // handleStartElement(QName,XMLAttributes,boolean)
+    }
 
     /**
      *  Handle end element. If there is not text content, and there is a
@@ -2544,7 +2549,7 @@
              assertAugs.putItem(Constants.ELEMENT_PSVI, assertPSVI);           
     
              assertionProcessor.endElement(element, assertAugs);
            } catch (Exception ex) {
-             throw new XNIException(ex.getMessage(), ex);
+               throw new XNIException(ex.getMessage(), ex);
            }
         }
 



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

Reply via email to