[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.m2m] question to modelmodification with ATL
|
- From: musich@xxxxxx (musich)
- Date: Tue, 8 Jul 2008 13:11:13 +0000 (UTC)
- Newsgroups: eclipse.modeling.m2m
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I'm trying do a Modelmodification with ATL, but I do not know how can I
insert a new instance of input model element to output model.
Can Anyone help me?
for example:
my metamodel is the following:
<?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:ecore="http://www.eclipse.org/emf/2002/Ecore">
<ecore:EPackage name="Author">
<eClassifiers xsi:type="ecore:EClass" name="Author">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
ordered="false" unique="false" lowerBound="1" eType="/1/String"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="surname"
ordered="false" unique="false" lowerBound="1" eType="/1/String"/>
</eClassifiers>
</ecore:EPackage>
<ecore:EPackage name="PrimitiveTypes">
<eClassifiers xsi:type="ecore:EDataType" name="String"/>
</ecore:EPackage>
</xmi:XMI>
my inputmodel:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns="Author">
<Author name="David" surname="Touzet"/>
<Author name="tobias" surname="zimmerman"/>
</xmi:XMI>
how can I get this outputmodel ?
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns="Author">
<Author name="David" surname="Touzet"/>
<Author name="Tobias" surname="zimmerman"/>
<Author name="Tomas" surname="Hering"/>
</xmi:XMI>