title: Jaxb for OGC Schemas
body: <p>This is my scheme (scheme1.xsd)</p>
  
  <pre><code>&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:app="http://www.deegree.org/app" xmlns:deegreewfs="http://www.deegree.org/wfs" xmlns:dgjdbc="http://www.deegree.org/jdbc" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.deegree.org/app"&gt;
      &lt;xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd" /&gt;
      &lt;xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" /&gt;
      &lt;xs:import namespace="http://www.opengis.net/wfs" schemaLocation="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" /&gt;
      &lt;!-- CONFIGURACI N DE LA BASE DE DATOS --&gt;
      &lt;!-- ==============================Genera una clave como identificador======================================== --&gt;
      &lt;xs:element name="Entidad" substitutionGroup="gml:_Feature" type="app:EntidadType"&gt;
          &lt;!-- DEFINICI N DE GML:ID --&gt;
      &lt;/xs:element&gt;
      &lt;!-- ==============================RESOLUCION DE CAMPOS======================================== --&gt;
      &lt;xs:complexType name="EntidadType"&gt;
          &lt;xs:complexContent&gt;
              &lt;xs:extension base="gml:AbstractFeatureType"&gt;
                  &lt;xs:sequence&gt;
                      &lt;!-- Campo simple - INTEGER --&gt;
                      &lt;xs:element name="fid" type="xs:integer"&gt;
                      &lt;/xs:element&gt;
                      &lt;!-- Campo simple - INTEGER --&gt;
                      &lt;xs:element name="nombreEntidad_nombre" type="xs:string"&gt;
                      &lt;/xs:element&gt;
                      &lt;xs:element name="entidadLocal_municipioReal" type="xs:string"&gt;
                      &lt;/xs:element&gt;
                      &lt;xs:element name="entidadLocal_municipio" type="xs:string"&gt;
                      &lt;/xs:element&gt;
                      &lt;xs:element name="entidadLocal_provinciaReal" type="xs:string"&gt;
                      &lt;/xs:element&gt;
                      &lt;xs:element name="entidadLocal_provincia" type="xs:string"&gt;
                      &lt;/xs:element&gt;
                      &lt;xs:element name="posicionEspacial_BBOX" type="gml:GeometryPropertyType"&gt;
                      &lt;/xs:element&gt;
                      &lt;xs:element name="posicionEspacial_Centroide" type="xs:string"&gt;
                      &lt;/xs:element&gt;
                      &lt;!-- GEOM --&gt;
                      &lt;xs:element name="geom" type="gml:GeometryPropertyType"&gt;
                      &lt;/xs:element&gt;
                  &lt;/xs:sequence&gt;
              &lt;/xs:extension&gt;
          &lt;/xs:complexContent&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>When I use:</p>
  
  <pre><code>xjc scheme1.xsd
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>parsing a schema...
  [ERROR] Property "Title" is already defined. Use &amp;lt;jaxb:property&gt; to resolve this conflict.
  line 232 of "http://www.w3.org/1999/xlink.xsd"
  
  [ERROR] The following location is relevant to the above error
  line 219 of "http://www.w3.org/1999/xlink.xsd"
  
  [ERROR] Property "Title" is already defined. Use &amp;lt;jaxb:property&gt; to resolve this conflict.
  line 261 of "http://www.w3.org/1999/xlink.xsd"
  
  [ERROR] The following location is relevant to the above error
  line 246 of "http://www.w3.org/1999/xlink.xsd"
  
  Failed to parse a schema.
  </code></pre>
  
  <p>I used this file (binding.xjb):    </p>
  
  <pre><code>&lt;jxb:bindings version="2.0"
            xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
            xmlns:xs="http://www.w3.org/2001/XMLSchema" &gt;
  
      &lt;jxb:bindings schemaLocation="http://www.w3.org/1999/xlink.xsd" node="/xs:schema"&gt;
  
          &lt;jxb:bindings node="//xs:attributeGroup[@name='locatorAttrs']"&gt;
              &lt;jxb:bindings node=".//xs:attribute[@ref='xlink:title']"&gt;
                  &lt;jxb:property name="title1"/&gt;
              &lt;/jxb:bindings&gt;
          &lt;/jxb:bindings&gt;
  
          &lt;jxb:bindings node="//xs:attributeGroup[@name='arcAttrs']"&gt;           
              &lt;jxb:bindings node=".//xs:attribute[@ref='xlink:title']"&gt;
                  &lt;jxb:property name="title2"/&gt;
              &lt;/jxb:bindings&gt;            
          &lt;/jxb:bindings&gt;        
  
      &lt;/jxb:bindings&gt;
  
  &lt;/jxb:bindings&gt;
  
  xjc scheme1.xsd -b binding.xjb
  </code></pre>
  
  <p>I get this errors:</p>
  
  <pre><code>parsing a schema...
  compiling a schema...
  [ERROR] Two declarations cause a collision in the ObjectFactory class.
    line 1466 of http://schemas.opengis.net/gml/3.1.1/base/geometryPrimitives.xsd
  
  [ERROR] (Related to above error) This is the other declaration.   
  line 1520 of "http://schemas.opengis.net/gml/3.1.1/base/geometryPrimitives.xsd"
  
  [ERROR] Two declarations cause a collision in the ObjectFactory class.
   line 206 of "http://schemas.opengis.net/gml/3.1.1/base/defaultStyle.xsd"
  
  [ERROR] (Related to above error) This is the other declaration.   
   line 225 of "http://schemas.opengis.net/gml/3.1.1/base/defaultStyle.xsd"
  
  [ERROR] Two declarations cause a collision in the ObjectFactory class.
   line 287 of "http://schemas.opengis.net/gml/3.1.1/base/geometryBasic0d1d.xsd"
  </code></pre>
  
  <p>What am I doing wrong?</p>