I use maven with jaxb to make classes out from a schema. This schema has the following choice:
<tns:choice minOccurs="1" maxOccurs="unbounded">
<tns:element name="video_track" type="tcore:TTrack" minOccurs="1" maxOccurs="1"/>
<tns:element name="audio_track" type="tcore:TTrack" minOccurs="1" maxOccurs="1"/>
</tns:choice>
The meening is, we want a list with x audiotracks and/or x videotracks. We need at least one of an audio or a video track!
When I generate classes with this choice I get the following code:
@XmlElementRefs({
@XmlElementRef(name = "audio_track", type = JAXBElement.class),
@XmlElementRef(name = "video_track", type = JAXBElement.class)
})
protected List<JAXBElement<TTrack>> videoTrackOrAudioTrack;
This is not what we want. I think I loose informations because with the list of TTracks I don't know if this is a video or an audio.
So what am I doing wrong here?
In maven I use org.jvnet.jaxb2.maven2 version 0.8.3