users@jaxb.java.net

Re: map namespace to packages

From: Malachi de Ælfweald <malachid_at_gmail.com>
Date: Fri, 9 May 2008 11:00:40 -0700

I do the following:

1. I map the xmlns/xsd to a package:
        <xsd:annotation>
                <xsd:appinfo>
                        <jaxb:schemaBindings>
                                <jaxb:package
name="org.eoti.spec.gaea.common.v1"/>
                        </jaxb:schemaBindings>
                </xsd:appinfo>
        </xsd:annotation>

2. If I want more than one package, I break it into more than one XSD (ie: a
little more object oriented)

3. I use NamespacePrefixMapper

Malachi

On Fri, May 9, 2008 at 10:45 AM, Dovholuk, Clint <
Clint.Dovholuk_at_globalcrossing.com> wrote:

> Hi All,
>
>
>
> Is there a plugin or some switch I can pass to jaxb to allow me to map
> namespaces to packages? Mapping schemas to packages is 'ok' but I'd rather
> a finer control over the mappings.
>
>
>
> Would a custom xjc plugin be able to accomplish this?
>
>
>
> Thanks,
>
> -Clint
>