I have the following xsd (I only post the relevant part here but the command was run against this excerpt, too)
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:complexType name="OptionType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:string" name="name" use="optional"/>
<xs:attribute type="xs:string" name="value" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="ControllableType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute type="xs:float" name="value" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>
I run the following command against it:
xjc src/main/resources/session.xsd -p org.myorg.mypackage -d src/main/java/org/myorg/mypackage
I get the following error:
[ERROR] Property "Value" is already defined. Use <jaxb:property> to resolve this conflict.
line 39 of jar:file:/usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar!/com/sun/xml/internal/xsom/impl/parser/datatypes.xsd
[ERROR] The following location is relevant to the above error
line 14 of file:/home/user/project/src/main/resources/session.xsd
[ERROR] Property "Value" is already defined. Use <jaxb:property> to resolve this conflict.
line 39 of jar:file:/usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar!/com/sun/xml/internal/xsom/impl/parser/datatypes.xsd
[ERROR] The following location is relevant to the above error
line 7 of file:/home/user/project/src/main/resources/session.xsd
Failed to parse a schema.
I read something about bindings here:
Symbol is already defined. Use JAXB property to resolve the conflict
JAXB Compiling Issue - [ERROR] Property "Any" is already defined
But why is this even needed? Isn't the attribute fully qualified and unique by XML element name combined with the attribute name?
Like "OptionType.value" or "ControllableType.value"