On Tue, 2003-06-03 at 12:09, Verma, Nitin (GECP, OTHER, 529706) wrote: > > >One way out (don't know if it's the only way) would be to relax the > >schema validation checks for POMs that use <extend>, then to perform > >more of the validation on the project model itself (i.e. the Java > >objects after they've been loaded into memory). Ideally this could > still > >be driven from the XML Schema, but you'd need something to bind the > XML > >Schema model to the Java model and perform the validation. Probably > >easier to just write the rules in Java. > > How would using <extend> solve the problem?
Sorry, I obviously wasn't clear enough. The problem is that the current maven-project.xsd is really too strict for project.xml files that use <extend>: if you're extending another project.xml there are elements that the schema says are required that you really want to pull in from the <extend>ed project.xml. I don't think you could write an XML Schema which would correctly check project.xml files that use <extend> because the schema can't be taught the complete semantics of the <extend> tag - it doesn't really know how the two files are combined to produce the internal project model. So the solution is probably to relax the XML Schema to specify the minimum requirements for a project.xml file to be syntactically valid as a self-contained unit, then to apply the remaining validation rules to the internal project model using Java code once the <extend> has been processed. -Mark. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]