On Tue, 2003-06-03 at 11:17, [EMAIL PROTECTED] wrote:
> 1. I don't know xml schema well, but my editor (jEdit) was not able to check 
> against the schema until I changed

Coincidentally, I just tried to do the same thing with some of my
project.xml files. I think someone mentioned 'maven pom:validate'
yesterday, which checks project.xml against the schema and seems to work
with the schema file in CVS at the moment. This might simply mean that
jEdit's schema validator is more strict than maven's, though...

> 2. I used inheritance for my subprojects to ommit the pomVersion, organisation 
> etc. tags in my sub-project POM files.  This does not harmonise with the schema, 
> since the schema requires pomVersion, organisation, etc. 
> Any idea how this conflict could be solved???
> 
> After all my rethinking of the problem I finally think it's best either to 
> not-use schema for those subprojects or to copy the required and redundant 
> information in all sub-project POMs.  What are you guys thinking?

Yeah, I ran into the same problem. I don't want to copy redundant
elements into the subproject POM just to satisfy the schema - it comes
down to the schema actually being too strict for files that use POM
inheritance.

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.

-Mark.


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

Reply via email to