users@jaxb.java.net

Type substitution

From: William Simons <william.simons_at_childrens.harvard.edu>
Date: Mon, 14 Nov 2005 16:55:15 -0500

In theory should I be able to do the following?:

1. Use JAXB 2 to generate source, classes, and a jar based on schema A
2. In a separate project, write schema B that has a type that extends a type
in schema A
3. Use JAXB 2 to generate sources based on B, delete the sources that were
created from the imported schema A, compile all remaining classes and
produce jar B.
4. Distribute jar A and jar B and use JAXB 2 to unmarshal an xml document
that uses type substitution for the elements from B.


Basically I'm treating schema A and jar A as thirdparty software that is
included with my distribution (even though they're both in-house).

I've written some tests that aren't successful but I can't see anything in
the generated code that would require the two schemas to have their source
generated in the same XJC compile.

Thanks,
Bill