Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [ETL]" Feature 'XXX' not found" when trying to load XML file backed by XSD
[ETL]" Feature 'XXX' not found" when trying to load XML file backed by XSD [message #1759142] Thu, 06 April 2017 20:52 Go to next message
kwnstantinos kapantais is currently offline kwnstantinos kapantaisFriend
Messages: 2
Registered: April 2017
Junior Member
i'm trying to do a bi-directional transformation between two languages using ETL

the first language is defined by an ecore metamodel and the second is defined by a XSD

my goal is to first do a M2M transformation from the first ecore based language to second xsd based language and then take the produced xml file from that transformation and do the opposite M2M transformation

So the source file--->target file will be
1).xmi(.model)----->xml
2)xml----->.xmi(.model)

for the first M2M everything's working perfectly and i get a xml file as i expected but when i try to load the xml file back and do the second M2M transformation i just get
" Feature 'XXX' not found" at the root element of that file.

i found that the problem is that the root element has the namespace defined in xsd(correctly). when i manually remove the namespace from the root element the parsing continue properly but then etl file cannot locate the root element in the rules for the transformation. But in the real case scenario of my project the xml file that i have to use must have a namespace(the xml file is ws-agreement xml file)

i have set a minimal example using the example of Tree2Graph but now i construct a simple xsd defining graph model, but i keep Tree.ecore and Tree.model as the example.

as i say the first transformation is done correctly.when i take the produced xml file and try to load it to begin the second transformation i get the mentioned error

in the minimal example i set two Main classes to do the transformations just as standalone example. Each class uses different files so feel free to try running both without reset the files to initial condition

i have find solutions to a lot of my problems from topics
such as :
https://www.eclipse.org/forums/index.php/t/1083635/


but i cannot find any solution to this problem

my knowledge of EMF is limited that's why i decided to use Epsilon and ETL for my cause so sorry if this is a dummy question


Re: [ETL]" Feature 'XXX' not found" when trying to load XML file backed by XSD [message #1759246 is a reply to message #1759142] Sat, 08 April 2017 13:58 Go to previous messageGo to next message
kwnstantinos kapantais is currently offline kwnstantinos kapantaisFriend
Messages: 2
Registered: April 2017
Junior Member
i manage to find the solution after all. my mistake was that i was just creating a GraphType EObject and then treated it as it was the root element. But when i created a DocumentRoot element and then put that GraphType into attribute of the DocumentRoot named graph everything is ok so i change the code at demo.etl from
pre{
var g:new example!GraphType;
}


to that
pre{
var root:new example!DocumentRoot;
var g:new example!GraphType;
root.graph=g;
}
Re: [ETL]" Feature 'XXX' not found" when trying to load XML file backed by XSD [message #1759260 is a reply to message #1759246] Sun, 09 April 2017 07:55 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1484
Registered: July 2009
Location: York, UK
Senior Member

Many thanks for sharing your solution!

Cheers,
Dimitris
Previous Topic:Install Epsilon on an offline eclipse
Next Topic:Quick fixes customization
Goto Forum:
  


Current Time: Mon Nov 20 06:11:18 GMT 2017

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

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