Are you sure namespace is required to perform validation? What are you using?
See http://java.sun.com/developer/technicalArticles/xml/validationxpath/ for an example of XSD validation. There is no namespace in the XML document. Regards, Julien ----- Message d'origine ---- > De : amaresh mourya <[email protected]> > À : Maven Users List <[email protected]> > Envoyé le : Lun 8 Mars 2010, 12 h 18 min 14 s > Objet : Re: Re : How to differentiate between pom.xml and ant's build file > > Hi All, > Thanks for your replies. > I tried validation with XSD(http://maven.apache.org/maven-v4_0_0.xsd).but It > fails since the namespace is missing. > > I think any xml could still be POM if it doesn't have namespace as I have > seen many pom.xml without schema. > > thanks > Amaresh > > On Mon, Mar 8, 2010 at 4:32 PM, Julien HENRY wrote: > > > Hi, > > > > You could try an XML validation using Maven XSD ( > > http://maven.apache.org/maven-v4_0_0.xsd). If the validation is ok => this > > is a valid POM. If the validation is ko... it can be anything else. > > > > Regards, > > > > Julien > > > > > > > > ----- Message d'origine ---- > > > De : amaresh mourya > > > À : Maven Users List > > > Envoyé le : Lun 8 Mars 2010, 11 h 40 min 05 s > > > Objet : How to differentiate between pom.xml and ant's build file > > > > > > Hi All, > > > I want to write a recognizer class which takes input any xml file and > > > returns true or false based on , whether or not the xml is POM. > > > > > > Problem : Since Ant's build file and POM both have root element > > > with/without Namespace. > > > > > > I don't want POM Name to be restricted to just "pom.xml", this could be > > > anything say "myproj.xml" etc. Still I want this "myProj.xml" to be > > > recognized as POM with above Recognizer class. > > > > > > Can same one suggest me the conditions to differentiate between them. > > > > > > > > > > > > --------------------------------------------------------------------- > > 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]
