Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Re: Ecore model from a XML model - not from a XML Schema!
Re: Ecore model from a XML model - not from a XML Schema! [message #495755] Thu, 05 November 2009 21:57 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Ana,

You're even less likely to get help about this on the newcomers
newsgroup than the EMF one. Did you follow the instructions I gave you
previous. I've added theM2M newsgroup/forum to the reply because that's
the place to ask about ATL. Normally you should prefix the subject with
[ATL] because it's a shared newsgroup.


aninha.mainhardt@gmail.com wrote:
> Hello folks!
>
> I'm a beginner in ATL, so I'm having a little trouble... I have a XML
> file and my goal is to make an ATL Transformation that uses it as an
> entry model. This XML file conforms to a specific XML Schema.
>
> To reach my goal I need to obtain an entry Ecore metamodel for my
> entry model, that is, for the XML file. I thought that it would be
> enough to generate an Ecore metamodel from the XML Schema, so I
> created an EMF Project, and choosed to obtain my Ecore metamodel from
> my XSD. Then, when I tried to run my ATL transformation using the
> entry metamodel that I got and the XML file as an entry model, it
> didn't work: there was no conformity between the entry model and
> metamodel!
>
> Is the only solution to make a transformation in my entry model (the
> XML file) to get a new entry model that conforms with the metamodel
> generated based in the XSD, or is there an easier way to use directly
> my XML file as an entry model in my ATL Transformation? I.e., do I
> need to transform my XML file and then use the result in my ATL
> Transformation, or do I need to change the metamodel that I got so
> that the conformity model-metamodel is satisfied?
>
> Please help! Thank you a lot!!!
>


Ed Merks
Professional Support: https://www.macromodeling.com/
[ATL] Re: Ecore model from a XML model - not from a XML Schema! [message #495817 is a reply to message #495755] Fri, 06 November 2009 09:08 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040609010309020208070302
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

Answers below:

Ed Merks a écrit :
> Ana,
>
> You're even less likely to get help about this on the newcomers
> newsgroup than the EMF one. Did you follow the instructions I gave you
> previous. I've added theM2M newsgroup/forum to the reply because that's
> the place to ask about ATL. Normally you should prefix the subject with
> [ATL] because it's a shared newsgroup.
>
>
> aninha.mainhardt@gmail.com wrote:
>> Hello folks!
>>
>> I'm a beginner in ATL, so I'm having a little trouble... I have a XML
>> file and my goal is to make an ATL Transformation that uses it as an
>> entry model. This XML file conforms to a specific XML Schema.
>>
>> To reach my goal I need to obtain an entry Ecore metamodel for my
>> entry model, that is, for the XML file. I thought that it would be
>> enough to generate an Ecore metamodel from the XML Schema, so I
>> created an EMF Project, and choosed to obtain my Ecore metamodel from
>> my XSD. Then, when I tried to run my ATL transformation using the
>> entry metamodel that I got and the XML file as an entry model, it
>> didn't work: there was no conformity between the entry model and
>> metamodel!
>>

Before doing anything with the xml file, you must ensure it can be read
by EMF. Here are the steps, you ever did some of them but let's check again:
- create the EMF Project, base on the XMLSchema. Also generate .edit and
..editor plugins
- export them as plugins and install them
- try to open the xml file using the previously generated editor.
Validate, fix errors...

>> Is the only solution to make a transformation in my entry model (the
>> XML file) to get a new entry model that conforms with the metamodel
>> generated based in the XSD,

Normally you don't have to do that, if your XML file conforms to the Schema.

Best Regards,

William

>> or is there an easier way to use directly
>> my XML file as an entry model in my ATL Transformation? I.e., do I
>> need to transform my XML file and then use the result in my ATL
>> Transformation, or do I need to change the metamodel that I got so
>> that the conformity model-metamodel is satisfied?
>>
>> Please help! Thank you a lot!!!
>>

--
Ne manquez pas notre prochaine formation ATL inter entreprises:
ATL - Paris - du 2 au 3 Décembre 2009
Pour plus de dates et pour le détail de cette formation:
http://www.obeo.fr/pages/formations/fr

Don't forget our next ATL training:
ATL - Paris - 2009 December from 2th to 3th
More dates and training program on:
http://www.obeo.fr/pages/formations/fr

--------------040609010309020208070302
Content-Type: text/x-vcard; charset=utf-8;
name="william_piers.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="william_piers.vcf"

YmVnaW46dmNhcmQNCmZuOldpbGxpYW0gUGllcnMNCm46UGllcnM7V2lsbGlh bQ0Kb3JnOk9i
ZW8NCmFkcjoyIHJ1ZSBSb2JlcnQgU2NodW1hbm47O2xvdCAyNDtOQU5URVM7 OzQ0NDA4O0Zy
YW5jZQ0KZW1haWw7aW50ZXJuZXQ6d2lsbGlhbS5waWVyc0BvYmVvLmZyDQp0 aXRsZTpNREEg
Q29uc3VsdGFudA0KdGVsO3dvcms6KzMzICgwKTIgNTEgMTMgNTAgNTMNCnVy bDpodHRwOi8v
d3d3Lm9iZW8uZnINCnZlcnNpb246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------040609010309020208070302--
icon14.gif  Re: [ATL] Re: Ecore model from a XML model - not from a XML Schema! [message #496432 is a reply to message #495817] Tue, 10 November 2009 05:04 Go to previous message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 9
Registered: November 2009
Junior Member
Thank you very much William!

The steps that you gave me really helped a lot... Due to my lack of knowledge I didn't realize that the generated editor would be necessary in order to make the XML model be recognized by the Ecore metamodel obtained from the XSD.

Best regards,
Ana

(Ed, sorry for the misunderstanding in the newsgroup..)
Previous Topic:[Help] QVT for beginners
Next Topic:[QVTO]
Goto Forum:
  


Current Time: Fri Mar 29 07:47:46 GMT 2024

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

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

Back to the top