About Family2Person Transformation [message #1792153] |
Thu, 12 July 2018 04:24  |
Eclipse User |
|
|
|
Dear All,
I was trying to transform Family2Person in QVTo. But as I am new, I am facing multiple problems. Someone, please help me.
Here is my input model:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:Families="http://ashraf.families"
xsi:schemaLocation="http://ashraf.families Families.ecore">
<Families:Family lastName="March">
<father firstName="Jim"/>
<mother firstName="Cindy"/>
<sons firstName="Brandon"/>
<daughters firstName="Brenda"/>
<daughters firstName="Jen"/>
</Families:Family>
<Families:Family lastName="Sailor">
<father firstName="Peter"/>
<mother firstName="Jackie"/>
<sons firstName="David"/>
<sons firstName="Dylan"/>
<daughters firstName="Kelly"/>
</Families:Family>
</xmi:XMI>
Output Model:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ashraf.persons="http://ashraf.persons">
<ashraf.persons:Female fullName="Cindy March"/>
<ashraf.persons:Female fullName="Brenda March"/>
<ashraf.persons:Female fullName="Jen March"/>
<ashraf.persons:Female fullName="Jackie Sailor"/>
<ashraf.persons:Female fullName="Kelly Sailor"/>
<ashraf.persons:Male fullName="Jim March"/>
<ashraf.persons:Male fullName="Brandon March"/>
<ashraf.persons:Male fullName="Peter Sailor"/>
<ashraf.persons:Male fullName="David Sailor"/>
<ashraf.persons:Male fullName="Dylan Sailor"/>
</xmi:XMI>
My problem is, I cannot iterate to father, mother, daughters, and sons, to get the full name. It overwrites one another.
I tried several ways but nothing works.
Someone, please help me to get the solution. Thank you.
I attached my project here.
Attachment: F2PQvto.zip
(Size: 3.96KB, Downloaded 269 times)
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08981 seconds