users@jaxb.java.net

Re: supporting schema extension in JAXB 1.0

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 11 May 2005 12:47:02 -0700

jastrachan_at_mac.com wrote:
> I understand that JAXB 2.0 handles schema extension (cool!) however the
> dependency on Java 5 means I can't use it on a project :(. I'm just
> wondering if anyone has ever managed (even in a non-standard vendor
> extension kinda way) to manage to add attribute/element extension into
> JAXB 1.0 marshalled code through some mechanism?
>
> I'm trying to figure out a way of working as if JAXB 2.0 was here, but
> support legacy Java 1.4 platforms until we can all move to JAXB 2.0

What do you mean by a "schema extension"? The inheritance of complex
types? JAXB 1.0 models that as Java class inheritance.

Or do you mean the use of xsi:type at runtime? JAXB RI 1.0 supports that
as an extension [1] (although personally I don't recommend this.)

[1]
http://java.sun.com/webservices/docs/1.5/jaxb/vendorCustomizations.html#typesub
-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com