In my xsd schema, I have a complexType "expression" which has 27 elements and all of them extend a common complexType "StepElement". Here is a sample of the expression complexType.(For simplicity, I'm only showing 8 of them.)
<xs:complexType name="expression">
<xs:sequence maxOccurs="unbounded">
<xs:element name="STEP_ANIMATION" type="Animation_Attributes" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="STEP_EXPECT_REPLY" type="Expect_Reply_Attributes" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="STEP_RESTART" type="Restart_Attributes" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="STEP_REDIRECT" type="Redirect_Attributes" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="STEP_SUBGOAL" type="Subgoal_Attributes" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="STEP_TIMER" type="Timer_Attributes" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="STEP_SITUATION" type="Situation_Attributes" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="STEP_SOUND" type="Sound_Attributes" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="ID" type="xs:integer"/>
<xs:attribute name="SUCCESS_EVT" type="xs:string"/>
<xs:attribute name="DELAY" type="xs:float"/>
</xs:complexType>
Where each of these element types look like this (They all extend StepElement but have different attributes)
<xs:complexType name="Animation_Attributes">
<xs:complexContent>
<xs:extension base="StepElement">
<xs:attribute name="AGENT" type="xs:string" default="$CURRENTBOT"/>
<xs:attribute name="SUCCESS_EVT" type="xs:string"/>
<xs:attribute name="FAIL_EVT" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
And here is how the StepElement looks like
<xs:complexType name="StepElement">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="ID" type="xs:integer"/>
<xs:attribute name="ENGLISH" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
Now the problem that I have is that when I parse this schema, the getter method that the JAXB generates in Expression class is this
public List<StepElement> getSTEPANIMATIONAndSTEPEXPECTREPLYAndSTEPRESTART()
Am I doing something wrong in the schema structure that is causing this to happen OR is there a solution to tweak the method name?