Skip to main content



      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 17:55 Go to next message
Eclipse UserFriend
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
Re: re-creating ecore model from EMF exported XSD [message #1774305 is a reply to message #1774053] Thu, 12 October 2017 10:16 Go to previous messageGo to next message
Eclipse UserFriend
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...
Re: re-creating ecore model from EMF exported XSD [message #1774322 is a reply to message #1774305] Thu, 12 October 2017 16:15 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: re-creating ecore model from EMF exported XSD [message #1774340 is a reply to message #1774322] Fri, 13 October 2017 02:09 Go to previous message
Eclipse UserFriend
We do generally try generate enough ecore:* annotation so that Ecore -> XSD -> Ecore doesn't lose information, so you can give it a try...
Previous Topic:MappingSet Issue
Next Topic:Genmodel to xsd, xsd to c# classes
Goto Forum:
  


Current Time: Wed Jul 02 20:03:46 EDT 2025

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

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

Back to the top