title: creating 2 different types for same root element
body: <p>I want to create one schema file for 2 different xml's (I can split it into 2 schemas but since the root element is same, I want to keep it in one file).</p>
  
  <p>now I have 2 different XML's.</p>
  
  <pre><code>&lt;orderStatus shipStatus="SHIPPED/PENDING"&gt;
      &lt;orderId&gt;1234&lt;/orderId&gt;
      &lt;orderedBy&gt;userName&lt;/orderedBy&gt;
      &lt;orderedOn&gt;2012-07-23T11:35:51.000-04:00&lt;/orderedOn&gt;
  &lt;/orderStatus&gt;
  </code></pre>
  
  <p>and the second XML is</p>
  
  <pre><code>&lt;orderStatus modifyShipStatus="SUSPENDED/PENDING"&gt;
      &lt;shipStatus&gt;101&lt;/shipStatus&gt;
  &lt;/orderStatus&gt;
  </code></pre>
  
  <p>how can i have 1 xsd for these 2 xmls ? When i tried to create the root element with one 1 type, it is working fine but when i try to add another type, JAXB throws error that the element is already defined. which makes sens.</p>