users@jaxb.java.net

Re: how to refer to a common schema without duplicating entries found in the common namespace

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 07 Feb 2005 09:30:46 -0800

Jean-Marie Condom wrote:
> thanks ; i had tried this instruction also but the problem is
> the duplication of common classes under
> meteorage/jobs/params/configuration when compiling
> configuration_test.xsd (whose namespace is
> meteorage/jobs/params/configuration)
> and that imports common.xsd
>
> those classes are already under meteorage/jobs/params/commons
> after having compiled common.xsd (whose namespace is
> meteorage/jobs/params/common)

I'm bit confused. You are saying that the same schema produces two sets
of classes?

I suspect what you might really want is to use <xsd:include> as opposed
to <xsd:import>.

Otherwise, if you intentionally defined identical schema definitions in
two namespaces, then the JAXB has to generate two sets of classes, too.
After all, they might look similar, but they are different --- they
belong to different namespaces.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com