Fabrizio,

This can only be a temporary solution, I am still hoping that we will be able to make validation work with full namespace awareness. If we succeed, we'll have to undo this commit.

-Lukas


[EMAIL PROTECTED] wrote:
Author: fgiust
Date: Sun Nov 13 01:21:00 2005
New Revision: 332953

URL: http://svn.apache.org/viewcvs?rev=332953&view=rev
Log:
quick hack for removing wrong error messages for poms with an xsd declaration

Modified:
    
maven/maven-1/plugins/trunk/plugin/src/main/org/apache/maven/JaxpMsvBean.java

Modified: 
maven/maven-1/plugins/trunk/plugin/src/main/org/apache/maven/JaxpMsvBean.java
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/plugin/src/main/org/apache/maven/JaxpMsvBean.java?rev=332953&r1=332952&r2=332953&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/plugin/src/main/org/apache/maven/JaxpMsvBean.java 
(original)
+++ 
maven/maven-1/plugins/trunk/plugin/src/main/org/apache/maven/JaxpMsvBean.java 
Sun Nov 13 01:21:00 2005
@@ -181,6 +181,14 @@
public void error(SAXParseException e) throws SAXException
         {
+            if (e.getMessage() != null && 
e.getMessage().indexOf("xsi:schemaLocation") > -1)
+            {
+                // unexpected attribute "xsi:schemaLocation"
+                // ignore, this is due to a valid xsd declaration
+                // Jaxp ignores additionals namespaces declared in the xml 
file (xmlns:xsi) and it can't validate
+                // using multiple schema at once
+                return;
+            }
             errorMessage(e, MSV_ERROR);
             setValid(false);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to