Author: mrglavas
Date: Mon Dec 13 19:58:44 2010
New Revision: 1045346

URL: http://svn.apache.org/viewvc?rev=1045346&view=rev
Log:
Related to XERCESJ-1488. XML Schema 1.1 specific code should only be executed 
in XML Schema 1.1 mode.

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=1045346&r1=1045345&r2=1045346&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
 Mon Dec 13 19:58:44 2010
@@ -3227,7 +3227,8 @@ public class XMLSchemaValidator
             
             // additional check for assertions processing, for simple type 
having  
             // variety 'union'.
-            if (attDV.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) {
+            if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1 &&
+                attDV.getVariety() == XSSimpleTypeDefinition.VARIETY_UNION) {
                 if 
(XSTypeHelper.isAtomicValueValidForAnUnion(attDV.getMemberTypes(), 
                                                               attrValue, 
null)) {
                     fisAtomicValueValid = false; 
@@ -3382,7 +3383,8 @@ public class XMLSchemaValidator
                     
                     // additional check for assertions processing, for simple 
type having 
                     // variety 'union'.
-                    if (attDV.getVariety() == 
XSSimpleTypeDefinition.VARIETY_UNION) {
+                    if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1 &&
+                        attDV.getVariety() == 
XSSimpleTypeDefinition.VARIETY_UNION) {
                         if 
(XSTypeHelper.isAtomicValueValidForAnUnion(attDV.getMemberTypes(), 
                                                                       null, 
defaultValue)) {
                             fisAtomicValueValid = false; 
@@ -3595,7 +3597,8 @@ public class XMLSchemaValidator
                     
                     // additional check for assertions processing, for simple 
type having 
                     // variety 'union'.
-                    if (dv.getVariety() == 
XSSimpleTypeDefinition.VARIETY_UNION) {
+                    if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1 &&
+                        dv.getVariety() == 
XSSimpleTypeDefinition.VARIETY_UNION) {
                         if 
(XSTypeHelper.isAtomicValueValidForAnUnion(dv.getMemberTypes(), 
                                                               
String.valueOf(textContent), 
                                                               null)) {
@@ -3645,7 +3648,8 @@ public class XMLSchemaValidator
                     
                     // additional check for assertions processing, for simple 
type having 
                     // variety 'union'.
-                    if (dv.getVariety() == 
XSSimpleTypeDefinition.VARIETY_UNION) {
+                    if (fSchemaVersion == Constants.SCHEMA_VERSION_1_1 &&
+                        dv.getVariety() == 
XSSimpleTypeDefinition.VARIETY_UNION) {
                         if 
(XSTypeHelper.isAtomicValueValidForAnUnion(dv.getMemberTypes(), 
                                                               
String.valueOf(textContent), 
                                                               null)) {



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

Reply via email to