users@jaxb.java.net

Generating to different packages throgh inclusion

From: Canning, Chuck <chuck.canning_at_zilliant.com>
Date: Wed, 12 Mar 2003 14:04:55 -0600

Hi,

I was wondering if it is possible to get JAXB to generate classes in
different packages through schema inclusion. In schema "A", I define:


    <xsd:annotation>
        <xsd:appinfo>
            <jxb:schemaBindings>
                <jxb:package name="A"/>
            </jxb:schemaBindings>
        </xsd:appinfo>
    </xsd:annotation>

in schema B, I include schema A, but specify

    <xsd:annotation>
        <xsd:appinfo>
            <jxb:schemaBindings>
                <jxb:package name="B"/>
            </jxb:schemaBindings>
        </xsd:appinfo>
    </xsd:annotation>


The generated code which goes against schema B, has everything in pacake B.
Is it possible to get JAXB to place the components defined in schema A in
package A and the components defined in schema B in package B? Thanks for
any feedback.

Chuck