Same element name in two different xsd files
<p>I have two xsd files.However , the element name is same in both files.
So , to overcome from conflicts I have created binding file.</p>

<p><strong>Request.xsd</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"&gt;
  &lt;xs:element name="XML"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref="HEADER"/&gt;
        &lt;xs:element ref="TOUR_OP"/&gt;
        &lt;xs:element ref="CUSTOMERID"/&gt;
        &lt;xs:element ref="DATEDEP"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="HEADER" type="xs:NCName"/&gt;
  &lt;xs:element name="TOUR_OP" type="xs:NCName"/&gt;
  &lt;xs:element name="CUSTOMERID" type="xs:integer"/&gt;
  &lt;xs:element name="DATEDEP" type="xs:integer"/&gt;
&lt;/xs:schema&gt;
</code></pre>

<p><strong>Response.xsd</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"&gt;
  &lt;xs:element name="XML"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref="HEADER"/&gt;
        &lt;xs:element ref="RESULTS"/&gt;
        &lt;xs:element ref="ENV"/&gt;
        &lt;xs:element ref="APP"/&gt;
        &lt;xs:element ref="VER"/&gt;
        &lt;xs:element ref="STAMP"/&gt;
        &lt;xs:element ref="CLIENT"/&gt;
        &lt;xs:element ref="PIN"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="HEADER" type="xs:NCName"/&gt;
  &lt;xs:element name="RESULTS"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref="AEROPLANS"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="AEROPLANS"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element maxOccurs="unbounded" ref="AEROPLAN"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="AEROPLAN"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element ref="MARKETCD"/&gt;
        &lt;xs:element ref="AEROPOINT"/&gt;
        &lt;xs:element ref="AERODOLLARS"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;xs:element name="MARKETCD" type="xs:NCName"/&gt;
  &lt;xs:element name="AEROPOINT" type="xs:integer"/&gt;
  &lt;xs:element name="AERODOLLARS" type="xs:decimal"/&gt;
  &lt;xs:element name="ENV" type="xs:NCName"/&gt;
  &lt;xs:element name="APP" type="xs:NCName"/&gt;
  &lt;xs:element name="VER" type="xs:NMTOKEN"/&gt;
  &lt;xs:element name="STAMP" type="xs:string"/&gt;
  &lt;xs:element name="CLIENT" type="xs:NCName"/&gt;
  &lt;xs:element name="PIN" type="xs:integer"/&gt;
&lt;/xs:schema&gt;
</code></pre>

<p><strong>Binding File (XJB)</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;bindings xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
          version="2.1"&gt;

        &lt;bindings schemaLocation="TTSAeroplanPointsSuccessResponse_v1.0.xsd"&gt;
            &lt;bindings node=".//xsi:attribute[@name='XML']"&gt;
                &lt;class name="XMLResponse"/&gt;
            &lt;/bindings&gt;
        &lt;/bindings&gt;
&lt;/bindings&gt;
</code></pre>

<p>As you can see , I both xsd files contain element name="XML" and binding file is created to overcome the conflicts while generating model classes.</p>

<p>I am getting an Error : XPath evaluation of ".//xsi:attribute[@name='XML']" results in empty target node</p>

<p>Please advice me , how I can resolve this.</p>