I have two schema(Progect,system) but all this schema have one class shared(Image), I have problem when I generation JAXB in java for each this schema I have one class for each this schema(image in progect and image in system),but I need one image for project schema and system schema. project schema:
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/ProjectDataBase"
xmlns:tns="http://www.example.org/ProjectDataBase" elementFormDefault="qualified">
<element name="Project">
<complexType>
<sequence>
<element name="Layer" type="tns:Layer" minOccurs="0"
maxOccurs="unbounded">
</element>
</sequence>
<attribute name="name" type="string" />
</complexType>
</element>
<complexType name="Layer">
<sequence>
<element name="LayerName" type="string" maxOccurs="1"
minOccurs="1">
</element>
<element name="Visible" type="boolean" maxOccurs="1"
minOccurs="1"></element>
<element name="Image" type="tns:Image" minOccurs="0"
maxOccurs="unbounded">
</element>
</sequence>
<attribute name="idLayer" type="int"></attribute>
</complexType>
<complexType name="Image">
<sequence>
<element name="name" type="string" maxOccurs="1"
minOccurs="1">
</element>
<element name="path" type="string" maxOccurs="1"
minOccurs="1"/>
</sequence>
</complexType>
System schemal:
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/systemDataBase"
xmlns:tns="http://www.example.org/systemDataBase" elementFormDefault="qualified">
<element name="SystemDataBase">
<complexType>
<sequence>
<element name="Classification" type="tns:Classification"
minOccurs="0" maxOccurs="unbounded">
</element>
</sequence>
</complexType>
</element>
<complexType name="Classification">
<sequence>
<element name="Image" type="tns:Image" maxOccurs="unbounded"
minOccurs="0"></element>
</sequence>
<attribute name="id" type="int"></attribute>
</complexType>
<complexType name="Image">
<sequence>
<element name="name" type="string" maxOccurs="1" minOccurs="1">
</element>
<element name="path" type="string" maxOccurs="1" minOccurs="1">
</element>
</sequence>
</complexType>
</schema>