Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Higher order transformation
Higher order transformation [message #1062391] Fri, 07 June 2013 14:00 Go to next message
Michal Kleczek is currently offline Michal KleczekFriend
Messages: 31
Registered: May 2013
Member
Hi,
I have several metamodels imported from XML schemas. I would like to use XML extractor to save models conforming to those metamodels to XML files.
But I do not want to define a transformation for each of the metamodels. The rules to transform to XML metamodel are actually all the same and are based on information in the metamodels.
Is it possible to create a single transformation that would do that. Something like:

create OUT : XML from METAIN : ECORE, IN : METAIN;
...


Thanks,
Michal
Re: Higher order transformation [message #1062428 is a reply to message #1062391] Fri, 07 June 2013 16:08 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

If your metamodel (in Ecore) has been directly created from an XML schema, then EMF itself is already able to import corresponding XML documents as models and to export back such models as XML documents.
You should take a look to the EMF documentation to get more info about this.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Higher order transformation [message #1062547 is a reply to message #1062428] Sat, 08 June 2013 16:48 Go to previous messageGo to next message
Michal Kleczek is currently offline Michal KleczekFriend
Messages: 31
Registered: May 2013
Member
Hugo Bruneliere wrote on Fri, 07 June 2013 12:08
Hello,

If your metamodel (in Ecore) has been directly created from an XML schema, then EMF itself is already able to import corresponding XML documents as models and to export back such models as XML documents.
You should take a look to the EMF documentation to get more info about this.


The problem really is I could not find any way to automate loading/saving instance documents (eg. an ant task).
Re: Higher order transformation [message #1062676 is a reply to message #1062547] Mon, 10 June 2013 10:51 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

You could do this via Java code to automate the full process/chain.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:Change Source Element
Next Topic:ArrayIndexOutOfBoundsException with ->at(1) although size is 2
Goto Forum:
  


Current Time: Fri Apr 19 04:48:12 GMT 2024

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

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

Back to the top