users@jaxb.java.net

Re: Multiple XSD one application

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 01 Aug 2003 08:40:14 -0700

Ted Poovey <tpoovey_at_USCENTRAL.ORG> wrote:
> I am sorry if this is a repeat. However, the search did not show anything
> on this for the tutorials, here or anywhere else in relation to JAXB.
>
> I have an application that needs to handle multiple types of XML files.
> I will have an XSD for each - right?
>
> If I do this on the generated code do I have to just expect that I will
> have a package per XSD with a lot of classes that are the same name in all
> of them?

It depends on how your schemas are defined. If they refer the common
schema file that defines the common types. You just compile everything
at once and you don't get any duplicate.

If your schemas contain a lot of similar definitions, then you'll get a
lot of similar Java classes, but hey, what else would you expect?

regards,
--
Kohsuke Kawaguchi                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com