Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » XSD » XML-Reader to ecore-mapping fails(using XML-Reader fails to read model correctly)
XML-Reader to ecore-mapping fails [message #690273] Wed, 29 June 2011 09:56
Frank Wiedemann is currently offline Frank WiedemannFriend
Messages: 5
Registered: July 2009
Junior Member
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:

<xs:element name="CHOICE">
		<xs:element ecore:name="id" name="ID" type="ID1"/>
		  <xs:element ref="DOT"/>
		  <xs:element ecore:name="choiceId" name="ID" type="ID1"/>
		<xs:element ref="MEMBERS"/>

Original xml-File

xml-File written by "org.eclipse.xtend.typesystem.xsd.XMLWriter"

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

Previous Topic:xmi to database
Next Topic:xml validation does not use latest xsd
Goto Forum:

Current Time: Fri Feb 21 16:51:36 GMT 2020

Powered by FUDForum. Page generated in 0.01732 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top