Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » re-creating ecore model from EMF exported XSD
re-creating ecore model from EMF exported XSD [message #1774053] Mon, 09 October 2017 21:55 Go to next message
Cedric Gava is currently offline Cedric GavaFriend
Messages: 53
Registered: July 2009
Member
Hello

this topic has some points in common with #1072206, but we are not in the same context.
Here is the context:
We must import XML data from customer, who gives us the XSD... OK
But when I take a look at the XSD files, surprise, I see clear evidences of EMF (Ecore.XSD, EcoreXMI.xsd, and XMI.xsd).

<xsd:schema xmlns:Core="http://www.toto.com/icd/core/5.0.3" xmlns:dmp="http://www.toto.com/dmp/5.0.3" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.toto.com/icd/core/5.0.3">


Since the files are serialized with default eclipse XMI serializer, I guess that the XSD structure is recreated to "mimic" the XMI serialization.

So my question is : What is the best way to recreate the ecore mmodels from the XSD ?
Is the feature already existing in eclipse ?
Or an XSLT somewhere that do the job ?
Import the XSD like any other XSD ?

Thank your for your advices.

BR


sooo lonely friends of eclipse on forum
http://www.eclipse.org/donate/images/friendslogo160.jpg
Re: re-creating ecore model from EMF exported XSD [message #1774305 is a reply to message #1774053] Thu, 12 October 2017 14:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Can't you ask the customer for the Ecore model. You could try to create an new Ecore project using the XML Schema importer and hope there is enough information in the *.xsd they give you to recover the *.ecore they're really using, but of course you're better of with their *.ecore...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: re-creating ecore model from EMF exported XSD [message #1774322 is a reply to message #1774305] Thu, 12 October 2017 20:15 Go to previous messageGo to next message
Cedric Gava is currently offline Cedric GavaFriend
Messages: 53
Registered: July 2009
Member
Hello ed.

Thank you for your answer, now I am I sure that the export from ecore to xsd is not bijective, and the re-import may need engineering know-how if we don't have the .ecore file.

Thank for the support
Hope you are fine

Cheers


sooo lonely friends of eclipse on forum
http://www.eclipse.org/donate/images/friendslogo160.jpg
Re: re-creating ecore model from EMF exported XSD [message #1774340 is a reply to message #1774322] Fri, 13 October 2017 06:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
We do generally try generate enough ecore:* annotation so that Ecore -> XSD -> Ecore doesn't lose information, so you can give it a try...

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:MappingSet Issue
Next Topic:Genmodel to xsd, xsd to c# classes
Goto Forum:
  


Current Time: Thu Apr 18 07:03:10 GMT 2024

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

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

Back to the top