users@jaxb.java.net

Re: Substituting a type's List property for the type itself

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 19 Dec 2006 10:31:33 -0800

Chris Nokleberg wrote:
> I'm not sure of all the ramifications, but it seems like you should be
> able to annotate a schema complex type as a "wrapper" type. Perhaps
> this would only be allowed if the type does not allow attributes. Then
> it could do the right thing--avoid generating the unnecessary class
> and adding @XmlElementWrapper to all the properties that reference the
> type. I'm willing to jump in and attempt to hack up a patch if this
> idea is not totally crazy.

No, it makes sense. And you are more than welcome to hack the code.

The only caution is that we cannot do this in the default binding mode,
due to the compatibility requirement. We'd have to come up with a vendor
extension customization, or make this a part of the simple binding mode.
Both have trade-offs, but I have any say on this, I'd prefer the latter.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com