Using scalaxb 1.1.2 (http://scalaxb.org) on MusicXML (http://www.musicxml.com/for-developers/), I got the following snippet:
<xs:complexType name="part-list">
<xs:sequence>
<xs:group ref="part-group" minOccurs="0" maxOccurs="unbounded"/>
<xs:group ref="score-part"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="part-group"/>
<xs:group ref="score-part"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
This leads to a illegal inheritance:
trait DefaultGeneratedPartu45listFormat extends scalaxb.ElemNameParser[generated.Partu45list]
with GeneratedPartu45groupGroupFormat
with GeneratedScoreu45partGroupFormat
with GeneratedPartu45groupGroupFormat {
...
}
As you can see, the double inheritance of GeneratedPartu45groupGroupFormat
will make the compile unhappy.
So I have two questions:
Is there a way to workaround this issue by changing the XSD to something equivalent that scalaxb understands?
Is there a way to caonfigure scalaxb to handle that issue gratefully?
Here's a simple substitution you could do to parse the grammar that compiles:
Here's a quick sample XSD that can reproduce the issue:
Please file an issue on Github.