Author: mukulg
Date: Thu Oct 31 05:21:00 2019
New Revision: 1869198

URL: http://svn.apache.org/viewvc?rev=1869198&view=rev
Log:
minor improvement to error messages for xsd validation. fixing the 
corresponding test cases in branch xs-1.1-tests as well.

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
    
xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/IDConstraintTests.java
    
xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties

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=1869198&r1=1869197&r2=1869198&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
 Thu Oct 31 05:21:00 2019
@@ -33,8 +33,8 @@
 
         AbsentKeyValue = cvc-identity-constraint.4.2.1.a: Element \"{0}\" has 
no value for the key \"{1}\".
         DuplicateField = Duplicate match in scope for field \"{0}\".
-        DuplicateKey = cvc-identity-constraint.4.2.2: Duplicate key value 
[{0}] declared for identity constraint \"{2}\" of element \"{1}\".
-        DuplicateUnique = cvc-identity-constraint.4.1: Duplicate unique value 
[{0}] declared for identity constraint \"{2}\" of element \"{1}\".
+        DuplicateKey = cvc-identity-constraint.4.2.2: Duplicate key value 
[{0}] found for identity constraint \"{2}\" of element \"{1}\".
+        DuplicateUnique = cvc-identity-constraint.4.1: Duplicate unique value 
[{0}] found for identity constraint \"{2}\" of element \"{1}\".
         FieldMultipleMatch = cvc-identity-constraint.3: Field \"{0}\" of 
identity constraint \"{1}\" matches more than one value within the scope of its 
selector; fields must match unique values.
         FixedDiffersFromActual = The content of this element is not equivalent 
to the value of the \"fixed\" attribute in the element's declaration in the 
schema.
         KeyMatchesNillable = cvc-identity-constraint.4.2.3: Element \"{0}\" 
has the key \"{1}\" which matches an element which has nillable set to true.

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=1869198&r1=1869197&r2=1869198&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
 Thu Oct 31 05:21:00 2019
@@ -64,7 +64,7 @@ public class IDConstraintTests extends X
             // test expected error messages
             List expectedMsgList = new ArrayList();
             FailureMesgFragments mesgFragments = new FailureMesgFragments();
-            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] declared for identity constraint \"key_a\" of element 
\"X\"");
+            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] found for identity constraint \"key_a\" of element 
\"X\"");
             expectedMsgList.add(mesgFragments);
             assertTrue(areErrorMessagesConsistent(expectedMsgList));
                } catch(Exception ex) {
@@ -101,7 +101,7 @@ public class IDConstraintTests extends X
             // test expected error messages
             List expectedMsgList = new ArrayList();
             FailureMesgFragments mesgFragments = new FailureMesgFragments();
-            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] declared for identity constraint \"key_a\" of element 
\"X\"");
+            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] found for identity constraint \"key_a\" of element 
\"X\"");
             expectedMsgList.add(mesgFragments);
             assertTrue(areErrorMessagesConsistent(expectedMsgList));
                } catch(Exception ex) {
@@ -138,7 +138,7 @@ public class IDConstraintTests extends X
             // test expected error messages
             List expectedMsgList = new ArrayList();
             FailureMesgFragments mesgFragments = new FailureMesgFragments();
-            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] declared for identity constraint \"key_a\" of element 
\"X\"");
+            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] found for identity constraint \"key_a\" of element 
\"X\"");
             expectedMsgList.add(mesgFragments);
             assertTrue(areErrorMessagesConsistent(expectedMsgList));
                } catch(Exception ex) {
@@ -175,7 +175,7 @@ public class IDConstraintTests extends X
             // test expected error messages
             List expectedMsgList = new ArrayList();
             FailureMesgFragments mesgFragments = new FailureMesgFragments();
-            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] declared for identity constraint \"key_a\" of element 
\"X\"");
+            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] found for identity constraint \"key_a\" of element 
\"X\"");
             expectedMsgList.add(mesgFragments);
             assertTrue(areErrorMessagesConsistent(expectedMsgList));
                } catch(Exception ex) {
@@ -286,7 +286,7 @@ public class IDConstraintTests extends X
             // test expected error messages
             List expectedMsgList = new ArrayList();
             FailureMesgFragments mesgFragments = new FailureMesgFragments();
-            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] declared for identity constraint \"key_a\" of element 
\"X\"");
+            mesgFragments.setMessageFragment("cvc-identity-constraint.4.2.2: 
Duplicate key value [a2] found for identity constraint \"key_a\" of element 
\"X\"");
             expectedMsgList.add(mesgFragments);
             assertTrue(areErrorMessagesConsistent(expectedMsgList));
                } catch(Exception ex) {

Modified: 
xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties?rev=1869198&r1=1869197&r2=1869198&view=diff
==============================================================================
--- 
xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties 
(original)
+++ 
xerces/java/trunk/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties 
Thu Oct 31 05:21:00 2019
@@ -33,8 +33,8 @@
 
         AbsentKeyValue = cvc-identity-constraint.4.2.1.a: Element \"{0}\" has 
no value for the key \"{1}\".
         DuplicateField = Duplicate match in scope for field \"{0}\".
-        DuplicateKey = cvc-identity-constraint.4.2.2: Duplicate key value 
[{0}] declared for identity constraint \"{2}\" of element \"{1}\".
-        DuplicateUnique = cvc-identity-constraint.4.1: Duplicate unique value 
[{0}] declared for identity constraint \"{2}\" of element \"{1}\".
+        DuplicateKey = cvc-identity-constraint.4.2.2: Duplicate key value 
[{0}] found for identity constraint \"{2}\" of element \"{1}\".
+        DuplicateUnique = cvc-identity-constraint.4.1: Duplicate unique value 
[{0}] found for identity constraint \"{2}\" of element \"{1}\".
         FieldMultipleMatch = cvc-identity-constraint.3: Field \"{0}\" of 
identity constraint \"{1}\" matches more than one value within the scope of its 
selector; fields must match unique values.
         FixedDiffersFromActual = The content of this element is not equivalent 
to the value of the \"fixed\" attribute in the element's declaration in the 
schema.
         KeyMatchesNillable = cvc-identity-constraint.4.2.3: Element \"{0}\" 
has the key \"{1}\" which matches an element which has nillable set to true.



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

Reply via email to