title: Resolve naming conflict in included XSDs for JAXB compilation
body: <p>I am currently trying to compile with JAXB (IBM build 2.1.3) a pair of schema files into the same package.  Each will compile on it's own, but when trying to compile them together i get a element naming conflict due to includes.  My question is; is there a way to specify with an external binding a resolution to the naming collision.</p>
  
  <p>Example files follow.  In the example the offending element is called "Common", which is defined in both incA and incB:</p>
  
  <p>incA.xsd</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;schema xmlns="http://www.w3.org/2001/XMLSchema" 
      targetNamespace="http://www.example.org/"
      xmlns:tns="http://www.example.org/" elementFormDefault="qualified"&gt;
      &lt;complexType name="TypeA"&gt;
          &lt;sequence&gt;
              &lt;element name="ElementA" type="string"&gt;&lt;/element&gt;
          &lt;/sequence&gt;
      &lt;/complexType&gt;
      &lt;!-- Conflicting element --&gt;
      &lt;element name="Common" type="tns:TypeA"&gt;&lt;/element&gt;
  &lt;/schema&gt;
  </code></pre>
  
  <p>incB.xsd</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;schema xmlns="http://www.w3.org/2001/XMLSchema" 
      targetNamespace="http://www.example.org/"
      xmlns:tns="http://www.example.org/" elementFormDefault="qualified"&gt;
      &lt;complexType name="TypeB"&gt;
          &lt;sequence&gt;
              &lt;element name="ElementB" type="int"&gt;&lt;/element&gt;
          &lt;/sequence&gt;
      &lt;/complexType&gt;
      &lt;!-- Conflicting element --&gt;
      &lt;element name="Common" type="tns:TypeB"&gt;&lt;/element&gt;
  &lt;/schema&gt;
  </code></pre>
  
  <p>A.xsd</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;schema targetNamespace="http://www.example.org/"
      elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
      xmlns:tns="http://www.example.org/"&gt;
      &lt;include schemaLocation="incA.xsd"&gt;&lt;/include&gt;
      &lt;complexType name="A"&gt;
          &lt;sequence&gt;
              &lt;element ref="tns:Common"&gt;&lt;/element&gt;
          &lt;/sequence&gt;
      &lt;/complexType&gt;
  &lt;/schema&gt;
  </code></pre>
  
  <p>B.xsd</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;schema targetNamespace="http://www.example.org/"
      elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
      xmlns:tns="http://www.example.org/"&gt;
      &lt;include schemaLocation="incB.xsd"&gt;&lt;/include&gt;
      &lt;complexType name="B"&gt;
          &lt;sequence&gt;
              &lt;element ref="tns:Common"&gt;&lt;/element&gt;
          &lt;/sequence&gt;
      &lt;/complexType&gt;
  &lt;/schema&gt;
  </code></pre>
  
  <p>Compiler error when both are compiled from one evocation of xjb:</p>
  
  <pre>
  [ERROR] 'Common' is already defined
   line 9 of file:/C:/temp/incB.xsd
  [ERROR] (related to above error) the first definition appears here
   line 9 of file:/C:/temp/incA.xsd
  </pre>
  
  <p>(For reference, this is a generalization to resolve an issue with compiling the OAGIS8 SP3 package)</p>