The XMLReader does not create a correct ecore-model:
I setup an mwe that reads a xml-File using with org.eclipse.xtend.typesystem.xsd.XMLReader. After that I wrote a xml-file with org.eclipse.xtend.typesystem.xsd.XMLWriter.
The ecore-model only contains an id-attribute which always contains the content of the second <ID>-element. The content of the first <ID>-element is always lost.
Here are snippets of the files:
xsd-file
<xs:element name="CHOICE">
<xs:complexType>
<xs:sequence>
<xs:element ecore:name="id" name="ID" type="ID1"/>
<xs:choice>
<xs:element ref="DOT"/>
<xs:element ecore:name="choiceId" name="ID" type="ID1"/>
</xs:choice>
<xs:element ref="MEMBERS"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Original xml-File
<CHOICE>
<ID>NameA</ID>
<ID>NameB</ID>
<MEMBERS>
...
</MEMBERS>
</CHOICE>
xml-File written by "org.eclipse.xtend.typesystem.xsd.XMLWriter"
<CHOICE>
<ID>NameB</ID>
<MEMBERS>
...
</MEMBERS>
</CHOICE>
can anyone help?
I expected two members. One with name id (with value of first <ID>-element) and one with name choiceId (with value of second <ID>-element).
Thanks in advance
Frank