Author: mukulg
Date: Sun Feb 14 13:34:44 2010
New Revision: 910005

URL: http://svn.apache.org/viewvc?rev=910005&view=rev
Log:
identified a bug while evaluation assertions for, "complexType -> simpleContent 
-> restriction". this code commit fixes this.

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
   (contents, props changed)

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=910005&r1=910004&r2=910005&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
 Sun Feb 14 13:34:44 2010
@@ -2492,6 +2492,24 @@
                assertions.addXSObject((XSAssert)complexTypeAsserts.get(i));
             }
           }
+          
+          // add assertion facets, from "complexType -> simpleContent -> 
restriction"
+          XSSimpleTypeDefinition simpleTypeDef = 
complexTypeDef.getSimpleType();
+          if (simpleTypeDef != null) {
+            XSObjectList complexTypeFacets = 
simpleTypeDef.getMultiValueFacets();
+            for (int i = 0; i < complexTypeFacets.getLength(); i++) {
+              XSMultiValueFacet facet = (XSMultiValueFacet) 
complexTypeFacets.item(i);
+              if (facet.getFacetKind() == XSSimpleTypeDefinition.FACET_ASSERT) 
{
+                 Vector simpleContentAsserts = facet.getAsserts();
+                 for (int simpleAssertIdx = 0; simpleAssertIdx < 
+                              simpleContentAsserts.size(); simpleAssertIdx++) {
+                    XSAssert simpleContentAssert = (XSAssert)
+                                         
simpleContentAsserts.get(simpleAssertIdx);
+                    assertions.addXSObject(simpleContentAssert);
+                 }
+              }
+            }
+          }
 
           // there could be assertions, to be evaluated on attributes. add 
these
           // assertions to the list of assertions to be processed.

Propchange: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb 14 13:34:44 2010
@@ -1 +1 @@
-Author Date Id Revision
+Id



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

Reply via email to