Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » XML creation during ETL
XML creation during ETL [message #1735558] Tue, 21 June 2016 07:35 Go to next message
crothy donald is currently offline crothy donaldFriend
Messages: 31
Registered: September 2013
Member
Hi everyone,

in short, my usecase is:
-> source is EMF ecore model, XML resource
-> target is plain XML

My output (target) will be a XML file created by scratch. Inspired by the plain XML example, I start coding my transformation, but I didn't get to far...

My problems are:
1) I was not able to create the root xml node within the pre block
pre {
'Running EMF2XML transformation ...'.println();

XMLDoc.root := new t_library;
}

results in
Type 't_library' not found

2) How to specify new xml types within the rule declaration?

I am afraid, I cannot use ETL to generate XML documents from scratch. Can anybody confirm or deny? Any other examples, projects, documentation.

Best regards
Re: XML creation during ETL [message #1735577 is a reply to message #1735558] Tue, 21 June 2016 09:57 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1595
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Could you please share a minimal example we can use to reproduce this?

https://www.eclipse.org/epsilon/doc/articles/minimal-examples/

Cheers,
Dimitris
Re: XML creation during ETL [message #1735605 is a reply to message #1735577] Tue, 21 June 2016 12:12 Go to previous messageGo to next message
crothy donald is currently offline crothy donaldFriend
Messages: 31
Registered: September 2013
Member
Hi Dimitris,

of course.
1) I took the Tree.ecore you provided with the Tree.xmi (TreeA->TreeB->TreeC) as input
2) Output will be a new XML, generated by scratch. My goal is to tranform any Tree instance within the Tree.xmi into a new XML Tag named "XMLTree"

Here the transformation, I try to generate a new XML Tag "xmlTree"
pre {
	'Running Tree2XML transformation ...'.println();

	XMLDoc.root := new t_XmlTree;
}


Here is the launch config:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.epsilon.etl.eclipse.dt.launching.EtlLaunchConfigurationDelegate">
<booleanAttribute key="fine_grained_profiling" value="false"/>
<listAttribute key="models">
<listEntry value="#Tue Jun 21 14:02:27 CEST 2016 isMetamodelFileBased=false name=Tree readOnLoad=true storeOnDisposal=false aliases= cached=true fileBasedMetamodelUri= metamodelUri=TreeDsl modelUri=platform\:/resource/udm.epsilon.transformation/models/Tree.xmi reuseUnmodifiedFileBasedMetamodels=true type=EMF modelFile=/udm.epsilon.transformation/models/Tree.xmi expand=true metamodelFile="/>
<listEntry value="#Tue Jun 21 14:03:18 CEST 2016 name=XMLDoc readOnLoad=false storeOnDisposal=true aliases= uri= cached=true file=/udm.epsilon.transformation/models/tree2xml.xml fileBased=true type=PlainXML"/>
</listAttribute>
<listAttribute key="parameters"/>
<booleanAttribute key="profile_model_loading" value="false"/>
<booleanAttribute key="profiling_enabled" value="false"/>
<booleanAttribute key="reset_profiler" value="false"/>
<stringAttribute key="source" value="/udm.epsilon.transformation/etl/tree2xml.etl"/>
</launchConfiguration>



Re: XML creation during ETL [message #1735610 is a reply to message #1735605] Tue, 21 June 2016 12:30 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1595
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Since you're working with two models, you'll need to qualify type names i.e.

XMLDoc.root := new XMLDoc!t_XmlTree;


Cheers,
Dimitris
Re: XML creation during ETL [message #1735629 is a reply to message #1735610] Tue, 21 June 2016 13:35 Go to previous message
crothy donald is currently offline crothy donaldFriend
Messages: 31
Registered: September 2013
Member
Hi Dimitris,

thank you for the quick reply. It works now.
Previous Topic:EVL integration in UML2 Tools
Next Topic:[EVL live validation not done]
Goto Forum:
  


Current Time: Sat Oct 20 02:50:55 GMT 2018

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

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

Back to the top