Author: mukulg Date: Mon Nov 19 17:07:17 2012 New Revision: 1411312 URL: http://svn.apache.org/viewvc?rev=1411312&view=rev Log: committing an improvement as suggested in latest comment on jira issue XERCESJ-1594.
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=1411312&r1=1411311&r2=1411312&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 Nov 19 17:07:17 2012 @@ -2749,13 +2749,13 @@ public class XMLSchemaValidator && id.getCategory() == IdentityConstraint.IC_KEYREF) { ValueStoreBase values = fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth()); - // report error if not all fields are present - if (values.fValuesCount != values.fFieldCount) { - reportSchemaError("KeyRefNotEnoughValues", new Object[] { element.rawname, values.getIdentityConstraint().getName() }); - } - if (values != null) { // nothing to do if nothing matched - values.endDocumentFragment(); - } + if (values != null) { + values.endDocumentFragment(); // nothing to do if nothing matched + // report error if not all fields are present + if (values.fValuesCount != values.fFieldCount) { + reportSchemaError("KeyRefNotEnoughValues", new Object[] { element.rawname, values.getIdentityConstraint().getName() }); + } + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org