Author: mukulg
Date: Sat Sep 22 06:31:17 2012
New Revision: 1388740

URL: http://svn.apache.org/viewvc?rev=1388740&view=rev
Log:
committing a fix for jira issue, XERCESJ-1585

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=1388740&r1=1388739&r2=1388740&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
 Sat Sep 22 06:31:17 2012
@@ -2751,8 +2751,16 @@ public class XMLSchemaValidator
                             fValueStoreCache.getValueStoreFor(id, 
selMatcher.getInitialDepth());
                         // nothing to do if nothing matched, or if not all
                         // fields are present.
-                        if (values != null && values.fValuesCount == 
values.fFieldCount)
+                        if (values != null && values.fValuesCount == 
values.fFieldCount) {
                             values.endDocumentFragment();
+                        }
+                        else if (values != null) {
+                            IdentityConstraint idcConstraint = 
values.getIdentityConstraint();
+                            if 
(fValueStoreCache.fGlobalIDConstraintMap.get(((KeyRef)idcConstraint).getKey()) 
== null) {
+                                reportSchemaError("KeyRefOutOfScope", new 
Object[] { idcConstraint.toString() });
+                            }
+                        }
+
                     }
                 }
             }
@@ -4638,6 +4646,10 @@ public class XMLSchemaValidator
             return fItemValueType;
         }
         
+        private IdentityConstraint getIdentityConstraint() {
+            return fIdentityConstraint;
+        }
+        
     } // class ValueStoreBase
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org
For additional commands, e-mail: commits-h...@xerces.apache.org

Reply via email to