Как обрабатывать элементы и атрибуты с одинаковыми именами в xsd при создании pojos с помощью jaxb?

У меня есть xsd, который содержит что-то вроде:

<xs:complexType>
  <xs:sequence minOccurs="0">
    <xs:element ref="HereIsTheProblem"/>
    <xs:element ref="blaBla"/>
  </xs:sequence>
  <xs:attribute name="something" type="xs:string" use="required">
    <xs:annotation/>
  </xs:attribute>
  <xs:attribute name="somethingElse" type="xs:string">
    <xs:annotation/>
  </xs:attribute>
  <xs:attribute name="HereIsTheProblem" type="xs:string">
    <xs:annotation/>
  </xs:attribute>
</xs:complexType>

теперь, когда я пытаюсь разобрать схему, используя jaxb для создания классов Java не удается:

[ERROR] Element "{http://something.somemorething.com/etc/}HereIsTheProblem" shows up in more than one properties.

как решить эту проблему, не внося никаких изменений в схему?

PS: моя версия jaxb — 2.1.13

6
задан Rahul Thakur 7 March 2012 в 08:36
поделиться