I am using JIBX maven plugin to generate the Java classes from the XSD schema. Below are 2 different sample XML types one representing a customer and other representing an account. The address field is similar in both the schema. However codegen generates 2 separate Address classes (i.e. Address and Address1) because they belong to different namespaces. How can I make JIBX codegen generate a single class file and make them reuse across repeating structure. Provided the author of the schema does not provide a common type schema.
<customer xmlns="xyz.com/cust">
<cust_number>97767</cust_number>
<name>John Doe</name>
<address>
<street_name>1st Street</street_name>
<address_line1>Line 1</address_line1>
<address_line2>Line 2</address_line2>
<city>San Jose</city>
</address>
</customer>
<account xmlns="xyz.com/acc">
<acc_number>97767</acc_number>
<acc_type>CHK</acc_type>
<name>John Doe</name>
<address>
<street_name>1st Street</street_name>
<address_line1>Line 1</address_line1>
<address_line2>Line 2</address_line2>
<city>San Jose</city>
</address>
</account>