users@jaxb.java.net

2 schema

From: Lou DeGenaro <lou.degenaro_at_gmail.com>
Date: Fri, 11 Apr 2008 11:30:46 -0400

I have 2 schema. One imports the other, for example schema-b:

<xs:schema
    xmlns:xa="http://www.degenaro.com/schema-a"
    xmlns:xb="http://www.degenaro.com/schema-b"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
    jxb:version="2.0"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    jxb:extensionBindingPrefixes="xjc"
>
  <xs:import schemaLocation="a.xsd" namespace="
http://www.degenaro.com/schema-a" />

and employs it thus:

  <xs:complexType name="abc-type">
    <xs:choice>
      <xs:element name="abc-string" type="xs:string" />
      <xs:element name="abc-import" type="xa:a-thingy" />
    </xs:choice>
  </xs:complexType>

Both schema are in the same directory. I run separate ant scripts to
generate jaxb code to separate destinations directories I get classes
generated for schema-a and schema-b both representing a-thingy in those
separate directories. But the objective is to have just one class for
a-thingy, and have it's representation embedded in b-thingy. Where can I
see an example of how to do this?

Thanks.

Lou.