Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Strange behaviour
[ATL] Strange behaviour [message #661392] Thu, 24 March 2011 09:55
aaaa  is currently offline aaaa
Messages: 1
Registered: March 2011
Junior Member
Tried to write simple ATL transformation.
Version: 3.1.2.v20110119-0755

--------Transformations-------------------

-- @path MM=/aa/UML.ecore
-- @path MM4=/aa/UML.ecore

module aaaa;
create OUT : MM4 from IN : MM;

rule modelis {
from s:MM!"UML::AuxiliaryConstructs::Models::Model" (s.name='Architecture')
to r:MM4!"UML::AuxiliaryConstructs::Models::Model" ( name<- s.name+'1' )
}

------------------Source model ---------------

<?xml version="1.0" encoding="ASCII"?>
<UML.AuxiliaryConstructs.Models:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:UML.AuxiliaryConstructs.Models="http:///UML/AuxiliaryConstructs/Models.ecore" xsi:schemaLocation="http:///UML/AuxiliaryConstructs/Models.ecore UML.ecore#//AuxiliaryConstructs/Models" uid="1111" name="Architecture"/>


-----------Target model -------------

<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:UML.AuxiliaryConstructs.Models="http:///UML/AuxiliaryConstructs/Models.ecore">
<UML.AuxiliaryConstructs.Models:Model name="Architecture1"/>
<UML.AuxiliaryConstructs.Models:Model name="Architecture1"/>
</xmi:XMI>

--------------------------------

Why there are two "models" ("Architecture1") in target, if there is only one ("Architecture") in source model?


Previous Topic:[ATL] possible Bug in ->sortedBy
Next Topic:[ATL] Call transformation from Java
Goto Forum:
  


Current Time: Thu Jul 31 11:38:33 EDT 2014

Powered by FUDForum. Page generated in 0.01779 seconds