svn commit: r1432599 - in /xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests: IDConstraintTests.java JiraBugsTests.java
Author: mukulg Date: Sun Jan 13 12:12:52 2013 New Revision: 1432599 URL: http://svn.apache.org/viewvc?rev=1432599&view=rev Log: making few updates to test cases for recent implementation changes for Jira issue, 1594 Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java?rev=1432599&r1=1432598&r2=1432599&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java Sun Jan 13 12:12:52 2013 @@ -303,13 +303,10 @@ public class IDConstraintTests extends X Validator v = s.newValidator(); v.setErrorHandler(this); v.validate(new StreamSource(xmlfile)); -assertTrue(failureList.size() == 2); +assertTrue(failureList.size() == 1); // test expected error messages List expectedMsgList = new ArrayList(); FailureMesgFragments mesgFragments = new FailureMesgFragments(); -mesgFragments.setMessageFragment("cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"Sub_1a\""); -expectedMsgList.add(mesgFragments); -mesgFragments = new FailureMesgFragments(); mesgFragments.setMessageFragment("the keyref identity constraint \"newKeyref\" refers to a key or unique that is out of scope"); expectedMsgList.add(mesgFragments); assertTrue(areErrorMessagesConsistent(expectedMsgList)); @@ -327,13 +324,10 @@ public class IDConstraintTests extends X Validator v = s.newValidator(); v.setErrorHandler(this); v.validate(new StreamSource(xmlfile)); -assertTrue(failureList.size() == 2); +assertTrue(failureList.size() == 1); // test expected error messages List expectedMsgList = new ArrayList(); FailureMesgFragments mesgFragments = new FailureMesgFragments(); -mesgFragments.setMessageFragment("cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"personnel\""); -expectedMsgList.add(mesgFragments); -mesgFragments = new FailureMesgFragments(); mesgFragments.setMessageFragment("cvc-identity-constraint.4.3: Key 'keyref' with value '1' not found for identity constraint of element 'personnel'"); expectedMsgList.add(mesgFragments); assertTrue(areErrorMessagesConsistent(expectedMsgList)); Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java?rev=1432599&r1=1432598&r2=1432599&view=diff == --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Sun Jan 13 12:12:52 2013 @@ -117,7 +117,7 @@ public class JiraBugsTests extends Xerce Validator v = s.newValidator(); v.setErrorHandler(this); v.validate(new StreamSource(xmlfile)); -assertTrue(failureList.size() == 2); +assertTrue(failureList.size() == 1); // test expected error messages List expectedMsgList = new ArrayList(); FailureMesgFragments mesgFragments = new FailureMesgFragments(); - To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org
svn commit: r1432596 - in /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl: msg/XMLSchemaMessages.properties xs/XMLSchemaValidator.java
Author: mukulg Date: Sun Jan 13 12:11:15 2013 New Revision: 1432596 URL: http://svn.apache.org/viewvc?rev=1432596&view=rev Log: committing few fixes for Jira issue, 1594 Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties 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/msg/XMLSchemaMessages.properties URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties?rev=1432596&r1=1432595&r2=1432596&view=diff == --- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties (original) +++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties Sun Jan 13 12:11:15 2013 @@ -44,7 +44,7 @@ KeyRefOutOfScope = Identity Constraint error: the keyref identity constraint \"{0}\" refers to a key or unique that is out of scope. KeyRefReferNotFound = Key reference declaration \"{0}\" refers to unknown key with name \"{1}\". UnknownField = Internal identity constraint error; unknown field \"{0}\" for identity constraint \"{2}\" specified for element \"{1}\". -KeyRefNotEnoughValues = cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"{0}\". +## KeyRefNotEnoughValues = cvc-identity-constraint.4.3.b: Not enough values specified for identity constraint specified for element \"{0}\". # Ideally, we should only use the following error keys, not the ones under # "Identity constraints". And we should cover all of the following errors. 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=1432596&r1=1432595&r2=1432596&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 Jan 13 12:11:15 2013 @@ -2771,11 +2771,11 @@ public class XMLSchemaValidator ValueStoreBase values = fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth()); if (values != null) { -values.endDocumentFragment(); // nothing to do if nothing matched -// report error if not all fields are present -if (values.fValuesCount != values.fFieldCount) { +values.endDocumentFragment(); // nothing to do if nothing matched +/*if (values.fValuesCount != values.fFieldCount) { +// report error if not all fields are present 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