Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] generate XML
[QVTo] generate XML [message #630596] Mon, 04 October 2010 11:04 Go to next message
2bro2b is currently offline 2bro2bFriend
Messages: 12
Registered: August 2010
Junior Member
Hi all,

i have a general question about M2M Transformation:
I transform a source-model which conforms to an Ecore-metamodel (A) to a output-model which conforms to an Ecore-Metamodel (B).
The Ecore-metamodel B was generated by importing a XSD with EMF's model importer.
Now QVT serializes the output model as XMI, but the objective is to produce XML files.
Do i have to implement another transformation wich transforms the XMI Output Files to XML Files which conform to the XSD ? Or is there some kind of "exporter" that can generate XML files ?

thanks in advance
Re: [QVTo] generate XML [message #630612 is a reply to message #630596] Mon, 04 October 2010 11:25 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6437
Registered: July 2009
Senior Member
Hi

This seems like a bug.

I think genmodel could have created a special XxxResource(Impl) and
XxxResourceFactory(Impl) for your Xxx meta-model. Has it?

If you use the corresponding *.xxx file name, QVTo could use the
XxxResourceFactory(Impl) which could set the save options to serialize
correctly. Are you using *.xxx?

Regards

Ed Willink


On 04/10/2010 12:04, 2bro2b wrote:
> Hi all,
>
> i have a general question about M2M Transformation:
> I transform a source-model which conforms to an Ecore-metamodel (A) to a
> output-model which conforms to an Ecore-Metamodel (B).
> The Ecore-metamodel B was generated by importing a XSD with EMF's model
> importer.
> Now QVT serializes the output model as XMI, but the objective is to
> produce XML files.
> Do i have to implement another transformation wich transforms the XMI
> Output Files to XML Files which conform to the XSD ? Or is there some
> kind of "exporter" that can generate XML files ?
>
> thanks in advance
>
Re: [QVTo] generate XML [message #630618 is a reply to message #630612] Mon, 04 October 2010 12:06 Go to previous messageGo to next message
2bro2b is currently offline 2bro2bFriend
Messages: 12
Registered: August 2010
Junior Member
Yes xxxResourceFactoryImpl and xxxResourceImpl are generated from the genmodel. I deployed the project as plugin and use it as output metamodel of the qvt-transformation.

> If you use the corresponding *.xxx file name, QVTo could use the
> XxxResourceFactory(Impl) which could set the save options to
> serialize correctly. Are you using *.xxx?

I don´t realy understand that part. Do i have to modify the XxxResourceFactory(Impl) in order to tell QVT the serialization format ?
Re: [QVTo] generate XML [message #630690 is a reply to message #630618] Mon, 04 October 2010 15:00 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6437
Registered: July 2009
Senior Member
Hi

I've not used XSD configuration, so my answers are just based on what I
would expect to work.

Normally during a save, a map of saveOptions should be merged, one from
the code invoking save and one from the ResourceFactory enabling the
ResourceFactory to ensure that whatever is needed for XSD is done.

I would try using the Sample Ecore Editor to Create a Dynamic Instance
of a class in your meta-model and see whether the saved instance looks
good. If so, the ResourceFactory is working, and you need to find out
why QVTo is not invoking Resource.save correctly. If not, read the EMF
book to find out how XSD save is supposed to work.

HTH

Ed

On 04/10/2010 13:06, 2bro2b wrote:
> Yes xxxResourceFactoryImpl and xxxResourceImpl are generated from the
> genmodel. I deployed the project as plugin and use it as output
> metamodel of the qvt-transformation.
>
>> If you use the corresponding *.xxx file name, QVTo could use the
>> XxxResourceFactory(Impl) which could set the save options to serialize
>> correctly. Are you using *.xxx?
>
> I don´t realy understand that part. Do i have to modify the
> XxxResourceFactory(Impl) in order to tell QVT the serialization format ?
Re: [QVTo] generate XML [message #630823 is a reply to message #630690] Tue, 05 October 2010 08:02 Go to previous message
2bro2b is currently offline 2bro2bFriend
Messages: 12
Registered: August 2010
Junior Member
ok that´s all a bit clearer now.
thanks for your help
Previous Topic:Problem LLaunching Families2Persons Tutorial Project
Next Topic:[ATL] Passing a parameter to a transformation
Goto Forum:
  


Current Time: Mon Aug 19 03:24:49 GMT 2019

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

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

Back to the top