After i Inject the XML using the AM3, the created model or XMI does not conform the XMI model [message #685992] |
Tue, 21 June 2011 06:05  |
Eclipse User |
|
|
|
HI All,
I am currently working on model to model transformation using ATL. I am trying to make two way transformation where both the source and target models are represented in XML Schema and XML. for the sake of compatibility, i inject the source XML model using AM3 injector in order to create the ecore model which is represented in XMI. However, after i made this transformation i find out that the XMI model does not conform the metamodel, which is source metamodel, but to the XML model which is general. So i find additional attributes called startLine, startColumn etc in the created XMI model. So when i try to make the model to model transformation i find out that the model does not conform to the given meta model. and i really need it to be conformed. I come to the thought that may be i can use both the XML and my metamodel as input metamodels, but i am not sure whether it will work or not. If you think this can solve my problem how can i make transformation from two input metamodels? If this does not work, what do you suggest me to do, in order to make the XMI model conformed to its metamodel, which is my project metamodel.
I really appreciate fast reply,
thanks in advance,
emwedish
|
|
|
Re: After i Inject the XML using the AM3, the created model or XMI does not conform the XMI model [message #691267 is a reply to message #685992] |
Fri, 01 July 2011 02:26  |
Eclipse User |
|
|
|
If there is any one who wants why it did not conform, here i got the solution. It is true the injected XML can not conform to the source meta model, because it needs one more transformation. Here is the process, first we inject our model and we got model.xmi. This model.xmi conforms to the XML meta model, therefore we need to make one more transformation to get the source model in XMI format. For the source model to get it in XMI format we need to use XML XMI model as source model and XML meta model as source metamodel and your source metamodel as target metamodel and write the ATL for this transformation. Then at the end you will able to get the source model in XMI format which conforms to the source metamodel.
|
|
|
Powered by
FUDForum. Page generated in 0.03605 seconds