Author: mukulg
Date: Mon Apr 12 03:15:38 2010
New Revision: 933083

URL: http://svn.apache.org/viewvc?rev=933083&view=rev
Log:
improvements to error messages (ref, JIRA issue XERCESJ-1441)

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/XMLAssertPsychopathImpl.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=933083&r1=933082&r2=933083&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
 Mon Apr 12 03:15:38 2010
@@ -107,7 +107,7 @@
         cvc-type.3.1.3 = cvc-type.3.1.3: The value ''{1}'' of element ''{0}'' 
is not valid.
         cvc-assertion.3.13.4.1 = cvc-assertion.3.13.4.1: Assertion evaluation 
(''{1}'') for element ''{0}'' with type ''{2}'' did not succeed.
         cvc-assertion.4.3.15.3 = cvc-assertion.4.3.15.3: Assertion evaluation 
(''{1}'') for element ''{0}'' with type ''{2}'' did not succeed (undefined 
context).
-        cvc-assertion.failure = cvc-assertion.failure: Assertion failure. {0} 
+        cvc-assertion.failure = cvc-assertion.failure: {0} 
         cvc-xpath.3.13.4.2 = cvc-xpath.3.13.4.2: Assertion XPath expression, 
(''{0}'') on the Schema type ''{1}'' couldn''t compile successfully.
         
 #schema valid (3.X.3)

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java?rev=933083&r1=933082&r2=933083&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLAssertPsychopathImpl.java
 Mon Apr 12 03:15:38 2010
@@ -346,7 +346,13 @@ public class XMLAssertPsychopathImpl ext
         if (message != null) {
            if (!message.endsWith(".")) {
               message = message + ".";    
-           }           
+           }
+           if (key.equals("cvc-assertion.4.3.15.3")) {
+              message = "Assertion failure (undefined context). " + message;   
+           }
+           else {
+              message = "Assertion failure. " + message; 
+           }
            validator.reportSchemaError("cvc-assertion.failure", 
                                        new Object[] { message } );    
         }



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

Reply via email to