title: Jaxb binding file being ignored
body: <p>I having a bit of trouble building JAXB bindings fora  set of schemas and its driving me a bit batty.  Here is the schema in question (it is just one of may schema in this particular build):</p>
  
  <pre><code>&lt;schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xml="http://www.w3.org/XML/1998/namespace" targetNamespace="http://www.w3.org/XML/1998/namespace"&gt;
  &lt;attribute name="lang" type="language"&gt;
      &lt;annotation&gt;
          &lt;documentation&gt;In due course, we should install the relevant ISO 2- and 3-letter
              codes as the enumerated possible values . . .&lt;/documentation&gt;
      &lt;/annotation&gt;
  &lt;/attribute&gt;
  &lt;attribute name="space" default="preserve"&gt;
      &lt;simpleType&gt;
          &lt;restriction base="NCName"&gt;
              &lt;enumeration value="default"/&gt;
              &lt;enumeration value="preserve"/&gt;
          &lt;/restriction&gt;
      &lt;/simpleType&gt;
  &lt;/attribute&gt;
  &lt;attributeGroup name="specialAttrs"&gt;
      &lt;attribute ref="xml:lang"/&gt;
      &lt;attribute ref="xml:space"/&gt;
  &lt;/attributeGroup&gt;
  </code></pre>
  
  <p></p>
  
  <p>xjc is claiming that the attributes declared above are already declared elsewhere:</p>
  
  <pre><code>parsing a schema...
  [ERROR] 'lang' is already defined
    line 26 of file:../../gml/3.1.1/smil/xml-mod.xsd
  
  [ERROR] (related to above error) the first definition appears here
    line 88 of http://www.w3.org/2001/03/xml.xsd
  
  [ERROR] 'space' is already defined
    line 34 of file:../../gml/3.1.1/smil/xml-mod.xsd
  
  [ERROR] (related to above error) the first definition appears here
    line 95 of http://www.w3.org/2001/03/xml.xsd
  
  [ERROR] 'specialAttrs' is already defined
    line 39 of file:../../gml/3.1.1/smil/xml-mod.xsd
  
  [ERROR] (related to above error) the first definition appears here
    line 111 of http://www.w3.org/2001/03/xml.xsd
  
  Failed to parse a schema.
  </code></pre>
  
  <p>Doing a bit of research would lead me to believe that the problem is that I need a binding file to resolve the duplicate attributes....and I have one :</p>
  
  <pre><code>&lt;jaxb:bindings version="1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes="xjc"&gt;
  
  &lt;jaxb:bindings schemaLocation="../../gml/3.1.1/smil/xml-mod.xsd" node="/xs:schema"&gt;
      &lt;jaxb:bindings node="//xs:attribute[@name='lang']"&gt;
          &lt;jaxb:property name="langAttribute"/&gt;
      &lt;/jaxb:bindings&gt;
      &lt;jaxb:bindings node="//xs:attribute[@name='space']"&gt;
          &lt;jaxb:property name="spaceAttribute"/&gt;
      &lt;/jaxb:bindings&gt;
      &lt;jaxb:bindings node="//xs:attributeGroup[@name='specialAttrs']"&gt;
          &lt;jaxb:property name="specialAttrsAttribute"/&gt;
      &lt;/jaxb:bindings&gt;
  &lt;/jaxb:bindings&gt;
  </code></pre>
  
  <p></p>
  
  <p>Yet the problem persists.  The error message with or without the bindings file is the same. I know the file is being used , because if I mess up the xpath for the node selector I get an error message. It's like xjc knows the bindings file is there but ignores it. </p>
  
  <p>Here's the command line that fails to build the bindings: </p>
  
  <pre><code>C:\tools\jaxb-ri-20110512\bin\xjc -episode ..\..\..\common.ogc -d ..\..\..\src -p com.ogc.bindings -b ..\..\..\bindings.xsd -catalog ..\..\..\ogc.cat -extension  sosAll.xsd
  </code></pre>
  
  <p>I have tried this with both the jdk6 native jaxb (2.0) and jaxb 2.2.4 (I installed the jaxb-api.jar in the endorsed directory)</p>