Hi Lukas

On 11/14/05, Lukas Theussl <[EMAIL PROTECTED]> wrote:
> 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.

Sure, if we can make MSV validate files properly we will have to
remove this temporary hack... anyway, let make it work now, till we
find a better solution.
Also note that this has nothing to do with namespace awareness, also
if we can make namespaces working it will not solve the problem: the
only solution would be validating project.xml against 2 schemas at the
same time (maven xsd+schema xsd), but AFAIK msv doesn't support that
at all...

fabrizio

>
> -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]
>
>

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

Reply via email to