Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[ATL] Load the genmodel instead of the Ecore file?
https://www.eclipse.org/forums/index.php/mv/msg/628105/1219863/#msg_1219863
The models used have been generated from several XML schema definitions (XSD files), with a top-level one that imports the other ones. A seperate Ecore file is created for each of the XSDs, but there is only a single genmodel for all of them.
I would prefer to load that single genmodel to the ATL transformation instead of several Ecore models, especially because I encounter problems when trying to put child model elements to the top-level model (described in earlier threads: 'containment references cannot span across models').
Of course, I have tested loading the genmodel, but it does not work:
Package with uri 'http://com.customer.dat/modeltransformation/1.0' not found.
Anything I should change to get that done? Thanks for any idea.]]>Gunnar Arndt2013-12-06T10:42:54-00:00Re: [ATL] Load the genmodel instead of the Ecore file?
https://www.eclipse.org/forums/index.php/mv/msg/628105/1219913/#msg_1219913
Have you set the launching option "Allow inter-model references" to true?
Concerning the loading of metamodel(s): if you load an Ecore model referencing other ones, they should be loaded too by ATL.
If not working on the genmodel for any reason, a workaround would be to create artificially a new Ecore model simply referencing all your Ecore models generated from the XSDs.]]>Hugo Bruneliere2013-12-06T16:53:04-00:00Re: [ATL] Load the genmodel instead of the Ecore file?
https://www.eclipse.org/forums/index.php/mv/msg/628105/1220031/#msg_1220031
that seems to be exactly the solution I have finally found Friday evening.
I had imported the Ecore model from an XSD which imports several other XSDs. Eclipse created several Ecore models from that, and a genmodel which imports all the Ecore models. When I looked closer at the Ecore models, I noticed that they do not have any knowledge of each other, so I copied the packages from the extending Ecore packages into the package of the root Ecore model.
Now, ATL loads everything I need from a single Ecore model (i.e., that model and all its extensions).
I am curious about the other members opinions on that fact: Would you consider that behavior a bug of EMF's XSD importer?
I think that a relationship of several imported XSDs should be represented not only in the genmodel, but in the Ecore, too.]]>Gunnar Arndt2013-12-09T09:05:14-00:00