users@jaxb.java.net

Class generation and <xsd:include>

From: Brett Ramdeen <bramdeen_at_CERTAPAY.COM>
Date: Tue, 21 Jan 2003 14:17:47 -0700

I have a collection of schemas which are dependent on a parent schema that defines basic types which are common to all of the child schemas. The child schemas all refer to the parent schema by use of an <xsd:include> tag.

When generating the java classes for the child schemas, I specifiy a different package for each child. Ie: Two schemas called A.xsd and B.xsd would for example have their JAXB interfaces and classes created in the package com.foo.a and com.foo.b.

My concern is that since A.xsd and B.xsd include common_types.xsd (for sake of the example). The interfaces and implementation classes found in common_types.xsd are created in both com.foo.a AND com.foo.b. These classes do not need to be created twice.

Is there a way to specify a package location for common_types.xsd such that its classes are created in a single common place, com.foo for example, and so that the classes created from A.xsd and B.xsd refer to the helper classes in this package?