Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » M2T transformation (UML2XML)
M2T transformation (UML2XML) [message #1745412] Mon, 10 October 2016 13:26 Go to next message
Raoudha Saida is currently offline Raoudha SaidaFriend
Messages: 41
Registered: June 2016
Member
Hi,
I'am a beginner in acceleo .
In fact I want to generate an xml file from a uml model by using acceleo but I don't know how can I write the acceleo template.
I tried this attached template but I don't know if it is right.
You find attached an exemple from my model, acceleo template and transformation rules(MARTE profile--> Castalia simulator).
Can one please help me to correct my work.
Thank you in advance.

[Updated on: Mon, 10 October 2016 13:27]

Report message to a moderator

Re: M2T transformation (UML2XML) [message #1745417 is a reply to message #1745412] Mon, 10 October 2016 14:06 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

A UML file is already an XML file so no transformation is needed.

Acceleo is an M2T tool which is good for text output but a bit mad for disciplined XML output for which a metamodel allows an M2M tool to generate what you want without worrying about matching tags etc.

Regards

Ed Willink
Re: M2T transformation (UML2XML) [message #1745419 is a reply to message #1745417] Mon, 10 October 2016 14:16 Go to previous messageGo to next message
Raoudha Saida is currently offline Raoudha SaidaFriend
Messages: 41
Registered: June 2016
Member
Thanks Ed Willink for your quick reply.

So how can I define transformation rules from my model based on MARTE profile to my simulator (castalia)?
Re: M2T transformation (UML2XML) [message #1748592 is a reply to message #1745419] Thu, 24 November 2016 23:18 Go to previous messageGo to next message
Henri Boucher is currently offline Henri BoucherFriend
Messages: 56
Registered: September 2015
Member
Hi Ed,

I'm considering using acceleo to produce JavaFX XML files (.fxml) from my model instance. I'd use M2M but I don't know where to find a metamodel for JavaFX. Any suggestions?

Cheers.
Re: M2T transformation (UML2XML) [message #1748610 is a reply to message #1748592] Fri, 25 November 2016 09:22 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Producing XML using M2T is obviously possible, but quite mad. You will find that it is much easier to develop your own JavaFX model if you cannot find one than synthesize XML. Have a look at Modisco to see if they have anything helpful.

Regards

Ed Willink
Re: M2T transformation (UML2XML) [message #1748611 is a reply to message #1748610] Fri, 25 November 2016 09:24 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Googling "JavaFX Ecore" offers some promising hits.

Regards

Ed Willink
Re: M2T transformation (UML2XML) [message #1748685 is a reply to message #1748611] Sat, 26 November 2016 19:26 Go to previous messageGo to next message
Henri Boucher is currently offline Henri BoucherFriend
Messages: 56
Registered: September 2015
Member
Hi Ed,

I took a quick look at Modisco. I also checked out the first few hits out of 10,100 google results. I then narrowed the search by googling "javafx.ecore" including the quotes. Just two hits, one being this topic. Nothing promising stands out.

W3C's XSLT combined with their XPath provide functionality similar to Acceleo, albeit much older (1998 vs 2006). The first sentence along with the box on the right in this wikipedia page are relevant to this discussion. Any chance XSLT's XML output functionality could be ported to Acceleo?

If not, I may have to be mad!

Best regards,
Henri
Re: M2T transformation (UML2XML) [message #1748689 is a reply to message #1748685] Sun, 27 November 2016 00:11 Go to previous messageGo to next message
Henri Boucher is currently offline Henri BoucherFriend
Messages: 56
Registered: September 2015
Member
Hi Ed,

Just so you get the full story, I started this topic before joining this one. There's an explanation for the lack of a schema in the post dated Sat, 26 November 2016 16:56.

Henri.
Re: M2T transformation (UML2XML) [message #1748703 is a reply to message #1748689] Sun, 27 November 2016 11:42 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Another option would be to try Epsilons' M2M language (ETL) which supports both EMF models and schema-less XML documents [1, 2] as inputs/outputs of transformations.

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/plain-xml/
[2] https://www.eclipse.org/epsilon/examples/index.php?example=org.eclipse.epsilon.examples.rss2atom
Re: M2T transformation (UML2XML) [message #1748728 is a reply to message #1748703] Mon, 28 November 2016 00:27 Go to previous message
Henri Boucher is currently offline Henri BoucherFriend
Messages: 56
Registered: September 2015
Member
Thanks Ed and Dimitris.
Previous Topic:[Acceleo] Problem starting Acceleo from within Magicdraw Plugin
Next Topic:Cross-reference not found
Goto Forum:
  


Current Time: Tue Apr 16 14:05:50 GMT 2024

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

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

Back to the top